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
GroovyConsleの動きがいまいちの場合は以下を修正すること | |
(groovyConsoleのシェルの方を治すのも可。特にMac!!) | |
$GROOVY_HOME/bin | |
startGroovy | |
## 先頭に | |
export JAVA_HOME=/Library/Java/Home | |
export JAVA_OPTS='-Dgroovy.source.encoding=UTF-8 -Dfile.encoding=UTF-8' |
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
//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 testClass =['com.nihon0tc.example.test.AdTest', | |
'com.nihon0tc.example.test.AdManagerTest#testManager'] | |
def prop0 = new Properties() |
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 java.util.ArrayList; | |
import android.content.Context; | |
import android.graphics.Typeface; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.BaseAdapter; | |
import android.widget.CheckedTextView; | |
import android.widget.ImageView; |
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
//ref https://gist.github.com/3595115 | |
import android.util.Log; | |
import com.nihon0tc.ad.BuildConfig; | |
public class LogUtil { | |
public static void debug(String tag,Object msg) | |
{ |
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
[exec] android.content.res.Resources$NotFoundException: String array resource ID #0x7f050000 | |
[exec] at android.content.res.Resources.getStringArray(Resources.java:393) | |
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
private static AlertDialog updateDialog = null; | |
private Resources m_r = null; | |
public void showMessageBoxUpdate(final String title, final String message) { | |
if(m_r ==null)m_r = getResources(); | |
if(updateDialog!=null){ | |
updateDialog.dismiss(); | |
updateDialog=null; | |
} | |
LogUtil.trace(TAG, "title = " + title); | |
LogUtil.trace(TAG, "message = " + message); |
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
var cronJob = require('cron').CronJob; | |
cronJob('0 5 1 * * *', function(){ | |
console.log('You will see this message every day'); | |
}, null, true, "japan/tokyo"); |
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
// 右下=>左上、左下=>右上 のコマンド入力イメージ | |
private int fling_count = 0; | |
private final SimpleOnGestureListener onGestureListener = new SimpleOnGestureListener() { | |
@Override | |
public boolean onFling(MotionEvent event1, MotionEvent event2, float velocityX, float velocityY) { | |
//横向き基準 | |
float BASE_X = 400; | |
float BASE_Y = 200; |
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
http://otter.topsy.com/credit.json | |
{ | |
response: { | |
limit: 3000, | |
reset: 1341903600, | |
refresh_in_secs: 83684, | |
remaining: 2675 | |
}, | |
request: { |
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
private String create_uuid() { | |
String sUUID = get_string("uuid",null); | |
if(sUUID!=null)return sUUID; | |
UUID uuid = UUID.randomUUID(); | |
sUUID= uuid.toString(); | |
Log.v(TAG, "uuid gen " + sUUID); | |
put_string("uuid",sUUID); | |
return sUUID; | |
} |