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
public void sayHi() | |
{ | |
System.out.println("hi"); | |
} |
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
require 'optparse' | |
# Init parameters. | |
# Refernce: optparse.rb | |
def init_params(args) | |
# Parameters filter by OptionParser. | |
params = {:repeat => 1, :input => 'N/A'} | |
OptionParser.new do |opts| |
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
%w(rubygems simple-rss open-uri set mechanize).each { |f| require f } | |
class RssPlurker | |
Plurk = 'http://www.plurk.com' | |
def initialize(user_name, password, source) | |
@user_name = user_name | |
@password = password | |
@source = source |
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
--- | |
layout: default | |
--- | |
<div id="post"> | |
{{ content }} | |
</div> | |
<div id="related"> | |
<h2>Related Posts</h2> | |
<ul class="posts"> |
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
destination: ./_site | |
auto: false | |
lsi: false | |
server_port: 4000 | |
pygments: false | |
markdown: maruku | |
permalink: date | |
maruku: | |
use_tex: false | |
use_divs: false |
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
# 以下區塊為主程式執行區段: | |
# | |
# 查詢參數分別為: | |
# 開始年(西元) | |
# 開始月 | |
# 結束年(西元) | |
# 結束月 | |
# 開始年 | |
# 股票代碼 | |
start_year = 2009 |
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
# 以下區塊為主程式執行區段: | |
# | |
# 查詢參數分別為: | |
# 開始年(西元) | |
# 開始月 | |
# 結束年(西元) | |
# 結束月 | |
# 開始年 | |
# 股票代碼 | |
start_year = 2009 |
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
def quick_sort(array, start, end): # Call by value | |
if(start < end): | |
pivot_idx = partition(array, start, end) | |
quick_sort(array, start, pivot_idx-1) | |
quick_sort(array, pivot_idx+1, end) | |
def partition(array, start, end): | |
pivot = array[start] | |
l_idx = start | |
r_idx = end |
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
<!-- static array style --> | |
<xsd:complextype name="__messages"> | |
<xsd:sequence> | |
<xsd:element name="message" type="tns:ArrayOf__message" minoccurs="0" /> | |
</xsd:sequence> | |
</xsd:complextype> | |
<xsd:complextype name="ArrayOf__message"> | |
<xsd:complexcontent> | |
<xsd:restriction base="SOAP_ENC:Array"> | |
<xsd:attribute ref="SOAP_ENC:arrayType" wsdl:arraytype="tns:__message[]" /> |
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"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:orientation="vertical" | |
android:background="@android:color/darker_gray"> | |
<TextView | |
android:id="@+id/textView1" | |
android:layout_width="match_parent" |
OlderNewer