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
{ | |
"swagger": "2.0", | |
"info": { | |
"version": "v1", | |
"title": "Edubots情緒rule專用api", | |
"description": "用於edubots機器人,透過連網方式取得情緒規則與表情圖集等資料,與使用者互動" | |
}, | |
"tags": [ { | |
"name" : "emotion rule", | |
"description" : "情緒規則api" |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Ansi 0 Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.0</real> |
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
startdate=2013-03-15 | |
enddate=2013-04-14 | |
curr="$startdate" | |
while true; do | |
echo "$curr" | |
[ "$curr" \< "$enddate" ] || break | |
curr=$( date +%Y-%m-%d --date "$curr +1 day" ) | |
done |
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
{ | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/User/Monokai Soda.tmTheme", | |
"disabled_single_snippet_for_scopes": "text.html, er, pe, pc, if, ife, else, elsif, end, lt", | |
"ensure_newline_at_eof_on_save": true, | |
"file_exclude_patterns": | |
[ | |
"*.pyc", | |
"*.pyo", | |
"*.exe", |
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
//判斷是否是UTF8 | |
private function isUTF8($word) | |
{ | |
if (preg_match("/^([".chr(228)."-".chr(233)."]{1}[".chr(128)."-".chr(191)."]{1}[".chr(128)."-".chr(191)."]{1}){1}/",$word) == true || preg_match("/([".chr(228)."-".chr(233)."]{1}[".chr(128)."-".chr(191)."]{1}[".chr(128)."-".chr(191)."]{1}){1}$/",$word) == true || preg_match("/([".chr(228)."-".chr(233)."]{1}[".chr(128)."-".chr(191)."]{1}[".chr(128)."-".chr(191)."]{1}){2,}/",$word) == true) | |
{ | |
return true; | |
} | |
else | |
{ | |
return false; |
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
//指定ContentType | |
context.Response.ContentType = _contentType; | |
//檔案Response出去 註:這邊會將檔案整個Response出去但是並不會顯示路徑!! | |
context.Response.WriteFile(ConfigurationManager.AppSettings["files_folder_PhysicalPath"] + _file); | |
string _fileName = HttpUtility.UrlPathEncode( Path.GetFileName(_file)); | |
string strContentDisposition = String.Format("{0}; filename=\"{1}\"", "inline", _fileName); | |
context.Response.AddHeader("Content-Disposition", strContentDisposition); |
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
{ | |
"array": [ | |
{ | |
"location": { | |
"lat": 123, | |
"long": 456, | |
"address": "xxxxxx" | |
}, | |
"uid": "12345" | |
"tel": "0912345678", |
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
SELECT user_id | |
FROM `facebook_active_user_201303` | |
WHERE page_id = '145649977189' | |
AND startdate = '2013-03-01' | |
AND period = 'month' | |
AND user_id | |
IN | |
( | |
SELECT user_id | |
FROM `facebook_active_user_201303` |
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
<script> | |
if ((navigator.userAgent.match(/iPhone/i)) || | |
(navigator.userAgent.match(/Android/i)) || | |
(navigator.userAgent.match(/iPod/i))|| | |
(navigator.userAgent.match(/Windows Phone OS 7/i))) | |
{ | |
location.replace("mobile.aspx"); | |
} | |
</script> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>万</key> | |
<string>萬</string> | |
<key>与</key> | |
<string>與</string> | |
<key>专</key> | |
<string>專</string> |