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
if(!isFullPackage) { | |
methodName = targetLine.match(/::(.+)/)[1]; | |
} | |
↓ | |
// フルパスを省略する場合は、パッケージの区切り文字がある場合のみ | |
if(!isFullPackage && methodName.indexOf("::") > -1) { | |
methodName = methodName.match(/::(.+)/)[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
# 特定の拡張子のファイルパスだけ抜き出す | |
target_ext = ['mxml', 'xml', 'as', 'txt', 'html'] | |
target_file = [] | |
Dir.glob("**/*").each do |f| | |
target_ext.each do |t| | |
target_file.push(f) if f =~ /.+\.#{t}$/ | |
end | |
end |
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(obj) { | |
var idName="asLoggerConsole"; | |
var idLineName="asLoggerConsoleLine"; | |
var d = document; | |
var div = d.getElementById(idName); | |
if(!div) { | |
div = d.createElement("div"); | |
div.id = idName; | |
div.class = idName + "Class"; | |
d.body.appendChild(div) |
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
<?xml version="1.0" encoding="utf-8"?> | |
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> | |
<mx:Button label="hgoehoge" click="click(event)" /> | |
<mx:Script> | |
<![CDATA[ | |
private function click(e:Event):void { | |
if(ExternalInterface.available) { | |
var location:Object = ExternalInterface.call("function(){return window.location;}"); | |
trace(location) | |
} |
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
# sinatra でのリダイレクト設定 | |
# hoge/ のような '/' 終わりを '/' 無しへリダイレクト | |
# ただし、 http://example.com の場合は末尾 '/' が付く | |
get %r{^(.+)/$} do |c| | |
redirect c, 303 | |
end |
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
require 'net/http' | |
require 'uri' | |
require 'pp' | |
require 'kconv' | |
require 'rubygems' | |
require 'pit' | |
require 'json' | |
#-------------------------- | |
# 取得した Streamデータを文字列として出力する。 |
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
#client.rb | |
require 'drb/drb' | |
there = DRbObject.new_with_uri("druby://localhost:12345") | |
puts there.method1("hoge") | |
there method2() do |num| | |
puts "yield = #{num}" | |
end |
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
for FILE in `ls -a | grep '^\.[^\.]'`; do | |
echo ${FILE} | |
done |
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
// 対象のクラスはなんでも良い | |
// describeType したクラスの public 変数 を列挙して、内容を出力する | |
// 参考 | |
// http://livedocs.adobe.com/flash/9.0_jp/ActionScriptLangRefV3/flash/utils/package.html#describeType() | |
// http://www.be-interactive.org/?itemid=26 | |
var hoge:UIComponent = this as UIComponent; | |
var xml:XML = describeType(hoge); | |
for each(var list:XML in xml.variable) { |