Skip to content

Instantly share code, notes, and snippets.

View fb55's full-sized avatar

Felix Boehm fb55

View GitHub Profile
@fb55
fb55 / clone.java
Created August 23, 2010 15:35
jsarray-behaviour for java
class clone{
private int id;
public clone next;
public clone previous;
private boolean deleted = false;
public String value;
public int getId(){
return this.id;
//just wrote this code for a project. how cool is that?
var reqURL = (function loopRegExps (url, regExps) {
for(var i in regExps){
if(url.match(regExps[i][0])){ return (regExps[i][1] + "url=" + encodeURIcomponent(url))}
}
})(url, collectionA);
/*just some thoughts:
I would always use a named function, so it can call itself if needed. It's just a good practice.
@fb55
fb55 / html2article.xml
Created April 25, 2010 18:23
a YQL script to extract articles from webpages
<?xml version="1.0" encoding="UTF-8" ?>
<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd">
<meta>
<author>Felix Boehm</author>
<documentationURL>http://feedic.com/</documentationURL>
<sampleQuery>select * from t where url="feedic.com"</sampleQuery>
</meta>
<bindings>
<select itemPath="" produces="XML">
<urls>