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
//go-gtk | |
func on_window_resize(){ | |
window := gtk.WidgetFromObject(builder.GetObject("main_window")) | |
switcher := gtk.WidgetFromObject(builder.GetObject("main_switcher")) | |
vline := gtk.WidgetFromObject(builder.GetObject("vline")) | |
win_alloc := new(gtk.GtkAllocation) | |
window.GetAllocation(win_alloc) | |
sw_alloc := new(gtk.GtkAllocation) | |
switcher.GetAllocation(sw_alloc) |
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" | |
type Scope struct { | |
Minimum, Maximum, Current int | |
Transformer func(inst *int) | |
} | |
func (s *Scope)Find(min int, interval int){ | |
s.Current, s.Minimum = min,min |
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 ( | |
"log" | |
"net" | |
"time" | |
) | |
const ( | |
comQuit byte = iota + 1 |
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
// TypesThatResemble returns all types that (directly or indirectly) embed a | |
// type that has the same name as the t arget type, but have a different | |
// import path | |
// e.g. "github.com/acsellers/yield.Controller" vs "github.com/robfig/revel.Controller" | |
func (s *SourceInfo) TypesThatResemble(targetType string) (filtered []*TypeInfo) { | |
var ( | |
nodeQueue = []string{} | |
processed []string | |
targetTypeName = targetType[strings.LastIndex(targetType, "."):] |
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 paintserver | |
import ( | |
"net/http" | |
"code.google.com/p/go.net/websocket" | |
"image/color" | |
"image" | |
"image/png" | |
) |
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" | |
"github.com/acsellers/round" | |
) | |
func main() { | |
people := []string{"p1", "p2", "p3", "p4", "p5", "p6"} |
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 "github.com/acsellers/round" | |
func main() { | |
round.PrintMatchups([]string{"abba", "bards", "cats", "ducks", "elephants"}) | |
} |
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
{{ extends "layouts/base.html" }} | |
{{ block "head" }} | |
<title>{{.title}}</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<link rel="stylesheet" type="text/css" media="screen" href="/public/css/main.css"> | |
{{range .moreStyles}} | |
<link rel="stylesheet" type="text/css" href="/public/{{.}}"> | |
{{end}} | |
<script src="/public/js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> |
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
GoodDoc for Ruby | |
Purpose | |
Provide a code documentation specification for Ruby that doesn't faff about. | |
Method documentation | |
The first sentence should be a one-sentence summary that starts with the name being declared. | |
This is the only part of the documentation that is required. If the public or private status | |
of the function would be in question, you should work it into this summary. Use the active | |
voice when possible, for instance returns or checks is better than will return or will check. |
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" | |
"unicode" | |
) | |
var combining = &unicode.RangeTable{ | |
R16: []unicode.Range16{ | |
{0x0300, 0x036f, 1}, // combining diacritical marks |
OlderNewer