Skip to content

Instantly share code, notes, and snippets.

package main
import (
"fmt"
"runtime"
)
func green(k int) {
var i = 0;
for {
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
{
"files": [
{
"source": "js/prefix",
"kind": "core",
"type": "js",
"package": 0
},
{
"source": "js/fquery",
@lega911
lega911 / 1.js
Last active December 18, 2015 19:44
alight.filters.toString = function(val, exp, scope) {
return val.toString()
}
@lega911
lega911 / 1.js
Created December 18, 2015 18:52
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) {
// 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()
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');
// service = {};
function controller(scope) {
service.todo.get();
// or $todo = service.todo
// or require('todoService', function($todo) {}
};
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
// 0.403273203 sec
package main
import "fmt"
import "time"
func main() {
start := time.Now().UnixNano()