This file contains hidden or 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
| /** | |
| * Inject a {@link Broadcaster} based on @Path | |
| */ | |
| private @PathParam("tablename") Broadcaster tablename; | |
| @GET | |
| @Path("{tablename}") | |
| @Suspend(resumeOnBroadcast=true, period=30, listeners={EventsLogger.class}) | |
| public String getData(@PathParam("tablename") String tableName, |
This file contains hidden or 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.apache.commons.logging.LogFactory; | |
| @SuppressWarnings({"UnusedDeclaration"}) | |
| public class Log | |
| { | |
| private final org.apache.commons.logging.Log log; | |
| private Log(String name) | |
| { | |
| log = LogFactory.getLog(name); |
This file contains hidden or 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 org.skife.jdbi.v2.unstable.eod; | |
| import junit.framework.TestCase; | |
| import org.h2.jdbcx.JdbcDataSource; | |
| import org.skife.jdbi.v2.DBI; | |
| import org.skife.jdbi.v2.Handle; | |
| import org.skife.jdbi.v2.Something; | |
| import java.io.Closeable; | |
| import java.util.List; |
This file contains hidden or 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
| Client: Mac Pro OS X, 2.8Ghz Quad-Core Intel Xeon, 8 GB 1066 Mhz DDR3 | |
| Server: lighttpd/1.4.26 -> Ubuntu, 2.8Ghz Duo-Core Intel Xeon, 6 1066 Mhz DDR3 | |
| 50 threads that does 50 requests, done 50 times. | |
| Async Http Client 1.5.0-SNAPSHOT (Config http://is.gd/7rGGWU) | |
| ============================================================= | |
| BenchmarkResult{requestsPerSecond=1578.96, threads=50, batches=50, targetRequests=125000, successfulRequests=125000, failedRequests=0, averageRequestTime=0.63ms, averageBatchTime=1583.32ms, totalBenchmarkTime=79166.03ms} | |
| (last 5 runs) |
This file contains hidden or 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
| function merge_sort(a_array) { | |
| if (a_array.length < 2) { | |
| return a_array; | |
| } | |
| var mid = parseInt(a_array.length / 2); | |
| var left = a_array.slice(0, mid); | |
| var right = a_array.slice(mid, a_array.length); | |
| return merge(merge_sort(left), merge_sort(right)); | |
| } |
This file contains hidden or 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
| like as the waves make towards the pebbled shore | |
| so do our minutes hasten to their end | |
| each changing place with that which goes before | |
| in sequent toil all forwards do contend |
This file contains hidden or 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
| from faireſt creatures we deſire increaſe, | |
| that thereby beauties roſe might neuer die, | |
| but as the riper ſhould by time deceaſe, | |
| his tender heire might beare his memory |
This file contains hidden or 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
| when to the Seſſions of ſweet ſilent thought, | |
| i ſummon vp remembrance of things paſt, | |
| i ſigh the lacke of many a thing I ſought, | |
| and with old woes new waile my deare times waſte |
This file contains hidden or 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
| require 'mime/types' | |
| ARGV.each do |mime_type| | |
| mimes = MIME::Types[mime_type] | |
| exts = [] | |
| mimes && mimes.each do |mime| | |
| mime.extensions.each { |x| exts << x } | |
| end | |
| puts "#{mime_type} extensions : #{exts.join(',')}" | |
| end |
This file contains hidden or 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
| require 'lingua/stemmer' | |
| stemmer = Lingua::Stemmer.new(:language => "en") | |
| puts ARGV.map { |w| stemmer.stem(w) }.join(" ") |
OlderNewer