Skip to content

Instantly share code, notes, and snippets.

View nicolas-t's full-sized avatar
🦏
opensourcing

Nicolas Turlais nicolas-t

🦏
opensourcing
View GitHub Profile
@nicolas-t
nicolas-t / gist:4245948
Last active October 13, 2015 19:38
Chocolat
$(document).ready(function(){
$('selector').Chocolat({
displayAsALink: true,
linkImages : true
});
});
@nicolas-t
nicolas-t / gist:4245938
Created December 9, 2012 16:36
Chocolat
<a href="series/1.jpg" rel="Titre de la série" title="Légende de l'image 1"><img width="100" src="series/mini/1.jpg" /></a>
<a href="series/2.jpg" title="Légende de l'image 2"><img width="100" src="series/mini/2.jpg" /></a>
<a href="series/3.jpg" title="Légende de l'image 3"><img width="100" src="series/mini/3.jpg"/></a>
@nicolas-t
nicolas-t / gist:4245929
Created December 9, 2012 16:34
Chocolat
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.chocolat.js"></script>
<link rel="stylesheet" href="css/chocolat.css" type="text/css" media="screen" charset="utf-8">
<script>
/*variables*/
var stair = [], routes = [], retours = [], sommes = [], result = false;
/*functions*/
function recur(index,parc){
if(index == (stair.length-1) || index == (stair.length-2) ){
retours.push(parc);
}
if(index+1 < stair.length){
var result=-10000;
function recur(index,sum,stair){
/*global result <-- python shit baby*/
if((index == (stair.length-1) || index == (stair.length-2)) && (result< sum))
result = sum;
if(index+1 < stair.length)
recur(index+1, sum + stair[index+1],stair);
if(index+2 < stair.length)
recur(index+2, sum + stair[index+2],stair);