2013-02-23 kansai.pm#15 @turugina
HTTP Status codeはすべて暗記していると聞きました。
use strict; | |
use warnings; | |
use utf8; | |
use Math::Trig; | |
use v5.12; | |
# lat 緯度 lng 経度 |
(def board-sample | |
[ | |
0 9 0 0 1 0 0 2 0 | |
0 0 0 0 9 0 0 4 0 | |
5 0 0 0 0 0 0 0 6 | |
6 5 0 7 3 2 0 8 4 | |
0 0 9 0 0 0 7 1 3 | |
8 0 0 0 0 1 0 6 0 | |
2 1 4 8 5 3 0 7 9 | |
0 8 5 0 7 6 4 3 2 |
#!perl | |
use v5.12; | |
use Storable qw/dclone/; | |
use List::Util qw/shuffle/; | |
use Set::Intersection; | |
#my @board = qw( | |
#0 9 0 3 0 0 0 0 0 | |
#5 0 0 0 0 0 7 0 0 |
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>your.group.id</groupId> | |
<artifactId>your-product-id</artifactId> | |
<version>1.0.0-SNAPSHOT</version> | |
<packaging>apk</packaging> | |
<name>My Application</name> |
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>your.group.id</groupId> | |
<artifactId>your.library.id</artifactId> | |
<version>1.0.0-SNAPSHOT</version> | |
<packaging>apklib</packaging> | |
<name>My Library</name> |
use strict;use warnings;use utf8;my($xx,$x,$X,@x,@X)=qr!\p{xdigit}!; | |
sub X{0 eq$_||!/^0+[^0]+$/}@x=(sub{/^$xx{2}([-:])(?:$xx{2}\1){4}$xx{2}$/}, | |
sub{@X=split/\./;4==@X&&4==grep{/^\d{1,3}$/&&0<=$_&&256>$_&&X}@X}, | |
sub{@X=split/:/;8==@X&&8==grep{/^$xx{1,4}$/&&X}@X}); | |
sub x{$X=0;for$x(@x){last if$x->();++$X;}$X;}@x=map x,<STDIN>; | |
@x=map{$_*=4;$x[$_]*64+$x[$_+1]*16+$x[$_+2]*4+$x[$_+3]}0..$#x/4; | |
print join'',map chr,@x; |
use v5.12; | |
use Math::Combinatorics qw/permute/; | |
use List::MoreUtils qw/mesh/; | |
use Data::Dumper; | |
my @vars = qw/Betty Ethel Joan Kitty Mary/; | |
my @values = 1..scalar @vars; | |
say Dumper([ |
import android.content.Context; | |
import android.content.res.AssetManager; | |
import android.test.ServiceTestCase; | |
import com.example.android.HogeService; | |
public class HogeTest extends ServiceTestCase<HogeService> | |
{ | |
private Context getTestContext() throws Exception | |
{ |
package com.example.android.proxytest; | |
import java.io.ByteArrayOutputStream; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.IOException; | |
import java.util.Properties; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; |