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
// see http://ontaikikou.blogspot.jp/2012/08/groovyplayn.html | |
// http://stackoverflow.com/questions/11846023/unable-to-run-playn-sample-project-compile-errors | |
// not run | |
// depends of -Djava.library.path=target/lwjgl/natives/macos-x | |
@GrabResolver(name='forplay', root='http://forplay.googlecode.com/svn/mavenrepo',m2Compatible='true') | |
@Grab(group='com.googlecode.playn', module='playn-core', version='1.4') | |
@Grab(group='com.googlecode.playn', module='playn-java', version='1.4') | |
@Grab(group='com.samskivert', module='pythagoras', version='1.3.1') | |
@Grab(group='org.lwjgl.lwjgl', module='lwjgl', version='2.8.4') |
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
@GrabResolver(name='twitter4j',root='http://twitter4j.org/maven2') | |
@Grab('org.twitter4j:twitter4j-core:[3.0,)') | |
import twitter4j.* | |
def twitter = new TwitterFactory().getInstance() | |
twitter.getFavorites('kimukou2628').each{ //OK | |
//twitter.getFavorites('kimukou2628',new Paging(1,40)).each{ //NG | |
println "${it.user.name}:${it.text}" |
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
//println("path => " + this.class.protectionDomain.codeSource.location.path) | |
//println("fileName => " + new File(this.class.protectionDomain.codeSource.location.file).name) | |
def loc=this.getClass().getProtectionDomain().getCodeSource().getLocation() | |
println "===start($loc)===" | |
def prop1 = new Properties() | |
prop1.load(new FileInputStream('local.properties')) | |
def config = new ConfigSlurper().parse(prop1) | |
def adb_home="${config.sdk.dir}/platform-tools" |
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
// ref http://d.hatena.ne.jp/maji-KY/20110919/1316417705 | |
// http://d.hatena.ne.jp/t-horikiri/20120308/1331182734 | |
// | |
// javadoc http://jsoup.org/apidocs/index.html?overview-summary.html | |
// | |
@Grab(group='org.jsoup', module='jsoup', version='1.7.1') | |
import org.jsoup.Jsoup | |
import org.jsoup.nodes.Document | |
import org.jsoup.nodes.Element |
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
<receiver android:name=".HeadsetStateReceiver" android:enabled="false" android:process=":remote"> | |
<intent-filter> | |
<action android:name="android.intent.action.HEADSET_PLUG"/> | |
</intent-filter> | |
</receiver> |
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.apache.tools.ant.Project | |
import org.apache.tools.ant.ProjectHelper | |
def antFile = new File("./build.xml") | |
def project = new Project() | |
project.init() | |
ProjectHelper.configureProject(project, antFile); | |
/* | |
//==== NG ========= |
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 android.graphics.Bitmap; | |
import android.support.v4.util.LruCache; | |
public final class ImageCache { | |
private static final String TAG = "ImageCache"; | |
private static final int MEM_CACHE_SIZE = 1 * 1024 * 1024; // 1MB | |
private static LruCache<String, Bitmap> sLruCache; |
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 android.speech.tts.TextToSpeech; | |
import com.google.tts.TextToSpeechBeta; | |
private int initTtsMode = -1; //-1:TTS無効、1:EN、2:N2TTS | |
private Resources m_r; | |
protected Resources m_r; |
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
ant.path(id: "aptFactoryPath",location:'factory/jsonpullparser-apt-1.4.11.jar') | |
ant.path(id: "path") { | |
fileset(dir: "${config.sdk.dir}/tools/lib") { | |
include(name: "**/*.jar") | |
} | |
fileset(dir: 'libs') { | |
include(name: "**/*.jar") | |
} | |
} |
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
☆1 の段階で | |
net.vvakame.util.jsonpullparser.JsonFormatException: not started '('!, Do you want the json hash? | |
☆2 だとエラーは出なくなるが1個しか取れないよう・・・(10個は取れるはず | |
☆3 だと下記のエラー(treatUnknownKeyAsError = true つけると全マッピングする必要あり) | |
net.vvakame.util.jsonpullparser.JsonFormatException: unsupported key. key=user_id | |
とか出てしまう |