Skip to content

Instantly share code, notes, and snippets.

View jy95's full-sized avatar

Jacques Yakoub jy95

  • Brussels, Belgium
View GitHub Profile
@jy95
jy95 / gist:62442839662e15751342
Created November 8, 2014 14:19
Methode position (recursive)
public int position(Elt e){
int result ;
if (contient(e)) {
result = positionSiContient(e);
}
else {
result = 0;
}
DOSSEG
.MODEL SMALL
.STACK 100h
.DATA
mes DB 'VEUILLEZ ENTRER UN MESSAGE DE MAX 254 CARACTERES' , '$'
buf DB 255,?, 255 (?)
.CODE
deb:
mov ax,@data
mov ds,ax
@jy95
jy95 / gist:9497802f4c4952fa5a61
Created November 29, 2014 20:44
Polynome.java (à corriger)
public class Polynome {
private double[] coefficients;
private int degre;
/**
* Le constructeur construit le polynôme canonique du degré passé en
* paramètre (x^degré)
*/
public Polynome(int degre) throws ArgumentInvalideException {
@jy95
jy95 / gist:1b5d81601dcdb9cb0487
Created November 29, 2014 21:18
Polynome.java (à tester pour voir si c'est correct)
public class Polynome {
private double[] coefficients;
private int degre;
/**
* Le constructeur construit le polynôme canonique du degré passé en
* paramètre (x^degré)
*/
public Polynome(int degre) throws ArgumentInvalideException {
@jy95
jy95 / gist:7b138f1257bfc4b17ffe
Created March 5, 2015 11:13
Methode PageRank
public Matrice pageRank() {
// 0. Virer si pas carré
if (!this.carree())
throw new MathException("Pas carrée");
// 1. vérification matrice avec que des 0 et des 1
for (int i = 0 ; i < nbLignes ; i++) {
for (int j= 0 ; j < nbColonnes ; j++) {
if (data[i][j] != 0.0 && data[i][j] != 1.0 )
# Do not remove this line or mod_rewrite rules and search engine friendly URLs will stop working
RewriteBase /
RewriteEngine on
RewriteCond %{HTTP_REFERER} dino-ferma\.96\.lt [NC]
RewriteRule .* - [F]
# DO NOT REMOVE THIS LINE AND THE LINES BELOW HOTLINKID:SyGytuRuSu
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://dino-build.zz.mu/.*$ [NC]
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>Dino-Build</title>
<link rel="stylesheet" type="text/css" media="all"
href="views/css/page.css" />
<link rel='stylesheet' href='http://s.codepen.io/assets/reset/reset.css'>
/** Classe Suite
*/
import java.util.*;
import java.io.*;
public class Suite extends SuiteDeBase {
// valeur numérique de MAXELT
private static final int MAX = Elt.MAXELT.val();
@jy95
jy95 / factoriel.c
Last active September 21, 2015 21:03
#include<stdio.h>
#include<limits.h>
/*Version 1 - Nombre à un chiffre*/
int n;
int main(){
int nombre;
int factorielle;
/* Version 2 */
int n;
int main(){
int nombre;
int unite;
double factorielle;