##環境建制
brew install gnu-prolog # 安裝 gnu prolog
gprolog # 跑起來
consult('pa3prolog.pl'). # 載入檔案
# ...玩
/** | |
* 密碼學導論作業二/第二題 | |
* @author Yukai Huang | |
* NTUST 2014 | |
*/ | |
#include <iostream> | |
#include <iomanip> | |
#include <cmath> | |
#include <stdio.h> |
# usage: | |
# | |
# dir_traversal do | |
# the_code_want_to_run_in_each_directory | |
# end | |
def self.dir_traversal | |
Dir.glob("*").each do |name| | |
if File.directory?(name) | |
Dir.chdir(name) |
[ | |
{ | |
"course_title": "控制系統分析與設計", | |
"course_code": "AC5009701", | |
"lecturer": "楊振雄", | |
"credits": "3", | |
"required_or_elective": "選", | |
"full_or_half_semester": "半", | |
"semester": "1032", | |
"course_limitations": null, |
{ | |
"startUrl": "http://www.opentech.com.tw/search/result.asp", | |
"selectors": [{ | |
"parentSelectors": ["_root", "nextpage"], | |
"type": "SelectorLink", | |
"multiple": true, | |
"id": "nextpage", | |
"selector": "p a:nth-of-type(2)", | |
"delay": "" | |
}, { |
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>一點 Google 中文字體的淺嚐即止</title> | |
<link rel="stylesheet" type="text/css" href="style.css"> | |
</head> | |
<body> | |
<div class="container"> | |
<h1 class="song">結我的來達相能維多</h1> | |
<p class="hei"> |
data = Array.new(1000) { |e| e+1 } | |
data.shuffle! |
function scrollBottomDistance() { | |
return $("#contents").height() - ($("#main").scrollTop() + $("#main").height()) | |
} | |
function scrollToBottomDistance(e) { | |
return e.children().height() - (e.scrollTop() + e.height()) | |
} | |
function scrollToBottom(e) { | |
value = e.children().height() - e.height() - 1, setTimeout(function() { |
臺北市 | http://vote2016.cec.gov.tw/zh_TW/P1/n100000000000000.html | |
---|---|---|
北投區 | http://vote2016.cec.gov.tw/zh_TW/P1/n100000100000000.html | |
士林區 | http://vote2016.cec.gov.tw/zh_TW/P1/n100000200000000.html | |
大同區 | http://vote2016.cec.gov.tw/zh_TW/P1/n100000300000000.html | |
中山區 | http://vote2016.cec.gov.tw/zh_TW/P1/n100000400000000.html | |
松山區 | http://vote2016.cec.gov.tw/zh_TW/P1/n100000500000000.html | |
內湖區 | http://vote2016.cec.gov.tw/zh_TW/P1/n100000600000000.html | |
南港區 | http://vote2016.cec.gov.tw/zh_TW/P1/n100000700000000.html | |
萬華區 | http://vote2016.cec.gov.tw/zh_TW/P1/n100000800000000.html | |
中正區 | http://vote2016.cec.gov.tw/zh_TW/P1/n100000900000000.html |