Skip to content

Instantly share code, notes, and snippets.

View teppeihomma's full-sized avatar

Teppei Homma teppeihomma

  • PLAYSMART Inc.
  • Tokyo Japan
View GitHub Profile
@STAR-ZERO
STAR-ZERO / SampleFragment.java
Created December 13, 2012 03:44
【Android】Fragmentのテンプレート的なもの
public class SampleFragment extends Fragment {
/** Fragmentで保持しておくデータ */
private int mData;
/**
* Fragmentインスタンスを生成した返却.
*
* コンストラクタに引数を渡すのはダメ。
* Fragmentがメモリ不足で破棄され、そこから復帰する時に空のコンストラクタ呼ばれる。
@enaeseth
enaeseth / yaml_ordered_dict.py
Created February 25, 2011 19:54
Load YAML mappings as ordered dictionaries
import yaml
import yaml.constructor
try:
# included in standard lib from Python 2.7
from collections import OrderedDict
except ImportError:
# try importing the backported drop-in replacement
# it's available on PyPI
from ordereddict import OrderedDict