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
#!perl | |
use strict; | |
use warnings; | |
use utf8; | |
use XML::RSS; | |
use Growl::Any; | |
use LWP::UserAgent; | |
use File::Temp qw/:POSIX/; | |
use HTTP::Status qw/:constants/; | |
use Scope::Guard; |
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 utf8; | |
#=============================== | |
my $consumer_key = ''; | |
my $consumer_secret = ''; | |
my $access_token = ''; | |
my $access_token_secret = ''; |
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
import System | |
import System.Windows.Forms; | |
class Parent(Form): | |
public def constructor(): | |
self.IsMdiContainer = true | |
_btn = Button(Text: "Create Child") | |
_btn.Click += self.CreateChild | |
self.Controls.Add(_btn) |
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
import System.Threading | |
rnd = System.Random() | |
data = (rnd.Next(100) for i in range(100)) | |
for t in (Thread({Thread.Sleep(i*100); print i}) for i in data): | |
t.Start() |
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
class Hoge | |
{ Q_OBJECT; | |
public: | |
Hoge(); | |
private slot: | |
void OnButtonClicked(bool); | |
private: | |
QPushButton *button_ |
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
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; |
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
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 | |
{ |
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 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([ |
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 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; |
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
<?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> |