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
import java.util.ArrayList; | |
import java.util.Collections; | |
public class RandomListSample { | |
public static void main(String[] args) { | |
RandomList taskList = new RandomList( | |
new RandomList("a", "b", "c"), | |
new RandomList(1, 2, 3, 4, 5), | |
new RandomList("太郎", "次郎") | |
); |
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 com.example.sqltest; | |
import android.app.Activity; | |
import android.content.ContentValues; | |
import android.content.Context; | |
import android.database.Cursor; | |
import android.database.sqlite.SQLiteDatabase; | |
import android.database.sqlite.SQLiteOpenHelper; | |
import android.os.Bundle; | |
import android.util.Log; |
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 com.example.customlist; | |
import java.util.List; | |
import android.content.Context; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.ArrayAdapter; | |
import android.widget.TextView; |
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
<select name='alphabet' multiple='multiple'> | |
<option value='ABC'>えーびーしー</option> | |
<option value='DEF'>でーいーえふ</option> | |
<option value='GHI'>じーえいちあい</option> | |
<option value='JKL'>じぇーけーえる</option> | |
</select> |
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
var adjustAspectRatio = function (rectObj, wRetio, hRetio) { | |
if ((typeof rectObj.width === 'undefined' || rectObj.width === null) | |
|| (typeof rectObj.height === 'undefined' || rectObj.height === null)) { | |
console.error('Error : Object is not rect!'); | |
return; | |
} | |
if (rectObj.width > rectObj.height * wRetio / hRetio) { | |
rectObj.width = rectObj.height * wRetio / hRetio; | |
} | |
else if (rectObj.height > rectObj.width * hRetio / wRetio) { |
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
// twilio-node sample code "One-ring Call" | |
var twilio = require('twilio'); | |
var client = twilio('1234567890', '0987654321'); | |
client.calls.create({ | |
to: '+81xxxxxxxxxx', | |
from: '+81zzzzzzzzzz', | |
url: 'http://twilio-sample.com' | |
}, function (err, call) { | |
if(err) { | |
console.log(err); |
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
/** | |
* 半全角カナ変換モジュール | |
* @return {[type]} [description] | |
*/ | |
var kanaConverter = (function() { | |
// マップ作成用関数 | |
var createKanaMap = function(properties, values) { | |
var kanaMap = {}; | |
// 念のため文字数が同じかどうかをチェックする(ちゃんとマッピングできるか) |
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
" Note: Skip initialization for vim-tiny or vim-small. | |
if !1 | finish | endif | |
if has('vim_starting') | |
if &compatible | |
set nocompatible " Be iMproved | |
endif | |
" Required: | |
set runtimepath+=~/.vim/bundle/neobundle.vim/ |
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
var arr = [ | |
{ | |
name: 'たなか', | |
sex: '男', | |
age: 15 | |
}, | |
{ | |
name: 'さとう', | |
sex: '女', | |
age: 20 |
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
# Ex.1 | |
find ./ -type f -print | xargs grep 'foo' * | |
# Ex.2 | |
grep -r 'foo' . |
OlderNewer