Skip to content

Instantly share code, notes, and snippets.

--- browser.xul.orig 2009-05-08 23:29:02.000000000 +0900
+++ browser.xul 2009-05-10 11:05:38.000000000 +0900
@@ -1,26 +1,26 @@
<?xml version="1.0"?>
<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<popup id="contentAreaContextMenu">
+ <menuseparator insertafter="placesMenu" />
<menuitem
class="menuitem-iconic"
- insertbefore="context-bookmarklink"
MATCH FAILED
input: [[% USE LinkTo -%]\n[% args = {\n href => '/link/to?foo=bar',\n hoge => 'huga',\n in => 'put',\n} -%]\n[% LinkTo.link_to('link_text', args) %]\n]
expect: [<a href="/link/to?foo=bar&amp;in=put&amp;hoge=huga">link_text</a>]
output: [<a href="/link/to?foo=bar&amp;hoge=huga&amp;in=put">link_text</a>]
FAILED 13: - template text 5 did not match expected
not ok 13 - template text 5 did not match expected
use Web::Scraper;
use strict;
use Data::Dumper;
use URI;
use YAML;
use utf8;
use Encode qw/ encode_utf8 decode_utf8 /;
my $s = scraper {
process "table.wikitable tr", "tr[]" =>
use Benchmark qw/:all/;
use List::Util qw/ sum /;
cmpthese(0, {
sum => sub { sum( 1 .. 1000 ) },
loop => sub {
my $x = 0;
$x += $_ for ( 1 .. 1000 );
},
});
__END__
package Filter;
use strict;
require Exporter;
our @ISA = qw/ Exporter /;
our @EXPORT_OK = qw/ html uri replace html_line_break /;
our %EXPORT_TAGS = ( all => \@EXPORT_OK );
use overload
'|' => sub {
my ($self, @args) = @_;
?= encoded_string q{<?xml version="1.0" encoding="utf-8"?>}
package Example;
use URI;
use Web::Scraper;
my $URL = 'http://www.topicmaker.com';
my @FOO = qw/ foo /;
sub scrape {
scraper {
process '//tr', 'rows[]', scraper {
package Example;
my @FOO = qw/ foo /;
sub nested {
sub {
sub {
warn @FOO;
}->();
}->();
}
1;
my @FOO = qw/ foo /;
sub nested {
sub {
sub {
warn @FOO;
}->();
}->();
}
nested();
package main
import (
"fmt";
"os";
"strconv";
)
func main() {
n, error := strconv.Atoi( os.Args[1] );