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
CC = g++ -std=c++0x | |
EXECUTABLE := exo_01.run | |
INCLUDE := include | |
SOURCES := $(wildcard dirsignal/*.cxx) | |
OBJECTS := $(patsubst dirsignal/%.cxx, %.o, $(SOURCES)) | |
all: $(EXECUTABLE) | |
clean : |
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
DROP TABLE IF EXISTS ETUDIANT; | |
DROP TABLE IF EXISTS PROF; | |
DROP TABLE IF EXISTS MODULE; | |
DROP TABLE IF EXISTS ENSEIGNT; | |
DROP TABLE IF EXISTS NOTATION; | |
CREATE TABLE ETUDIANT | |
( | |
NUM_ET INT(6) PRIMARY KEY AUTO_INCREMENT, | |
NOM_ET VARCHAR(20), |
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 <string> | |
#include <functional> | |
#include <map> | |
#include <iostream> | |
#include <memory> | |
template <typename T> class TypedOption; | |
class Option | |
{ |
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
################################################## | |
# Project name | |
TARGET = colorist | |
# Compiler and flags | |
CC = LD_LIBRARY_PATH="/opt/gcc-4.9.3/lib" /opt/gcc-4.9.3/bin/g++ | |
CFLAGS = -Wall -g -std=c++14 -I /opt/gcc-4.9.3/include -L /opt/gcc-4.9.3/lib | |
# Catch unit testing |
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 <map> | |
#include <string> | |
#include <utility> | |
#include <vector> | |
namespace { | |
using Iter = std::string::const_iterator; |
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
const qr = require('qrcode'); | |
const Canvas = require('drawille'); | |
qr.drawBitArray(process.argv[2], (err,bits,width) => { | |
if(err){ | |
console.error(err); | |
return; | |
} | |
let height = Math.ceil(bits.length / width); |
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 <stdlib.h> | |
#include <string.h> | |
#include "term.h" | |
/* Eterm */ | |
static const char *Eterm_keys[] = { | |
"\033[11~","\033[12~","\033[13~","\033[14~","\033[15~","\033[17~","\033[18~","\033[19~","\033[20~","\033[21~","\033[23~","\033[24~","\033[2~","\033[3~","\033[7~","\033[8~","\033[5~","\033[6~","\033[A","\033[B","\033[D","\033[C", 0 | |
}; | |
static const char *Eterm_funcs[] = { |
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 std::env; | |
use std::io::Read; | |
use std::fs::File; | |
use std::cmp; | |
pub fn main() { | |
let args: Vec<String> = env::args().collect(); | |
let mut file = File::open(&args[1]).unwrap(); | |
let mut contents = String::new(); | |
file.read_to_string(&mut contents).unwrap(); |
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
const fs = require('fs'); | |
const englishFrequency = [ | |
0.08167, | |
0.01492, | |
0.02782, | |
0.04253, | |
0.12702, | |
0.02228, | |
0.02015, |
OlderNewer