This file contains hidden or 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" | |
"runtime" | |
) | |
func green(k int) { | |
var i = 0; | |
for { |
This file contains hidden or 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
Online Builder, Basis and Full version | |
al-init $element | |
al-model - proxy for al-value, al-focused, al-checked ... | |
optional A2 style for events and directives | |
$global namespace |
This file contains hidden or 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
{ | |
"files": [ | |
{ | |
"source": "js/prefix", | |
"kind": "core", | |
"type": "js", | |
"package": 0 | |
}, | |
{ | |
"source": "js/fquery", |
This file contains hidden or 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
alight.filters.toString = function(val, exp, scope) { | |
return val.toString() | |
} |
This file contains hidden or 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
alight.filters.throttle = { | |
init: function(delay, scope) { | |
this.delay = Number(delay); | |
this.to = null; | |
this.scope = scope; | |
}, | |
onChange: function(value) { | |
var that; | |
that = this; | |
if (this.to) { |
This file contains hidden or 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
// current | |
alight.filters.toString = function(exp, scope) { | |
return function(val) { | |
return val.toString() | |
} | |
} | |
// new style | |
alight.filters.toString = function(val, exp, scope) { | |
return val.toString() |
This file contains hidden or 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
alight.hooks.directive.push({ | |
code: 'scope', | |
fn: function() { | |
var parentScope; | |
if (this.directive.scope) { | |
parentScope = this.scope; | |
if (this.directive.scope === 'root') { | |
this.scope = parentScope.$new('root'); | |
} else { | |
this.scope = parentScope.$new(this.directive.scope === 'isolate'); |
This file contains hidden or 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
// service = {}; | |
function controller(scope) { | |
service.todo.get(); | |
// or $todo = service.todo | |
// or require('todoService', function($todo) {} | |
}; |
This file contains hidden or 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
random-read: (g=0): rw=randread, bs=4K-4K/4K-4K/4K-4K, ioengine=sync, iodepth=1 | |
random-write: (g=0): rw=randwrite, bs=4K-4K/4K-4K/4K-4K, ioengine=sync, iodepth=1 | |
fio-2.1.3 | |
Starting 2 processes | |
random-read: Laying out IO file(s) (1 file(s) / 1280MB) | |
random-write: Laying out IO file(s) (1 file(s) / 1280MB) | |
Jobs: 1 (f=1): [_w] [100.0% done] [0KB/3104KB/0KB /s] [0/776/0 iops] [eta 00m:00s] | |
random-read: (groupid=0, jobs=1): err= 0: pid=1476: Fri Oct 16 11:24:06 2015 | |
read : io=1280.0MB, bw=24974KB/s, iops=6243, runt= 52484msec | |
clat (usec): min=50, max=18582, avg=154.99, stdev=149.82 |
This file contains hidden or 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
// 0.403273203 sec | |
package main | |
import "fmt" | |
import "time" | |
func main() { | |
start := time.Now().UnixNano() |