This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <ctime> | |
#include <cstdlib> | |
// W funkcji głównej trzeba zainicjalizowac generator liczb losowych | |
srand(time(NULL)); | |
// widac losowanie | |
void wypeln_los(int *tab, int n, int min, int max){ | |
for (int i=0;i<n;i++){ | |
tab[i] = rand()%(max-min+1)+min; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdlib> | |
#include <iostream> | |
using namespace std; | |
double fibonacci(long long n){ | |
if (n<2) | |
return 1; | |
else | |
return fibonacci(n-1)+fibonacci(n-2); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <algorithm> | |
#include <iostream> | |
#include <ctime> | |
#include <cstdlib> | |
#include <cmath> | |
using namespace std; | |
// Zgrabna funkcja do wypelniania tablicy losowymi liczbami | |
void wypeln_los(int *tab, int n, int min, int max){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- --> | |
<deviceinfo version="0.2"> | |
<device> | |
<!-- These are raw scancodes produced by the atkbd driver --> | |
<match key="@input.originating_device:info.linux.driver" string="atkbd"> | |
<match key="/org/freedesktop/Hal/devices/computer:system.hardware.vendor" contains="BenQ"> | |
<match key="/org/freedesktop/Hal/devices/computer:system.hardware.product" contains="Joybook R22"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Podaj nazw? usera"; | |
read USER_CHOICE; | |
for i in `cut -f1 -d':' "/etc/group"`; do | |
gpasswd -a $USER_CHOICE $i ; | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Very nice and usefull! | |
*/ | |
@forelse ($users as $user) | |
{{ $user->name }} | |
@empty | |
<p>There are no users.</p> | |
@endforelse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE | |
database1.table D1, | |
database2.table D2 | |
SET D1.email=D2.email | |
WHERE D1.domain=D2.domain AND D1.email IS NULL AND D2.email <>''; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* loadSimpleFileToArray | |
* | |
* what the function does | |
* | |
* @param (String) path to the source file | |
* @return (Array) | |
*/ | |
function loadSimpleFileToArray($fileName) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for x in `git status | grep deleted | awk '{print $3}'`; do git rm $x; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#-*- coding: utf-8 -*- | |
from pyquery import PyQuery as pq | |
import MySQLdb | |
db = MySQLdb.connect(host="localhost", user="someuser", | |
passwd="somepassword", db="somedatabase", charset='utf8') | |
c = db.cursor() | |
# It explains itself | |
# Of course we can dig it from forum "programmaticaly", |
OlderNewer