自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(136)
  • 资源 (4)
  • 收藏
  • 关注

转载 在Windows的CMD中如何设置支持UTF8编码

这个问题很多人开始都会不知道,当然包括曾经的我,当用到的时候,只好求助于伟大的股沟和度娘了。网上有设置的方法,但说明确不够详细系统,说设置字体为:Lucida Console。问题是,在默认方式下,只有点阵字体,哪有什么Lucida Console。所以,在自己成功设置后,拿出来和大家分享下过程,下面就让我们找出Lucida Console来设置吧。   这里需要先了解些内容:CH

2013-11-17 22:01:06 69618 2

转载 用NodeJS实现APNS

APNS(Apple Push Notification service)可以给ios设备推送通知,直观表述就是当某个app在后台运行时,能弹出提示消息。相比Android来,只有这一套方案所以少了很多调研成本。标题写NodeJS,只是因为我们的生产环境是NodeJS,我也用其他语言调过,测试的库是这三个:node-apns(NodeJS) / PyAPNs(Python) / apns(Ruby

2013-10-02 23:29:59 4221

转载 Linux文件默认权限:umask

现在,我们知道如何建立或者是改变一个目录或文件的属性了,不过,你知道,当建立一个新的文件或目录时,它的默认属性是什么吗?那就与umask有关了。那么,umask是什么呢?基本上,umask就是指定“当前用户在建立文件或目录时候的属性默认值”。那么,如何得知或设置umask呢?它以下面的方式来指定条件: [root@linux ~]# umask0022[root@linux ~]# uma

2013-09-21 15:14:06 1847

转载 MAC SSH Raspberry Pi perl: warning: Falling back to the standard locale ("C").

If it happens when using SSH, this is a fault on the SSH client, not the RPi. For example using an Ubuntu machine as the SSH client will cause this problem.To fix this SSH problem, edit the file

2013-09-21 14:52:22 2634

转载 debian locale: Cannot set LC_CTYPE to default locale: No such file or directory

If you get similar messages to this when you use apt-getperl: warning: Setting locale failed.perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_CTYPE

2013-09-15 22:48:56 4928

转载 iOS中定时器NSTimer使用

调用一次计时器方法:[cpp] view plaincopymyTimer = [NSTimer scheduledTimerWithTimeInterval:1.5 target:self selector:@selector(scrollTimer) userInfo:nil repeats:NO];  //不重复,只调用一次。tim

2013-09-11 19:52:44 39545

转载 Debian 音量调节工具

1. Install$ sudo apt-get install alsamixer2. Using$ alsamixer

2013-08-31 14:01:48 4219

转载 Windows node.js npm install express -g Cannot find module 'express'

Method 1: 在当前app目录下执行npm install expressMethod 2:1. 当前用户环境变量添加NODE_PATH并设置路径为C:\Users\YOUR_USER_NAME\AppData\Roaming\npm\node_modules2. 将%NODE_PATH%添加到当前用户环境变量path中Re

2013-08-30 14:03:11 13211

转载 无法在Safari中显示pdf

原因:之前安装Adobe PDF Reader卸载后没有删除其安装在Safari中的插件解决方法:1. 关闭Safari2. 打开Finder进入目录:/Library/Internet Plug-Ins/3. 删除AdobePDFViewer.plugin及AdobePDFViewerNPAPI.plugin4. 重新打开Safari后即可在Safari中查看PDF了

2013-08-24 21:12:04 9558 1

翻译 从工程中删除Cocoapods

1. 删除工程文件夹下的Podfile、Podfile.lock及Pods文件夹2. 删除xcworkspace文件3. 使用xcodeproj文件打开工程,删除Frameworks组下的Pods.xcconfig及libPods.a引用4. 在工程设置中的Build Phases下删除Check Pods Manifest.lock及Copy Pods Resources

2013-08-24 01:11:40 36712 2

转载 安装cocoapods时出现could not stat active Xcode path的解决办法

Solution #1 (affects all users)xcode-select is the answer. You are either pointing at the wrong path or you are not doing it as a root user. Try this in Terminal:sudo xcode-select -switch /Appli

2013-08-23 22:15:28 2389

转载 VirtualBox SSH 登录 NAT 方式联网的 GUEST HOST

在 VirtualBox 中安装好 Linux 后,发现无法直接  ssh 登录到 Linux Guest Host (印象里貌似Vmware默认是可以的)。Google 一下,发现确实有可行的解决方案:1. WinXP环境下如何建立ssh网络连接到Virtual Box的Linux Guest2. Virtualbox NAT ssh to guest都是基于

2013-08-22 13:34:04 2003

转载 如何设置快速的debian源

Author:gaojinbo Time:2010-02-04 Mail:[email protected]如何设置快速的debian源使用apt-spy,可以自动测试到哪个源的下载速度最快,并自动将最快的源写入配置文件由于刚装好系统是没有apt-spy,所以先找个源先安装apt-spy 1)设置临时源 vi /etc/apt/sources.

2013-08-22 11:25:25 900

转载 AFNetworking使用

1. 把AFNetworking文件夹下的源码导入工程2. 加入依赖的framework:SystemConfiguration.frameworkCFNetwork.frameworkSecurity.frameworkreference:http://stackoverflow.com/questions/11492600/undefined-symbols

2013-08-21 22:21:06 3434

转载 C# Excel数字转字母列标

var dividend = index; var columnName = string.Empty; while (dividend > 0) { var modulo = (dividend - 1) % 26; columnName = Convert.

2013-08-06 09:32:37 3313

转载 JavaScript 二、八、十、十六进制转换

十进制转换成其他进制objectname.toString([radix])objectname 必选项。要得到字符串表示的对象。radix 可选项。指定将数字值转换为字符串时的进制。返回对象的字符串表示。var m = 10;document.write(m.toString(2) + ""); // 显示为 1010document.write(m.to

2013-07-31 15:09:33 729

原创 OS X Java Home

Java Home:/System/Library/Java/Home

2013-07-29 22:35:03 825

转载 Javascript中的类实现

Javascript本身并不支持面向对象,它没有访问控制符,它没有定义类的关键字class,它没有支持继承的extend或冒号,它也没有用来支持虚函数的virtual,不过,Javascript是一门灵活的语言,下面我们就看看没有关键字class的Javascript如何实现类定义,并创建对象。一:定义类并创建类的实例对象在Javascript中,我们用function来定义类,如下:

2013-07-23 13:45:35 688

原创 weinre安装及使用

1.安装node.js2.安装weinrenpm installweinre(Windows请使用Node.js Command prompt)3.启动weinrenode node_modules\weinre\weinre(node_modules\weinre 为weinre安装路径,Windows默认装在:C:\Users\USER_NAME\node_modules\

2013-07-22 11:09:35 4647 1

转载 Objective-C多线程同步互斥及锁

在iOS中有几种方法来解决多线程访问同一个内存地址的互斥同步问题:>>>方法一,@synchronized(id anObject),(最简单的方法)会自动对参数对象加锁,保证临界区内的代码线程安全@synchronized(self) {        // 这段代码对其他 @synchronized(self) 都是互斥的        // self 指向同一

2013-05-04 11:36:41 1293

转载 Objective-C 格式化输出

%@ 对象%d, %i 整数%u 无符整形%f 浮点/双字%x, %X 二进制整数%o 八进制整数%zu size_t%p 指针%e 浮点/双字 (科学计算)%g 浮点/双字%s C 字符串%.*s Pascal字符串%c 字符%C unichar%lld 64位长整数(lon

2013-05-03 13:21:16 1749

转载 UILabel显示换行的方法

UILabel*label;//设置换行label.lineBreakMode = UILineBreakModeWordWrap; label.numberOfLines = 0;换行符还是\n比如NSString * xstring=@"lineone\nlinetwo"记得要把label的高度设置的足够显示多行内容。 From:http:/

2013-04-30 22:22:59 1803

原创 Android onCreate方法被调用两次的解决方法

原因:1. 横竖屏旋转2. 系统启动后,搜索到可用移动网络会触发onCreate方法,在开启应用程序后,碰到上面两种情况会销毁当前Activity,然后重启一个新的Activity实例.解决方法:1. AndroidManifest.xml中增加下面的设置android:configChanges="mcc|mnc|orientation|keyboardHidden"2. 重载下面的方法

2013-04-26 17:35:58 6531

原创 file was built for archive which is not the architecture being linked (armv7s)

ld: warning: ignoring file /Users/USER_NAME/Documents/PATH_TO_YOUR_LIBRARY/libXXX.a, file was built for archive which is not the architecture being linked (armv7s):  /Users/USER_NAME/Documents/PATH_TO

2013-04-16 21:48:22 8258 2

原创 Gentoo内核编译

1. 解压内核源码至/usr/src/linux-version2. 配置内核# make menuconfig3. 编译内核# make && make modules_install4. 建立连接# ln -sfn /usr/src/linux-version /usr/src/linux5. 拷贝bzImage至/boot# cp /usr/src/linux

2013-04-13 23:42:56 1513

原创 Gentoo技巧总结

(1)临时挂载boot# mount /boot

2013-04-13 22:45:14 751

原创 Gentoo安装VMwareTools

1. VMware的菜单【VM】->【Install VMware Tools】(也可以在Virtual Machine Settings的Hardware标签下的CD/DVD下使用install-path-to-vmware/linux.iso)2. # mount /dev/cdrom /mnt/cdrom   失败?不要急。。。看到/dev下没有cdrom,这时# cat /pr

2013-04-13 19:23:54 1880

原创 VMware安装Gentoo及注意事项

大体上按照官网的Handbook(英文版)安装即可,有以下几点注意下:(1)如果使用的virtual disk type时使用的是默认的SCSI时,需要在编译内核的时候把下面这些模块支持添加进去(直接编译进内核[*])-->Device Drivers-->SCSI device support-->SCSI disk support-->Device Drivers-->SCSI

2013-04-13 17:46:53 1445

原创 安装vc6出现couldn't find acme setup的解决办法

安装文件的目录层次太深,将安装文件目录改为磁盘根目录以缩短目录层次即可。。。囧rz(WIN8下测试有效)

2013-03-26 23:12:37 6296 1

转载 objective-c宏定义

1、先来几个常用的:01// 是否高清屏02 #define isRetina ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 960), [[

2013-03-17 11:06:44 1473

转载 The entitlements specified in your application’s Code Signing Entitlements file do not match those

最近开发iPhone程序,获得开发签名后在真机器上部署测试,在点击Build And Run后,提示The executable was signed with invalid entitlements.(The entitlements specified in your application’s Code Signing Entitlements file do not match thos

2013-03-16 23:00:40 6265

原创 静态库调用问题汇总

程序运行时调用静态库中函数出现:unrecognized selector sent to instance原因:将生成的simulator版本的静态库导入到工程中进行链接,囧rz解决方法:在Edit Scheme中将Destination设置为iOS设备程序编译时出现:Undefined symbols for architecture armv7原因:静态库中有导入

2013-03-16 19:03:14 1484

原创 iOS相关目录整理备忘

iOS模拟器目录:Users/your_user_name/Library/Application Support/iPhone Simulator/iOS_version/

2013-03-12 21:27:12 1031

转载 XCode环境变量及路径设置

一般我们在xcode里面配置包含工程目录下头文件的时候,都要关联着相对路径和绝对路径,如果只是自己用这个项目,用绝对路径的问题不大,但是如果你把工程发给别人,别人就要在改这个绝对路径,这时候绝对路径的缺点立马出现。所以在修改User Header Search Paths这个选项的时候使用"$(SRCROOT)/当前工程名字/需要包含头文件所在文件夹"将上面的双引号里面的字符串拷贝

2013-03-11 12:30:29 138012 3

转载 关于颜色的整形表示

0xffff00ff是int类型的数据,分组一下0x|ff|ff00ff,0x是代表颜色整数的标记,ff是表示透明度,ff00ff表示颜色,注意:这里ffff00ff必须是8个的颜色表示,不接受ff00ff这种6个的颜色表示。名称背景数值背景颜色名称中文名称十六进制RGB十进制RGB粗细字体配色参考

2013-03-08 16:37:20 2343

原创 Tried to obtain the web lock from a thread other than the main thread or the web thread. This may be

Tried to obtain the web lock from a thread other than the main thread or the web thread. This may be a result of calling to UIKit from a secondary thread.原因:在子线程中对UI进行了操作。NSDate *startTime = [

2013-03-03 13:36:56 2559

原创 setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key

其中一个变量或属性(variable 或 property)已经和一个nib或storyboard文件进行了连接,但是后来在Xcode 开发环境,将该 变量或属性名进行了更改。如 UILabel *label; 更改为 UILabel *newLabel; 这个时候编译或运行App,将出现类似前面的异常信息。如何解决这一问题呢?你需要解除或删除之前连接了连接(connectio

2013-03-02 13:59:40 9628 1

原创 Scene is unreachable due to lack of entry points and does not have an identifier for runtime access

使用Storyboard时出现以下警告:warning: Unsupported Configuration: Scene is unreachable due to lack of entry points and does not have an identifier for runtime access via -instantiateViewControllerWithIdentifi

2013-02-18 22:57:24 17376

转载 SSH连接时出现Host key verification failed的原因及解决方法

SSH连接的时候Host key verification failed.[root@cache001 swftools-0.9.0]# ssh 192.168.1.90@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    WARNING: REMOTE HOST IDENTIFICATION HAS CHA

2012-12-22 19:25:27 5444 2

转载 NSString & NSMutableString

Immutable strings //  Setup  two  variables  to  point  to  the  same  string NSString * str1 = @"Hello World"; NSString * str2 = str1; //  "Replace"  the  second  string str2 = @"He

2012-12-08 20:49:57 565

spring2.0中文参考手册(chm)

spring2.0中文参考手册 chm格式

2010-03-11

Linux kernel 2.6 配置指南.pdf

Linux kernel 2.6 配置指南,很详细的说。。。。

2009-04-24

html基础教程(网人交流论坛)

html基础教程 原作者: 福星高高照 来 源:网人交流论坛

2009-02-06

空空如也

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

TA关注的人

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