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
render 'ads/hoge-ad' |
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
/ ./app/views/ads/hoge_ad.slim | |
/ scriptのasyncを効かせるために、{ } で囲む必要がある。 | |
script{ async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js" } | |
/ ad-name | |
ins.adsbygoogle | |
style="display:inline-block;width:336px;height:280px" | |
data-ad-client="hoge" | |
data-ad-slot="huga" | |
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
.urllist-title-link.recent-entries-title-link.urllist-title.recent-entries-title { | |
font-size: 0.9rem; | |
} | |
.urllist-title-link.entries-access-ranking-title-link.urllist-title.entries-access-ranking-title { | |
font-size: 0.9rem; | |
} | |
.hatena-module-body .hatena-urllist { | |
font-size: 0.9rem; | |
} |
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
const smtpConfig = { | |
host: 'smtp.gmail.com', | |
secure: true, // use SSL | |
auth: { | |
user: process.env.GMAIL_ADDRESS, | |
pass: process.env.GMAIL_PASSWORD, | |
}, | |
} | |
const transport = require('nodemailer').createTransport(smtpConfig) |
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
const CronJob = require('cron').CronJob | |
new CronJob({ | |
cronTime: '0 0 12 * * *', | |
onTick: () => { /* */ }, | |
start: true, | |
timeZone: 'Asia/Tokyo', | |
}) |
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
let ary = [1, 2, 3, 4, 5] | |
// array[2]から3個の要素を6で埋める | |
ary.splice(2, 3, 6, 6, 6) | |
console.log(ary) // [1, 2, 6, 6, 6] |
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
let ary = [1, 2, 3, 4, 5] | |
// 第二引数は"個数" | |
ary.splice(2, 3) // [3 , 4, 5] | |
// 破壊的変更がなされる | |
console.log(ary) // [1, 2] |
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
let ary = [1, 2, 3, 4, 5] | |
// 第二引数は"未満"の終了位置 | |
ary.slice(2, 3) // [3] | |
// 元の配列に変更はなし | |
console.log(ary) // [1, 2, 3, 4, 5] |
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
const solution(N) => N.reduce((a, b) => a ^ b) | |
solution([5, 4, 3, 5, 3]) // 4 | |
// https://codility.com/programmers/lessons/2-arrays/odd_occurrences_in_array/ |
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
int main() | |
{ | |
icu::UnicodeString ramp( icu::UnicodeString::fromUTF8( "ÐðŁłŠšÝýÞþŽž" ) ); | |
std::cout << ramp[5] << "\n"; | |
} |