自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(165)
  • 资源 (1)
  • 收藏
  • 关注

原创 raspberry install mysql-connector-python

wget http://cdn.mysql.com/Downloads/Connector-Python/mysql-connector-python-1.0.11.zip  # unzip mysql-connector-python-1.0.11.zip  # cd mysql-connector-python-1.0.11   # python setup.py install

2016-01-22 19:15:20 742

原创 mac install MySQL-python

mac python-mysqldb EnvironmentError: mysql_config not foundsave:brew install mysql 先安装mysql

2016-01-21 13:49:18 726

原创 mac,centos 安装Connector/Python

mac 官网下载,双击--------------------------------------centos https://dev.mysql.com/doc/connector-python/en/connector-python-installation-source.htmlsudo yum install mysql-connector-python

2016-01-20 20:20:39 783

原创 raspberry install python-mysqldb

sudo apt-get install python-mysqldbimport _mysqldb=_mysql.connect(host="",user="",passwd="",db="")db.query("""SELECT * FROM messages""")r=db.store_result()r.fet

2016-01-20 20:14:15 457

原创 pip install --upgrade pip,error: command 'gcc' failed with exit status 1

yum install python-devel mysql-devel zlib-devel openssl-develhttps://segmentfault.com/q/1010000000618370

2016-01-20 13:37:19 1992

原创 raspberry robot auto start server

vi  /etc/rc.local   sudo /etc/init.d/openvpn start

2016-01-19 20:06:22 368

原创 tableview & collection view

例子:TableView Fundamentals for iOS

2015-08-25 15:10:28 455

原创 hexo 安装

hexo官网中安装node.js  两种方法都没有用$ curl https://raw.github.com/creationix/nvm/master/install.sh | sh$ wget -qO- https://raw.github.com/creationix/nvm/master/install.sh | sh

2015-08-18 15:36:47 1205

原创 How to Add Core Data to an existing Utility Application

这个问题 你妹 本来就是要折腾 =/=

2015-08-06 11:23:09 528

翻译 调试已经部署了的App

https://developer.apple.com/library/ios/qa/qa1747/_index.html#//apple_ref/doc/uid/DTS40011341不通过xcode设置->隐私->诊断与用量 格式为__通过xcodewindow->devices->查看设备上的logxcode6会列出low memory name是Unknown,ty

2015-08-04 16:44:34 511

原创 objectiveC【语法】修饰符 static extern const

http://blog.csdn.net/xpwang168/article/details/8087143http://casatwy.com/iosying-yong-jia-gou-tan-wang-luo-ceng-she-ji-fang-an.html

2015-07-31 22:39:22 343

原创 TestFlight使用流程

TestFlight使用流程注册一个新的邮箱 exp:[email protected]使用该邮箱去注册新的appleid,appleid名为[email protected]打开developer.apple.com 选择Menuber Center,输入开发者账户、用户名 sign in选择iTunes Connect,选中 用户与职能 ,添加iTunes connec

2015-07-30 10:14:23 4353

原创 今天要用到可折叠的tableview 折腾了半天

https://developer.apple.com/library/ios/samplecode/TableViewUpdates/Introduction/Intro.html下面是解决方案 apple也给出了解决方案 https://developer.apple.com/library/ios/samplecode/TableViewUpdates/Introduction/Intr

2015-07-27 19:56:08 406

原创 Do not warn about base configuration if unnecessary

老是叫我升cocopods 升了之后 这个是没配置好 之前的配置遗留在项目配置文件中 新的pod没法进行新的设置 才出现的问题https://github.com/CocoaPods/CocoaPods/issues/2633I've hit the same issue just now and it took me a while to figure out how

2015-07-27 10:27:29 625

原创 the-target-overrides-the-other-ldflags-build-setting-defined-in-pods-pods

http://stackoverflow.com/questions/18376416/the-target-overrides-the-other-ldflags-build-setting-defined-in-pods-pods事情是这样的 weibo sdk 叫我在the other flags中添加-objc,结果pods就一直报错Downloading depe

2015-07-26 21:55:55 1437

原创 读取项目中的资源

有时会直接通过拉拽的方式,将文件添加到项目中,这时一定要注意3点Destination: 一定要勾选 (不然只是一定引用 添加进来了 到时项目要是提交的时候 就会缺少文件Added folders:Add to target: 一定要勾选今天碰到的问题是 给项目添加caf声音文件 结果 pewPewPath读出来一直是nil,估计是没有添加到targetNSString

2015-07-23 10:34:00 352

翻译 iOS中各种图片的要求 App Icons on iPad and iPhone

https://developer.apple.com/library/ios/qa/qa1686/_index.html

2015-07-20 11:26:08 430

原创 UICollection view or Tableview 使用

UICollection view的使用(TableView同理首先使用自定义UICollectionViewCell的话 1、需要先创建继承UICollectionViewCell的class 2、将界面中的collectionview 的cell连接到calss中(这边需要先将界面上的cell对应的class设为我们的自定义class,不然无法建立IBOutlet3、 在c

2015-07-18 23:29:22 371

原创 stretching image-based content

UIImageView 的contentStretch 这个属性已经被废弃了,可以通过UIImageView使用一个stretchable image来实现通过UIImage的stretchableImageWithLeftCapWith:topCapHeight:这个方法来创建一个可拉伸image

2015-05-18 11:36:54 290

原创 win7 拨号651

重装系统之后,拨号就是651,发现以太网口无法识别网线。更新下网卡驱动即可

2015-05-17 23:26:04 473

原创 ubuntu kylin 14.04 ,cannot download the metalink

不论是虚拟光驱还是直接wube.exe都是这个问题,直接U盘启动盘安装就成功了。U盘怎么安装,网上多少的是UltraISO的教程

2015-05-17 23:21:27 2764

原创 arduino 与 703n openwrt的故事

网上买了个703n,掌柜给刷的是 14.07 所以大小不够 我重新刷了个12.09http://item.taobao.com/item.htm?spm=a1z09.2.9.12.cXhvuQ&id=42862309949&_u=firvrcddf25/*附常用固件下载地址:Dreambox Barrier Breaker 14.07 中文(默认刷的就是这个

2015-05-15 22:40:51 1349

原创 C 学习笔记

float achar srt[10]&a 和 str都是地址scanf()是读取单词 gets()读取字符串缓冲:完全缓冲 缓冲区满的时候才被清空,内容被发送到目的地 比如文件输入行缓冲 遇到换行清空缓冲区文件结尾:文件尾部添加 Ctrl+Z 字符来标志结尾系统存储文件大小c getchar() 返回EOF #def

2015-05-15 16:04:40 308

原创 Swift Optionals & Implicitly Unwrapped Optionals

以下内容摘自:https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/TheBasics.html#//apple_ref/doc/uid/TP40014097-CH5-ID309As described above, optionals

2015-05-14 19:34:14 712

原创 Swift Function & Closure

FunctionsFunctions are self-contained chunks of code that perform a specific task. You give a function a name that identifies what it does, and this name is used to “call” the function to perform

2015-05-14 15:34:02 484

原创 汉明距

#include unsigned hamdis(unsigned x, unsigned y){ //considered as binary values, that is, as sequences of bits unsigned dist = 0, val = x ^ y; while(val){ ++dist; val &= val-1; } return di

2015-05-13 14:32:44 587

原创 八皇后问题

#include #define SIZE 8unsigned int lines[SIZE];unsigned int LINE_MAX = 1 << (SIZE - 1);void reset(){ for (int i = 0; i < SIZE; ++i) { lines[i] = LINE_MAX; }}int moveNext(){ for (int

2015-05-13 14:30:11 356

原创 辗转相除法

//// main.c// GCD//// Created by andy on 15/5/11.// Copyright (c) 2015年 Andy. All rights reserved.//#include #define max(x,y) x > y? x : y#define min(x,y) x < y? x: yint GCD(int,int);

2015-05-13 14:29:07 449

原创 First Class Type

Swift中关于函数有这样的介绍Functions are a first-class type. This means that a function can return another function as its value.函数是先类类型?意味着一个函数可以将另一个函数当作它的返回值返回。看看 stackoverflow上关于这个的解释Usual

2015-05-13 13:58:12 961

原创 View Content Mode

Content ModesEach view has a content mode that controls how the view recycles its content in response to changes in theview’s geometry and whether it recycles its content at all. When a view is firs

2015-05-12 09:06:52 451

原创 NSNumber 转NSString

// 格式转换NSNumberFormatter *numberFormatter = [NSNumberFormatter new];//  获取值[numberFormatter stringFromNumber:NSNumberValue]

2015-05-07 09:15:23 444

原创 无法设置

出现这个问题 AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager]; [manager GET:weburlString parameters:nil success:^(AFHTTPRequestOperation *operation, id respons

2015-05-06 11:37:30 700

原创 python unicode support

关于字符编码 有几个好的文章 哈哈 programmer必备基础知识~~http://www.joelonsoftware.com/articles/Unicode.htmlhttp://www.ruanyifeng.com/blog/2007/10/ascii_unicode_and_utf-8.htmlhttp://wklken.me/posts/2013/08/31/pyth

2015-04-30 16:21:09 598

转载 字符编码笔记:ASCII,Unicode和UTF-8

http://www.ruanyifeng.com/blog/2007/10/ascii_unicode_and_utf-8.html作者: 阮一峰日期: 2007年10月28日今天中午,我突然想搞清楚Unicode和UTF-8之间的关系,于是就开始在网上查资料。结果,这个问题比我想象的复杂,从午饭后一直看到晚上9点,才算初步搞清楚。

2015-04-30 08:17:34 376

转载 中文编码杂谈

http://www.searchtb.com/2012/04/chinese_encode.html编码问题的例子在windows自带的notepad(记事本)程序中输入“联通”两个字,保存后再次打开,会发现“联通”不见了,代之以“��ͨ”的乱码。这是windows平台上典型的中文编码问题。即文件保存的时候是按照ANSI编码(其实就是GB2312,后面会详细介绍)保存,打开的

2015-04-30 08:15:12 693

转载 Fields, Attributes, Properties 在各种语言中的区别

来源:http://www.wwwcoder.com/作者:Venkatarama Uppugunduri这些至少在程序员的世界中是一种容易被混淆的术语。它们的含意经常会被交换。这里是我对于它们的看法。Attributes(特性)讨论的是主题的天性。而 Properties(属性)则讨论的是主题的所有物中的财产、内容,状态或者所有权。打个比方说我是人类,在这个前提下

2015-04-28 10:41:14 1112

原创 NSOperation 数据返回后更新tableview

很蛋疼 我是通过delagate的中方法来执行reload的。Log显示数据返回很快,但是reload貌似就是咩有起到作用。然后我又尝试了在completion block做reload,尼玛,还是木有结果,。突然想到,这些个可都不是在主线程啊。google了一下http://stackoverflow.com/questions/3615329/uiview-and-uitableview-

2015-04-24 14:03:42 440

原创 iOS xib 界面构造心得

1:自定义view自定义的cocoa touch view继承 UIView类;然后创建新的xib,设置其相关联的class;在xib中需要先创建各个view的IBoutlet,这样Files's Owner才能将其IBoutlet绑定。2:AutoLayout使用autolayout时,可以先将整个页面布局先拉拉好,然后再创建相对应的constraints,这样做的话,Int

2015-04-14 17:38:13 395

原创 cocoapods安装Afnetworking后,无法include<AFNetworking/AFNetworking.h>

反复卸载安装AFNetworking还是不行,然后查找到了这个issues       https://github.com/CocoaPods/CocoaPods/issues/2695解决方法怎么有点牛头不对马嘴的feel。解决方法是给我的测试项目也配上Configuratioon File,分别是Pods.debug和Pods.release。这样就傻乎乎地解决了,这是什么问

2015-04-06 16:09:01 5032

原创 sublime 设置识别语言

cmd+shift  输入语言入“object-c”自动跳出 Set Syntax:Object-C这样就能识别OC的代码片段了..个人觉得用sublime做代码片段管理比较好

2015-04-05 16:15:02 7805

android 邮件发送 (直接发送)

android 邮件发送 (直接发送)。注意邮箱一定要开启smtp服务

2013-05-28

空空如也

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

TA关注的人

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