1.Autorotation自动旋转时controller发生了什么?一是controller的view在controller允许的时候调整frame,方法shouldAutorotateToInterfaceOrientation返回controller是否允许view自动根据设备旋转而旋转.自动...
分类:
其他好文 时间:
2014-10-28 23:30:36
阅读次数:
500
一、预备知识―程序的内存分配
一个由c/C++编译的程序占用的内存分为以下几个部分
1、栈区(stack)― 由编译器自动分配释放 ,存放函数的参数值,局部变量的值等。其操作方式类似于数据结构中的栈。
2、堆区(heap) ― 一般由程序员分配释放, 若程序员不释放,程序结束时可能由OS回收 。注意它与数据结构中的堆是两回事,分配方式倒是类似于链表,呵呵。
3、全局区(静态...
分类:
其他好文 时间:
2014-10-28 21:47:49
阅读次数:
131
public class Test : MonoBehaviour{ public string output = ""; public string stack = ""; void OnEnable() { Application.RegisterLogCa...
分类:
编程语言 时间:
2014-10-28 19:58:35
阅读次数:
132
//创建UIScrollView UIScrollView*scroll = [[UIScrollViewalloc]init]; //值UIScrollView的可视范围 scroll.frame=CGRectMake(0,0,375,667); scroll.backgroundColor= ....
分类:
其他好文 时间:
2014-10-28 00:27:03
阅读次数:
169
今天又看了遍《effective C++》,手动实现了一下条款42中的栈,贴出来当博客的处女贴。首先栈的声明如下,采用了模板传入类型,而栈的底层采用是个链表。// stack.h// by Chwen 2014-10-27 #include#include #include using namesp...
分类:
编程语言 时间:
2014-10-28 00:26:30
阅读次数:
227
frame:类型是CGRect @property (nonatomic) CGRect frame; 控件所在矩形框的位置和尺寸(以父控件的左上角为坐标原点)bounds @property (nonatomic) CGRect bounds; 控件所在矩形框的位置和尺寸(以自己左上角为坐...
分类:
其他好文 时间:
2014-10-28 00:16:59
阅读次数:
293
RAC优化之配置大帧(jumbo frame)
首先讲讲MTU的概念:在网络通信中,有个MTU(Max Transmission Unit)的概念,即网络传输中最大帧的大小,这个值默认是1500Byte(以太网的可变帧大小是46-1500Byte)。
[root@node1 ~]# ifconfig bond0
bond0 Link encap:Ethernet HWaddr C8...
分类:
其他好文 时间:
2014-10-27 23:05:05
阅读次数:
500
page : logic virtual pagepage frame : physical memory page ,struct page { unsigned long flags : atomic_t count ; struct list_head list; struct ad...
分类:
其他好文 时间:
2014-10-27 22:42:51
阅读次数:
221
栈是一种常见的数据结构,主要特点是“后进先出”。以下是用C语言实现的简单的栈。头文件stack.h,定义栈的结构体和相关的操作:#ifndefSTACK_H
#defineSTACK_H
enum{STACK_OK=0,STACK_OVERFLOW,STACK_ERROR,};
typedefintElemType;
structstack{
ElemType*data;
ElemType..
分类:
其他好文 时间:
2014-10-27 19:46:53
阅读次数:
212
解决方案1:
type?point?=?^node;
?node?=?record
?i:longint;
?n:point;
?end;
var?i,j,k,n,m,a,b,top:longint;
?map:array[1..10000]of?point;
?ans:array[1..10000]of?longint;
?stack,i...
分类:
编程语言 时间:
2014-10-27 15:52:51
阅读次数:
148