Skip to content

Instantly share code, notes, and snippets.

# -*- coding: utf-8 -*-、
__author__ = 'West'
import os
from PIL import Image, ImageDraw
from collections import namedtuple
import urllib.request
# 巧妙的使用namedtuple,定义一种tuple类型,包含'Image','Charact'
from collections import namedtuple
@Van1996
Van1996 / DemoModule.java
Created March 19, 2017 04:19
RxJavaDemo
import rx.Observable;
import rx.Observer;
import rx.functions.Func1;
/**
* Created by Van on 2017/03/13.
*/
/*
依赖:
compile 'io.reactivex:rxjava:1.1.3'
@Van1996
Van1996 / Thread.java
Created April 25, 2017 13:24
Thread类的init() 方法(JDK 1.8)
/**
* Initializes a Thread.
*
* @param g the Thread group
* @param target the object whose run() method gets called
* @param name the name of the new Thread
* @param stackSize the desired stack size for the new thread, or
* zero to indicate that this parameter is to be ignored.
* @param acc the AccessControlContext to inherit, or
* AccessController.getContext() if null