Skip to content

Instantly share code, notes, and snippets.

@nedzadarek
nedzadarek / trying_snippet
Last active December 15, 2015 23:19
Nothing interesting
I wanted to try this.
So I added new line.
<!DOCTYPE html>
<html>
<head>
<title>HTML5 Video</title>
</head>
<body>
<!-- Write your video tag here: -->
<video controls="controls" src="">Your browser does not support the HTML5 video tag.</video>
</body>
</html>
@nedzadarek
nedzadarek / brainfuck_in_racket.rkt
Created April 13, 2013 14:26
How to use brainfuck in DrRacket. Just add first line.
#lang planet dyoo/bf
++++++[>++++++++++++<-]>.
>++++++++++[>++++++++++<-]>+.
+++++++..+++.>++++[>+++++++++++<-]>.
<+++[>----<-]>.<<<<<+++[>+++++<-]>.
>>.+++.------.--------.>>+.
@nedzadarek
nedzadarek / datalog_in_racket.rkt
Created April 13, 2013 14:27
How to use prolog in racket
#lang datalog
ancestor(A, B) :- parent(A, B).
ancestor(A, B) :-
parent(A, C), D = C, ancestor(D, B).
parent(john, douglas).
parent(bob, john).
ancestor(A, B)?
@nedzadarek
nedzadarek / compare1.c
Created April 13, 2013 14:39
Compare 2 floats.
if (liczba_float1 == liczba_float2) //zrób coś
@nedzadarek
nedzadarek / compare2.c
Created April 13, 2013 14:41
Comparing 2 floats equality based on how different they are.
bezwgledna(float a) if (a<0) return (a-(2*a)); else return a;
if ( bezwgledna(liczba_float1 - liczba_float2) < 0.0001
@nedzadarek
nedzadarek / float_list.hs
Created April 13, 2013 14:44
Problem of representing numbers in Haskel's list.
[1.0, 1.2 .. 2.0]
@nedzadarek
nedzadarek / result_floatlist.hs
Created April 13, 2013 14:46
Result of [1.0, 1.2 .. 2.0] in Haskel
[1.0,1.2,1.4,1.5999999999999999,1.7999999999999998,1.9999999999999998]
@nedzadarek
nedzadarek / list_float.c
Created April 13, 2013 14:47
List of float from 1 to 2, step is 0.2
for (double i = 1; i < 2; (i += 0.2))
cout << i<< endl;