public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello World!");
}
}
To run it on an android device:
javac HelloWorld.java
# There are 3 levels of git config; project, global and system. | |
# project: Project configs are only available for the current project and stored in .git/config in the project's directory. | |
# global: Global configs are available for all projects for the current user and stored in ~/.gitconfig. | |
# system: System configs are available for all the users/projects and stored in /etc/gitconfig. | |
# Create a project specific config, you have to execute this under the project's directory. | |
$ git config user.name "John Doe" | |
# Create a global config |
$ sysctl -A | |
user.cs_path: /usr/bin:/bin:/usr/sbin:/sbin | |
user.bc_base_max: 99 | |
user.bc_dim_max: 2048 | |
user.bc_scale_max: 99 | |
user.bc_string_max: 1000 | |
user.coll_weights_max: 2 | |
user.expr_nest_max: 32 | |
user.line_max: 2048 | |
user.re_dup_max: 255 |
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello World!");
}
}
To run it on an android device:
javac HelloWorld.java
public class UpdateApp extends AsyncTask<String,Void,Void>{
private Context context;
public void setContext(Context contextf){
context = contextf;
}
@Override
protected Void doInBackground(String... arg0) {
try {
tell application "Finder" | |
display dialog "hello world!" | |
end tell |
# Display git history including/interleave submodule commits | |
$ git log -1 -p --submodule | |
# Refereneces: | |
# http://stackoverflow.com/questions/8843724/git-history-including-interleave-submodule-commits | |
# http://git-scm.com/docs/git-submodule |
// Define cURL process with correct arguments. | |
def proc = "curl -o log/${day.format('yyyy-MM-dd')}.log " | |
+ "http://servername/import-data/${day.format('yyyy-MM-dd')}" | |
.execute() | |
// cURL uses error output stream for progress output. | |
Thread.start { System.err << proc.err } | |
// Wait until cURL process finished and continue with the loop. | |
proc.waitFor() |
//Declaring the inputs and outputs of a task | |
//build.gradle | |
task transform { | |
ext.srcFile = file('mountains.xml') | |
ext.destDir = new File(buildDir, 'generated') | |
inputs.file srcFile | |
outputs.dir destDir | |
doLast { | |
println "Transforming source file." |
#!/bin/sh | |
# From Gerrit Code Review 2.5-rc0 | |
# | |
# Part of Gerrit Code Review (http://code.google.com/p/gerrit/) | |
# | |
# Copyright (C) 2009 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 |