Generates n number of primes using sieve of eratosthenes. https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes
Solution Modified from https://play.golang.org/p/9U22NfrXeq
Generates n number of primes using sieve of eratosthenes. https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes
Solution Modified from https://play.golang.org/p/9U22NfrXeq
1 -> 2 2 -> 3 3 -> 5 4 -> 7 5 -> 11 | |
6 -> 13 7 -> 17 8 -> 19 9 -> 23 10 -> 29 | |
11 -> 31 12 -> 37 13 -> 41 14 -> 43 15 -> 47 | |
16 -> 53 17 -> 59 18 -> 61 19 -> 67 20 -> 71 | |
21 -> 73 22 -> 79 23 -> 83 24 -> 89 25 -> 97 | |
26 -> 101 27 -> 103 28 -> 107 29 -> 109 30 -> 113 | |
31 -> 127 32 -> 131 33 -> 137 34 -> 139 35 -> 149 | |
36 -> 151 37 -> 157 38 -> 163 39 -> 167 40 -> 173 | |
41 -> 179 42 -> 181 43 -> 191 44 -> 193 45 -> 197 | |
46 -> 199 47 -> 211 48 -> 223 49 -> 227 50 -> 229 |
<section class="{{type}}> | |
<p>{{body}}</p> | |
{{#some_partial}} | |
</section> |
$program-colors: 'teal' #008e8d, | |
'yellow' #e6c01e, | |
'green' #00bb66, | |
'blue' #0071ba, | |
'teal' #0b667c, | |
'magenta' #cc0066, | |
'light-blue' #0091ed, | |
'red' #e93e1d; | |
.program { |
require 'zeus/rails' | |
class CustomPlan < Zeus::Rails | |
def test | |
RSpec.configuration.seed = rand 1..10_000 | |
exit RSpec::Core::Runner.run(ARGV) | |
end | |
def after_fork |
$desc.has(':visible')[(quick ? 'hide' : 'slideUp')](); | |
$desc.has(':hidden')[(quick ? 'show' : 'slidedown')](); |
if (!$desc.is(':visible')) { | |
if(quick) | |
$desc.show(); | |
else | |
$desc.slideDown(); | |
} else { | |
if(quick) | |
$desc.hide(); | |
else | |
$desc.slideUp(); |