自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(39)
  • 资源 (5)
  • 收藏
  • 关注

原创 安装django + Apach + mod_wsgi

安装mod_wsgi:   sudo pip install mod_wsgireport unkown locale: UTF-8export LANG="en_US.UTF-8"export LC_COLLATE="en_US.UTF-8"export LC_CTYPE="en_US.UTF-8"export LC_MESSAGES="en_US.UTF-8"

2017-07-02 22:34:30 266

原创 [Error 13] Permission denied

[xx$ python get-pip.pyCollecting pip  Downloading pip-9.0.1-py2.py3-none-any.whl (1.3MB)    100% |████████████████████████████████| 1.3MB 43kB/s Collecting wheel  Downloading wheel

2017-03-05 15:26:26 2788

原创 Swift Extension

/*      Extension */class C{}protocol someProtocol{}protocol anotherProtocol{}// extend protocol conformanceextension C:someProtocol,anotherProt

2017-02-05 18:44:31 297

翻译 Swift nested types

/*   Nested types   one type nexted in other type */struct BlackJackCard{    enum Suit: String{        case spades = "heitao",        hearts="hongtao",diamonds="f

2017-02-04 20:08:05 241

原创 swift type casting

/*   type casting */class Car{    var name:String    init(name:String){        self.name=name    }}class SportCar:Car{    var speed:Int    init(

2017-01-25 22:50:00 251

原创 swift Error handling

/*  Swift error represented by types that conform to Error protocol  *///exampleenum VendingMachineErr: Error {    case invalidSelection    case insufficientMon

2017-01-22 18:52:03 198

原创 swift optional chaining

// Optional chaining/*class Person{    var residence:Residence?}class Residence{    var addr="Default place if you are low rank"}var ppl=Person()//print(ppl.residen

2017-01-21 15:27:58 173

原创 Project Hard Coder *************Coding 硬汉*************

It's a logger for the coding progress on IT expertise:Start date: 2017/1/17Review period: AnnuallyRegistered sub project: SWIFT/PYTHON

2017-01-17 14:06:37 269 1

原创 swift ARC

/* ARC  - automatic reference counting, only for reference types  - Closure and Class etc are reference typesx Tips:    ARC allocates memory to object instance and deallocates when

2017-01-09 22:46:13 239

原创 一些鼓励

朋友的创业项目进展缓慢,但是顺利,由衷的替他高兴。反观自己,我应该在抓抓执行力这个东西,该坚持的还是要坚持下去,继续努力!

2017-01-05 21:09:53 160

原创 西部世界看完后

最近一直在搞房子的事,不停逛论坛看规划,感觉已入魔,根本停不下来。这个阶段刚好是我要调整的阶段,实在没心思静下来,于是把《西部世界》看完了。心中久久难以平复,死亡,意义,未来等等,我们在浩瀚的宇宙中孤独前行,周围漆黑一片。是否寻找伴侣的原始渴望,来自于我们惧怕孤独面对死亡的迫切需求。

2017-01-04 22:44:43 521

原创 swft deinit

swift deinit/*    deinit only for class    by Default the ARC(automatic reference counting) manage your deinit    but sometimes for example you want to close a file writing process fir

2017-01-04 21:34:16 239

原创 swift init (under constrction)

Init// *** Initialization ***// * unlike object-C, initialization in swift does not return a value// in it's simplest form, it is like a instance method with no parameter

2016-12-27 21:34:28 262

原创 swift class inheritance * some codes

// ** ** ** Inheritance ** ** **class Vehicle {    var currentSpeed =0.0    var description: String{        return "travelling at \(currentSpeed) kilometers per hour" 

2016-12-06 19:48:19 221

原创 swift subscript scraps

// * * * * * Subscript * * * * * // similar to subscript to Array, Dictionary, Class/Struct/Enum can have too// ???? what's the diff from function, I can replace subscript with func

2016-12-04 16:05:25 396 1

原创 swift methods scraps

// Methods are functions associate with types: Class, Structs and Enums// 1. Type methods: like type properties, they are static and tied with Type// 2. Instance methods: belong to specific in

2016-12-04 11:23:35 161

原创 swift Property

import Foundation// property: //      1. Stored property : Class Struct//      2. Calculated property : Class Struct Enum//      3. Type property AKA static property//      4

2016-12-03 13:52:42 399

原创 Swift Class & Stucts

import Foundation// Class and Structure are basically the same but Class is more powerful// Class have below features that Structure don't have// 1 Inheritance// 2 Type casting

2016-11-24 22:17:45 218

原创 Swift enum

enum CompassPoint { case north case south case west case east}var somePoint = CompassPoint.eastswitch somePoint {case .north: print("it's north")case .south: print("it's

2016-11-22 15:29:23 188

原创 高兴太早永远会被打脸

每次兴奋的以为天神眷顾,开心的尾巴翘立,piapia乱晃。都会迎来啪啪啪打脸。不知道多少次如此的经验,似乎让我进入了一旦有好事,我都没有份的奇怪心境。这不是客观事实,但是是主观定律,是情绪过分带动后对现实的失落。正在读age of turbulence, 我认为未来技术发展,使得金融工具更加有利于有胆识和知识的人。从现在开始,投资能力,提

2016-11-18 09:30:01 550 1

原创 Some realizations

At this moment, I realized I will become thirty in a few months, which is grabing my heart and what I am most afraid of.Is become nobody. Been a young person you carry all kinds of unreal

2016-11-15 22:09:02 156

原创 swift 闭包 tips

简化版的闭包,记住用$0 $1代替表达式var numberArry = [12,24,54,14,53,5,1]var alreadySort = numberArry.sorted(by:{n1,n2 in n1>n2})print(alreadySort)var alreadySorted = numberArry.sorted(by:{$0<$1

2016-11-01 23:12:12 229

原创 Swift 函数也有类型type

函数在Swift里面和其他类一样也包含类型属性TYPE, 就像数字类型Int,字符类型Character下面例子,他们的类型就是 ( Int , Int ) -> Int之所以这样设计,你可以方便的把函数作为参数,作为变量,也可以作为返回值:

2016-10-30 21:06:47 266

原创 Inout 关键词

Inout 关键词var para1 = 10var para2 = 20func changePara( para1: Int, para2: Int ) -> (Int,Int){ // para1 = para1 + 1// para2 = para2 + 2 return (para1,para2) }print(c

2016-10-30 20:25:20 287

原创 20161023

这两天出于某种狂热,因为想要获得内测激活码一下子注册了微博,并转发了一条应该是假官方出的活动,幸没有深入下去。人都是感性的,在某些情况下,judgement is impaired。在任何冲动的时刻,一定要告诫自己冷静,因为你现在做的决定,大部分出于非理性。

2016-10-23 11:04:48 203

原创 Object archiving and Object graphs

Archiving 就是将一些objects打包成可传送的archives,这些archive不仅保存数据也保存meta data(描述数据的数据,就是这些objects什么类,什么关系之类)以便于将archive 原样decode和encode。下图是一个object graph(目标形成的网络)进行打包成archive

2016-10-18 23:00:17 183

原创 IOS - Property list

Property list乃轻量级model层容器(用以存放app相关信息的文件)。Cocoa Foundation和 Core Foundation都有使用property list的APIProperty List Types and Objects

2016-10-18 21:31:26 234

原创 Logger

20161018 - 14 hours

2016-10-18 21:12:53 325

原创 Swift 学习笔记 Core Data (一)

Core Data是一个管理model层的框架Core Data 框架提供以下特殊服务:在基本文本处理上提供tracking和内置的undo , redo功能change管理,维护object 间关系一致性Object的lazy loading,

2016-10-18 09:13:31 300

原创 Swift 学习笔记 (三) —— Table view徜徉在Data Hierarchy的海洋

Table View通常都会包含各种数据组成的层次结构中, 以下教你UIKit框架如何实现这些层次化的数据层结构。Hierarchical Data Models and Table Views (海尔兄弟)

2016-10-18 08:16:20 511

翻译 Cocoa Core - App ID

App ID 是一串用以识别一个或多个APP, 有两部分String组成,Team ID 和 Bundle ID搜索string.App ID可以分成 Explicit App ID和Wildard App ID (如下图,永远带有星号通配符:星号至少匹配一个字符com.domain.*

2016-10-13 17:22:18 194

原创 Swift - MVC

一个贤惠的Model class一个贤惠的model class通常都是NSObject的儿子。或者,你想玩点酷哒哒Core Data技术,就是NSManagedObject,就是那么帅,就是那么任性。

2016-10-12 23:20:03 606

原创 代理模式

代理是一种程序设计模式,表示一个对象给其他对象充当协同或者代理作用。代理对象会保存对与被代表的对象一份引用,在适当的时候会临幸它。代理和Cocoa框架代理类和被代理对象保持weak reference(很重要,是weak reference,涉及到内存溢出). 在垃圾回收环境下,可以用strong reference.比如, NSWindow

2016-10-12 11:43:05 157

原创 Swift 学习笔记 UITableView (二)Overview of the table View API

其中包含了UiKit classes, 两个protocols, 一个categoryTable ViewUITableView 继承了UIScrollView, 并重写成只支持垂直滚动

2016-10-10 18:34:30 226

原创 swift 学习笔记 UITableView (一)Table View Styles and Accessory Views

Table View Styles 和 附属的viewsTable View有各种不同的Style去match不同的porpose, 而且, UIKit framework提供了标准的Style,同样也为cell提供了标准的子view。table View Styles根据外观可以区分成两个table view: Plain 和 GroupedPla

2016-10-10 16:30:07 375

原创 SiriKit 学习笔记(三) 解析和处理Intents

你 App 的Indents extension扩展的接口点是INExtension Object,它的主要作用是把indents引导给Siri去处理。在extension里有三类objects来处理intents一种Indents Object保存Siri收集的用户数据一种Handler Object是你自定义的用以解析,确定并处理indents一种Response ob

2016-10-08 13:25:48 1822

原创 SiriKit 学习笔记(二) 创建Intents Extension

Intents Extention是一个app程序包中的app扩展,首先你必须有一个app去支持它。 Intents Extention处理大部分与SiriKit的交互。给App程序加入Intents Enxtention, 请做以下操作在IOS app中启用SiriXcodeProject中加入Intents Extention target, 并配置到Info.pl

2016-10-08 12:53:02 1775

原创 SiriKit 学习笔记 (一) 认识SiriKit

SiriKit是基于 Apple人工智能助手Siri到开放API接口,用于帮助ios APP实现语音控制。SiriKit主要由两个框架组成: Intents 框架: 定义哪种任务可以执行相应的app操作。 Intents UI 框架: 定义相应app操作后的UI展示。SiriKit支持领域VoIP(Voice over Internet Protocol

2016-10-06 21:12:19 1087

原创 20161005

写在广告狂人全季看完后。然后。忸忸怩怩的过了大半个小时后,没有才情之人永远矫情不起来。只能看着别人在豆瓣上挥洒才情,自己只能卖卖萌。折腾了大半年的创业计划就此搁浅,从项目制定,找合伙人,到需求分析,商业计划书,开发。。。一直到最后合伙人退出,我自甘堕落开始看美剧。庆幸还好没有拉到资金,一直是兼职在作,不然就作大了。想起这么一段话:人生有两种状态:一种叫笑话,另外

2016-10-05 15:36:02 179 1

Pro DNS and BIND

Pro DNS and BIND

2016-07-16

Java A Beginner's Guide 6th

thinking in java比较深奥和理论,这本书比较有实践意义

2016-07-16

struts2 权威指南 1-3章

struts2基本知识了解,第一章:struts2概述,第二章helloworld 第三章 struts2基础

2010-05-14

html等Web技术电子书

包含了从基础的HTML到XHTML,乃至进阶的XML、SQL、数据库、多媒体和WAP的学习资料

2010-05-14

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除