Skip to content

Instantly share code, notes, and snippets.

View ahmed-bacha's full-sized avatar

AAB ahmed-bacha

View GitHub Profile

Projet Annonces

Presentation


Dans le projet, le but est de développer un site (style LeBonCoin) pour les étudiants de TSE afin qu'ils puissent avoir les annonces des logements/appartements disponible (misent à disposition par l'école nouvelle cité ou par d'autres autres étudiants)

Structure du projet


  • BDD
  • Utils
@ahmed-bacha
ahmed-bacha / CommandeDao.java
Last active August 29, 2015 14:10
DAO pour la gestion de Ligne de commande avec persistance sous Hibernate
package dao;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.hibernate.Session;
import db.HibernateUtils;
import domain.LigneCommande;
public class CommandeDao {
// on ordonne la liste en spécifiant une fonction pour le Comparator
Collections.sort(currencies, new Comparator<Currency>(){
public int compare(Currency c1, Currency c2){
return c1.getName().compareTo(c2.getName());
}
});
@ahmed-bacha
ahmed-bacha / architecture.txt
Last active August 29, 2015 14:13
Architecture de la BDD du projet IKYA
-User
* Integer id
* String name
* String email
* String password
* Set<Contact> contacts
* Integer score
-Contact
* Integer id
@ahmed-bacha
ahmed-bacha / hsqldb.txt
Created January 23, 2015 09:47
Run config. HsqlDB
Configuration HSQL DB
1 - Name : Launch_DataBase
- Main class : org.hsqldb.server.Server
- Arguments : --database.0 file:footdb --dbname.0 footdb
2 - Name : Launch_Console
- Main class : org.hsqldb.util.DatabaseManagerSwing
@ahmed-bacha
ahmed-bacha / ColorizeTerminal.md
Last active August 29, 2015 14:14
Colorize Osx Shell

Colorize your terminal (Shell) !

Profile file


Open your terminal, and enter :

nano ~/.bash_profile
@ahmed-bacha
ahmed-bacha / AddSessionVariableToServlet.md
Last active August 29, 2015 14:14
Using session variables in a JEE Servlet (ADD variable/GET variable from session scope)

Using session variables in a JEE (Servlet)

Open the session first !


Open a session in a JEE Servlet (to do each time, in all Servlets that you want to access to Session variables)

// GET the current session from the request
HttpSession session = request.getSession();
package org.pri.controller;
import java.io.File;
import org.neo4j.graphdb.Direction;
import org.neo4j.graphdb.GraphDatabaseService;
import org.neo4j.graphdb.Node;
import org.neo4j.graphdb.Relationship;
import org.neo4j.graphdb.RelationshipType;
import org.neo4j.graphdb.Transaction;
@ahmed-bacha
ahmed-bacha / Neo4JCleanDB.txt
Created February 8, 2015 14:12
Neo4J clean DB from console
MATCH (n)
OPTIONAL MATCH (n)-[r]-()
DELETE n,r
Test, Abdelkrim added ...