This file contains hidden or 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure(2) do |config| | |
# The most common configuration options are documented and commented below. | |
# For a complete reference, please see the online documentation at |
This file contains hidden or 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
apply plugin: 'com.android.library' | |
apply plugin: 'com.github.dcendents.android-maven' | |
apply plugin: 'com.jfrog.bintray' | |
version = "" // 项目的版本名 | |
android { | |
compileSdkVersion 22 | |
buildToolsVersion '22.0.1' | |
defaultConfig { |
This file contains hidden or 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
module ChineseId | |
WEIGHT = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2] | |
CODE = ["1", "0", "X", "9", "8", "7", "6", "5", "4", "3", "2"] | |
#S = Sum(Ai * Wi) | |
#Y = mod(S, 11) | |
#C = Cy | |
def self.checksum id | |
This file contains hidden or 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
/** | |
* Created by Tiou on 2014/7/15. | |
* 一个实现 Recycle 机制的对象 | |
*/ | |
public class Data { | |
/** | |
* 对象池,就是上文所提到的对象仓库,用于暂时存放不用的对象。 | |
* 用链表来实现对象池结构,直观,高效,易用。 | |
* sPool 便是指向链表头部的引用 | |
*/ |
This file contains hidden or 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
# Mac | |
.DS_Store | |
# Android Studio | |
.idea/ | |
.gradle | |
/*/local.properties | |
/*/out | |
/*/*/build | |
/*/*/production |
This file contains hidden or 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 BaseActivity extends SherlockFragmentActivity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
mCommit = new LinkedList<FragmentTransaction>(); | |
mStateSaved = false; | |
} | |
@Override |
This file contains hidden or 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
#!/bin/python | |
#auto-increment-version-code-in-android-app | |
import re | |
def readManifest(): | |
f = file('AndroidManifest.xml') | |
entry = f.read(); | |
f.close(); | |
return entry; | |
This file contains hidden or 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
/* | |
Android Asynchronous Http Client | |
Copyright (c) 2011 James Smith <[email protected]> | |
http://loopj.com | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
require 'json' | |
str = '{"a":"string","b":12,"c":2.12,"d":9223372036854775807,"e":0.142318719237491324918231415143121324,"f":[1,3,4,5,6] }' | |
class JavaGenerator | |
def initialize(name, config={}) | |
@name = name | |
@config = config |