Skip to content

Instantly share code, notes, and snippets.

#include <iostream>
#include <stack>
using namespace std;
stack<int> liczby;
int main (int argc, char const *argv[])
{
char c = 0;
while(true){
#!/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
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]
from django.db.models.signals import *
class UserNotPresentError(Exception):
pass
class SignalNotSpecifiedError(Exception):
pass
class SignalReceiver(object):
user = None
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
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;;
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);
200.times do
Thread.new { `./klient 100 1 1` }
end
Thread.new { `./klient 100 100 #{1..1000.join(" ")}` }
SELECT e.id, e.rok_wydania, e.lokalizacja_id as lokalizacja_nazwa, e.lokalizacja_id as l_ident,
e.wydawnictwo_id as wydawnictwo_name, e.wydawnictwo_id as w_ident,
fullname(u.imie, u.nazwisko) as user_fullname, u.id as u_ident,
k.tytul as ksiazka_tytul, k.tytul as k_ident,
fullname(a.imie, a.nazwisko) as autor_fullname, a.id as a_ident,
wyp.id as wyp_ident, wyp.id IS NOT NULL as wypozyczony
FROM egzemplarz e LEFT OUTER JOIN wypozyczenia wyp ON wyp.egzemplarz = e.id AND wyp.data_zwrotu IS NULL
LEFT OUTER JOIN uzytkownik u ON wyp.uzytkownik = u.id
JOIN ksiazka k ON e.ksiazka_id = k.tytul
JOIN autor a ON a.id = k.autor_id;
BEGIN;
CREATE TABLE "autor" (
"id" serial NOT NULL PRIMARY KEY,
"imie" varchar(255) NOT NULL,
"nazwisko" varchar(255) NOT NULL,
"rok_urodzenia" integer NOT NULL,
"rok_smierci" integer
)
;
CREATE TABLE "wydawnictwo" (