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
StaxMatcher<String> value = start("value").thenr(chars()).thenl(end("value")); | |
StaxMatcher<String> extra = start("extra").thenr(chars()).thenl(end("extra")); | |
StaxMatcher<Tuple2<String, String>> entry = start("entry").thenr(value).then(extra).thenl(end("entry")); | |
Mapper<Void> execEntry = new Mapper<Tuple2<String, String>, T>(entry) { | |
public Void process(Tuple2<String, String> data) { | |
// insert data into the database | |
return null; |
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
grammar ImmanixToStringDebug; | |
options { | |
output=AST; | |
ASTLabelType=CommonTree; | |
} | |
p : m; | |
m : (LP! binop RP! rep^?) | (LB! binop RB!) |SM; | |
binop : m (op^ m)*; |
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
javascript:(function(){var a=window,b=document,c=encodeURIComponent,d=a.open("http://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk="+c(b.location)+"&title="+c(b.title),"bkmk_popup","left="+((a.screenX||a.screenLeft)+10)+",top="+((a.screenY||a.screenTop)+10)+",height=420px,width=550px,resizable=1,alwaysRaised=1");a.setTimeout(function(){d.focus()},300)})(); |
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 com.google.gwt.core.client.JavaScriptObject; | |
public final class FsItem extends JavaScriptObject { | |
protected FsItem() { | |
} | |
public native FsItem init(boolean folder, String absoluteName, String name, int size) /*-{ | |
this.folder = folder; | |
this.absoluteName = absoluteName; | |
this.name = name; |
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 org.codehaus.jackson.jaxrs.JacksonJsonProvider; | |
import javax.ws.rs.core.Application; | |
import java.util.HashSet; | |
import java.util.Set; | |
public class GfeResources extends Application { | |
@Override | |
public Set<Object> getSingletons() { | |
Set<Object> res = new HashSet<Object>(); |
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 org.restlet.Context; | |
import org.restlet.ext.jaxrs.JaxRsApplication; | |
import javax.ws.rs.core.Application; | |
import java.util.HashSet; | |
import java.util.Set; | |
import org.codehaus.jackson.jaxrs.JacksonJsonProvider; | |
class GfeResources extends Application { | |
@Override |
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 | |
PID=`ps x | grep libflashplayer.so | grep -v grep | awk '{print $1}'` | |
FD=`lsof -p $PID | grep Flash | awk '{print $4}' | sed 's/u$//'` | |
while IFS=' ' read -ra ADDR; do | |
for x in "${ADDR[@]}"; do | |
echo "cp /proc/$PID/fd/$x ~" | |
done | |
done <<< "$FD" |
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 jawher.moulder.examples; | |
import static jawher.moulder.moulds.Moulds.*; | |
import java.util.Arrays; | |
import org.jsoup.Jsoup; | |
import org.jsoup.nodes.Document; | |
import org.junit.Before; | |
import org.junit.Test; |
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 jawher.moulder.examples; | |
import static jawher.moulder.moulds.Moulds.*; | |
import java.util.Arrays; | |
import org.jsoup.Jsoup; | |
import org.jsoup.nodes.Document; | |
import org.junit.Before; | |
import org.junit.Test; |
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
Collection<Link> links = Link.select(); | |
e.register("ul#content > li", new Repeater<Link>( | |
new SimpleValue<Iterable<Link>>(links)), new SubTemplator() | |
.register("ul.tags li", new Repeater<String>( | |
new TransformValue<Iterable<String>, Link>( | |
new ElementDataValue<Link>()) { | |
@Override | |
protected Iterable<String> transform(Link s) { |