INSERT INTO `posts`(
`id`
,`title`
,`body`
,`created_at`
,`updated_at`
)
This file contains hidden or 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
/** | |
* 指定した範囲の整数をランダムに取得する | |
* | |
* @param {number} min ランダムに取得したい整数の下限 | |
* @param {number} max ランダムに取得したい整数の上限 | |
* @returns {number} min 以上 max 以下の整数 | |
*/ | |
function randomInt(min, max) { | |
var interval = max - min + 1; |
This file contains hidden or 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 error_requirements.txt right_requirements.txt | |
index 691fc4f..2325d81 100644 | |
--- error_requirements.txt | |
+++ right_requirements.txt | |
asn1crypto==0.24.0 | |
attrs==17.4.0 | |
Automat==0.6.0 | |
-cffi==1.11.4 | |
+cffi==1.11.2 | |
constantly==15.1.0 |
This file contains hidden or 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 putAccountsList() { | |
var m = Analytics.Management.AccountSummaries.list(); | |
Logger.log(m); | |
// 見出し行 | |
var headerRow = [ | |
'アカウント#ID', |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
""" | |
20. JSONデータの読み込み | |
Wikipedia記事のJSONファイルを読み込み,「イギリス」に関する記事本文を表示せよ.問題21-29では,ここで抽出した記事本文に対して実行せよ. | |
""" | |
import codecs | |
import json |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
""" | |
10. 行数のカウント | |
行数をカウントせよ.確認にはwcコマンドを用いよ. | |
""" | |
import codecs | |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
""" | |
00. 文字列の逆順 | |
文字列"stressed"の文字を逆に(末尾から先頭に向かって)並べた文字列を得よ. | |
""" | |
print("stressed"[::-1]) | |
# => desserts |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
from datetime import datetime | |
from calendar import monthrange | |
def add_month(_date, month_delta): | |
"""{month_delta} ヵ月後の同日の日時を返す | |
>>> add_month(datetime.datetime(2017, 1, 30, 5, 20, 15), month_delta=1) |
This file contains hidden or 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
javascript:(function(){var rid='TW_alt_check';if(document.getElementById(rid))return;function e(t){return document.getElementsByTagName(t)}function a(o,a){return o.getAttribute(a)}var i=e('img');if(i.length<=0)return;var r=document.createElement('div');var rcss='padding:5px;position:absolute;top:0;left:0;background:#fff;border:solid%20#ccc%201px;z-index:999;';var%20 tblcss='%20style=\'border-collapse:collapse;background:#fff;\'';var%20 tdlcss='%20style=\'padding:4px;border-bottom:solid%20#ffffff%202px;text-align:right;\'';var%20 tdrcss='%20style=\'padding:4px;border-bottom:solid%20#ffffff%202px;text-align:left;\'';r.id=rid;r.style.cssText=rcss;var%20 h='%3Ctable'+tblcss+'>';for(var%20 j=0;j<i.length;j++){h+=(j%252==0)?'<tr%20bgcolor=#f6f6f6>':'<tr%20bgcolor=%23f2f2f2>';h+='%3Ctd'+tdlcss+'%3E%3Cimg%20src='+a(i[j],'src')+'%3E%3C/td%3E%3Ctd'+tdrcss+'%3E'+a(i[j],'alt')+'</td></tr>'}h+='</table>';e('body')[0].appendChild(r);r.innerHTML=h;r.ondblclick=function(){this.parentNode.removeChild(this)};window.scrollTo(0, |
This file contains hidden or 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 | |
/* | |
* This file is part of the Carbon package. | |
* | |
* (c) Brian Nesbitt <[email protected]> | |
* | |
* For the full copyright and license information, please view the LICENSE | |
* file that was distributed with this source code. | |
*/ |
NewerOlder