Posts

Html-連線上網

Html-連線上網 受歡迎的主機商推薦 http://www.wickedlysmart.com/hosting-providers/ %ftp www .google .com Connected to www .google .com Name: XXX password: XXX dir cd google put index .html dir mkdir images cd images bye put <filename> //傳送指定檔案至伺服器 get <filename> //從伺服器取得指定檔案,傳回電腦中 FTP MAC OSX Fetch $ Transmit $ Cyberduck (free) Windows Smart FTP $ WS_FTP (basic version is free Advanced version $) Cyberduck (free) URL Uniform Resource Locators (統一資源定位碼) 網址名稱 www.google.com google.com是網域名稱 www.google.com是網站名稱 http://www.google.com/index.html https:協定(protocol) www.gooogle.com網站名稱 index.html絕對路徑 微軟的預設檔案為default.htm 少一個l較為特殊 Web常用Unicode代碼 http://www.w3schools.com/charsets/ref_html_symbols.asp Unicode代碼 http://www.unicode.org/charts/

IOS多執行緒

IOS多執行緒 关于iOS多线程,你看我就够了 http://www.jianshu.com/p/0b0d9b1f1f19 NSURLSession 教程 http://www.jianshu.com/p/045cdfdaaf6e NSURLSession with NSBlockOperation and queues http://stackoverflow.com/questions/21198404/nsurlsession-with-nsblockoperation-and-queues iOS 並行程式設計: 初探 NSOperation 和 Dispatch Queues http://www.appcoda.com.tw/ios-concurrency/ background-transfer-service-ios7 http://www.appcoda.com/background-transfer-service-ios7/ Parsing JSON in Swift http://chris.eidhof.nl/post/json-parsing-in-swift/ How do I use NSOperationQueue with NSURLSession? http://stackoverflow.com/questions/21918722/how-do-i-use-nsoperationqueue-with-nsurlsession Operation Queues Cocoa operations are an object-oriented way to encapsulate work that you want to perform asynchronously. Operations are designed to be used either in conjunction with an operation queue or by themselves. Because they are Objective-C based, operations are most commonly used in Cocoa-based applications in OS...

closure

closure Swift functions are closures. 意思就是closure可以在function的範圍內抓外部變數來引用 來看一下這段程式碼 class Dog { var whatThisDogSays = "woof" func bark() { print ( self .whatThisDogSays) } } 這段程式碼裡面函式指向一個變數whatThisDogSays 那變數在函式外部,因為它宣告在函式的外部,但內部的還是可以看到他並使用,因此函式bark 可以傳遞value,但whatThisDogSays 的reference 是怎麼傳遞的? func doThis(f : Void -> Void ) { f() } let d = Dog() d . whatThisDogSays = "arf" let f = d . bark doThis(f) // arf 在上面這段程式碼裡面,我們並沒有直接呼叫bark 我們創造一個Dog的實體物件d,然後傳遞bark的方法值到doThis 現在whatThisDogSays 是一個實體屬性屬於Dog類別 雖然在doThis這個方法裡面沒有whatThisDogSays 的確,在方法內doThis沒有Dog 的物件,但f()仍然可以運作 這個方法d.bark,即使他被到處傳遞,卻仍然可以看到被宣告在外的變數whatThisDogSays ,即使whatThisDogSays 這個被呼叫的變數不屬於Dog類別的物件,也不屬於任何物件的方法。 bark方法

Title3

Image
Title3 版本控制工具(Version Control System, VCS),傳統上先鎖定,然後再取出修改。 再完成修改與回傳前,其他人不能修改。 後來採用分散式作法,隨時取得然後合併(merge),Git就是這種分散式的系統。 市面上目前常用的VCS工具主要有 1.SVN 2.GiT 從2014年以後GIT正式超越SVN git的開發者是Linux的作者 Linus Torvalds 一開始 Linus Torvalds 使用BitKeeper一開始免費使用,後來開始營利。 但卻找不到免費可使用得好的版本控制工具。 當時Git的程式碼用來管理有將近七百萬行的Linux專案 Git下載 https://git-scm.com/ 在安裝畫面記得放上

IOS-charts 方法

IOS-charts 方法 var ViewForLine : [LineChartView] = [] var ViewForBar : [BarChartView] = [] //label: "Line Chart" 圖表示意 let lineChartDataSet = LineChartDataSet(yVals: dataEntries, label: "Line Chart" ) let lineChartData = LineChartData(xVals: dataPoints, dataSet: lineChartDataSet) //資料來源 ViewForLine .first ! .data = lineChartData //圖表背景顏色 ViewForLine .first ! .backgroundColor = UIColor(red: 85 / 255 , green: 85 / 255 , blue: 85 / 255 , alpha: 1 ) // X 軸圖標位置 ViewForLine .first ! .xAxis .labelPosition = .Bottom //右軸是否開啟 ViewForLine .first ? .rightAxis .enabled = false //左軸圖標位置 ViewForLine .first ? .leftAxis .labelTextColor = UIColor .whiteColor () // X 軸的 X 刻度標記顏色 ViewForLine .first ? .xAxis .labelTextColor = UIColor .whiteColor () //圖表描述文字色彩 ViewForLine .first ? .descriptionTextColor ...

Title24

Title24 // // BarLineChartViewBase.swift // Charts // // Created by Daniel Cohen Gindi on 4/3/15. // // Copyright 2015 Daniel Cohen Gindi & Philipp Jahoda // A port of MPAndroidChart for iOS // Licensed under Apache License 2.0 // // https://github.com/danielgindi/Charts // import Foundation import CoreGraphics #if ! os(OSX) import UIKit #endif /// Base-class of LineChart, BarChart, ScatterChart and CandleStickChart. public class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChartDataProvider, NSUIGestureRecognizerDelegate { 最大可顯示數值計算 /// the maximum number of entries to which values will be drawn /// (entry numbers greater than this value will cause value-labels to disappear) ## 最大可顯示數值計算 internal var _maxVisibleValueCount = 100 自動顯示比例 /// flag that indicates if auto scaling on the y axis is enabled private var _autoScaleMinMaxEnabled = false private var _autoScale...

Title23

Title23 AppDelegate.m - ( BOOL )application:( UIApplication *)application didFinishLaunchingWithOptions:( NSDictionary *)launchOptions { // Override point for customization after application launch. return YES ; } AppDelegate.h/m define a class that manages the application overall. AppDelegate.h/m 定義了一個類別可以管理整個應用程式 The app will create one instance of that class and send that object messages that let the delegate influence the app’s behavior at well-defined times. For example, 這個應用程式會創造一個實體給類別去傳送物件訊息 讓代理影響明確定義到所有的應用程式行為 例如: -application:didFinishLaunchingWithOptions: is sent when the app has finished launching and is ready to do something interesting. 當應用程序已經完成啟動,並準備做一些有趣的事情被發送。 Take a look at the UIApplicationDelegate reference page for a list of messages that the app delegate can implement to modify the behavior of the application. 看看在UIApplicationDelegate參考頁的應用程序委託可以實現修改應用程序的行為信息的列表。 相當於Asp.Net 中的 Global.ascx ,做全域變數的控制。 AppDele...