Skip to content

Instantly share code, notes, and snippets.

if(!isFullPackage) {
methodName = targetLine.match(/::(.+)/)[1];
}
                          ↓
// フルパスを省略する場合は、パッケージの区切り文字がある場合のみ
if(!isFullPackage && methodName.indexOf("::") > -1) {
methodName = methodName.match(/::(.+)/)[1];
}
# 特定の拡張子のファイルパスだけ抜き出す
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
(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)
<?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)
}
# sinatra でのリダイレクト設定
# hoge/ のような '/' 終わりを '/' 無しへリダイレクト
# ただし、 http://example.com の場合は末尾 '/' が付く
get %r{^(.+)/$} do |c|
redirect c, 303
end
We couldn’t find that file to show.
require 'net/http'
require 'uri'
require 'pp'
require 'kconv'
require 'rubygems'
require 'pit'
require 'json'
#--------------------------
# 取得した Streamデータを文字列として出力する。
#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
for FILE in `ls -a | grep '^\.[^\.]'`; do
echo ${FILE}
done
// 対象のクラスはなんでも良い
// 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) {