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 Speaker interface { | |
Speak() string; | |
} | |
type Person struct { | |
name string; | |
} |
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 ( | |
. "http"; // http パッケージの関数を http. prefix なしで使えるように | |
"io"; | |
"fmt"; | |
) | |
func main() { | |
gourl := "http://golang.org/"; |
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
#!/bin/sh | |
SOURCE=$1 | |
if [ "$GOARCH" = "386" ]; then | |
GO="8" | |
elif [ "$GOARCH" = "amd64" ]; then | |
GO="6" | |
elif [ "$GOARCH" = "arm" ]; then | |
GO="5" |
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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Term::ReadLine; | |
use Data::Dumper; | |
my $term = new Term::ReadLine "Goprog"; | |
my $prompt = ""; | |
my $OUT = $term->OUT || \*STDOUT; |
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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
my $source = shift; | |
unless ($source) { | |
print "no source. exec goshell\n"; | |
exec("goshell"); | |
} |
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
Perl/5.10.0 (x86_64-linux-gnu-thread-multi) | |
HTML::Template/2.9 | |
HTML::Template::Compiled/0.94 | |
HTML::Template::Pro/0.92 | |
Template/2.20 | |
Text::MicroTemplate/0.09 | |
Benchmark: running HT, HT::C, HT::Pro, MT, TT for at least 1 CPU seconds... | |
HT: 2 wallclock secs ( 1.10 usr + 0.00 sys = 1.10 CPU) @ 2035.45/s (n=2239) | |
HT::C: 1 wallclock secs ( 1.05 usr + 0.00 sys = 1.05 CPU) @ 13652.38/s (n=14335) | |
HT::Pro: 1 wallclock secs ( 0.74 usr + 0.31 sys = 1.05 CPU) @ 18618.10/s (n=19549) |
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 ( | |
big "gmp"; | |
"flag"; | |
"fmt"; | |
"strconv"; | |
) | |
var n = 0 |
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
<? | |
print json_encode(array(0 => 'foo', 1 => 'bar')); | |
print json_encode(array(1 => 'foo', 0 => 'bar')); | |
?> | |
["foo","bar"]{"1":"foo","0":"bar"} |
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
SIGSEGV: segmentation violation | |
Faulting address: 0x28 | |
PC=0x400920 | |
main·empty_port+0x120 /home/fujiwara/devel/go-simple-kvs/listen.go:12 | |
main·empty_port(0x439850, 0x0) | |
main·main+0xca /home/fujiwara/devel/go-simple-kvs/listen.go:30 | |
main·main() | |
mainstart+0xf /home/fujiwara/local/go/src/pkg/runtime/amd64/asm.s:54 | |
mainstart() |
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
diff --git a/data/base.xml b/data/base.xml | |
index 333a0f9..f0dcb52 100644 | |
--- a/data/base.xml | |
+++ b/data/base.xml | |
@@ -1,4 +1,5 @@ | |
? use DateTime::Format::HTTP; | |
+? my $today = DateTime->now(); | |
<?= encoded_string qq[<\?xml version="1.0" encoding="utf-8"?\>] ?> | |
<rss version="2.0" | |
xmlns:dc="http://purl.org/dc/elements/1.1/" |