摘要:分两部分,1缩小图片大小2减弱图片质量@1. 缩小图片大小首先我们弄个catogory//头文件@interface UIImage (Compress)- (UIImage *)compressedImage;@end//mm文件#define MAX_IMAGEPIX 200.0// max pix 200.0px#define MAX_IMAGEDATA_LEN 200.0// max data length 5K@implementation UIImage (Compress)- (UIImage *)compressedImage {CGSize imageSize = self.
阅读全文
11 2012 档案
摘要:http://www.iphonedevsdk.com/forum/iphone-sdk-development/10527-how-resize-image.htmlI use several techniques depending on the situation. For most i resize the image to 640/480 which reduces the file size (and ultimately the transfer size) down with the code below. You could change the h/w to whateve
阅读全文
摘要:单独查看内存使用情况的命令:free -m查看内存及cpu使用情况的命令:top也可以安装htop工具,这样更直观,安装命令如下:sudo apt-get install htop安装完后,直接输入命令:htop就可以看到内存或cpu的使用情况了。 转http://www.juziku.com/sunlightcs/weizhishi/830.htm
阅读全文
摘要:vi的复制粘贴命令vi编辑器有3种模式:命令模式、输入模式、末行模式。掌握这三种模式十分重要: 命令模式:vi启动后默认进入的是命令模式,从这个模式使用命令可以切换到另外两种模式,同时无论在任何模式下只要按一下[Esc]键都可以返回命令模式。在命令模式中输入字幕“i”就可以进入vi的输入模式编辑文件。 输入模式:在这个模式中我们可以编辑、修改、输入等编辑工作,在编辑器最后一行显示一个“--INSERT--”标志着vi进入了输入模式。当我们完成修改输入等操作的时候我们需要保存文件,这时我们需要先返回命令模式,在进入末行模式保存。 末行模式:在命令模式输入“:”即可进入该模式,在末行模式中有...
阅读全文
摘要:Linux的nm查看动态和静态库中的符号 功能列出.o .a .so中的符号信息,包括诸如符号的值,符号类型及符号名称等。所谓符号,通常指定义出的函数,全局变量等等。使用nm [option(s)] [file(s)]有用的options:-A 在每个符号信息的前面打印所在对象文件名称;-C 输出demangle过了的符号名称;-D 打印动态符号;-l 使用对象文件中的调试信息打印出所在源文件及行号;-n 按照地址/符号值来排序;-u 打印出那些未定义的符号;常见的符号类型:A 该符号的值在今后的链接中将不再改变;B 该符号放在BSS段中,通常是那些未初始化的全...
阅读全文
摘要:Android 减包相关LOCAL_CPPFLAGS := -Wno-sign-promo -Wno-missing-field-initializers -fvisibility=hidden -fvisibility-inlines-hidden如果函数不添加 __attribute__((visibility ("default")))其它依赖的文件,在link的时候会报错误 ,这也给减小so的输出函数提供了思路。
阅读全文
摘要:chrome源码学习之知识体系指南 http://blog.csdn.net/ciml/article/details/5721153
阅读全文
摘要:Blocked time includes any pre-processing time (such as cache lookup) and the time spent waiting for a network connection to become available. Internet Explorer will only create a maximum of two concurrent network connections per host name (i.e. www.microsoft.com) and will queue up requests unt...
阅读全文
摘要:error: Exited sync due to gc errors install git 1.8 and zhen repo init again from scratch.sudo apt-get install python-software-propertiessudo add-apt-repository ppa:git-core/ppasudo apt-get updatesudo apt-get install git
阅读全文
摘要:xcode不断进步,在xcode4中引入了ARC的概念。您用或者不用它就在那里,于是有了本文:如何在未使用arc的工程中引入一个使用了arc特性的文件,如何在arc工程中引用未使用arc的文件。其实说白了也很简单就是在”Compile Sources”中对相应的文件加入使用或者不使用arc的flagok,首选“Compile Sources”的位置:选中工程->TARGETS->相应的target然后选中右侧的“Build Phases”,向下就找到“Compile Sources”了。如何在未使用arc的工程中引入一个使用了arc特性的文件:对相应的文件添加:-fobjc-arc
阅读全文
摘要:android webkit调试时打log的方法#define E_LOG(FORMAT,...) \ { __android_log_print(ANDROID_LOG_ERROR, "logTag", FORMAT, ##__VA_ARGS__); }显示函数名和行数 String func = String(String(__PRETTY_FUNCTION__) + ":" + String::number(__LINE__));
阅读全文
摘要:Adddominik's repository:sudo apt-add-repository ppa:dominik-stadler/subversion-1.7Updateapt:sudo apt-get updateInstallsubversion 1.7:sudo apt-get install subversionhttp://blog.jedf.com/2012/06/installing-subversion-17-on-ubuntu-1204.html
阅读全文