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
<html> | |
<head> | |
<title>hello</title> | |
</head> | |
<body> | |
<h1>hello</h1> | |
</body> | |
</html> |
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
// List<HogeBean> beans = Hoge.findAll(); | |
Collections.sort(beans, new Comparator<HogeBean>() { | |
@Override | |
public int compare(HogeBean o1, HogeBean o2) { | |
int comp = compareString(o1.getKey(), o2.geKey()); | |
if (comp != 0) { | |
return comp; | |
} | |
return 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
// HogeBean.java | |
public class HogeBean { | |
private int age; | |
private String name; | |
private String hometown; | |
public HogeBean(int age, String hometown, String name) { | |
this.setAge(age); | |
this.hometown = hometown; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<link rel="stylesheet" type="text/css" href="css/zocial.css" /> | |
<style type="text/css"> | |
html { height: 100% } | |
body { | |
height: 100%; | |
margin: 0px; |
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
;; log_download.ttl | |
;; | |
;; TeraTermマクロ | |
;; コマンド実行後、scpでファイルをダウンロード。 | |
;; Setting | |
HOSTADDR = '127.0.0.1' | |
USERNAME = 'username' | |
PASSWORD = 'password' | |
LOCALPATH = 'c:\work\' |
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 utf8; | |
use DBI; | |
my $database = 'test.db'; | |
my $data_source = "dbi:SQLite:dbname=$database"; | |
my $dbh = DBI->connect($data_source); |
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
<?php | |
class PdoDao { | |
const user = "hogehoge"; | |
const pass = "hogehoge"; | |
const memSec = 10; | |
private $pdo; | |
private $m; |
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/env perl | |
use strict; | |
use Data::Dumper; | |
my $obj = Hoge->new({ | |
str => 'http://hogehoge/', | |
hoge => 'foobar' | |
}); | |
warn Dumper $obj; |
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
<?php | |
// SilexとDoctrine使ってる感じで | |
$app->get('/csv/userlist/{id}.csv', function ($id) use ($app) { | |
// DBのデータを連想配列のリストで取得 | |
$sql = "select * from user where result = 1 and groupid = ?"; | |
$stmt = $app['db']->prepare($sql); | |
$stmt->bindValue(1, $id); | |
$stmt->execute(); | |
$items = $stmt->fetchAll(PDO::FETCH_ASSOC); |
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/env perl | |
use Net::IMAP::Client; | |
use Data::Dumper; | |
use strict; | |
use warnings; | |
my $imap = Net::IMAP::Client->new( | |
server => $ARGV[0], | |
user => $ARGV[1], |
OlderNewer