start new:
tmux
start new with session name:
tmux new -s myname
| #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) |
| 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"; |
| 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 { |
| 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" | |
| "io/ioutil" | |
| "strings" | |
| "sync" | |
| "log" | |
| "time" | |
| "crypto/md5" |
| #!/bin/bash | |
| #Federico Ponzi | |
| #doylefermi | |
| #chocolatkey | |
| # GPLv2 | |
| usage() | |
| { | |
| echo "Usage: $0 [-all][-list][-i] xxx.xxx.xxx.xxx" | |
| } |
| (* numeri di Church *) | |
| val zero = fn f => fn x => x; | |
| val uno = fn f => fn x => f x; | |
| val due = fn f => fn x => f (f x); | |
| val tre = fn f => fn x => f (f (f x)); | |
| (* dato un naturale, si ottiene il corrispondente numero | |
| di Church applicando la seguente funzione di codifica *) |
| import socket | |
| import MergeSort | |
| HOST = '192.168.1.1' | |
| PORT = 50007 | |
| s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
| s.connect((HOST, PORT)) | |
| #Receives arraystring in chunks |
| # -*- coding: utf-8 -*- | |
| """Convert the Yelp Dataset Challenge dataset from json format to csv. | |
| For more information on the Yelp Dataset Challenge please visit http://yelp.com/dataset_challenge | |
| """ | |
| import argparse | |
| import collections | |
| import csv | |
| import simplejson as json | |