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
| import com.intellij.openapi.actionSystem.AnActionEvent | |
| import static liveplugin.PluginUtil.* | |
| /** | |
| * 将当前单词或下一个单词转换为首字母大写 | |
| */ | |
| registerAction("Capitalize Word", "alt C") { AnActionEvent event -> | |
| runDocumentWriteAction(event.project) { | |
| currentEditorIn(event.project).with { |
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
| /* | |
| * Copyright (C) 2011 The Android Open Source Project | |
| * | |
| * 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 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
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; | |