I hereby claim:
- I am heliosmaster on github.
- I am davide (https://keybase.io/davide) on keybase.
- I have a public key whose fingerprint is A69F 6A4A B256 ADBE 3342 D1E0 8BF1 0214 1E71 40D0
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
[RF12demo.12] B i2 g212 @ 868 MHz | |
Available commands: | |
<nn> i - set node ID (standard node ids are 1..30) | |
<n> b - set MHz band (4 = 433, 8 = 868, 9 = 915) | |
<nnnn> o - change frequency offset within the band (default 1600) | |
96..3903 is the range supported by the RFM12B | |
<nnn> g - set network group (RFM12 only allows 212, 0 = any) | |
<n> c - set collect mode (advanced, normally 0) |
(ns nonograms-dojo.core) | |
;; Nonograms by Davide Taviani and Boris Arkenaar | |
(defn transpose [m] | |
(apply mapv vector m)) | |
(def input-data | |
{:size [10 10] | |
:rows [[] [1 1] [1] [2 1 1] [1 1 1] [1 2 1 1] [1] [1] [] []] | |
:cols [[] [1] [] [3] [1 1] [] [5] [1] [1 4] []]}) |
(ns minesweeper-dojo.core) | |
;; written by Davide Taviani and Mohammad Noureldin | |
(def input1 [3 1 1]) | |
(defn is-full-of-mines? [rows cols mine-count] | |
(= (+ mine-count 1) | |
(* rows cols))) |
I hereby claim:
To claim this, I am signing this object:
# `sed -i 's/<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>/ | |
#<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>\n | |
# <meta http-equiv="Content-Type" content="text\/html; charset=UTF-8"\/>/g' #{filename}` | |
#out = `find . -name "*.htm*" | xargs file -i` | |
if ARGV.size > 0 | |
out = `file -i #{ARGV[0]}/*.htm*` | |
else | |
out = `file -i *.htm*` |
#out = `find . -name "*.htm*" | xargs file -i` | |
out = (ARGV.size > 0 ? `file -i #{ARGV[0]}/*.htm*` : `file -i *.htm*`) | |
out.split("\n").each do |l| | |
l =~ /(.*):(.*)charset=(.*)/ | |
filename = "#{$1}" | |
charset = "#{$3}" | |
charset = "windows-1252" if charset == "unknown-8bit" | |
if (charset!= "binary" && charset != "us-ascii" && charset != "utf-8") | |
succ = system("iconv -f #{charset} -t utf-8 #{filename} -o #{filename}.tmp") | |
if !succ |
package main | |
import "fmt" | |
// fibonacci is a function that returns | |
// a function that returns an int. | |
func fibonacci() func() int { | |
fib0 := 1 | |
fib1 := 1 | |
return func() int { |
package main | |
import ( | |
"fmt" | |
"os" | |
"math" | |
"strconv" | |
) | |
func main(){ | |
// figures out which number is the bound |
#include <math.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <sys/time.h> | |
extern double drand48(); | |
int Z; | |
int M; | |
int sizeLattice; | |
int N; |