Skip to content

Instantly share code, notes, and snippets.

View seysn's full-sized avatar
🦀
Pipo

Nicolas Seys seysn

🦀
Pipo
View GitHub Profile
package calculatrice;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class Calculatrice {
public static final char[] list_operators = new char[] {'+', '-', '*', '/'};
package tests;
import calculatrice.Calculatrice;
import static org.junit.Assert.*;
import org.junit.Test;
public class CalculatriceTest {
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.annotation.WebServlet;
import java.sql.*;
@WebServlet("/servlet/Clients")
public class Clients extends HttpServlet {
public void service( HttpServletRequest req, HttpServletResponse res ) throws ServletException, IOException {
PrintWriter out = res.getWriter();
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.annotation.WebServlet;
import java.sql.*;
@WebServlet("/servlet/Insert")
public class Insert extends HttpServlet {
public void service( HttpServletRequest req, HttpServletResponse res ) throws ServletException, IOException {
try {
" Vim color file
"
" Author: Tomas Restrepo <tomas@winterdom.com>
" https://github.com/tomasr/molokai
"
" Note: Based on the Monokai theme for TextMate
" by Wimer Hazenberg and its darker variant
" by Hamish Stuart Macpherson
"
" Désactivation de la compatibilité avec Vi
set nocompatible
" Activation du colorscheme
syntax enable
colorscheme molokai
let g:rehash256 = 1
" Ajout des nombres
set number
@seysn
seysn / Revision.md
Last active November 17, 2015 16:55

Les revision du swag

##1. Je charge une page de serveur mais rien ne s'affiche. Que fait-on ? (démarche)

  • Vérification serveur lancé
  • Compilation
  • WebServlet + Nom de servlet
  • Drivers
  • Regarder les logs (catalina.sh ou log/catalina.out)
  • 2 servlets avec une même URL
@seysn
seysn / gol.js
Last active February 5, 2016 22:15
// la grille de cellule avec un ensemble fixe (le carr�) et un clignotant
var monde = [
[0,0,0,0,0,0,0,0],
[0,1,1,0,0,0,0,0],
[0,1,1,0,0,0,0,0],
[0,0,0,0,0,0,0,0],
[0,0,0,0,1,0,0,0],
[0,0,0,0,1,0,0,0],
[0,0,0,0,1,0,0,0],
[0,0,0,0,0,1,1,1]
@seysn
seysn / chess.js
Last active February 12, 2016 21:52
var canvas = document.getElementById("screen");
var gfx = canvas.getContext("2d");
// Définition du type Piece
var Piece = function(name, color, line, column){
this.name = name || 'empty';
this.line = line || 0;
this.column = column || 0;
this.color = color || 'grey';
this.pieceId = undefined;
<html>
<head>
<script type='text/javascript'>
// On tente de charger l'image au plus tôt !
var chessSymbols = new Image();
chessSymbols.src = 'chess.png';
chessSymbols.onload = function() {
console.info("Chess symbols loaded !");
// dessine la grille, une fois l'image chargée
//drawGrid(0,0, canvas.width, canvas.height, 8, 8);