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
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
Scanner scanner = new Scanner(System.in); | |
int n = scanner.nextInt(); |
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
import java.awt.Rectangle; | |
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
Scanner scanner = new Scanner(System.in); | |
int night = scanner.nextInt(); | |
int count = 1; | |
while (night != 0) { |
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
import java.util.ArrayList; | |
import java.util.Scanner; | |
public class Main { | |
static class LL { | |
public ArrayList<Integer> list; | |
public LL() { | |
list = new ArrayList<Integer>(); |
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
public String search(String longitude, String latitude, int radius) { | |
String res = null; | |
try { | |
HttpClient client = new DefaultHttpClient(); | |
HttpGet get = new HttpGet("http://ym.takeshi.tw:8080/search?long=" | |
+ longitude + "&lat=" + latitude + "&radius=" + radius); | |
HttpResponse response = client.execute(get); | |
int len = (int) response.getEntity().getContentLength(); | |
byte[] responseBody = new byte[len]; |
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
# -*- encoding: utf-8 -*- | |
import Image | |
import ImageDraw | |
import sys | |
pattern = ( | |
(), | |
(0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0), |
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
<html> | |
<head> | |
</head> | |
<body> | |
<canvas id='leapCanvas' height='600' width='800' /> | |
</body> | |
<script src="http://js.leapmotion.com/0.2.0-beta6/leap.min.js"></script> | |
<script> | |
var c = document.getElementById("leapCanvas"); |
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
import requests | |
import csv | |
import uniout | |
from os.path import exists | |
from os.path import basename | |
from pprint import pprint | |
def save(url, path=None): |
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
[['G3020A', | |
u' 專題實驗 ', | |
u'李良德', | |
u'必修', | |
'1', | |
'2', | |
' 0', | |
u'專任 '], | |
['G3020B', | |
u' 專題實驗 ', |
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
iTerm 2 - 取代 Terminal 用的工具 | |
zsh - zshell, 加強 shell 在使用上的體驗 | |
oh-my-zsh - zsh 的 plugin, 讓 zsh 更好用 | |
Xampp - 整合 apache http server, mysql 等軟體包 | |
Sparrow - 郵件軟體, 9.99$ | |
keka - 檔案壓縮程式 | |
Snagit - 螢幕擷取程式 | |
Sublime Text 2 - 強大的文字編輯程式支援許多 plugin(已經要出第 3 代了) | |
Package Control - Sublime 的 plugin, 主要是用來管理套件用(用 Sublime 必裝) | |
Subliminter - Sublime 的 plugin, 用於支援程式撰寫 |
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 = 0; i < 5; i++){ | |
for(j = 0; j < 4 - i; j++){ | |
if(a[j] < a[j + 1]){ | |
swap(a[j], a[j+1]); | |
} | |
} | |
} |