Posts

Showing posts from June, 2016

D-U-N-S 鄧白氏檔案查詢 IOS企業帳號申請

Image

MSSQL 常用語法

MSSQL 常用語法 查詢 SELECT [id] ,[major_trader_id] ,[net_amount] ,[tradedate] FROM [quotefutures].[dbo].[futures_major_trader] where [tradedate] = '2016-06-28 00:00:00.000' 刪除 DELETE FROM [quotefutures].[dbo].[futures_major_trader] where [tradedate] = '2016-06-28 00:00:00.000' select * from (select top 30 * from quotestock.dbo.TSE100Price ORDER BY tradedate DESC) k order by k.tradedate;

AP102 2016/6/27 JAVA 第一堂

AP102 2016/6/27 JAVA 第一堂 public class MainClass { public static void main (String[] argv) { byte b = 1 ; short s = 2 ; int i = 3 ; long l = 4 ; float f = 1.1 f; double d = 1.2 ; boolean bool = true ; char c = 'a' ; String text = "hello world" ; System.out.println( "b = " + b + "\ns = " + s); } } 強制轉型 class Casting{ public static void main (String[] args){ int i = 1 ; double d = 11.1 ; double sum1 = i + d; int sum2 = ( int )(i + d); System.out.println(sum1); System.out.println(sum2); } } 數字與字串串接 class ConcatenateOP{ public static void main (String[] args){ String str1 = "123" ; String str2 = str1 + 10 ; int i = 123 ; double d = 3.12 ; System. out .println(str2); Sys

changing property contentsGravity in transform-only layer, will have no effect

changing property contentsGravity in transform-only layer, will have no effect changing property contentsGravity in transform-only layer, will have no effect Ans: stackView需要改成Scale to Fit 即可

Title20

Title20 1.砍掉原本的ViewController(mainstory board) 也要移除左邊的ViewController.swift然後move to Trash 2.建立一個UITableViewController 3.然後Is Initial View Controller 4.建立一個UITableViewController的類別 5.點擊mainstoryboard的Custom Class來建立關聯 6.建議Cell 的 identifier (要在attributes inspector建立 7.更改Row Height 8.加入imageview, Label 9.進行Stack 10.設定成Top left right bottom (2,6,0,2) 11.創造一個類別NameBookTableViewCell 在類別內建立IBAction @IBOutlet var ReadmeButton: UIButton! @IBOutlet var TitleLabel: UILabel! @IBOutlet var thumbImageView: UIImageView! 12.MainStoryBoard繼承這個類別 13.由mainstoryboard左邊的Cell拉IBAction 連結

Swift TableView

Swift TableView 1.拉一個Table View 2.Table View右方的 Prototype Cells 從0改成1 3.點選cell 將identifier處輸入Cell 宣告類別 UITableViewDelegate UITableViewDataSource 是protocol protocol算是一種需求 需要UITableView顯示出來需要開出需求清單 例如: 表格裡面你要繪製出多少列,裡面要提供多少資料? 而可以藉由代理物件delegate object delegation pattern class ViewController: UIViewController , UITableViewDelegate , UITableViewDataSource 補上這段程式碼 class ViewController: UIViewController , UITableViewDelegate , UITableViewDataSource { override func viewDidLoad() { super .viewDidLoad () // Do any additional setup after loading the view, typically from a nib. } override func didReceiveMemoryWarning() { super .didReceiveMemoryWarning () // Dispose of any resources that can be recreated. } func tableView(tableView: UITableView , numberOfRowsInSection section: Int) -> Int { //回傳總列數 //總共看陣列有幾個物件就回傳幾列 return studentNames .count } func tableView(tableV

AP102 2016/6/21

AP102 2016/6/21 Sketch 3 取消Borders EDIT-> Set Style As Default R矩形 按shift就是正方形 O圓形 按shift就是正圓 L線 U有角矩形 星形 可以使用多 圖層 Shift連選 點選右鍵Group selection 再按一次就是解除Ungroup Union 連集合 直接把資料夾拉出去至桌面 就可以產生圖片 遮罩 Mask ArtBoard 視同一個輸出範圍 程式的大小是point 點程式 實際像素是pixel 像素 ipad full screen Pixel iphone3Gs: 320* 480 iphone4 : 640 * 960 iphone5/5s: 640 * 1136 iphone6/6s: 750 * 1334 iphone6+/6s+: 1242 * 2208 Point: iphone5: 320 * 568

Title17

Title17 SKProductsRequest * productsReq = [[SKProductsRequest alloc] initWithProductIdentifiers:[NSSet setWithObjects:@ "tw.pitch.unlimited" ,@ "tw.pitch.30coin" , nil ]]; //用server取得可用貨號可更為彈性 //指定產品要求的 delegate 對象 productsReq .delegate = self ; 要在這一行加入 <SKProductsRequestDelegate> @interface StoreTableViewController () <SKProductsRequestDelegate> 然後再新增一行 - (void) productsRequest: ( SKProductsRequest *) request didReceiveResponse: ( SKProductsResponse *) response{ }

Title15

Title15 1. Git Project 來自於smalltalk 從NsXTStep -> OpenStep ->CocoaTouch 記憶體自動管理 ARC automatic reference counting 可防止記憶體滲漏(memory leak) 釘選你的Xcode 使用GitHub –> fork一個函式庫 Xcode基本框架 版本管理工具Xcode也可以使用 包含Subversion Assistant editor 2.Getter與Setter MVC設計模式降低了程式碼 2.5.語法 3.表格與視圖 4.Segue 5.照相機 6.CoreData 7.NSfetchRequest 8.UIImagePicker

Markdown懶人包

Xcode 常用工具

Alcatraz Jazzy Carth PaintCode2  把向量圖轉程式 PaintCode-plug-in程式碼 fastlane上架截圖 Apple Account 雙重認證要記得取消 IOS-UI test 內建記錄動作

網址註冊

網址註冊 GOOGLE https://www.google.com/webmasters/tools/submit-url?hl=zh_TW YAHOO http://tw.info.search.yahoo.com/free/request BING http://www.bing.com/webmaster/SubmitSitePage.aspx 天空 http://reg.yam.com/Register/register.asp

FaceBook 外掛

粉絲專頁外掛程式 https://developers.facebook.com/docs/plugins/page-plugin

Head First Javascript 2

深入淺出javascipt 前情提要 快速瀏覽 1.變數命名方式 2.保留字 3.註解與被拒絕的變數命名 4.迴圈 5.判斷句 6.文件物件模型 alert document.write console.og document.write('來一次') 上面這一行會把字寫進瀏覽器 7. 使用console.log 8. 兩種方式使用javascript Q&A 1.如果點擊prompt中的cancel會傳回什麼值? A.將會傳回null(沒有值) 2.如果prompt函式總是會傳回一個字串。那麼字串(像是"0"或是"6"') 如何能夠與數字(像是0或者是6)做比較? A.這種情況下,JS試著將字串轉換成數值 3.如果輸入的不是數字而是six或者quit這類的字 A.那將無法進行熟比較 將會傳回false,會導致miss結果,但之後將會在程式中加入檢查數字輸入的語法 4.使用OR運算符,當其中有一個測試項目為true時可以取得ture 那兩個同時為true 可以 5.有and運算嗎? 有 6.無窮迴圈是什麼? 因為沒有在迴圈語法內終止而導致的循環程式 比較運算符號 < > ==(等於) ===(完全等於) <= >= != ||    (OR) &&  (AND) !

電腦病毒爆大災情

昨天開始爆出勒索軟體大量入侵個人電腦與公司行號伺服器的災情。 所有的檔案會出現 .cryp1的副檔名,造成感染後病毒會透過區域網路滲透 導致整間公司的所有檔案遭到2048位元加密。 使用超級電腦暴力破解都無法破解這樣長度的位元的密碼 相關使用者有以下的使用習慣 1.大部分都是微軟IE的使用者。 2.有幾個案例是IE突然跳出更新,按下確認後就中獎了。 3.部分使用者有去中國網站的習慣。 4.有使用者堅持自己沒有去中國網站,但是有閱讀國內新聞網站,可能是從Flash廣告的部分中獎。 5.病毒疑似有潛伏期,有使用者是看YouTube到一半中獎的。 6.目前此變種cryptXXX,卡巴斯基與趨勢科技先前推出的的解密軟體無法解密。 7.案例中有一例是無法上網的主機被加密,有網友推測病毒是從共享資料夾內入侵。 8.目前統計的案例來看,只要有寫入權限的資料夾都可能被加密。 9.專攻通用文件格式與圖片格式,特殊格式不在攻擊範圍內。 目前這種病毒主要透過微軟的IE瀏覽器 大量傳播電腦病毒的方式是透過廣告商的廣告傳播 因此即使沒有下載任何檔案 當電腦打開一接觸到廣告 就會立刻下載廣告檔案 導致電腦中毒,主要解決方式是安裝chrome瀏覽器的套件ADBLOCK 這款軟體是Google的擴充套件 安全性經過Google認證過 因此無須擔心此連結的安全性,這款軟體主要可以阻擋一切的跳出廣告 https://chrome.google.com/webstore/detail/adblock/gighmmpiobklfepjocnamgkkbiglidom?hl=zh-TW 就能避免類似的勒索軟體直接以廣告方式 勒索你的電腦

HTML Templete

HTML Templete <!DOCTYPE html> < html > < head > < meta charset = "UTF-8" > < link rel = "stylesheet" href = "#.css" > < script src = "js.name.js" > </ script > < title > My website </ title > </ head > < body > </ body > </ html >

AP102 2016/06/01 資料庫

AP102 2016/06/01 資料庫 資料庫 大型資料庫 攜帶不便 效率較好 資料庫合在一起管理 小型資料庫 攜帶方便 效率較差 一個檔案作為一個資料庫 一開始只會有欄,沒有列 SQlite 沒有欄位,有設跟沒設一樣 索引  主鍵(primary key): 一個資料的主索引,資料皆不可重複 例如:身分證字號  唯一鍵(unique key): 限制這個欄位的資料不可以重複 例如:電話號碼  一般索引(index):單純設置索引 <? php //$db=new pdo("mysql:host=資料庫位址",資料庫帳號,資料庫密碼); $db = new pdo( "mysql:host=localhost:8889" , "root" , "root" ); $db -> query( "set names 'utf8' " ); $db -> query( "use databasetest" ); // use 資料庫名稱 $db -> query( "insert into test (title,url,description) values('This is title ','www.google.org.tw/','ucc'),('aaa','bbb','cccc')" ); ` 括起來可使用保留字當作自定義名稱 $db -> prepare( "insert into `insert` (title,url,description) values(?,?,?)" ) -> execute( $_POST ); delete from 資料表名稱 where 篩選條件 $db->query( "del