Crea sito

Programming Archive

Ruby | How to print Prime Numbers

I will show you quickly how to find and print a N amount of Prime Numbers in Ruby . Here’s the code: def prime(n) for i in 1...(n) isPrime = true for j in 2...(i) if i % j == 0 isPrime = false break end end if isPrime puts i end end end prime(100)

How to Find length of a List in Haskell

Hi guys, in these weeks I’m studying Haskell and Functional Programming in general and since I’m finding this language very interesting and funny I want to share with you some tips and tricks on how to solve common problems. In this post I want to show you how to find the length of a List

How to Update Ubuntu Bash in Windows 10

Since I wrote a a personal review about the new Ubuntu Linux Bash present in Windows 10 Anniversary, I want to show you also how to keep your Bash updated and upgraded. This is a simple and fast operation that could be fundamental in order to have a perfectly working Shell. I will divide this

Windows 10 Anniversary: Ubuntu Bash Review

The new Windows 10 Update named 1607, also known as Windows Anniversary, is full of new features and improvement, in particular Redmond added the Ubuntu Linux Bash in his own Operating System. Even if the Bash is still a beta, it has the more common features available in other Linux Systems like Ubuntu. I tried