start new:
tmux
start new with session name:
tmux new -s myname
/** | |
* dirwatcher.scala | |
* | |
* Uses the Java 7 WatchEvent filesystem API from within Scala. | |
* Adapted from: | |
* http://download.oracle.com/javase/tutorial/essential/io/examples/WatchDir.java | |
* | |
* @author Chris Eberle <[email protected]> | |
* @version 0.1 | |
*/ |
(defun right-arrow () | |
(interactive) | |
(cond ((looking-back "=") | |
(backward-delete-char 1) (insert "⇒")) | |
((looking-back "-") | |
(backward-delete-char 1) (insert "→")) | |
(t (insert ">")))) | |
(defun left-arrow () | |
(interactive) |
val primes: Stream[Int] = 2 #:: Stream.from(3).filter { n => !primes.takeWhile(_ <= math.sqrt(n)).exists(n % _ == 0) } | |
def isPrime(n: Int) = primes.dropWhile(_ < n).head == n |
function killall(ns, wet_run) { | |
ns = (typeof (ns) != 'undefined') ? ns : ""; | |
inprog = db.currentOp().inprog; | |
for (var i in inprog) { | |
var op = inprog[i]; | |
if (op.ns.indexOf(ns) != -1) { | |
if (wet_run == true) { | |
db.killOp(op.opid); | |
} else { | |
var toprint = {} |
Every application ever written can be viewed as some sort of transformation on data. Data can come from different sources, such as a network or a file or user input or the Large Hadron Collider. It can come from many sources all at once to be merged and aggregated in interesting ways, and it can be produced into many different output sinks, such as a network or files or graphical user interfaces. You might produce your output all at once, as a big data dump at the end of the world (right before your program shuts down), or you might produce it more incrementally. Every application fits into this model.
The scalaz-stream project is an attempt to make it easy to construct, test and scale programs that fit within this model (which is to say, everything). It does this by providing an abstraction around a "stream" of data, which is really just this notion of some number of data being sequentially pulled out of some unspecified data source. On top of this abstraction, sca
//wearversion | |
//wearlog | |
//wearvoiceinputenable | |
//wearvoiceinputdisable | |
//weargoogleapi | |
//assert | |
//pushassert | |
//uplog | |
//upcrash | |
//switchnotificationstatus |
\usepackage{fontspec} %加這個就可以設定字體 | |
\usepackage{xeCJK} %讓中英文字體分開設置 | |
\setCJKmainfont{微軟正黑體} %設定中文為系統上的字型,而英文不去更動,使用原TeX字型 | |
\XeTeXlinebreaklocale "zh" %這兩行一定要加,中文才能自動換行 | |
\XeTeXlinebreakskip = 0pt plus 1pt %這兩行一定要加,中文才能自動換行 | |
\defaultCJKfontfeatures{AutoFakeBold=6,AutoFakeSlant=.4} %以後不用再設定粗斜 | |
\newCJKfontfamily\Kai{標楷體} %定義指令\Kai則切換成標楷體 | |
\newCJKfontfamily\Hei{微軟正黑體} %定義指令\Hei則切換成正黑體 | |
\newCJKfontfamily\NewMing{新細明體} %定義指令\NewMing則切換成新細明體 |
Most of what's written in this article is deliberately biased and wrong. It is yet another in the stream of Scala-hating posts that people. I analyze the article below:
TIOBE index is a metric based on search engine ranking policies and can be intentionally or unintentionally gamed.
https://blog.timbunce.org/2009/05/17/tiobe-index-is-being-gamed/
On these rankings, Scala is quite high: