git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
// Way 1 | |
def loadConfig; loadConfig = { p -> | |
if (p == null || !p.exists()) return | |
if (new File(p, "rp-config.gradle").exists()) apply from: "${p}/rp-config.gradle" | |
else loadConfig(p.parentFile) | |
} | |
loadConfig(buildscript.sourceFile.parentFile) | |
// Way2 | |
def loadConfig = { p -> |
task hello(){ | |
println("HELLO") | |
} | |
task deployReplugin { | |
println("deployReplugin") | |
} | |
deployReplugin.doLast { | |
println("deployReplugin.doLast") |
pragma solidity ^0.4.23; | |
library Math { | |
function add(uint256 x, uint256 y) pure internal returns (uint256 z) { | |
assert((z = x + y) >= x); | |
} | |
function sub(uint256 x, uint256 y) pure internal returns (uint256 z) { | |
assert((z = x - y) <= x); |
PmHostSvc:IPluginHost | |
===================== | |
@Override | |
public Map<String, List<String>> queryLocalBroadcasts(String action, boolean hostOnly) throws RemoteException { | |
if (LogDebug.LOG) { | |
LogDebug.d("IPluginHost", String.format("queryLocalBroadcasts(%s): >>>>>> ", action)); | |
} | |
final long start = LogDebug.LOG ? System.currentTimeMillis() : 0; | |
// |
# 中国身份证校验码计算公式 | |
# for more information: http://blog.sciencenet.cn/blog-408109-1075697.html | |
# 使用方法: | |
# `id_calculator ${身份证号码空格隔开}` | |
# 例如: | |
# ``` | |
# $ id_calculator 1 1 0 1 0 0 2 0 0 1 0 9 1 0 8 2 9 1 | |
# $ 求和 = 209, 余数 = 0, 校验码 = 1 |
function trace(count) { | |
var i = 0; | |
var caller = arguments.callee.caller; | |
count = count || 10; | |
while ((caller = caller.caller) && i++ < count) { | |
console.log(i+":"+caller.toString()); | |
} | |
} |
allprojects[0].repositories.listIterator().toSet().forEach { | |
println("REPOSITORY: ${it.name} ${it.properties.get('url')}") | |
} |
> Task :app:taskTree | |
------------------------------------------------------------ | |
Project :app | |
------------------------------------------------------------ | |
preBuild | |
preDebugBuild | |
compileDebugAidl | |
compileDebugRenderscript |
[![PorterDuff-Mode.png](https://j.mp/3tK399i)](https://j.mp/39b6pmq) |