This file contains 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
# Usage: pr (pull request current branch into develop) | |
# Usage 2: pr stable (pull request current branch into stable) | |
function pr() { | |
base=$1; | |
if [ "$1" == "" ]; then | |
base="develop" | |
fi | |
hub pull-request -b team:"$base" -h team:`git rev-parse --abbrev-ref HEAD`; | |
} |
This file contains 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
#define ApplicationDelegate ((AppDelegate *)[[UIApplication sharedApplication] delegate]) | |
#define UserDefaults [NSUserDefaults standardUserDefaults] | |
#define NotificationCenter [NSNotificationCenter defaultCenter] | |
#define SharedApplication [UIApplication sharedApplication] | |
#define Bundle [NSBundle mainBundle] | |
#define MainScreen [UIScreen mainScreen] | |
#define ShowNetworkActivityIndicator() [UIApplication sharedApplication].networkActivityIndicatorVisible = YES | |
#define HideNetworkActivityIndicator() [UIApplication sharedApplication].networkActivityIndicatorVisible = NO | |
#define NetworkActivityIndicatorVisible(x) [UIApplication sharedApplication].networkActivityIndicatorVisible = x | |
#define NavBar self.navigationController.navigationBar |
This file contains 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
invoke-virtual v0, v1, v5, Landroid/content/Intent;->putExtra(Ljava/lang/String; Ljava/lang/String;)Landroid/content/Intent; | |
v0 | |
invoke-virtual v0, v1, v2, Landroid/content/Intent;->putExtra(Ljava/lang/String; Landroid/os/Parcelable;)Landroid/content/Intent; | |
v0 | |
invoke-virtual v0, v1, Landroid/content/Intent;->setPackage(Ljava/lang/String;)Landroid/content/Intent; | |
v0 | |
invoke-direct v0, v1, Landroid/content/Intent;-><init>(Ljava/lang/String;)V | |
v0 | |
new-instance v0, Landroid/content/Intent; | |
v1 |
This file contains 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
invoke-virtual v0, v1, v2, Landroid/content/Intent;->putExtra(Ljava/lang/String; Ljava/lang/String;)Landroid/content/Intent; | |
v0 | |
invoke-virtual v0, v1, v2, Landroid/content/Intent;->putExtra(Ljava/lang/String; Landroid/os/Parcelable;)Landroid/content/Intent; | |
v0 | |
invoke-virtual v0, v1, Landroid/content/Intent;->setPackage(Ljava/lang/String;)Landroid/content/Intent; | |
v0 | |
invoke-direct v0, v1, Landroid/content/Intent;-><init>(Ljava/lang/String;)V | |
v0 | |
new-instance v0, Landroid/content/Intent; | |
v1 |
This file contains 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
#include <stdio.h> | |
#include <deque> | |
#include <map> | |
#define MAX_CHILD_NUM 10 | |
using namespace std; | |
typedef struct _obj { | |
struct _obj *child[MAX_CHILD_NUM]; |
This file contains 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
id="your id here" | |
pw="your password here" | |
filename="$1" | |
algo_name="$2" | |
curl -s -c cookie -d "team_name=${id}&passwd=${pw}&submit=submit" 'http://main.learner.csie.ntu.edu.tw/php/ml12fall/login.php' > /dev/null | |
curl -s -o output.html -b cookie -F "userfile=@${filename};type=text/plain" -F "algouse=${algo_name}" 'http://main.learner.csie.ntu.edu.tw/php/ml12fall/cal.php' | |
sed -nE 's/.*(AUC \(first-half\): [0-9\.]+).*/\1/p' output.html |
This file contains 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
for i in `seq 102 104` | |
do | |
join sum.list $i.list | awk '{print $6=(0.65*($4-$2)^2+($5-$3)^2)^(0.5)}' > $i.out | |
done | |
cat *.out > all.out |
This file contains 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 -w | |
use 5.010; | |
use LWP; | |
use URI::Escape; | |
use strict; | |
my $str = 'abcdefghijklmnopqrstuvwxyz0123456789~!@#$%^&*()_+`-=[]\\{}|;\':",./<>? '; | |
my @chars = map { uri_escape($_) } split //, $str; | |
my @stack; |
This file contains 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
VERSION 5.00 | |
Begin VB.Form Form1 | |
Caption = "上推" | |
ClientHeight = 5415 | |
ClientLeft = 60 | |
ClientTop = 345 | |
ClientWidth = 6930 | |
LinkTopic = "Form1" | |
ScaleHeight = 5415 | |
ScaleWidth = 6930 |
This file contains 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
main: poly.cpp main.cpp poly.h | |
g++ dm4.cpp main.cpp -o poly | |
run: | |
./poly < input |