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
package main | |
import "fmt" | |
type Integer int | |
type Name string | |
func main() { | |
// undertaking type can assign to Typed var, 同 undertaking type -> Typed var |
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
public class PrimitiveTypeTest { | |
public static void main(String[] args) { | |
System.out.println(getPrimitiveWrapperType(int.class)); | |
} | |
private static Class<?> getPrimitiveWrapperType(Class<?> class1) { | |
if (class1 == java.lang.Integer.TYPE) { // 不是 class1 == java.lang.Integer.class | |
return Integer.class; | |
} | |
return null; |
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
java -Xmx512M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=384M -jar `dirname $0`/yeti.jar "$@" |
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 dispatch._ | |
val r = Http(url("http://www.ckernel.org/news/patch/2012.html") OK as.String) | |
r.map { _.split("\n").toList.count(_.contains("huawei"))} () // 7 |
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
package demo; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; | |
/** | |
* 圈子成员接口. | |
* | |
*/ |
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
@rem clojure launch shell | |
@echo off | |
set SCRIPT_DIR=%~dp0 | |
java -noverify -Xmx512M -jar "%SCRIPT_DIR%clojure-1.4.0.jar" %* |
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 | |
git add . | |
if [ "$1" = "" ]; then | |
git commit -m "update" | |
else | |
git commit -m "$1" | |
fi | |
https_proxy=localhost:8087 git push origin master |
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
void main() { | |
print(f0()); // -> sss | |
print(f1()); // -> null | |
print(f2()); // -> sss | |
print(f3()); // -> yyy | |
var len = "dasada".split("").where((c) => c == 'a').length; | |
print("LEN:$len"); //-> 3 | |
} |
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/bash | |
#----------------------------------------------------------------------------- | |
# Modified By itang | |
#----------------------------------------------------------------------------- | |
## Origin info | |
#------------------------------------------------------------------------------ | |
# Name: sbtmkdirs | |
# Purpose: Create an SBT project directory structure with a few simple options. |
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
package main | |
import ( | |
"fmt" | |
"sync" | |
) | |
func main() { | |
nums := []int{0, 1, 2, 3} | |
noms := []string{"Tim", "Eston", "Aaron", "Ben"} |