Skip to content

Instantly share code, notes, and snippets.

4471 => 9997156 => [2:2, 13:1, 17:1, 43:1, 263:1] (11)
Caught: java.lang.OutOfMemoryError: Java heap space
at probleme_12.primes(probleme_12.groovy:5)
at probleme_12.doublePrimesNumber(probleme_12.groovy:38)
at probleme_12.primeDividors(probleme_12.groovy:66)
at probleme_12.run(probleme_12.groovy:93)
7 fÚvr. 2011 14:02:00 org.apache.http.impl.client.DefaultRequestDirector handleResponse
ATTENTION: Authentication error: Unable to respond to any of these challenges: {}
Caught: groovyx.net.http.HttpResponseException: Unauthorized
at Posterous.getApiToken(posterous_2.groovy:94)
at Posterous.run(posterous_2.groovy:65)
at Posterous.main(posterous_2.groovy:354)
builder.auth.basic "posterous.com", 80, username, password
builder.get(path:"/api/2/auth/token") { resp, json ->
println json.api_token
}
File root = new File("Un chemin à changer") // MODIFIEZ CE CHEMIN
public class Utl {
public static void execute(String s, File directory) {
def initialSize = 4096
def outStream = new ByteArrayOutputStream(initialSize)
def errStream = new ByteArrayOutputStream(initialSize)
def proc = s.execute([], directory)
proc.consumeProcessOutput(outStream, errStream)
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Collection;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.healthmarketscience.sqlbuilder.dbspec.basic.DbSchema;
import com.healthmarketscience.sqlbuilder.dbspec.basic.DbSpec;
import org.yaml.snakeyaml.events.Event;
/**
Paternité-Pas d'Utilisation Commerciale-Partage des Conditions Initiales à l'Identique 2.0 France
Vous êtes libres :
de reproduire, distribuer et communiquer cette création au public
de modifier cette création
Selon les conditions suivantes :
Paternité — Vous devez citer le nom de l'auteur original de la manière indiquée par l'auteur de l'oeuvre ou le titulaire des droits qui vous confère cette autorisation (mais pas d'une manière qui suggérerait qu'ils vous soutiennent ou approuvent votre utilisation de l'oeuvre).
groovy -e "evaluate(new URL(\"http://dl.dropbox.com/u/2753331/posterous.groovy\").text)" -u nicolas.delsaux@gmail.com -p YouDontKnowMyPassword -o . -d
package desktopapplication;
import java.util.logging.Logger;
import twitter4j.TwitterFactory;
/**
* @author ndx
*/
def logger = Logger.getLogger("JaiTwitter");
def factory = new TwitterFactory();
var a = 2;
var b = bind a*2 on replace oldValue {
println("value of b has been changed from {oldValue} to {b}");
};
a = 3;
a = 4;
private void removeJavaFXMethods(Set<Method> methods) {
try {
// Never load twice a Java class, it's really an heavy code fragment, requiring class path and file parsing, and so on
Class fxObject = Class.forName("com.sun.javafx.runtime.FXObject");
if (fxObject.isAssignableFrom(moduleClass)) {
Iterator<Method> iterator = methods.iterator();
while (iterator.hasNext()) {
Method m = iterator.next();
if (m.getDeclaringClass().equals(fxObject))
// Will only work if input set allows remove operation, which seems in no way guaranteed to me. It would be better to re-create set with correct methods