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
/* | |
* Thumbnail API(http://img.simpleapi.net/) with jQuery | |
* sample: http://jsdo.it/eller86/cnuG | |
*/ | |
;(function($){ | |
$.thumbnail = $.thumbnail || function(sourceUrl){ | |
return $('<a>').attr('href', sourceUrl).append( | |
$('<img>').attr({ | |
src: 'http://img.simpleapi.net/small/' + sourceUrl, | |
width: 128, |
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
/** | |
* Returns a new string that is a substring of this string. | |
* The surrogate pair is taken into consideration. | |
*/ | |
final class SubstringSample { | |
static String substring(String source, int startCodePoints) { | |
final int endCodePoints = source.codePointCount(0, source.length()); | |
return substring(source, startCodePoints, endCodePoints); | |
} |
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.util.ArrayList; | |
public class Test { | |
private Class<?>[] CLASSES = new Class<?>[] { | |
Object.class, | |
HasOneField.class, | |
HasTwoField.class, | |
HasThreeField.class, | |
HasLongField.class, | |
HasTwoLongField.class, |
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
/* This program is free software. It comes without any warranty, to | |
* the extent permitted by applicable law. You can redistribute it | |
* and/or modify it under the terms of the Do What The Fuck You Want | |
* To Public License, Version 2, as published by Sam Hocevar. See | |
* http://sam.zoy.org/wtfpl/COPYING for more details. */ | |
/** | |
* 明示的な開放が必要なリソースクラスが使用する。 | |
* | |
* finalizeメソッドにより、開放されていないリソースがあった場合標準エラー出力に警告を出す。 |
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.BufferedWriter; | |
import java.io.FilterOutputStream; | |
import java.io.IOException; | |
import java.io.OutputStreamWriter; | |
import java.io.Writer; | |
import java.util.Arrays; | |
import org.json.JSONException; | |
import org.json.JSONObject; |
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
The constructor ColumnIterator(CassandraConnection, CassandraDAOFactory, String, String, String, boolean, ConsistencyLevel, ConsistencyLevel) is undefined | CassandraEnvelopeDao.java | /PARTAKE/src/main/java/in/partake/model/dao/cassandra | line 119 | Java Problem | |
---|---|---|---|---|---|
The constructor ColumnIterator(CassandraConnection, CassandraDAOFactory, String, String, String, boolean, ConsistencyLevel, ConsistencyLevel) is undefined | CommentCassandraDao.java | /PARTAKE/src/main/java/in/partake/model/dao/cassandra | line 175 | Java Problem | |
The constructor ColumnIterator(CassandraConnection, CassandraDAOFactory, String, String, String, boolean, ConsistencyLevel, ConsistencyLevel) is undefined | EnrollmentCassandraDao.java | /PARTAKE/src/main/java/in/partake/model/dao/cassandra | line 197 | Java Problem | |
The constructor ColumnIterator(CassandraConnection, CassandraDAOFactory, String, String, String, boolean, ConsistencyLevel, ConsistencyLevel) is undefined | MessageCassandraDao.java | /PARTAKE/src/main/java/in/partake/model/dao/cassandra | line 200 | Java Prob |
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
Index: src/main/java/in/partake/model/dao/cassandra/CassandraDao.java | |
=================================================================== | |
--- src/main/java/in/partake/model/dao/cassandra/CassandraDao.java (revision 310) | |
+++ src/main/java/in/partake/model/dao/cassandra/CassandraDao.java (working copy) | |
@@ -12,6 +12,7 @@ | |
import org.apache.cassandra.thrift.Column; | |
import org.apache.cassandra.thrift.ColumnOrSuperColumn; | |
+import org.apache.cassandra.thrift.ColumnPath; | |
import org.apache.cassandra.thrift.ConsistencyLevel; |
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 jp.skypencil; | |
import java.io.IOException; | |
import java.util.ArrayList; | |
import java.util.List; | |
import javax.servlet.http.HttpServlet; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletResponse; |
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
Index: src/main/java/in/partake/servlet/listener/InitializationListener.java | |
=================================================================== | |
--- src/main/java/in/partake/servlet/listener/InitializationListener.java (revision 335) | |
+++ src/main/java/in/partake/servlet/listener/InitializationListener.java (working copy) | |
@@ -1,11 +1,18 @@ | |
package in.partake.servlet.listener; | |
-import java.io.File; | |
-import java.io.FilenameFilter; | |
- |
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 jp.skypencil.misc.random; | |
import java.util.Random; | |
public class EndlessRetryer { | |
private final Random seed = new Random(); | |
public int random(int min, int max) { | |
final int width = max - min; | |
if (min < 0 || width < 0) throw new IllegalArgumentException(); |
OlderNewer