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 Tree struct { | |
Value int | |
Left, Right *Tree | |
} |
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 ( | |
"log" | |
"math/rand" | |
"runtime" | |
"time" | |
// "github.com/rcrowley/go-metrics" | |
// "github.com/rcrowley/go-metrics/influxdb" |
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
/** @scratch /configuration/config.js/1 | |
* == Configuration | |
* config.js is where you will find the core Grafana configuration. This file contains parameter that | |
* must be set before Grafana is run for the first time. | |
*/ | |
define(['settings'], | |
function (Settings) { | |
"use strict"; | |
return new Settings({ |
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" | |
) | |
func operatSlice(s []int, num int) []int { | |
for i := 0; i < num; i++ { | |
s = append(s, 4) | |
} |
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
defmodule Hello do | |
def pipe(a, b) do | |
IO.puts a | |
IO.puts b | |
end | |
end | |
"hello" |> Hello.pipe("world") |
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
-module(kvs). | |
-export([start/0, store/2, lookup/1]). | |
start() -> register(kvs, spawn(fun() -> loop() end)). | |
store(Key, Value) -> rpc({store, Key, Value}). | |
lookup(Key) -> rpc({lookup, Key}). | |
rpc(Q) -> | |
kvs ! {self(), Q}, | |
receive |
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
defmodule Kvs do | |
def store(key, value) do | |
rpc({:store, key, value}) | |
end | |
def start do | |
Process.register spawn(fn -> loop() end), :kvs | |
end | |
def lookup(key) do |
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
# PostgreSQL. Versions 8.2 and up are supported. | |
# | |
# Install the pg driver: | |
# gem install pg | |
# On OS X with Homebrew: | |
# gem install pg -- --with-pg-config=/usr/local/bin/pg_config | |
# On OS X with MacPorts: | |
# gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config | |
# On Windows: | |
# gem install pg |
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 ( | |
"bufio" | |
"fmt" | |
"io" | |
"io/ioutil" | |
"log" | |
"os" | |
"path/filepath" |
OlderNewer