# fetch source
sudo yum install git
sudo yum install wget
# to compile
sudo yum install java-1.7.0-openjdk
This file contains 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/sh | |
#TYPE='generic' | |
TYPE='alternative' | |
#|---------|-----------------------|---------------|---------------|---------------------|-------------------|-------------------|----------------------|-------------------| | |
#| ARCH | aarch64-k3.10 | armv5sf-k3.2 | armv7sf-k2.6 | armv7sf-k3.2 | mipselsf-k3.4 | mipssf-k3.4 | x64-k3.2 | x86-k2.6 | | |
#| LOADER | ld-linux-aarch64.so.1 | ld-linux.so.3 | ld-linux.so.3 | ld-linux.so.3 | ld.so.1 | ld.so.1 | ld-linux-x86-64.so.2 | ld-linux.so.2 | | |
#| GLIBC | 2.27 | 2.27 | 2.23 | 2.27 | 2.27 | 2.27 | 2.27 | 2.23 | | |
#|---------|-----------------------|---------------|---------------|---------------------|-------------------|-------------------|----------------------|-------------------| |
This file contains 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 Foundation | |
extension CALayer { | |
public func animate() -> CALayerAnimate { | |
return CALayerAnimate(layer: self) | |
} | |
} | |
public class CALayerAnimate { |
This file contains 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
# update repo version | |
repo selfupdate --no-repo-verify | |
# reset all repos | |
repo forall -vc "git reset --hard" | |
# clean and delete unstaged changes | |
repo forall -vc "git clean -df" | |
# pull all repos |
if you encounter this error
out/host/linux-x86/bin/jack: line 131: 31049 Killed $SERVER_PRG $SERVER_PORT_SERVICE $SERVER_PORT_ADMIN $SERVER_COUNT $SERVER_NB_COMPILE $SERVER_TIMEOUT >> $SERVER_LOG 2>&1
ERROR: Cannot launch Jack server
make: *** [out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/with-local/classes.dex] Error 41
make: *** Waiting for unfinished jobs....
its because ~/.jack has an incorrect permission you can fix it with
This file contains 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 Nicholas Wong <nickwph@gmail.com>. | |
* Github Gist: https://gist.github.com/nickwph/de0dd805e29fe3bcba476b6126459259 | |
* Gradle build file to set up variables for checkstyle. | |
*/ | |
apply plugin: 'checkstyle' | |
checkstyle { | |
configFile file('checkstyle-config.xml') | |
showViolations true |
This file contains 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 Nicholas Wong <nickwph@gmail.com>. | |
* Github Gist: https://gist.github.com/nickwph/8e757fa1fff9c52a39a6a5a485fdc900 | |
* Gradle build file to set up variables for findbugs. | |
* The following tasks will be created in normal circumstance. | |
* | |
* - Create FindBugs XML Report | |
* findbugsDebug | |
* findbugsRelease | |
* |
This file contains 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
// temporarily solution: place generated code into source directory | |
project.afterEvaluate { | |
def variants | |
if (project.plugins.hasPlugin("com.android.application") || project.plugins.hasPlugin("com.android.test")) { | |
variants = project.android.applicationVariants | |
} else if (project.plugins.hasPlugin("com.android.library")) { | |
variants = project.android.libraryVariants | |
} else { | |
throw new Exception("The android application or library plugin must be applied to the project") | |
} |
This file contains 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
# filtering function from sdk list | |
function get_id_with_regex { | |
android list sdk --all --extended | grep $1 | sed 's/.*"\(.*\)".*/\1/g' | tr '\n' ',' | |
} | |
# grep ids | |
INSTALL_FILTER=$(get_id_with_regex 'build-tools') # build-tools-* | |
INSTALL_FILTER+=$(get_id_with_regex '"android-\(1[5-9]\|[2-9][0-9]\)') # android-15 to android-99 | |
INSTALL_FILTER+='tools,' | |
INSTALL_FILTER+='platform-tool,' |
Define Node
static class Node {
int value;
Node left, right;
}
Breathe First Iterative Traversal
NewerOlder