Changeset 4906
- Timestamp:
- 01/19/08 01:27:56 (5 years ago)
- Location:
- lang
- Files:
-
- 15 modified
-
javascript/jsdeferred/tags/release-0.2.1/binding/userscript.js (modified) (2 diffs)
-
javascript/jsdeferred/tags/release-0.2.1/doc/index.html (modified) (1 diff)
-
javascript/jsdeferred/tags/release-0.2.1/jsdeferred.jquery.js (modified) (1 diff)
-
javascript/jsdeferred/tags/release-0.2.1/jsdeferred.js (modified) (1 diff)
-
javascript/jsdeferred/tags/release-0.2.1/jsdeferred.mini.js (modified) (1 diff)
-
javascript/jsdeferred/tags/release-0.2.1/jsdeferred.nodoc.js (modified) (1 diff)
-
javascript/jsdeferred/tags/release-0.2.1/jsdeferred.userscript.js (modified) (3 diffs)
-
perl/Class-Hookable/tags/Class-Hookable-0.05/Changes (modified) (1 diff)
-
perl/Class-Hookable/tags/Class-Hookable-0.05/lib/Class/Hookable.pm (modified) (4 diffs)
-
perl/Class-Hookable/tags/Class-Hookable-0.05/t/04_call/00_run_hook.t (modified) (2 diffs)
-
ruby/wikiforme/tags/wikiforme-0.6.0/README (modified) (2 diffs)
-
ruby/wikiforme/tags/wikiforme-0.6.0/bundles/article.4me/image.rb (modified) (1 diff)
-
ruby/wikiforme/tags/wikiforme-0.6.0/pressmate/public_html/header.txt (modified) (2 diffs)
-
ruby/wikiforme/tags/wikiforme-0.6.0/pressmate/public_html/index.txt (modified) (1 diff)
-
ruby/wikiforme/tags/wikiforme-0.6.0/pressmate/start.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lang/javascript/jsdeferred/tags/release-0.2.1/binding/userscript.js
r3591 r4906 43 43 var d = Deferred(); 44 44 var req = new XMLHttpRequest(); 45 if (opts.method == "post") req.setRequestHeader("content-type", "application/x-www-form-urlencoded;charset=UTF-8");46 45 req.open(opts.method, opts.url, true); 47 46 req.onreadystatechange = function () { … … 49 48 }; 50 49 req.send(opts.data || null); 51 d.xhr = req;52 50 return d; 53 51 } -
lang/javascript/jsdeferred/tags/release-0.2.1/doc/index.html
r3594 r4906 65 65 Copyright (c) 2007 cho45 ( www.lowreal.net )</p> 66 66 <p>http://coderepos.org/share/wiki/JSDeferred</p> 67 <p>Version:: 0.2. 167 <p>Version:: 0.2.0 68 68 License:: MIT</p> 69 69 <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 ) 2 2 // See http://coderepos.org/share/wiki/JSDeferred 3 3 function Deferred(){return(this instanceof Deferred)? this.init(this):new Deferred()} -
lang/javascript/jsdeferred/tags/release-0.2.1/jsdeferred.js
r3593 r4906 5 5 * http://coderepos.org/share/wiki/JSDeferred 6 6 * 7 * Version:: 0.2. 17 * Version:: 0.2.0 8 8 * License:: MIT 9 9 * -
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 ) 2 2 // See http://coderepos.org/share/wiki/JSDeferred 3 3 function 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 ) 2 2 // See http://coderepos.org/share/wiki/JSDeferred 3 3 function Deferred () { return (this instanceof Deferred) ? this.init(this) : new Deferred() } -
lang/javascript/jsdeferred/tags/release-0.2.1/jsdeferred.userscript.js
r3594 r4906 1 1 // 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 ) 3 3 // See http://coderepos.org/share/wiki/JSDeferred 4 4 function D () { … … 189 189 var d = Deferred(); 190 190 var req = new XMLHttpRequest(); 191 if (opts.method == "post") req.setRequestHeader("content-type", "application/x-www-form-urlencoded;charset=UTF-8");192 191 req.open(opts.method, opts.url, true); 193 192 req.onreadystatechange = function () { … … 195 194 }; 196 195 req.send(opts.data || null); 197 d.xhr = req;198 196 return d; 199 197 } -
lang/perl/Class-Hookable/tags/Class-Hookable-0.05/Changes
r3585 r4906 1 1 Revision history for Perl extension Class::Hookable 2 2 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 3 0.04 Fri Dec 11:50:00 JST 2007 7 4 - Correction of a mistake of a test file: 02_hookable_call_filter.t 8 5 [before] 06: use Test::Base tests => 4; 9 6 [after] 06: use Test::More tests => 4; 10 7 11 0.03 Thu Dec 2014:20:00 JST 20078 0.03 Thu Dec 14:20:00 JST 2007 12 9 * Substantial Changes * 13 10 * Change in the filter method of the plugin * -
lang/perl/Class-Hookable/tags/Class-Hookable-0.05/lib/Class/Hookable.pm
r3585 r4906 8 8 9 9 use vars qw( $VERSION ); 10 $VERSION = '0.0 5';10 $VERSION = '0.04'; 11 11 12 12 sub new { bless {}, shift } … … 353 353 Carp::croak "callabck is not code reference."; 354 354 } 355 356 if ( ! defined $hook ) { 357 Carp::croak "hook name is not specified."; 358 } 359 355 360 356 361 357 my @results; … … 386 382 } 387 383 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_context397 : $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 412 384 1; 413 385 __END__ … … 652 624 This method is an alias of C<$hook-E<gt>run_hook( $hook, $args, 1, \&callback )>. 653 625 654 =head2 call_method655 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 2667 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 =back679 680 B<Arguments of registered function>:681 682 sub function {683 my ( $plugin, $context, $args ) = @_;684 # some code685 }686 687 The argument by which it is passed to callback is C<$plugin>, C<$context>, C<$args>.688 689 =over 3690 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 =back707 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 4718 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 =back738 739 626 =head1 FILTER METHODS 740 627 -
lang/perl/Class-Hookable/tags/Class-Hookable-0.05/t/04_call/00_run_hook.t
r3583 r4906 44 44 } 45 45 46 is_deeply(47 [ $hook->run_hook('foobar') ],48 [qw( FOO BAR )],49 );50 51 46 # -- context test -------------------- # 52 47 … … 60 55 isa_ok( $context, 'Context' ); 61 56 } 57 is_deeply( 58 [ $hook->run_hook('foobar') ], 59 [qw( FOO BAR )], 60 ); 62 61 63 62 # -- dispatch_plugin test ------------ # 63 64 64 65 65 $hook->hookable_set_filter( -
lang/ruby/wikiforme/tags/wikiforme-0.6.0/README
r2107 r4906 16 16 17 17 18 See pressmate/README for web-based interface. 19 20 18 21 19 22 *Copyright and license … … 21 24 Copyright (C) 2007 FURUHASHI Sadayuki 22 25 23 You can redistribute it and/or modify it under the terms of 24 the Ruby's license. 26 You can redistribute it and/or modify it under the same terms as Ruby. 25 27 -
lang/ruby/wikiforme/tags/wikiforme-0.6.0/bundles/article.4me/image.rb
r3575 r4906 90 90 end 91 91 def process_smartdoc 92 prio = %w[eps pspng jpeg jpg gif svg cgi php]92 prio = %w[eps, ps, png jpeg jpg gif svg cgi php] 93 93 XML[:img, 94 94 {:src => autoimage([:path, :url], prio)} -
lang/ruby/wikiforme/tags/wikiforme-0.6.0/pressmate/public_html/header.txt
r3575 r4906 1 1 #webhead 2 2 ?css /css/example.css 3 ?css /css/notice.css4 3 5 4 // jQuery … … 7 6 8 7 // excanvas 9 ?javascript /js/excanvas -compressed.js8 ?javascript /js/excanvas.pack.js 10 9 ^if_ie 11 10 -
lang/ruby/wikiforme/tags/wikiforme-0.6.0/pressmate/public_html/index.txt
r3575 r4906 1 1 *?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 2 Pressmate -
lang/ruby/wikiforme/tags/wikiforme-0.6.0/pressmate/start.rb
r3575 r4906 26 26 port = 9400 27 27 28 begin29 require 'rubygems'30 rescue LoadError31 end32 33 28 require 'app/pressmate' 34 29 require 'app/pressmate/extension'
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)