バージョン管理ツール
- 個人に環境があるので同時作業が可能
- 更新履歴が残る。いつ誰が何をなぜ変更したのか残ります。
| s/\s+$/\n/ |
| function isValidDate(year, month, day) { | |
| var d = new Date(year, month, day); | |
| if ((d.getFullYear() != year) || | |
| (d.getMonth() != month) || | |
| (d.getDate() != day) | |
| ) { | |
| return false; | |
| } | |
| return true; | |
| } |
| <?php | |
| $size = getimagesize($img); | |
| $size_w = 708; | |
| $size_h = ($size_w / $size[0]) * $size[1]; | |
| $image = '<img src="'.$img.'" width="'.$size_w.'" height="'.$size_h.'">'; |
| $(function(){ | |
| // リセットボタン | |
| $(".clearForm").bind("click", function(){ | |
| event.preventDefault(); | |
| $(this.form).find("textarea, :text, select").val("").end().find(":checked").removeAttr("checked"); | |
| }); | |
| }); |
| git diff 比較ブランチ名 --name-only |
| <?php | |
| /** | |
| * アメブロからRSS情報を取得します | |
| * @param [type] $url [description] | |
| * @return [type] [description] | |
| */ | |
| function get_ameba_rss($url) { | |
| $xml = simplexml_load_file($url); | |
| $results = array(); |
| add/remove | |
| begin/end | |
| create/destroy | |
| fast/last | |
| get/put | |
| get/set | |
| increment/decrement | |
| insert/delete | |
| lock/unlock | |
| min/max |
| var numberFormat = function(num) { | |
| return num.toString().replace(/^\d+[^\.]/, function(t) { | |
| return t.replace(/([\d]+?)(?=(?:\d{3})+$)/g, function(t) { | |
| return t + ','; | |
| }); | |
| }); | |
| } |
| <?php | |
| /** | |
| * 月の何週目か取得 | |
| * @param integer $y 年 | |
| * @param integer $m 月 | |
| * @param integer $d 日 | |
| */ | |
| function getNthWeek($y, $m, $d) | |
| { | |
| $week1 = date('W', mktime(0, 0, 0, $m, 1, $y)); |