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
int sommets = rand(8, 12); | |
int arretes = rand(sommets, 2 * (fact(sommets) / (fact(2) * fact(sommets - 2)))); | |
GrapheOriente go = new GrapheOriente(sommets); | |
for (int i = 0; i < arretes; i++) { | |
int sommet1; | |
int sommet2; | |
do { | |
sommet1 = rand(1, sommets); | |
sommet2 = rand(1, sommets); |
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
public boolean circuitExiste(int sommet) { | |
if (adjacents[sommet - 1][sommet - 1] == 1) return true; // boucle sur le même sommet | |
int exposant = 1; | |
int[][] matExp = matriceAdjacence(); | |
while (exposant <= adjacents.length && matExp[sommet - 1][sommet - 1] == 0) { | |
exposant++; | |
matExp = produitMatrice(adjacents, matExp); | |
} |
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
public int longueurChemin(int sommet1, int sommet2) { | |
int exposant = 1; | |
int[][] matExp = matriceAdjacence(); | |
while (exposant < adjacents.length && matExp[sommet1 - 1][sommet2 - 1] == 0) { | |
exposant++; | |
matExp = produitMatrice(adjacents, matExp); | |
} | |
return exposant == adjacents.length ? 0 : exposant; |
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
File films = new File("x:/films"); | |
File dir; | |
for (File fic : films.listFiles()) { | |
if (fic.isFile()) { | |
dir = new File(films, fic.getName().substring(0, fic.getName().lastIndexOf("."))); | |
dir.mkdir(); | |
fic.renameTo(new File(dir, fic.getName())); | |
} | |
} |
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
use immeuble | |
Begin tran | |
select * from locataire | |
delete from locataire | |
where no_appart in ( | |
select no_appart from appart_extra | |
where no_extra = 8) | |
select * from locataire |
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 | |
// prende la valeur envoyé par le code javascript | |
$text = $_GET['text']; | |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Ajax / Exemple 1</title> | |
<meta charset="UTF-8"> |
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
02/12 [Soutien] examen 2 partie 1 | |
02/12 [Android] tp3 | |
04/12 [ASP] tp6 | |
05/12 [ASP] examen 2 | |
06/12 [Admin] examen 3 | |
09/12 [Soutien] examen 2 partie 2 | |
09/12 [Soutien] tp2 partie 3 avant 18h | |
09/12 [Android] examen 2 | |
11/12 [ASP] tp7 | |
12/12 [ASP] examen 3 |
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
var mysql = require('mysql'); | |
var connection = mysql.createConnection({ | |
host : 'localhost', | |
user : 'node-test', | |
password : '', | |
database : 'node_test' | |
}); | |
exports.open = function (callback){ | |
connection.connect(function(err){ |
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
displayNum = (num) -> | |
return '' + Math.round(num * 100) / 100 | |
class Person | |
constructor: (@name, @input) -> | |
@balance = 0 | |
give: (other, amount) -> | |
@balance -= amount |
OlderNewer