1m
- ライブラリ本の宣伝
- WEB+DB Press 6月号の宣伝
private QuestionListAdapter adapter; | |
public void reload() { | |
adapter.setNotifyOnChange(false); | |
adapter.clear(); | |
List<Question> questions = spm.loadQuestions(); | |
for (Question question : questions) { | |
adapter.add(question); | |
} |
import java.util.function.Function; | |
public class ApplicablePortion { | |
int add(int a, int b) { | |
return add(a).apply(b); | |
} | |
//カリー化関数 | |
Function<Integer, Integer> add(final int a) { |
enum FizzBuzz{ | |
case None | |
case Fizz | |
case Buzz | |
case FizzBuzz | |
case Num(i : Int) | |
func print(){ | |
switch self{ | |
case .Fizz: |
<link rel="import" href="../notification-elements/notification-alert.html"> | |
<link rel="import" href="../google-map/google-map.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; |
アプリインストール後、一回起動後プロセス落として再起動するとスプラッシュの後ANRになる。
07-17 16:24:07.093: E/ActivityManager(634): ANR in com.cookpad.android.activities.debug
07-17 16:24:07.093: E/ActivityManager(634): PID: 2474
07-17 16:24:07.093: E/ActivityManager(634): Reason: Executing service com.cookpad.android.activities.debug/com.cookpad.android.activities.activitylogs.ActivityLogsService
07-17 16:24:07.093: E/ActivityManager(634): Load: 0.98 / 0.96 / 1.05
07-17 16:24:07.093: E/ActivityManager(634): CPU usage from 2994ms to -3750ms ago:
07-17 16:24:07.093: E/ActivityManager(634): 35% 634/system_server: 29% user + 6.1% kernel / faults: 950 minor
07-17 16:24:07.093: E/ActivityManager(634): 5.2% 724/com.android.systemui: 4.6% user + 0.5% kernel
public class SerialOperator<R, T> implements Observable.Operator<R, T> { | |
Action2<Subscriber<? super R>, T> then; | |
T next; | |
SerialOperator(Action2<Subscriber<? super R>, T> then) { | |
this.then = then; | |
} |
//コールバック持つならこういう感じにすると | |
interface OnClickListener { | |
boolean onClick(View view); | |
class EmptyOnClickListener implements OnClickListener { | |
@Override | |
public boolean onClick(View view) { | |
return false; |
${1:import(android.view.View.OnClickListener)}${2:import(android.view.View)}setOnClickListener(new OnClickListener() { | |
@Override | |
public void onClick(View v) { | |
${cursor} | |
} | |
}); |