Follow the below steps to install the latest version of PostgreSQL on Windows by scoop package manager.
scoop install postgresql -g| unit AsyncThread; | |
| interface | |
| uses | |
| {Delphi} | |
| System.SysUtils | |
| {Project} | |
| ; |
| def generate_collatz(n): | |
| """ | |
| Generator function to generate the Collatz sequence. | |
| Args: | |
| n (int): The starting number for the sequence. | |
| Yields: | |
| int: The next number in the sequence. | |
| """ |
| /// OEIS A014445 - Even Fibonacci numbers; or, Fibonacci(3*n). | |
| /// https://oeis.org/A014445 | |
| /// https://oeis.org/A014445/list | |
| void main() => print(evenFibonacci().take(26)); | |
| Iterable<int> evenFibonacci() sync* { | |
| int a = 0, b = 2; | |
| while (true) { |
| // Summation of Primes | |
| // https://projecteuler.net/problem=10 | |
| void main() { | |
| final timer = Stopwatch()..start(); | |
| final answer = summationOfPrimesBelow(2000000); | |
| timer.stop(); |
| import std.stdio; | |
| import std.range; | |
| import std.algorithm; | |
| auto primeGenerator() { | |
| int num = 2; | |
| return generate(() { | |
| while (true) { | |
| if (isPrime(num)) { |
| import sympy as sp | |
| def generate_sequence(gen_func, num_terms): | |
| """ | |
| Generates a sequence up to num_terms terms using the given generating function. | |
| Args: | |
| gen_func: The generating function as a SymPy expression. | |
| num_terms (int): The number of terms in the sequence. |
Install latest version of MySQL via scoop package manager on Windows. If you want to install specific version of MySQL, just replace "mysql" with "mysql@version". For example: "[email protected]".
scoop install mysql -g| import std.stdio : writefln; | |
| void main() { | |
| "%,3?d".writefln('_', 2_000_000.sumOfPrimesBelow); | |
| } | |
| ulong sumOfPrimesBelow(ulong num) { | |
| // Create a dynamic array of booleans initialized to true | |
| bool[] primes = new bool[num]; | |
| primes[] = true; |
| import vibe.d; | |
| import vibe.web.rest; | |
| import std.array; | |
| shared static this() | |
| { | |
| auto router = new URLRouter; | |
| router.get("/", serveStaticFiles("./../client/index.html")) | |
| .get("*", serveStaticFiles("./../client/")); |