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
#center{ | |
left: 0; | |
right: 0; | |
margin-left: auto; | |
margin-right: auto; | |
} |
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
PGraphics s, m; | |
void setup(){ | |
size(220,220); | |
// Create a cookie cutter. | |
// White areas are kept. Black areas are not. | |
m = createGraphics( width, height, P2D ); | |
m.beginDraw(); | |
m.background(0); | |
m.fill(255); |
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
adb backup -f ~/data.ab -noapk app.name | |
dd if=data.ab bs=1 skip=24 | python -c "import zlib,sys;sys.stdout.write(zlib.decompress(sys.stdin.read()))" | tar -xvf - |
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
void setup() { | |
size(500, 500); | |
noFill(); | |
strokeWeight(3); | |
strokeJoin(BEVEL); | |
} | |
float th1, th2, r, x, y, t; | |
int N = 16; | |
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
function getMidnight(){ | |
$date = new DateTime(); | |
$hours = $date->format('H'); | |
$minutes = $date->format('i'); | |
$seconds = $date->format('s'); | |
$hours = ($hours*60)*60; | |
$minutes = $minutes*60; | |
$midnight = time()-($hours+$minutes+$seconds); | |
$midnight = $date = date('Y-m-d H-i-s', $midnight); |
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
function echoJSON($data) { | |
$json = json_encode($data); | |
echo isset($_GET['callback']) | |
? "{$_GET['callback']}($json)" | |
: $json; | |
} |
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 | |
$req = $bdd->prepare('INSERT INTO jeux_video(nom, possesseur, console, prix, nbre_joueurs_max, commentaires) | |
VALUES(:nom, :possesseur, :console, :prix, :nbre_joueurs_max, :commentaires)'); | |
$req->execute(array( 'nom' => $nom, 'possesseur' => $possesseur, 'console' => $console, 'prix' => $prix, 'nbre_joueurs_max' => $nbre_joueurs_max, 'commentaires' => $commentaires )); echo 'Le jeu a bien été ajouté !'; ?> |
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
try { | |
$sqlResquest = 'SELECT u1.user_id as user_id1, | |
u1.user_fname as user_fname1, | |
u1.user_lname as user_lname1, | |
u1.user_email as user_email1, | |
u1.user_duos as user_duos1, | |
u1.user_answers as user_answers1, | |
u1.user_img as user_img1, | |
d.duo_status as duo_status, | |
d.duo_id as duo_id, |
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
float rot = 0; | |
void setup() { | |
size(400, 400); | |
background(100, 200, 50); | |
smooth(); | |
noStroke(); | |
} | |
void draw_rotating_rectangle(float x, float y, float rect_size, float r) { | |
translate(x, y); |
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
size(400, 400); | |
noStroke(); | |
background(23, 100, 240); | |
float x = 0; | |
while (x < width) { | |
float y = 0; | |
while (y < height) { | |
// in rare cases, paint using red color | |
if (random(100) > 98) { |
NewerOlder