This file contains 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
#!/bin/bash | |
lines_to_skip=`t timeline | wc -l | sed 's/^ *//g'` | |
i=0 | |
echo Skipping [$lines_to_skip] lines in the timeline | |
echo From now on, say each tweet as soon as it arrives... | |
t stream timeline | while read -r line; do |
This file contains 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
package fr.ybo.javaquiz; | |
public class Singleton { | |
private static final Singleton INSTANCE = new Singleton(); | |
public static Singleton getInstance() { | |
return INSTANCE; | |
} |
This file contains 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
Field mapClassesField = CsvEngine.class.getDeclaredField("mapClasses"); | |
mapClassesField.setAccessible(true); | |
CsvClass csvClass = ((Map<Class<?>, CsvClass>)mapClassesField.get(engine)).get(Dog.class); | |
System.out.println(csvClass.getColumnNames()); |
This file contains 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
package fr.ybonnel.codestory; | |
import com.google.common.collect.Lists; | |
import java.util.ArrayList; | |
import java.util.List; | |
public class CompteEstBon { | |
private List<Integer> listeNumbers; |
This file contains 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
@Test | |
@Ignore | |
public void should_be_very_very_fast() throws IOException, SAXException { | |
int max = 250; | |
Random random = new Random(); | |
ObjectMapper mapper = new ObjectMapper().setSerializationInclusion(JsonInclude.Include.NON_NULL); | |
WebConversation wc = new WebConversation(); | |
for (int i =0; i < max; i++) { | |
List<Commande> commandes = new ArrayList<Commande>(); | |
for (int j = 1; j <= (i+1)*5; j++) { |
This file contains 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
{"gain":50,"path":["0"]} |
This file contains 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
package fr.ybonnel.codestory.path.scalaskel; | |
import com.fasterxml.jackson.annotation.JsonProperty; | |
public class Change { | |
@JsonProperty | |
private Integer foo; | |
@JsonProperty | |
private Integer bar; |
This file contains 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
package models.scalaskel | |
import play.api.libs.json._ | |
import play.api.Logger | |
case class Change(foo:Int, bar:Int, qix:Int, baz:Int) { | |
def this() = this(0, 0, 0, 0) | |
def this(change:Change, coin:Coin) = this( | |
if (coin.isFoo) change.foo + 1 else change.foo, |
This file contains 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
import java.util { ArrayList } | |
import ceylon.collection { LinkedList } | |
shared class Coin(Integer coinValue) { | |
shared Integer valeur = coinValue; | |
shared Boolean canPay(Integer centsToPay) { | |
return centsToPay >= valeur; | |
} | |
} |
This file has been truncated, but you can view the full file.
This file contains 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
[{"VOL":"1","DEPART":1,"DUREE":10,"PRIX":19},{"VOL":"2","DEPART":2,"DUREE":7,"PRIX":5},{"VOL":"3","DEPART":3,"DUREE":8,"PRIX":15},{"VOL":"4","DEPART":4,"DUREE":1,"PRIX":2},{"VOL":"5","DEPART":5,"DUREE":10,"PRIX":3},{"VOL":"6","DEPART":6,"DUREE":5,"PRIX":9},{"VOL":"7","DEPART":7,"DUREE":3,"PRIX":12},{"VOL":"8","DEPART":8,"DUREE":4,"PRIX":1},{"VOL":"9","DEPART":9,"DUREE":1,"PRIX":16},{"VOL":"10","DEPART":10,"DUREE":6,"PRIX":5},{"VOL":"11","DEPART":11,"DUREE":6,"PRIX":16},{"VOL":"12","DEPART":12,"DUREE":3,"PRIX":11},{"VOL":"13","DEPART":13,"DUREE":3,"PRIX":5},{"VOL":"14","DEPART":14,"DUREE":7,"PRIX":15},{"VOL":"15","DEPART":15,"DUREE":10,"PRIX":20},{"VOL":"16","DEPART":16,"DUREE":6,"PRIX":2},{"VOL":"17","DEPART":17,"DUREE":6,"PRIX":12},{"VOL":"18","DEPART":18,"DUREE":4,"PRIX":12},{"VOL":"19","DEPART":19,"DUREE":8,"PRIX":9},{"VOL":"20","DEPART":20,"DUREE":7,"PRIX":18},{"VOL":"21","DEPART":21,"DUREE":4,"PRIX":2},{"VOL":"22","DEPART":22,"DUREE":2,"PRIX":1},{"VOL":"23","DEPART":23,"DUREE":7,"PRIX":16},{"VOL":"24","D |
OlderNewer