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
public class SampleFragment extends Fragment implements LoaderCallbacks<String> { | |
private static final int LOADER_ID = 0; | |
@Override | |
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { | |
return inflater.inflate(R.layout.fragment_main, container, false); | |
} | |
@Override |
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
# device上の/systemを書き込み可で再マウントする | |
# 方法1:adbコマンド | |
# | |
adb root # userdebugでは必要、engでは不要 | |
adb remount | |
# 方法2:端末上のシェルでmountコマンド | |
# |
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
// | |
// Access to local JVM's JVM servers without port | |
// http://stackoverflow.com/questions/5552960/how-to-connect-to-a-java-program-on-localhost-jvm-using-jmx | |
// | |
import com.sun.tools.attach.* | |
import javax.management.remote.* | |
import javax.management.* | |
VirtualMachine.list().each { desc -> |
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
MY_DIRNAME=$(dirname $0) | |
cd $MY_DIRNAME | |
cd YOUR_APP_DIR | |
echo "インストール先を選んでください" | |
# sedで余計な文字列を削除し,selectでANSに選ばれた選択肢を入れる | |
select ANS in `adb devices | sed -e "s/List of devices attached//" | sed -e "s/device//"` | |
# 入力値が適切な値かどうかチェック | |
do | |
if [ -z "$ANS" ]; then |
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 com.hisasann.sample_cookieshare; | |
import java.io.IOException; | |
import java.util.List; | |
import org.apache.http.HttpResponse; | |
import org.apache.http.HttpStatus; | |
import org.apache.http.client.ClientProtocolException; | |
import org.apache.http.client.CookieStore; | |
import org.apache.http.client.ResponseHandler; |
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
apply plugin: 'java' | |
apply plugin: 'eclipse' | |
apply plugin: 'maven' | |
configurations { taskdef } | |
repositories { mavenCentral() } | |
dependencies { taskdef 'java2html:j2h:1.3.1' } |
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
// {"desc":"Description", "url":"http://host/path", "price":9999, "source":"XXX Shoppers"} | |
// -> Item (desc (String), url (String), price (long), source (String)) | |
package com.gmail.altakey.xxx; | |
import android.util.Log; | |
import java.io.*; | |
import java.util.*; | |
import net.vvakame.util.jsonpullparser.*; | |
public class ItemStreamParser { |
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
/** | |
* manifest.json(server) | |
*/ | |
{ | |
"manifest_version": 2, | |
"name": "tcp socket server sample", | |
"description": "try tcp socket server coding!!", | |
"version": "0.1", | |
"minimum_chrome_version": "24", |
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
<?xml version="1.0" encoding="utf-8"?> | |
<project name="runner-setup"> | |
<!-- Half-baked pre build setup from Android SDK r20 --> | |
<target name="sdk-build-setup"> | |
<!-- read the previous build mode --> | |
<property file="${out.build.prop.file}" /> | |
<!-- if empty the props won't be set, meaning it's a new build. | |
To force a build, set the prop to empty values. --> | |
<property name="build.last.target" value="" /> | |
<property name="build.last.is.instrumented" value="" /> |
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
' エクスポートしたいmdbとエクスポート先のパスを記述 | |
Dim src : src = "D:\\M2T\\TestDB.mdb" | |
Dim dst : dst = "D:\\M2T\\" | |
Dim fso : Set fso = CreateObject("Scripting.FileSystemObject") | |
If fso.FileExists(src) <> True Then | |
MsgBox src & vbCrLf & "は存在しません。", vbCritical | |
WScript.Quit() | |