Σ
: アルファベット(有限集合)Ω = Σ ∪ { [, ]}
Ω^*
:Ω
上の語全体からなる集合L_p
:Ω
上の言語 (括弧言語)- 基底 :
Σ
の元と空語λ
- 帰納ステップ :
u
,v
がL_p
の元ならばuv
と[u]
はL_p
の元
- 基底 :
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 void concatEager() { | |
final TestSubscriber<List<String>> testSubscriber = new TestSubscriber<>(); | |
final long startTime = new Date().getTime(); | |
System.out.println("Start."); | |
Observable.concatEager( // | |
asyncObservable("uno", 4), // | |
asyncObservable("dos", 3), // |
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 abstract class RetrofitSingleSubscriber<T> extends SingleSubscriber<T> { | |
public abstract void onHttpError(HttpException e); | |
public abstract void onNonHttpError(Throwable e); | |
@Override public void onError(Throwable error) { | |
if (error instanceof HttpException) { | |
onHttpError((HttpException) error); | |
} else { |
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
pulic static void logd(String format, Object... args) { | |
Log.d(TAG, String.format(Locale.getDefault(), format, args)); | |
} |
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 static long copyFileStream(FileInputStream is, FileOutputStream os) | |
throws IOException { | |
FileChannel srcChannel = null; | |
FileChannel destChannel = null; | |
try { | |
srcChannel = is.getChannel(); | |
destChannel = os.getChannel(); | |
return srcChannel.transferTo(0, srcChannel.size(), destChannel); | |
} finally { |
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 static Twitter getTwitter(Context ctx) { | |
InputStream is = null; | |
TwitterFactory tf; | |
try { | |
is = ctx.getResources().getAssets().open("twitter4j.properties"); | |
PropertyConfiguration conf = new PropertyConfiguration(is); | |
tf = new TwitterFactory(conf); | |
} catch (IOException e) { | |
tf = new TwitterFactory(); |
##ListView読み込み
- 件数指定
- 自動・手動
- 追加ボタン・オーバースクロール
- リストアイテム非同期読み込みとか
##AsyncTask
- 結果のコールバック
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
FragmentStatePagerで持ってるfragmentはめくっていくとonStopが呼ばれるのでここでよしなにするとよい(かも |
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
527 /** | |
528 * Set the descendant focusability of this view group. This defines the relationship | |
529 * between this view group and its descendants when looking for a view to | |
530 * take focus in {@link #requestFocus(int, android.graphics.Rect)}. | |
531 * | |
532 * @param focusability one of {@link #FOCUS_BEFORE_DESCENDANTS}, {@link #FOCUS_AFTER_DESCENDANTS}, | |
533 * {@link #FOCUS_BLOCK_DESCENDANTS}. | |
534 */ | |
535 public void setDescendantFocusability(int focusability) { | |
536 switch (focusability) { |
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
text = client.execute(httpGet, new ResponseHandler<String>() { | |
@Override | |
public String handleResponse(HttpResponse resp) | |
throws ClientProtocolException, IOException { | |
if (resp.getStatusLine().getStatusCode() != HttpStatus.SC_OK) { | |
throw new IOException(resp.getStatusLine().getStatusCode() + "returned."); | |
} | |
HttpEntity entity = resp.getEntity(); | |
if (entity != null) { | |
InputStream is = entity.getContent(); |
NewerOlder