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
digraph Java有多少种方式决定Logging的去处 { | |
graph [ tooltip = "神马轻量级Logging框架都是骗人的" ] | |
log4j [ tooltip = "我很快,而且支持很多种输出目标哦" ] | |
slf4j -> "logback, jdk14, ..." | |
slf4j -> log4j | |
log4j -> "org.apache.log4j.ConsoleAppender" | |
log4j -> "org.apache.log4j.FileAppender" | |
log4j -> "org.apache.log4j.net.SyslogAppender" | |
log4j -> "org.apache.log4j.net.SocketAppender" | |
log4j -> "其他Appender..." |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 org.junit._ | |
class TailCallBenchmark { | |
import scala.util.continuations._ | |
@Test | |
def test() { | |
import scala.util.control.TailCalls._ | |
def unwind(): Unit @cps[TailRec[Unit]] = { |
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
class NativeInMacro | |
{ | |
@:macro public static function myMacro():haxe.macro.Expr | |
{ | |
trace(MyEnum.MY_VALUE); | |
return macro null; | |
} | |
public static function main() | |
{ | |
trace(MyEnum.MY_VALUE); |
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
class ExplicitCommonType | |
{ | |
public static function main() | |
{ | |
// ExplicitCommonType.hx:6: characters 71-89 : IntHash<Int> should be Hash<Int> | |
var iterable:Iterable<Int> = Math.random() < 0.5 ? new Hash<Int>() : new IntHash<Int>(); | |
} | |
} |
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
--gen-hx-classes | |
-swf-lib haxelib-release/textLayout.swf | |
-swf no-output.swf | |
--no-output | |
--macro removeField("flashx.textLayout.conversion.BaseTextLayoutExporter","exportFlowElement",true) | |
--macro removeField("flashx.textLayout.conversion.BaseTextLayoutExporter","exportContainerFormattedElement",true) | |
--macro removeField("flashx.textLayout.conversion.BaseTextLayoutExporter","exportListItem",true) | |
--macro removeField("flashx.textLayout.conversion.BaseTextLayoutExporter","exportParagraphFormattedElement",true) | |
--macro removeField("flashx.textLayout.conversion.BaseTextLayoutExporter","exportList",true) | |
--macro removeField("flashx.textLayout.elements.FlowElement","abstract") |
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/env scala | |
trait 所有操作 { | |
protected type 操作符 | |
protected def 创建操作符(操作: (Int, Int) => Int):操作符 | |
final def 加 = 创建操作符(_ + _) | |
final def 乘 = 创建操作符(_ * _) |
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
var path = WScript.Arguments(0); | |
var rev = WScript.Arguments(1); | |
var WshShell = new ActiveXObject("WScript.Shell"); | |
var expectedDir = WshShell.ExpandEnvironmentStrings("%EXPECTED_DIR%"); | |
var svnlook = WshShell.ExpandEnvironmentStrings("%SVNLOOK%"); | |
var jenkinsUrlPrefix = WshShell.ExpandEnvironmentStrings("%JENKINS_URL_PREFIX%"); | |
var dirsChanged = WshShell.Exec(svnlook + " dirs-changed " + path + " -r " + rev).StdOut; | |
while (!dirsChanged.AtEndOfStream) { | |
var dir = dirsChanged.ReadLine(); | |
if (dir.match(expectedDir)) { |
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
object Zhihu37118044 { | |
def printDeep(vector: IndexedSeq[_]) { | |
import scalaz.std.indexedSeq._ | |
import scalaz.syntax.traverse._ | |
((0 until 100):IxSq[Int]).foldLeftM[IxSq, Any](vector) { | |
case (vector: IxSq[Any], _) => | |
vector | |
case (value: Any , _) => |
OlderNewer