Skip to content

Instantly share code, notes, and snippets.

200.times do
Thread.new { `./klient 100 1 1` }
end
Thread.new { `./klient 100 100 #{1..1000.join(" ")}` }
int main() {
{
Rational a(1, 3), b, c(a), d, e(1);
d = a;
e = 1;
assert(d == a);
assert(b == Zero());
assert(e == One());
assert(a && !b);
assert((a / b).isNumber() == false);
let rev = List.fold_left (fun a x -> x::a) [];;
let is_prime x =
let rec pom a =
if a*a > x then true
else
if x mod a = 0 then false
else pom (a+2)
in if x mod 2 = 0 then false
else pom 3;;
cp /etc/hosts /etc/hosts.backup &&
for h in $( echo 'blip.pl
flaker.pl
ign.com
joemonster.org
jogger.pl
onet.pl
polygamia.pl
wyborcza.pl' )
do
from django.db.models.signals import *
class UserNotPresentError(Exception):
pass
class SignalNotSpecifiedError(Exception):
pass
class SignalReceiver(object):
user = None
You can represent time statements in most western languages where
a prefix and/or suffix is used.
The default case is to use suffix only (as in English), which you
do by providing the `suffixAgo` and `suffixFromNow` settings in
the strings hash (earlier versions of timeago used the deprecated
`ago` and `fromNow` options). If present, they are used.
2 minutes [suffixAgo]
2 minutes [suffixFromNow]
#!/bin/bash
username=$(whoami)
proc="$(ps aux | grep $username | grep -v $0 | grep firefox | grep -v grep)"
if [ "$proc" != "" ]
then
echo "shutdown firefox first!"
exit 1
fi
#include <iostream>
#include <stack>
using namespace std;
stack<int> liczby;
int main (int argc, char const *argv[])
{
char c = 0;
while(true){