Changeset 4906

Show
Ignore:
Timestamp:
01/19/08 01:27:56 (5 years ago)
Author:
hakobe
Message:
 
Location:
lang
Files:
15 modified

Legend:

Unmodified
Added
Removed
  • lang/javascript/jsdeferred/tags/release-0.2.1/binding/userscript.js

    r3591 r4906  
    4343        var d = Deferred(); 
    4444        var req = new XMLHttpRequest(); 
    45         if (opts.method == "post") req.setRequestHeader("content-type", "application/x-www-form-urlencoded;charset=UTF-8"); 
    4645        req.open(opts.method, opts.url, true); 
    4746        req.onreadystatechange = function () { 
     
    4948        }; 
    5049        req.send(opts.data || null); 
    51         d.xhr = req; 
    5250        return d; 
    5351} 
  • lang/javascript/jsdeferred/tags/release-0.2.1/doc/index.html

    r3594 r4906  
    6565Copyright (c) 2007 cho45 ( www.lowreal.net )</p> 
    6666<p>http://coderepos.org/share/wiki/JSDeferred</p> 
    67 <p>Version:: 0.2.1 
     67<p>Version:: 0.2.0 
    6868License:: MIT</p> 
    6969<p>Permission is hereby granted, free of charge, to any person obtaining a copy 
  • lang/javascript/jsdeferred/tags/release-0.2.1/jsdeferred.jquery.js

    r3594 r4906  
    1 // JSDefeered 0.2.1 (c) Copyright (c) 2007 cho45 ( www.lowreal.net ) 
     1// JSDefeered 0.2.0 (c) Copyright (c) 2007 cho45 ( www.lowreal.net ) 
    22// See http://coderepos.org/share/wiki/JSDeferred 
    33function Deferred(){return(this instanceof Deferred)? this.init(this):new Deferred()} 
  • lang/javascript/jsdeferred/tags/release-0.2.1/jsdeferred.js

    r3593 r4906  
    55 * http://coderepos.org/share/wiki/JSDeferred 
    66 * 
    7  * Version:: 0.2.1 
     7 * Version:: 0.2.0 
    88 * License:: MIT 
    99 * 
  • lang/javascript/jsdeferred/tags/release-0.2.1/jsdeferred.mini.js

    r3594 r4906  
    1 // JSDefeered 0.2.1 (c) Copyright (c) 2007 cho45 ( www.lowreal.net ) 
     1// JSDefeered 0.2.0 (c) Copyright (c) 2007 cho45 ( www.lowreal.net ) 
    22// See http://coderepos.org/share/wiki/JSDeferred 
    33function Deferred(){return(this instanceof Deferred)? this.init(this):new Deferred()} 
  • lang/javascript/jsdeferred/tags/release-0.2.1/jsdeferred.nodoc.js

    r3594 r4906  
    1 // JSDefeered 0.2.1 (c) Copyright (c) 2007 cho45 ( www.lowreal.net ) 
     1// JSDefeered 0.2.0 (c) Copyright (c) 2007 cho45 ( www.lowreal.net ) 
    22// See http://coderepos.org/share/wiki/JSDeferred 
    33function Deferred () { return (this instanceof Deferred) ? this.init(this) : new Deferred() } 
  • lang/javascript/jsdeferred/tags/release-0.2.1/jsdeferred.userscript.js

    r3594 r4906  
    11// Usage:: with (D()) { your code } 
    2 // JSDefeered 0.2.1 (c) Copyright (c) 2007 cho45 ( www.lowreal.net ) 
     2// JSDefeered 0.2.0 (c) Copyright (c) 2007 cho45 ( www.lowreal.net ) 
    33// See http://coderepos.org/share/wiki/JSDeferred 
    44function D () { 
     
    189189        var d = Deferred(); 
    190190        var req = new XMLHttpRequest(); 
    191         if (opts.method == "post") req.setRequestHeader("content-type", "application/x-www-form-urlencoded;charset=UTF-8"); 
    192191        req.open(opts.method, opts.url, true); 
    193192        req.onreadystatechange = function () { 
     
    195194        }; 
    196195        req.send(opts.data || null); 
    197         d.xhr = req; 
    198196        return d; 
    199197} 
  • lang/perl/Class-Hookable/tags/Class-Hookable-0.05/Changes

    r3585 r4906  
    11Revision history for Perl extension Class::Hookable 
    22 
    3 0.05  Wed Dec 26 10:42:00 JST 2007 
    4         * I forgot to implement the call_method method. 
    5  
    6 0.04  Fri Dec 21 11:50:00 JST 2007 
     30.04  Fri Dec 11:50:00 JST 2007 
    74        - Correction of a mistake of a test file: 02_hookable_call_filter.t 
    85          [before] 06: use Test::Base tests => 4; 
    96          [after]  06: use Test::More tests => 4; 
    107 
    11 0.03  Thu Dec 20 14:20:00 JST 2007 
     80.03  Thu Dec 14:20:00 JST 2007 
    129        * Substantial Changes * 
    1310        * Change in the filter method of the plugin * 
  • lang/perl/Class-Hookable/tags/Class-Hookable-0.05/lib/Class/Hookable.pm

    r3585 r4906  
    88 
    99use vars qw( $VERSION ); 
    10 $VERSION = '0.05'; 
     10$VERSION = '0.04'; 
    1111 
    1212sub new { bless {}, shift } 
     
    353353        Carp::croak "callabck is not code reference."; 
    354354    } 
    355  
    356     if ( ! defined $hook ) { 
    357         Carp::croak "hook name is not specified."; 
    358     } 
    359  
     355     
    360356 
    361357    my @results; 
     
    386382} 
    387383 
    388 sub call_method { 
    389     my ( $self, $method, $args ) = @_; 
    390  
    391     if ( ! defined $method ) { 
    392         Carp::croak "method name is not specified."; 
    393     } 
    394  
    395     my $context = ( defined $self->hookable_context ) 
    396                 ? $self->hookable_context 
    397                 : $self ; 
    398  
    399     my $action = $self->registered_function( $method ); 
    400     return if ( ! $action ); 
    401  
    402     if ( $self->hookable_call_filter( 'call_method', $method, $args, $action ) ) { 
    403         my ( $plugin, $function ) = @{ $action }{qw( plugin function )}; 
    404         my $result = $function->( $plugin, $context, $args ); 
    405         return $result; 
    406     } 
    407     else { 
    408         return; 
    409     } 
    410 } 
    411  
    4123841; 
    413385__END__ 
     
    652624This method is an alias of C<$hook-E<gt>run_hook( $hook, $args, 1, \&callback )>. 
    653625 
    654 =head2 call_method 
    655  
    656   my $result = $hook->call_method( $method => $args ); 
    657  
    658 This method calls function of the registered plugin to method. 
    659 Arguments are specified by the order of C<$method> and C<$args>. 
    660  
    661 When the function was not found, 
    662 no this methods are returned. 
    663  
    664 B<Arguments of call_method method>: 
    665  
    666 =over 2 
    667  
    668 =item C<$method> 
    669  
    670 Designation of the method name with which a plugin was registered. 
    671 This argument is indispensable. 
    672  
    673 =item C<$args> 
    674  
    675 The argument which passes it to function. 
    676 This argument is optional. 
    677  
    678 =back 
    679  
    680 B<Arguments of registered function>: 
    681  
    682   sub function { 
    683       my ( $plugin, $context, $args ) = @_; 
    684       # some code 
    685   } 
    686  
    687 The argument by which it is passed to callback is C<$plugin>, C<$context>, C<$args>. 
    688  
    689 =over 3 
    690  
    691 =item C<$plugin> 
    692  
    693 The plugin object which passed a plugin and function to the register_method method when registering. 
    694  
    695 =item C<$context> 
    696  
    697 When C<$hook-E<gt>hookable_context> is specified, the specified object is passed, 
    698 and when it isn't so, object of Class::Hookable (or object of inherited Class::Hookable class) is passed. 
    699  
    700 Please see L<"hookable_context"> about context object which can be specified in C<$hook-E<gt>hookable_context>. 
    701  
    702 =item C<$args> 
    703  
    704 The argument specified by the run_hook method. 
    705  
    706 =back 
    707  
    708 B<Arguments of C<$hook-E<gt>hookable_call_filter>>: 
    709  
    710   $hook->hookable_call_filter( 'call_method', $method, $args, $action ); 
    711  
    712 Only when C<$hook-E<gt>hookable_call_filter( 'call_method', $method, $args, $action )> has returned truth, 
    713 this method calls function. 
    714  
    715 Please see L<"hookable_call_filter"> about C<$hook-E<gt>hookable_call_filter>. 
    716  
    717 =over 4 
    718  
    719 =item C<'call_method'> 
    720  
    721 C<'call_method'> is filter name. 
    722  
    723 =item C<$method> 
    724  
    725 The function name specified by the call_method method. 
    726  
    727 =item C<$args> 
    728  
    729 The argument specified by the call_method method. 
    730  
    731 =item C<$action> 
    732  
    733   my ( $plugin, $function ) = @{ $action }{qw( plugin function )}; 
    734  
    735 The hash reference including the plugin and the function. 
    736  
    737 =back 
    738  
    739626=head1 FILTER METHODS 
    740627 
  • lang/perl/Class-Hookable/tags/Class-Hookable-0.05/t/04_call/00_run_hook.t

    r3583 r4906  
    4444} 
    4545 
    46 is_deeply( 
    47     [ $hook->run_hook('foobar') ], 
    48     [qw( FOO BAR )], 
    49 ); 
    50  
    5146# -- context test -------------------- # 
    5247 
     
    6055    isa_ok( $context, 'Context' ); 
    6156} 
     57is_deeply( 
     58    [ $hook->run_hook('foobar') ], 
     59    [qw( FOO BAR )], 
     60); 
    6261 
    6362# -- dispatch_plugin test ------------ # 
     63 
    6464 
    6565$hook->hookable_set_filter( 
  • lang/ruby/wikiforme/tags/wikiforme-0.6.0/README

    r2107 r4906  
    1616 
    1717 
     18  See pressmate/README for web-based interface. 
     19 
     20 
    1821 
    1922*Copyright and license 
     
    2124Copyright (C) 2007 FURUHASHI Sadayuki 
    2225 
    23 You can redistribute it and/or modify it under the terms of 
    24 the Ruby's license. 
     26You can redistribute it and/or modify it under the same terms as Ruby. 
    2527 
  • lang/ruby/wikiforme/tags/wikiforme-0.6.0/bundles/article.4me/image.rb

    r3575 r4906  
    9090        end 
    9191        def process_smartdoc 
    92                 prio = %w[eps ps png jpeg jpg gif svg cgi php] 
     92                prio = %w[eps, ps, png jpeg jpg gif svg cgi php] 
    9393                XML[:img, 
    9494                        {:src => autoimage([:path, :url], prio)} 
  • lang/ruby/wikiforme/tags/wikiforme-0.6.0/pressmate/public_html/header.txt

    r3575 r4906  
    11#webhead 
    22?css /css/example.css 
    3 ?css /css/notice.css 
    43 
    54// jQuery 
     
    76 
    87// excanvas 
    9 ?javascript /js/excanvas-compressed.js 
     8?javascript /js/excanvas.pack.js 
    109^if_ie 
    1110 
  • lang/ruby/wikiforme/tags/wikiforme-0.6.0/pressmate/public_html/index.txt

    r3575 r4906  
    11*?Pressmate 
    2  
    3 *#Pressmateとは? 
    4 Pressmateは''構造化Wiki記法エンジン''を使ったWikiのような何かです。 
    5  
    6  
    7 *#新しい記法の作り方 - Note要素を作る 
    8 >|| 
    9 NOTE: Note 
    10 これは注意書きです。 
    11 注意しましょう。 
    12 ||< 
    13 と書くと、 
    14 >|html| 
    15 <div class="note"> 
    16   <p>Note</p> 
    17   <p>これは注意書きです。</p> 
    18   <p>注意しましょう。</p> 
    19 </div> 
    20 ||< 
    21 と変換してくれる記法を作ってみます。 
    22 ./start.rbスクリプトでサーバーを起動している場合は、一端終了して./start_debug.rbスクリプトを使って起動し直してください。 
    23  
    24  
    25 **#Hello World! 
    26 何はともあれ、まずは''Hello World!''を作ってみます。''#hello''と書くと''Hello World!''と表示する要素です。 
    27 +./format.4me/user.4me/''hello.rb''ファイルを作る 
    28 +''Hello World!''を書く 
    29 >|ruby| 
    30 f = Format.block :hello 
    31 f.group :@contents 
    32 f.process_html {|text, children| 
    33   XML[:p, "Hello World!"] 
    34 } 
    35 ||< 
    36 +''Hello World!''を呼び出す 
    37 ↓ここがHello World!になれば成功! 
    38 #hello 
    39  
    40  
    41 **#簡単なブロック要素を作る 
    42 ''<div class="note">''の中にテキストを出力するブロック要素を作ってみます。 
    43 +./format.4me/user.4me/に、拡張子を''.rb''にして新しいファイルを作る(たとえば''note.rb'') 
    44 +以下のプログラムを書く 
    45 >|ruby| 
    46 f = Format.block :class_note 
    47 f.group :@contents 
    48 f.process_html {|text, children| 
    49   XML[:div, {:class => "note"}, text.process] 
    50 } 
    51 ||< 
    52 ''text.process''は、インライン要素を展開します。つまり''太字''や'''斜体'''が適切に変換されます。 
    53 +呼び出す 
    54 #class_note テキスト 
    55  
    56 ''XML[...]''はいわゆる「わびさび方式」です。テキストを自動的にHTMLエスケープしてくれたりします。 
    57  
    58  
    59 **#入れ子を作る 
    60 ^anchor note_nest 
    61 >|| 
    62 #class_note Note 
    63 これは注意書きです。 
    64 注意しましょう。 
    65 ||< 
    66 と書くと、 
    67 >|html| 
    68 <div class="note"> 
    69   <p>Note</p> 
    70   <p>これは注意書きです。</p> 
    71   <p>注意しましょう。</p> 
    72 </div> 
    73 ||< 
    74 と出力するブロック要素を作ってみます。''#class_note''に続けて書いた文章が子要素になるところがポイントです。 
    75  
    76 +以下のプログラムを書く 
    77 >|ruby| 
    78 f = Format.block :class_note 
    79 f.group :@contents 
    80 f.contain :paragraph   # この行を追加 
    81 f.process_html {|text, children| 
    82   # ↓ここを変更 
    83   XML[:div, {:class => "note"}, [:p, text.process], children] 
    84 } 
    85 ||< 
    86 +呼び出す 
    87 #class_note Note 
    88 これは注意書きです。 
    89 注意しましょう。 
    90  
    91  
    92 **#文法をセットする 
    93 ''#class_note Note''の代わりに、 
    94 >|| 
    95 NOTE: Note 
    96 これは注意書きです。 
    97 注意しましょう。 
    98 ||< 
    99 という記法で呼び出せるようにしてみます。 
    100  
    101 +以下のプログラムを書く 
    102 >|ruby| 
    103 f = Format.block :class_note 
    104 f.group :@contents 
    105 f.contain :paragraph 
    106 f.default_syntax 'NOTE:'  # この行を追加 
    107 f.process_html {|text, children| 
    108   XML[:div, {:class => "note"}, [:p, text.process], children] 
    109 } 
    110 ||< 
    111 +呼び出す 
    112 NOTE: Note 
    113 これは注意書きです。 
    114 注意しましょう。 
    115  
    116  
    117 **#包含関係 
    118 [[#note_nest]]で ''f.contain :paragraph'' と設定しましたが、これでは、 
    119 >|| 
    120 NOTE: Note 
    121 これは注意書きです。 
    122 注意しましょう。 
    123 -注意1 
    124 -注意2 
    125 ||< 
    126 と書いたときに、''-注意1''や''-注意2''は子要素になってくれません。そこでもう少し詳しく設定してみます。 
    127  
    128 +以下のプログラムを書く 
    129 >|ruby| 
    130 f = Format.block :class_note 
    131 f.group :@contents 
    132 f.contain :@contents      # この行を追加 
    133 f.uncontain :class_note   # この行を追加 
    134 f.default_syntax 'NOTE:' 
    135 f.process_html {|text, children| 
    136   XML[:div, {:class => "note"}, [:p, text.process], children] 
    137 } 
    138 ||< 
    139 +呼び出す 
    140 NOTE: Note 
    141 これは注意書きです。 
    142 注意しましょう。 
    143 -注意1 
    144 -注意2 
    145  
    146 どうでしたか?簡単ですね。 
    147 新しい記法を作ったら、CodeReposにコミットしてみてください。 
    148  
     2Pressmate 
  • lang/ruby/wikiforme/tags/wikiforme-0.6.0/pressmate/start.rb

    r3575 r4906  
    2626port = 9400 
    2727 
    28 begin 
    29         require 'rubygems' 
    30 rescue LoadError 
    31 end 
    32  
    3328require 'app/pressmate' 
    3429require 'app/pressmate/extension'