This file contains hidden or 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
| var scrolling = function(){ | |
| var speed = 1000; | |
| jQuery('a[href^="#"]').bind('click',function(){ | |
| var id = jQuery(this).attr('href'); | |
| if(id == '#') | |
| goTo('body'); | |
| else | |
| goTo(id); | |
| return(false); | |
| void(0); |
This file contains hidden or 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
| // From: http://www.siteduzero.com/informatique/tutoriels/bootstrap-de-twitter-un-kit-css-et-plus/formulaires | |
| <div class="span5"> | |
| <form class="form-inline well"> | |
| <div class="control-group"> | |
| <div class="controls"> | |
| <input type="text" placeholder="Texte ici"> | |
| <button type="submit" class="btn btn-primary pull-right">Envoyer</button> | |
| <div class="alert alert-error hide"> | |
| <h4 class="alert-heading">Erreur !</h4> | |
| Vous devez entrer au moins 4 caractères ! </div> |
This file contains hidden or 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
| <!-- Besoin dans le pom --> | |
| <dependency> | |
| <groupId>org.apache.struts</groupId> | |
| <artifactId>struts2-json-plugin</artifactId> | |
| <version>2.1.8</version> | |
| </dependency> | |
| 1- Envois d'un flux, genre un fichier ou une image (mais mode Ajax !!!) | |
| @Action(value = "/charger", results = { | |
| @Result(name = "succes", type = "stream", params = { "contentType", "application/octet-stream", |
This file contains hidden or 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
| <!doctype html> | |
| <!--[if lte IE 6]> <html class="no-js ie6 ie67 ie678" lang="fr"> <![endif]--> | |
| <!--[if IE 7]> <html class="no-js ie7 ie67 ie678" lang="fr"> <![endif]--> | |
| <!--[if IE 8]> <html class="no-js ie8 ie678" lang="fr"> <![endif]--> | |
| <!--[if gt IE 8]><!--> <html class="no-js" lang="fr"> <!--<![endif]--> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=10"> | |
| <title></title> | |
| <meta name="viewport" content="initial-scale=1.0"> |
This file contains hidden or 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
| // Getting the EntityManagerFactory from a singleton in the PersistenceManager class | |
| public class PersistenceManager { | |
| public static final boolean DEBUG = true; | |
| private static final PersistenceManager singleton = new PersistenceManager(); | |
| protected EntityManagerFactory emf; | |
| public static PersistenceManager getInstance() { |
This file contains hidden or 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
| <a class="emboss lightAgain" title="Lorem ipsum">Lorem ipsum</a> | |
| <a class="emboss darkAgain" title="Lorem ipsum">Lorem ipsum</a> | |
| .emboss { | |
| font-size:4em; padding:50px; font-weight:bold; background:#0A539C; display:block; font-family: arial, sans-serif; | |
| } | |
| .lightAgain { color:#FFFFFF; position:relative; } | |
| .lightAgain:before { | |
| content: attr(title); | |
| position:absolute; |
This file contains hidden or 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
| /* French initialisation for the jQuery UI date picker plugin. */ | |
| /* Written by Keith Wood (kbwood{at}iinet.com.au), | |
| Stéphane Nahmani (sholby@sholby.net), | |
| Stéphane Raimbault <stephane.raimbault@gmail.com> | |
| https://github.com/jquery/jquery-ui/tree/master/ui/i18n | |
| */ | |
| jQuery(function($){ | |
| $.datepicker.regional['fr'] = { | |
| closeText: 'Fermer', |
This file contains hidden or 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
| /* | |
| http://java.developpez.com/faq/java/?page=langage_chaine#LANGAGE_STRING_conversion_string | |
| */ | |
| // IMPORT | |
| import java.util.Locale; | |
| import java.text.DateFormat; | |
| // 1. Choix de la langue | |
| Locale locale = Locale.getDefault(); | |
This file contains hidden or 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
| // Initialisé à la date et l'heure courrante. | |
| GregorianCalendar calendar = new java.util.GregorianCalendar(); | |
| // Initialisé avec une instance de Date. | |
| calendar.setTime( maDate ); | |
| /* sur le champs "jour" (7 jours plus tôt) : */ | |
| calendar.add (Calendar.DATE, -7); | |
| /* sur le champs "mois" (5 mois plus tard) : */ |
OlderNewer