今天简述一下简单的内存管理,在IOS5.0以后Apple增加了ARC机制(Automatic Reference Counting),给开发人员带来了不少的方便,但是为了能更好的理解IOS内存管理机制,还是需要对其比较了解。1.在OC中,每个对象都有一个保留计数,创建时每个对象都有一个初始值为1的保...
分类:
移动开发 时间:
2015-09-05 16:21:13
阅读次数:
200
在HashMap中,如果需要使用多个属性组合作为key,可以将这几个属性组合成一个对象作为key。但是存在的问题是,要做get时,往往没办法保存当初put操作时的key object的reference,此时,需要让key object覆盖如下hashCode()和equals(Object obj...
分类:
编程语言 时间:
2015-09-05 12:23:36
阅读次数:
182
Basic Linux Commands :date, clock, hwclock, cal, ls, pwd, whereis, which, who, w, whoami
作业01:自行学习如下命令 date,clock,hwclock,cal ls,cd,pwd,tty,whereis,which stat,echo,shutdown,halt,reboot,poweroff who,w,whoamidate:显示系统时间,【时间日期】 date查看系统当前时间参数-u显示utc时间 格式化显示年月日用+号连起来如:date+%Y-%m-%d(如果我们用d..
分类:
系统相关 时间:
2015-09-04 14:27:14
阅读次数:
372
Sorting is a natural solution. But, you don't have to run O(nlgn) sorting for all the time. Counting sort is O(n)!class Solution {public: int hInde...
分类:
其他好文 时间:
2015-09-04 07:33:25
阅读次数:
179
引用与指针引用是C 中的概念,初学者容易把引用和指针混淆一起。一下程序中,n是m的一个引用(reference),m是被引用物(referent)。int m;int &n = m;n相当于m的别名(绰号),对n的任何操作就是对m的操作。所以n既不是m的拷贝,也不是指向m的指针,其实n就是m它自己。...
分类:
其他好文 时间:
2015-09-04 07:20:42
阅读次数:
146
Python GC主要使用引用计数(reference counting)来跟踪和回收垃圾。在引用计数的基础上,通过“标记-清除”(mark and sweep)解决容器对象可能产生的循环引用问题,通过“分代回收”(generation collection)以空间换时间的方法提高垃圾回收效率。发现...
分类:
编程语言 时间:
2015-09-04 07:12:11
阅读次数:
210
一、接上篇用户及权限管理Command:chmod/chown/chgrp/umask1、chmod(修改文件权限)SYNOPSIS
chmod[OPTION]...MODE[,MODE]...FILE...
chmod[OPTION]...OCTAL-MODEFILE...
chmod[OPTION]...--reference=RFILEFILE...分为三类:u:owner(属主)g:group(属组)o:other(其他)a:all三..
分类:
系统相关 时间:
2015-09-03 21:59:11
阅读次数:
273
原文来源:MySQL 5.5 Reference Manual部分翻译取自:《MySQL_5.1中文参考手册》转载请注明原文链接http://www.cnblogs.com/lenagt/archive/2012/06/06/2538201.html谢谢。----------------------...
分类:
数据库 时间:
2015-09-03 11:33:58
阅读次数:
257
Re: [xml] MSYS and MINGW: undefined reference to _imp__xmlFreeFrom: Mike Peat To: danielg teragram comCc: "Daniel Richard G." , xml gnome orgSubject: ...
分类:
其他好文 时间:
2015-09-02 00:25:53
阅读次数:
400
1049. Counting Ones (30)时间限制10 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueThe task is simple: given any positive integer N, you are supposed to...
分类:
其他好文 时间:
2015-09-01 21:16:52
阅读次数:
264