Skip to content

Instantly share code, notes, and snippets.

@ksomemo
ksomemo / reStructuredText.rst
Created July 17, 2014 00:13
markdownでも使っていた書き方をreStructuredTextでも書いてみた

reStructuredTextを触ってみる

段落(パラグラフ)

段落は、空行を挟むこと

リスト(メインセクション)

package main
import (
"code.google.com/p/go-tour/pic"
)
func Pic(dx, dy int) [][]uint8 {
t := make([][]uint8, dy)
for i := range t {
package main
import (
"code.google.com/p/go-tour/wc"
"strings"
)
func WordCount(s string) map[string]int {
wc := make(map[string]int)
words := strings.Fields(s)
package main
import "fmt"
// fibonacci is a function that returns
// a function that returns an int.
func fibonacci() func() int {
n := 0
a, b := 0, 1
package main
import (
"fmt"
"math/cmplx"
)
func Cbrt(x complex128) complex128 {
z := complex128(1.0)
for i := 0; i < 10000; i++ {
package main
import (
"fmt"
"math"
)
type ErrNegativeSqrt float64
/*
@ksomemo
ksomemo / programming-factor.rst
Last active June 6, 2017 10:39
プログラミング(言語)要素まとめ

プログラミング(言語)要素まとめ

気になることを並べてみた

REPL

  • Web Try系
  • 処理系インストールしてローカルで実行
@ksomemo
ksomemo / first-time-exercise.rst
Last active August 29, 2015 14:04
最初にやってみること

最初にやってみること

ソート

  • merge
  • quick

探索

package main
import (
"fmt"
"net/http"
)
type Hello struct{}
type String string
package main
import (
"code.google.com/p/go-tour/pic"
"image"
"image/color"
)
type Image struct {
// Bounds