start new:
tmux
start new with session name:
tmux new -s myname
| package main | |
| import "fmt" | |
| func dividiEtImpera( arr []int, low int, hi int, ch chan int){ | |
| if hi - low == 1{ | |
| // fmt.Println("low: ", low, " hi:", hi, " Caso hi-low==1, ritorno:",arr[hi-1], "+", arr[low] | |
| ch <- arr[hi-1] + arr[low] | |
| } else if hi-low == 0{ |
| package main | |
| import "fmt" | |
| // fibonacci is a function that returns | |
| // a function that returns an int. | |
| func fibonacci() func() int { | |
| nMeno1 := 0 | |
| nMeno2 := 1 | |
| return func() int { |
| public class FizzBuzzTest | |
| { | |
| public static void main(String[] args) | |
| { | |
| for (int i = 1; i <= 100; i++) | |
| { | |
| String toPrint; | |
| if(i%3 == 0 && i%5 == 0) | |
| toPrint = "FizzBuzz"; |
| #include <windows.h> | |
| #include <stdio.h> | |
| #include <tchar.h> | |
| #define MAX_BUF 1024 | |
| #define pipename "\\\\.\\pipe\\LogPipe" | |
| int main() | |
| { | |
| HANDLE pipe = CreateFile(pipename, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL); | |
| if (pipe == INVALID_HANDLE_VALUE) |
| /** | |
| * More info? | |
| * a.dotreppe@aspyct.org | |
| * http://aspyct.org | |
| * @aspyct (twitter) | |
| * | |
| * Hope it helps :) | |
| */ | |
| #include <stdio.h> |
| (let ((x 1)) | |
| (let | |
| ((y #' (lambda (z) (+ 0 x) ) )) | |
| (let ((x 2)) | |
| (funcall y 3) ; Returns 2 | |
| ))) |
| let | |
| val x = 1 | |
| in | |
| let | |
| (* Essendo statico, si salva (y, x, E=((x,1))). Quando andra' a risolvere questo metodo, assegnera' x ad 1. *) | |
| val y = (fn z => x) | |
| in | |
| let | |
| val x = 2 | |
| in |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #include <errno.h> | |
| #include <string.h> | |
| #include <sys/types.h> | |
| #include <time.h> | |
| char greeting[] = "Hello there\n1. Receive wisdom\n2. Add wisdom\nSelection >"; | |
| char prompt[] = "Enter some wisdom\n"; |