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
public class LambdaJBenchmark implements Benchmark { | |
public void iterateSimpleList(final List<String> lines) { | |
convert(lines, new Converter<Object, Object>() { | |
public Object convert(Object o) { | |
return o; | |
} | |
}); | |
} |
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
public class BenchmarkProxyManager implements InvocationHandler { | |
private Benchmark o; | |
public BenchmarkProxyManager(Benchmark o) { | |
this.o = o; | |
} | |
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { |
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
final Benchmark java = BenchmarkProxyManager.getProxiedClass(JavaBenchmark.class); | |
final Benchmark guava = BenchmarkProxyManager.getProxiedClass(GuavaBenchmark.class); | |
final Benchmark lambdaj = BenchmarkProxyManager.getProxiedClass(LambdaJBenchmark.class); | |
java.iterateSimpleList(lines); |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.0/themes/base/jquery-ui.css"> | |
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.js"></script> | |
<script type="text/javascript" src="http://code.jquery.com/ui/1.9.0/jquery-ui.js"></script> |
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 javapuzzle; | |
import com.google.common.base.Joiner; | |
import com.google.common.base.Predicate; | |
import com.google.common.collect.Collections2; | |
import com.google.common.collect.Lists; | |
import java.util.Collection; | |
import java.util.List; |
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 codeStory2013; | |
import java.util.*; | |
/** | |
* . | |
* | |
* @author fsznajderman | |
* date : 03/02/13 | |
*/ |
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
object Parser { | |
def main(args: Array[String]) { | |
new File(/*[DIRECTORY_PATH"*/).listFiles() foreach (f => { | |
val xml = XML.loadFile(f.getPath) | |
(xml \\ "value") foreach (v => | |
(v \ "@name").text match { | |
case "returnType" => println( f.getName.split('.')(0) + " , " + v.text) | |
case _ => | |
} | |
) |
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 scala.io.Source | |
import scala.util.parsing.json.{JSONObject, JSONFormat, JSONArray} | |
/** | |
* Created by fsznajderman on 16/04/2014. | |
*/ | |
object main { | |
case class Accident(lum: Int, agg: Int, int: Int, atm: Int, col: Int, catr: Int, grav: Float) |
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 utils | |
import rapture.io._ | |
import org.jsoup.Jsoup | |
import akka.actor.Actor | |
import scala.language.implicitConversions | |
import java.net.MalformedURLException | |
/** | |
* User: fsznajderman |
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.common.base.Optional; | |
import model.Contact; | |
/** | |
* Created by fsznajderman on 28/11/2014. | |
*/ | |
public class OtherCase { | |
OlderNewer