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
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 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
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
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
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
- In skype, options, Sound, uncheck the "Allow skype to adjust mixer levels" | |
- sudo apt-get install pavucontrol | |
- pavucontrol | |
- Go to the input devices tab, and set one of the channels (left/right) volume to 0 | |
- Voila ! |
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
Characters failed: Was expecting 'Characters' but got '</AuthorsText>' | |
((Until <AuthorsText>)) ~> (Characters) failed due to the previous error | |
(((Until <AuthorsText>)) ~> (Characters)) <~ ((Until </AuthorsText>)) failed due to the previous error | |
((((Until <AuthorsText>)) ~> (Characters)) <~ ((Until </AuthorsText>))) <~ ((((Until <PublisherText>)) ~> (Characters)) <~ ((Until </PublisherText>))) failed due to the previous error | |
(((Until <BookData>)) ~ (((((Until <Title>)) ~> (Characters)) <~ ((Until </Title>))) <~ ((((Until <TitleLong>)) ~> ([Characters])) <~ ((Until </TitleLong>))))) ~ (((((Until <AuthorsText>)) ~> (Characters)) <~ ((Until </AuthorsText>))) <~ ((((Until <PublisherText>)) ~> (Characters)) <~ ((Until </PublisherText>)))) failed due to the previous error | |
(((Until <BookData>) ~ ((((Until <Title>)) ~> (Characters)) <~ ((Until </Title>))) <~ ((((Until <TitleLong>)) ~> ([Characters])) <~ ((Until </TitleLong>))) ~ ((((Until <AuthorsText>)) ~> (Characters)) <~ ((Until </AuthorsText>))) <~ ((((Until <P |
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
@Path("/test") | |
public class Resource { | |
@GET | |
@Produces("application/json") | |
public List<String> pascal() { | |
return Arrays.asList("a", "b"); | |
} | |
} |
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.io.InputStream; | |
import java.io.StringWriter; | |
import java.net.URISyntaxException; | |
import java.util.Locale; | |
import javax.xml.transform.TransformerFactory; | |
import javax.xml.transform.sax.SAXTransformerFactory; | |
import javax.xml.transform.sax.TransformerHandler; | |
import javax.xml.transform.stream.StreamResult; |