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
openssl pkcs12 -in SecondTime.p12 -out StartHeart.pem -nodes -clcerts | |
##此生成的pem檔是給server用的。只要給這個檔案給Server即可。 | |
##有分開發用(debug)的pem和上架用的pem。如果要上架的話,要重新生成這個pem檔給server。 | |
##pem檔有有效時間。約1年過期。 |
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
//預備(整个过程大概是从 https://github.com/CocoaPods/CocoaPods 去克隆一个仓库到本地/Users/username/.cocoapods文件夹) | |
$ pod setup --verbose | |
//一、初始化Podfile文件 | |
$ pod init | |
//二、編輯 Podfile(ios版本是否有向下相容?)->用vim編輯 | |
platform :ios, '8.0' | |
pod 'AFNetworking', '~> 2.5.4' |
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
##全部載入完成 | |
$(window).load(function() { | |
}); | |
##指定元素載入完成 | |
$("#test").load(function(){ | |
$("#test").eq(0).text('請選擇'); | |
}); |
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
//把Dom轉換成jQuery物件 | |
$(this).mouseenter(function(e){ | |
var _type = $(e.target).attr('type'); | |
_typeAry = _type.split(";") | |
}); |
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
##arrary選擇 | |
var contry = $("div h5").eq(4).text(); | |
##input - label选择 | |
$("label[for=email]") | |
##select/option選取 | |
$('#selectBox option[value=C]').prop('selected', true); | |
##選取裡面有name...等元素用的方式 |
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
##GroupBy | |
SELECT sup_id, SUM(price), avg(price) FROM coffees GROUP BY sup_id | |
##聚合函數後可加別名Alias(須空隔) | |
SELECT AVG(total) 平均 , SUM(total) 總和, COUNT(*), MAX(price) 最大價格, MIN(price) 最小價格 FROM coffees |
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
##方法1 | |
INSERT INTO coffees(cof_code, cof_name, price, sales) VALUES(10000, "古坑藍山咖啡", 9999,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
##四個表連結use —> inner join | |
SELECT a.number, a.name, a.animalMain, d.caseType, c.caseContent, c.caseQuestion, c.caseAnimal | |
from TestHistory as a | |
INNER JOIN TestDetail as b | |
ON a.name = b.name | |
INNER JOIN CaseQuestion as c | |
ON b.questionInfo = c.caseNumber | |
INNER JOIN CaseAnalyze as d | |
ON c.caseContent = d.caseContent |
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
##ORDER BY | |
DESC => 增 | |
ASC => 减 | |
##基本查詢語法 + order by | |
SELECT * FROM coffees WHERE price >100 ORDER by sup_id | |
##where + and + or | |
SELECT * FROM coffees WHERE price >= 100 and price <=150 |
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
##No.1—- ##!如果省略where子句,則修改所有的記錄為指令的情況 | |
UPDATE coffees set sup_id = 1, total = 1, sales = 1, price = 1 WHERE cof_code = 10000 | |
##NO.2— 14心座用法 | |
UPDATE TestDetail set answer = 10, score = 10 WHERE questionInfo = 1 | |
##.3— 進階用法 + select | |
##欄位值直接加總 |
OlderNewer