Skip to content

Instantly share code, notes, and snippets.

View oliviermarin's full-sized avatar
💭
I may be slow to respond.

Olivier Marin oliviermarin

💭
I may be slow to respond.
  • Paris Turf
  • Châtillon
View GitHub Profile
contenu du test gist
@oliviermarin
oliviermarin / findByUserID.java
Created January 27, 2015 12:54
fonction pour faire passer user vers servlet ...
public User findByUserID(Integer ID) throws Exception {
EntityManager em = OpenJPAUtils.openEntityManager();
User result = em.find(User.class, ID);
HashSet<Contact> contacts = (HashSet<Contact>)getAllContactByUserID(result.getId());
if (contacts != null) {
<div class="panel panel-default">
<div class="panel-heading text-center">Liste de mes challenges !</div>
<div class="panel-body">
<div class="col-xs-12 col-sm-12 col-md-10 col-md-offset-1 col-lg-10 col-lg-offset-1">
<br />
<ul class="list-group">
<%
for(Challenge challenge : challenges){
ALTER TABLE myTABLE AUTO_INCREMENT = 1;
@oliviermarin
oliviermarin / gist:dc5b774d62e8a6c95b56
Created July 11, 2015 18:55
Commande pour créer un répertoire maven de gestion de librairie en local :
Commande pour créer un répertoire maven de gestion de librairie en local :
MacBook-Pro-de-olivier:/ oliviermarin$ mvn install:install-file
-Dfile=/Users/oliviermarin/Desktop/marmot-java-dependencies/marmot3-framework.jar
-DgroupId=edf-marmot3-framework
-DartifactId=edf-marmot3-framework
-Dversion=1.0
-Dpackaging=jar
Résultat de l’exécution de la commande :
@oliviermarin
oliviermarin / SQL | PostrgreSQL | Add a FOREIGN-KEY column in table t1 from table t2
Last active June 9, 2016 09:55
SQL | PostrgreSQL | Add a FOREIGN-KEY column in table t1 from table t2
ALTER TABLE t1
ADD COLUMN t1_fk INTEGER DEFAULT 1,
ADD FOREIGN KEY(t1_fk) REFERENCES t2(t2_pk);
xhtml | Face :
<p:row>
<p:column>
<p:outputLabel for="zone-geographique"
value="#{messages['operationimmobiliere.zone.geographique']} : " />
</p:column>
<p:column>
<p:selectOneRadio id="zone-geographique"
value="#{operationImmobiliereFace.codeZoneGeographique}">
INSERT INTO public.personne(
id,
age,
prenom,
nom)
SELECT
id,
age,
prenom, // Donnees précédante
'Dupont' // modification valeur
@oliviermarin
oliviermarin / PLSQL | PostgreSQL | creation simple de script plsql
Created June 10, 2016 15:38
PLSQL | PostgreSQL | creation simple de script plsql
DO $$
DECLARE
counter integer := 0;
BEGIN
FOR i IN 1..10
LOOP
counter := couter + i;
END LOOP;
END;
$$ LANGUAGE plpgsql;
@oliviermarin
oliviermarin / raise-info-sql
Created June 14, 2016 09:34
SQL | PostgreSQL | Afficher information dans script SQL
RAISE INFO 'param : %', param-value;