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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
object.method do |block_var| | |
block_var.method! | |
end | |
object.method {|block_var| block_var.method! } |
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
/@\w*eight/ |
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
(東京都|北海道|(?:京都|大阪)府|.{2,3}県) |
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
public class AttachServer extends AsyncTask<String, Void, JSONArray> { | |
// Builder configuration | |
// Uri.Builderを使うとエンコードもやってくれるみたい | |
// Field | |
private Uri.Builder builder; | |
Context context; | |
// Constructor | |
public AttachServer(Context context){ | |
this.context = context; | |
this.builder = new Uri.Builder(); |
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
# uniq_key=>count | |
# 必要になったのでメモみたいな形。 | |
class Array | |
# return hash | |
def rollup | |
r_hs = {} | |
self.uniq.each do |sep| | |
r_hs[sep] = self.count sep | |
end | |
r_hs |
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
class Run | |
## ローカルrequire | |
require 'yaml' | |
require 'twitter' | |
require '../OnLine/universal_search' | |
def initialize | |
@configure = YAML.load_file('configure.yaml') | |
@twitter_client = Twitter::REST::Client.new do |config| | |
config.consumer_key = @configure["iphone"]["consumer_key"] | |
config.consumer_secret = @configure["iphone"]["consumer_secret"] |
NewerOlder