hello1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[0 to 1000] | |
|> filter (-> it % 3 == 0 or it % 5 == 0) | |
|> foldr1 (+) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
:: Execute the PS1 file with the same name as this batch file. | |
set filename=%~d0%~p0%~n0.ps1 | |
if exist "%filename%" ( | |
PowerShell.exe -NoProfile -NonInteractive -NoLogo -ExecutionPolicy Unrestricted -Command "& '%filename%'" | |
:: Collect the exit code from the PowerShell script. | |
set err=%errorlevel% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
require('babel-polyfill'); | |
var PromiseBB = require('bluebird'); | |
// useless if the lost rejection Promise is not coming from BB | |
PromiseBB.onPossiblyUnhandledRejection(function(error) { | |
throw error; | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket | |
(define (factorial x) | |
(cond | |
[(< x 0) (raise "Value can't be less than zero")] | |
[(= x 0) 1] | |
[(= x 1) 1] | |
[else (* x (factorial (- x 1)))])) | |
(factorial 99) | |
(factorial -1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clc; | |
close all; | |
mm = [] | |
E1 = [] | |
E2 = [] | |
for m = 10:50:1000 | |
e1 = 0.0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* Run process on a schedule | |
Given a process (and arguments) and a schedule, it ensures that the process is run on the schedule: | |
If the process is not run when it should, it's started | |
If the process is running when it shouldn't, it's killed | |
*) | |
module Schedule = | |
open System |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* It's a drop in replacement for the core Fake functionality - dependency resolution and run tasks | |
*) | |
open System | |
open System.Text | |
open System.Collections.Generic | |
open System.IO | |
let private args = Environment.GetCommandLineArgs() |> List.ofArray |> List.skip 2 | |
printfn "All args: %A" args |