-
aaa
-
bbb
main(){ ruby;
}
# | |
# Find the newest OmniGraffle document | |
# | |
framework 'Cocoa' | |
def finish(notification) | |
if @query.resultCount > 0 then | |
puts @query.resultAtIndex(0).valueForAttribute('kMDItemPath') | |
end |
# | |
# List large Microsoft Word files upto 10 | |
# | |
framework 'Cocoa' | |
def finish(notification) | |
max = @query.resultCount | |
max = 10 if max > 10 | |
(0...max).each { |i| |
// jQueryで<input>タグのvalue値を取得する方法 | |
// value()ではないことに注意 | |
val = $('#input').val(); | |
webView.setWebChromeClient(new WebChromeClient() { | |
public boolean onConsoleMessage(ConsoleMessage cm){ | |
Log.v("TestWebViewApp", cm.message()+" -- line:"+cm.lineNumber()+" of "+cm.sourceId()); | |
return true; | |
} | |
}); |
require 'rubygems' | |
require 'aws/s3' | |
include AWS::S3 | |
Base.establish_connection!( | |
:access_key_id => 'ABCDEFG', | |
:secret_access_key => 'abcdefg' | |
) | |
DEFAULT_HOST.replace "s3-ap-northeast-1.amazonaws.com" # 東京を指定 |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>URL</key> | |
<string>vnc://gyazz.com</string> | |
</dict> | |
</plist> |
// validation | |
$('.zip .editable').editable('click', function(e){ | |
if(e.value.match(/^\d{3}\-\d{4}$/)){ | |
alert(e.target.selector + ' : ' + e.value); | |
} | |
else{ | |
$('.zip .editable').html(e.old_value); | |
alert(e.value + ' is not valid zip-code'); | |
} | |
}); |
(function($){ | |
$.fn.yourfunc = function(/* 適当な引数 */){ | |
/* 適当に処理 */ | |
return this; | |
}; | |
})(jQuery) |