Skip to content

Instantly share code, notes, and snippets.

exception Invalid_Phone_Key
type noeud_lex = Lettre of char * bool * arbre_lex
and arbre_lex = noeud_lex list ;;
(* q1 *)
let left_dict = [Lettre ('A', true, [Lettre ('R', true, []);
Lettre ('U', false, [Lettre ('X', true, [])])])]
let right_dict = [Lettre ('R', false, [Lettre ('I', false, [Lettre ('S', false, [Lettre ('E', false, [])]);
@davidsan
davidsan / Makefile
Created February 26, 2013 20:59
patch libIPC @osx 10.8.2
# Nom du repertoire ou generer la libIPC
REP = ../lib
# Nom du fichier a generer :
# <---
LIBRAIRIE = $(REP)/libIPC.a
# Fichiers C necessaires a la compilation :
# <---
@davidsan
davidsan / Exo1.c
Last active December 15, 2015 04:08
LI 357 – TER Partiel du vendredi 25 mars 2011 Exercice 1
/************************************
LI 357 – TER
Partiel du vendredi 25 mars 2011
Exercice 1
************************************/
#include <X11/Xlib.h>
#include <X11/X.h>
#include <stdlib.h>
#include <stdio.h>
function Commentaire(idCommentaire, auteur, texte, date, score) {
this.idCommentaire = idCommentaire;
this.auteur = auteur;
this.texte = texte;
this.date = date;
this.score = score;
}
// Commentaire.getHtml
Commentaire.prototype.getHtml = function () {
return ("Id : " + this.idCommentaire + "Auteur : " + this.auteur + "Texte : " + this.texte + "Date : " + this.date + "Score : " + this.score + "" + "");
<!DOCTYPE html>
<html>
<head>
<title>Page principale</title>
<link href="struct_main.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="main.js"></script>
<script type="text/javascript"
src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
#!/usr/bin/perl -l
use CGI;
use CGI::Cookie;
use Digest::MD5 'md5_hex';
use strict;
my $q=CGI->new();
# building cookie
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>test</title>
</head>
<body>
<script type="text/javascript" src="http://www.openrunner.com/orservice/inorser-script.php?key=mykey&amp;ser=S01&amp;id=2343179&amp;w=500&amp;h=351&amp;k=5&amp;m=0&amp;ts=1365619227"></script>
<div id='openrunner'>
@davidsan
davidsan / 5q1.html
Last active December 16, 2015 07:28
Autocomplete TER LI355
<html>
<head>
<script type="text/javascript" src="5q1.js"></script>
</head>
<body>
<form>
<fieldset>
<p>
<textarea onkeypress="callAjax(this)"></textarea>
</p>
<!DOCTYPE html>
<html lang="en">
<head>
<title>test</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
</head>
<body>
<ul>
<li><input type="checkbox" id="case1"/></li>
<li><input type="checkbox" id="case2"/></li>
<!DOCTYPE annonces SYSTEM 'annonces.dtd' > <annonces>
<annonce type="maison">
<adresse>Rue Balzac 37000 Tours</adresse>
<description superficie="140" prix="400000">Jolie maison</description>
<contact by="mail">toto@monmail.com</contact>
</annonce>
<annonce type="appartement">
<adresse>4 Place Jussieu 75005 Paris</adresse>
<description superficie="250" prix="2500000">Etablissement universitaire</description>
<contact by="telephone">0123456789</contact>