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
#include <stdio.h> | |
#include <stdlib.h> | |
int main(int argc, char **argv) | |
{ | |
int i; | |
char hello1[255] = "hello1!!\n"; | |
char hello2[255] = "hello2!!\n"; | |
char *func1() { return "func1\n"; } |
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 CGI; | |
use CGI::Carp qw(fatalsToBrowser); | |
use Time::HiRes qw(sleep); | |
my $cgi = CGI->new; | |
print $cgi->header( -charset => "UTF-8" ); |
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; | |
for my $s (qw/TERM HUP INT/) { | |
$SIG{$s} = sub { warn "SIG$s !!\n" and exit }; | |
} | |
chomp, print $_."\n" while <STDIN>; |
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; | |
for my $s (qw/TERM HUP INT/) { | |
$SIG{$s} = sub { warn "SIG$s !!\n" and exit }; | |
} | |
chomp, print $_."\n" while <STDIN>; |
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
(function(){ | |
var dc=document; | |
var t=dc.title; | |
var u=location.href; | |
var f=dc.createElement('form'); | |
f.action='http://mixi.jp/add_diary.pl?id=374297'; | |
f.method='post'; | |
f.name='mixi'; | |
f.innerHTML='<input type="hidden" name="diary_body" value="'+t+"¥n"+u+'">' | |
+'<input type="hidden" name="news_title" value="'+t+'">'; |
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 Mod3; | |
use strict; | |
use warnings; | |
use base qw/Exporter/; | |
use Data::Dumper; | |
sub import { | |
strict->import; | |
warnings->import; |
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/python | |
list = ['hoge','fuga','buzz','foo','hoge','hoge','buzz']; | |
dict = {} | |
for value in list: | |
dict[value] = dict[value] + 1 if dict.get(value) else 1 | |
print dict; |
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 DBI; | |
my $user = 'root'; | |
my $pass = ''; | |
my $dsn = 'DBI:mysql:test'; | |
my %attr = (RaiseError => 1, AutoCommit => 1); |
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
GET /dev3/0/000/000/0000000004.fid HTTP/1.1 | |
Host: 127.0.0.1:7502 | |
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; ja-JP-mac; rv:1.9.0.13) Gecko/2009073021 Firefox/3.0.13 GTB5 | |
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 | |
Accept-Language: ja,en-us;q=0.7,en;q=0.3 | |
Accept-Encoding: gzip,deflate | |
Accept-Charset: Shift_JIS,utf-8;q=0.7,*;q=0.7 | |
Keep-Alive: 300 | |
Connection: keep-alive | |
Pragma: no-cache |
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
GET /dev3/0/000/000/0000000004.fid HTTP/1.1 | |
Host: 127.0.0.1:7502 | |
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; ja-JP-mac; rv:1.9.0.13) Gecko/2009073021 Firefox/3.0.13 GTB5 | |
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 | |
Accept-Language: ja,en-us;q=0.7,en;q=0.3 | |
Accept-Encoding: gzip,deflate | |
Accept-Charset: Shift_JIS,utf-8;q=0.7,*;q=0.7 | |
Keep-Alive: 300 | |
Connection: keep-alive | |
If-Modified-Since: Tue, 25 Aug 2009 08:10:25 GMT |