Skip to content

Instantly share code, notes, and snippets.

View zaki50's full-sized avatar

Makoto Yamazaki zaki50

View GitHub Profile
diff -Nur support-v4-22.2.1/android/support/v4/animation/AnimatorCompatHelper.java support-v4-23.0.0/android/support/v4/animation/AnimatorCompatHelper.java
--- support-v4-22.2.1/android/support/v4/animation/AnimatorCompatHelper.java 2015-07-17 03:08:30.000000000 +0900
+++ support-v4-23.0.0/android/support/v4/animation/AnimatorCompatHelper.java 2015-06-23 08:43:44.000000000 +0900
@@ -17,6 +17,7 @@
package android.support.v4.animation;
import android.os.Build;
+import android.view.View;
abstract public class AnimatorCompatHelper {
diff -Nur appcampat-v7-22.2.1/android/support/v7/app/ActionBar.java appcampat-v7-23.0.0/android/support/v7/app/ActionBar.java
--- appcampat-v7-22.2.1/android/support/v7/app/ActionBar.java 2015-07-17 03:08:30.000000000 +0900
+++ appcampat-v7-23.0.0/android/support/v7/app/ActionBar.java 2015-06-23 08:43:44.000000000 +0900
@@ -46,45 +46,38 @@
* A primary toolbar within the activity that may display the activity title, application-level
* navigation affordances, and other interactive items.
*
- * <p>Beginning with Android 3.0 (API level 11), the action bar appears at the top of an
- * activity's window when the activity uses the system's {@link
- * android.R.style#Theme_Holo Holo} theme (or one of its descendant themes), which is the default.
@zaki50
zaki50 / gist:03c6b3f213881e6c5e16
Last active September 7, 2015 00:13
Data Binding を使うと Espresso 標準の withText(String) の Matcher が使い物にならなくなるので Data Binding 使用時にも使える withText(String) の実装。Data Binding は Stringではない CharSequence をセットするのが原因。
private static Matcher<View> withText(final String expectedText) {
return new BoundedMatcher<View, TextView>(TextView.class) {
@Override
public void describeTo(Description description) {
description.appendText("with string : ");
description.appendValue(expectedText);
}
@Override
public boolean matchesSafely(TextView textView) {
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="foo">His name is <xliff:g id="name" example="Andy Rubin">%1$s</xliff:g>.</string>
</resources>
<settings>
<profiles>
<profile>
<id>sign</id>
<properties>
<keystore>./test.keystore</keystore>
<storepass>hogehoge</storepass>
<keypass>hogehoge</keypass>
<alias>test</alias>
</properties>
@zaki50
zaki50 / JExcelSample.java
Created November 24, 2010 09:25
JExcel API のサンプル
public class JExcelSample {
public void sample(File inputFile) {
final Workbook masterBook = Workbook.getWorkbook(inputFile);
try {
for (Sheet sheet : masterBook.getSheets()) {
if (sheet == null) {
assert false : "null は無いはず。";
continue;
}
@zaki50
zaki50 / fix_logcat_encoding.diff
Created December 17, 2010 07:48
eclipse と ddms で logcat に ASCII外の文字を出すと化ける不具合の修正です。 tools_r8 ブランチ用
diff --git a/ddms/libs/ddmlib/src/com/android/ddmlib/MultiLineReceiver.java b/ddms/libs/ddmlib/src/com/android/ddml
index 24dbb05..f3d9412 100644
--- a/ddms/libs/ddmlib/src/com/android/ddmlib/MultiLineReceiver.java
+++ b/ddms/libs/ddmlib/src/com/android/ddmlib/MultiLineReceiver.java
@@ -51,7 +51,7 @@ public abstract class MultiLineReceiver implements IShellOutputReceiver {
if (isCancelled() == false) {
String s = null;
try {
- s = new String(data, offset, length, "ISO-8859-1"); //$NON-NLS-1$
+ s = new String(data, offset, length, "UTF-8"); //$NON-NLS-1$
ユーザーanonymousが実行
[workspace] $ /bin/sh -xe /Library/Tomcat/temp/hudson2161977023374287353.sh
+ echo /Users/zaki/.hudson/secrets/a3e0d4fc-c897-4ca1-9381-e51919ce2917
/Users/zaki/.hudson/secrets/a3e0d4fc-c897-4ca1-9381-e51919ce2917
+ cat /Users/zaki/.hudson/secrets/a3e0d4fc-c897-4ca1-9381-e51919ce2917/aa/bb.txt
secret!
Finished: SUCCESS
ユーザーanonymousが実行
[workspace] $ /bin/sh -xe /Library/Tomcat/temp/hudson2161977023374287353.sh
+ echo /Users/zaki/.hudson/secrets/a3e0d4fc-c897-4ca1-9381-e51919ce2917
/Users/zaki/.hudson/secrets/a3e0d4fc-c897-4ca1-9381-e51919ce2917
+ cat /Users/zaki/.hudson/secrets/a3e0d4fc-c897-4ca1-9381-e51919ce2917/aa/bb.txt
secret!
Finished: SUCCESS
class Klass<K> {
public static <K> Klass<K> create(Class<K> c) {
return new Klass<K>(c);
}
private final Class<K> clazz;
private Klass(Class<K> c) {
clazz = c;
}