Instead of the verbose setOnClickListener
:
RxView.clicks(submitButton).subscribe(o -> log("submit button clicked!"));
Observable
.just(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
python3 nucleus.py train --dataset=../../datasets/nucleus --subset=train --weights=coco |
c = get_config() | |
# Kernel config | |
c.IPKernelApp.pylab = 'inline' # if you want plotting support always in your notebook | |
# Notebook config | |
c.NotebookApp.certfile = u'/home/ubuntu/certs/mycert.pem' #location of your certificate file | |
c.NotebookApp.ip = '*' | |
c.NotebookApp.open_browser = False #so that the ipython notebook does not opens up a browser by default | |
c.NotebookApp.password = u'sha1:4a023b5f6d3e:bf90fad3935aaec912516f356710755612bd0164' #the encrypted password we generated above |
// --- Compiling --- | |
$ wget http://download.redis.io/releases/redis-2.8.3.tar.gz | |
$ tar xzvf redis-2.8.3.tar.gz | |
$ cd redis-2.8.3 | |
$ make | |
$ make install | |
// --- or using yum --- | |
$ rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm | |
$ rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm |
import android.content.Context; | |
import android.graphics.Bitmap; | |
import android.graphics.BitmapFactory; | |
import android.graphics.Canvas; | |
import android.graphics.Color; | |
import android.graphics.Paint; | |
import android.graphics.RectF; | |
import android.graphics.drawable.BitmapDrawable; | |
import android.graphics.drawable.Drawable; | |
import android.text.Spannable; |
TimingLogger timings = new TimingLogger(TAG, "methodA"); | |
// ... do some work A ... | |
timings.addSplit("work A"); | |
// ... do some work B ... | |
timings.addSplit("work B"); | |
// ... do some work C ... | |
timings.addSplit("work C"); | |
timings.dumpToLog(); |
例如我有一个ArrayList里面包含3个int[]数组 | |
int [] arr1 = new int [10]; | |
int [] arr2 = new int [10]; | |
int [] arr2 = new int [10]; | |
ArrayList al = new Arraylist(); |
import android.graphics.Bitmap; | |
import android.graphics.Bitmap.CompressFormat; | |
import android.graphics.Bitmap.Config; | |
import android.graphics.BitmapFactory; | |
import com.iqiyi.qixiu.utils.Log; | |
import java.io.ByteArrayOutputStream; | |
import java.io.File; | |
import java.io.FileNotFoundException; | |
import java.io.FileOutputStream; |
import android.content.Context; | |
import android.util.AttributeSet; | |
import android.util.DisplayMetrics; | |
import android.view.WindowManager; | |
import android.widget.RelativeLayout; | |
import java.util.ArrayList; | |
public class SoftListenLayout extends RelativeLayout { | |
private OnKeyboardChangedListener onKeyboardChangedListener; |