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
# -*- encoding: utf-8 -*- | |
# | |
# $ ruby tweet.rb hogehoge で投稿するよ | |
# | |
require "oauth" | |
require "twitter" | |
require "pp" | |
require "json" |
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
@Override | |
public String toString() { | |
StringBuffer sb = new StringBuffer(); | |
sb.append(this.getClass().getSimpleName() + "["); | |
Class<?> clazz = this.getClass(); | |
while (clazz != null) { | |
Field[] fields = clazz.getDeclaredFields(); | |
for (Field field: fields) { | |
try { |
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
private void debugCursor(Cursor c) { | |
if (c.moveToFirst()) { | |
do { | |
StringBuffer sb = new StringBuffer(); | |
sb.append("["); | |
for (int i = 0; i < c.getColumnCount(); i++) { | |
sb.append(c.getColumnName(i)); |
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 StringUtil { | |
/** 半角スペース */ | |
private static final char SPACE_CHAR_HALF = ' '; | |
/** 全角スペース */ |
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="ja"> | |
<head> | |
<meta charset="UTF-8"> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> | |
<script type="text/javascript"> | |
$(function() { | |
$('#target').bind('drop', function(e) { | |
// ドロップ |
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
EditText editText = new EditText(this); | |
editText.setInputType(InputType.TYPE_CLASS_TEXT); | |
editText.setFilters(new InputFilter[] {new InputFilter.LengthFilter(10)}); |
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..100).each{|i| puts i % 15 == 0 ? 'Fizz Buzz' : i % 3 == 0 ? 'Fizz' : i % 5 == 0 ? 'Buzz' : i} |
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
private void debugVersionInfo() { | |
try { | |
PackageInfo packageInfo = getPackageManager().getPackageInfo(getPackageName(), PackageManager.GET_META_DATA); | |
int versionCode = packageInfo.versionCode; | |
String versionName = packageInfo.versionName; | |
Log.d(TAG, "versionCode:" + versionCode); | |
Log.d(TAG, "versionName:" + versionName); |
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
# built application files | |
*.apk | |
*.ap_ | |
# files for the dex VM | |
*.dex | |
# Java class files | |
*.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
git config --global push.default upstream |