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
<html> | |
<head> | |
<title>test</title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> | |
<script type="text/javascript"> | |
$(function(){ | |
var pfirst = $("p#first").html(); | |
alert(pfirst); | |
$("p#first").html("<strong>変更後</strong>"); | |
$("p#first").css("color","red"); |
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
<html> | |
<head> | |
<title>test</title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> | |
<script type="text/javascript"> | |
$(function(){ | |
$("input#button").click(function(){ | |
$("input#text").val("ボタンから挿入"); | |
}); | |
}); |
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
use strict; | |
use warnings; | |
use Sys::Hostname; | |
my $hostname = hostname(); | |
print "$hostname¥n"; |
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
use strict; | |
use warnings; | |
use FLV::Info; | |
my @targets = @ARGV; | |
my $reader = FLV::Info->new; | |
for my $target (@targets) { | |
eval { $reader->parse($target); }; |
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
#!/usr/bin/perl | |
use Mojolicious::Lite; | |
use Data::Section::Simple; | |
my $vpath = Data::Section::Simple->new()->get_data_section(); | |
plugin 'xslate_renderer' => { | |
template_options => { path => [$vpath] }, | |
}; | |
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
use Mojolicious::Lite; | |
use File::Basename; | |
use File::Spec; | |
my $base = File::Spec->rel2abs(dirname(__FILE__)); | |
app->start($ARGV[0] ? $ARGV[0] : 'psgi'); |
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
use strict; | |
use warnings; | |
use RPC::XML; | |
use feature qw/say/; | |
say res(1); | |
say res(1.0); | |
say res(1.1); | |
say res("test"); | |
say res([1,2,3,4]); |
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
use strict; | |
use warnings; | |
use RPC::XML::Client; | |
my $cli = RPC::XML::Client->new('http://localhost:3000/'); | |
my $resp = $cli->send_request('echo', "hello"); | |
warn $resp->value; |
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
#!/usr/bin/evn perl | |
use strict; | |
use warnings; | |
use utf8; | |
BEGIN { $ENV{MOJO_POLL} = $ENV{MOJO_NO_IPV6} = 1 } | |
use Mojo::IOLoop; |
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
use strict; | |
use warnings; | |
use Mojo::Client; | |
my $client = Mojo::Client->new; | |
my $base_url = 'http://localhost:3000'; | |