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
- A [*] (master trunk) | |
\- B0 - B1 - B2 (messy_branch) |
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
def bank(int amount) { | |
[withdraw: {n -> amount -= n}, | |
deposit: {n -> amount += n}, | |
check: {amount}] | |
} | |
account = bank(1000) | |
println account.check() |
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
ThumbRemap_Init: | |
;1.有効にしたい方のコメントを削除 | |
;#Include %A_ScriptDir%\Thumb_ALPS.ahk | |
#Include %A_ScriptDir%\Thumb_Synaptics.ahk | |
;2.タッチパッドに触れているときのみ有効化したいリマップを列挙 | |
Thumb_Remap = | |
( |
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 list of reasons | |
def check_section(section) | |
case section.output_type | |
when 'text' | |
if section.content.match /.{0,10}<.{0,10}/ then | |
return $& | |
end | |
end | |
end | |
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.net.URL; | |
public class UrlTest { | |
public static void main(String argv[]) throws Exception { | |
URL url1 = new URL("http://squiare.github.io/"); | |
URL url2 = new URL("http://google.github.io/"); | |
System.out.println( | |
String.format("\"%s\".equals(\"%s\") = %b", | |
url1.toString(), |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
ninepatch { | |
round_rect { | |
vStretch 8, 32 | |
hStretch 8, -8 | |
vPadding 7, 33 | |
hPadding 7, -7 | |
} | |
} |
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
#!/bin/sh | |
if [ -z "$ANDROID_HOME" ] ; then | |
echo Please set ANDROID_HOME >&2 | |
fi | |
for jar in "${ANDROID_HOME}"/platforms/android-*/android.jar ; do | |
sdkVer=`expr "${jar}" : '.*/\(android-[0-9]*\)/android.jar'` | |
jar tf "$jar" | sed -n '/^java.*\.class/{s/\.class$//; s,/,.,g; p;}' |sort > sdk-${sdkVer} | |
done |
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
def waitForEmulatorReady() { | |
def bootanim = '' | |
def failCounter = 0 | |
while (!(bootanim =~ /stopped/)) { | |
def adbProcess = 'adb -e shell getprop init.svc.bootanim'.execute() | |
def errCode = adbProcess.waitFor() | |
if (errCode != 0) { | |
failCounter += 1 | |
if (failCounter > 3) { | |
throw new RuntimeException('failed to start emulator') |
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 com.android.build.gradle.internal.tasks.DeviceProviderInstrumentTestTask | |
import com.android.builder.testing.api.DeviceConnector | |
def isDeviceReady(DeviceConnector device) { | |
def res = device.getSystemProperty('init.svc.bootanim').get() | |
return res == 'stopped' | |
} | |
def waitForAllDevicesReady(DeviceProviderInstrumentTestTask testTaks) { | |
// Add time out? |