上一页 1 ··· 3 4 5 6 7 8 9 10 下一页

memory management before arc

摘要: When an iOS application is running, there is a run loop that is continually cycling. This run loop checks for events, like a touch or a time firing. Whenever an event occurs, the application breaks from the run loop and processes that event by calling the methods you have written in your classes. Wh 阅读全文
posted @ 2012-06-13 09:51 grep 阅读(197) 评论(0) 推荐(0) 编辑

block

摘要: This is a block^{ NSLog(@"This is from a block");}a block with arguments^(double dividend, double divisor){ double quotient = dividend/divisor; return quotient;}although blocks look like functions, they can be stored in variables. Like other variables, block variables are declared and then 阅读全文
posted @ 2012-06-12 10:53 grep 阅读(334) 评论(0) 推荐(0) 编辑

Property

摘要: You declare instance variables to hold the data, and you also declare accessor methods for them.However, you can use @property/@synthesize to construct instead.@property (attributes) type name;MutabilityA property can be declared readwrite or readonly. The default is readwrite, which means that both 阅读全文
posted @ 2012-06-11 14:45 grep 阅读(320) 评论(0) 推荐(0) 编辑

objective-c programming the big nerd ranch guide notes

摘要: preventing memory leaksretaining cycle are a very common source of memory leaks.to find retain cycles in your programming, you can use apple's profiling tool, instruments.how do you fix a retain cycle? use a weak reference. A weak reference is a pointer that does not imply ownership.In a parent- 阅读全文
posted @ 2012-06-09 10:37 grep 阅读(587) 评论(0) 推荐(0) 编辑

dababase 差异

摘要: 取得所有表mysqlSHOW TABLESoracleselect Object_Name from all_objects where Object_Type='TABLE'取得指定schema下面的表oracleselect Object_Name from all_objects where Object_Type='TABLE' and OWNER='demoschema' sql snippetsselect * from package_specification WHERE TRUNC(originated) = TO_DATE(& 阅读全文
posted @ 2012-06-07 10:47 grep 阅读(210) 评论(0) 推荐(0) 编辑

hello oracle IV

摘要: 子查询SELECT * FROM T 中就可以用子查询来代替表T,比如SELECT * FROM(SELECT * FROM T2 where FAge<30)SELECT语句可以嵌套在其他语句中,比如SELECT,INSERT,UPDATE以及DELETE等,这些被嵌套的SELECT语句就称为子查询,可以这么说当一个查询依赖于另外一个查询结果时就可以使用子查询。单值子查询(标量子查询) 单值子查询的语法和普通的SELECT语句没有什么不同,唯一的限制就是子查询的返回值必须只有一行记录,而且只能有一个列。列值子查询与标量子查询不同,列值子查询可以返回一个多行多列的结果集。这样的子查询又被 阅读全文
posted @ 2012-05-31 10:56 grep 阅读(219) 评论(0) 推荐(0) 编辑

objective-c revisited

摘要: global and static variablesTo make a variable global, you declare it outside of a particular function.#include <stdio.h>#include <stdlib.h>//declare a global variablefloat lastTemperature;a static variable is like a global variable in that it is declared outside of any function. However, 阅读全文
posted @ 2012-05-31 09:10 grep 阅读(296) 评论(0) 推荐(0) 编辑

hello oracle III

摘要: 表连接表连接有多种不同的类型,被主流数据库系统支持的有交叉连接(CROSS JOIN)、内连接(INNER JOIN)、外连接(OUTTER JOIN),另外在有的数据库系统中还支持联合连接(UNION JOIN)。内连接(inner join)SELECT FNumber,FPrice FROM T_Order INNER JOIN T_Customer ON FCustomerId= T_Customer.FId WHERE T_Customer.FName='MIKE' 为了避免列名歧义并且提高可读性,这里建议使用表连接的时候要显式列所属的表,如下SELECT T_Ord 阅读全文
posted @ 2012-05-30 13:53 grep 阅读(162) 评论(0) 推荐(0) 编辑

hello oracle II

摘要: 索引CREATE INDEX idx_person_nameage ON T_Person(FName,FAge) Oracle 中的DROP INDEX语句不要求指定表名,只要指定索引名即可DROP INDEX idx_person_name; 约束非空约束指定一个字段为空的方式就是在字段定义后增加NOT NULL惟一性约束单字段唯一约束,复合字段唯一约束如果希望一个字段在表中的值是唯一的,那么就可以将唯一约束设置到这个字段上,设置方式就是在字段定义后增加UNIQUECREATE TABLE T_Person (FNumber VARCHAR2(20) UNIQUE, FName VARC. 阅读全文
posted @ 2012-05-30 10:47 grep 阅读(247) 评论(0) 推荐(0) 编辑

hello oracle I

摘要: 整数类型 number(10)数值类型 number(m,n)字符相关类型 固定字符长度 如果没有填充满,尾部将以空格填充。 char(m) 可变字符长度 最大长度 不填空格 varchar2(m) 可变长度国际化字符串 最大长度4GB nvarchar2(m) 可变长度大字符串 最大长度 216-1 字节 clob 可变长度国际化大字符串 最大长度 4G nclob日期 date 日期时间数据 timestamp 时间戳二进制类型 blobCREATE TABLE T_Person(FName VARCH... 阅读全文
posted @ 2012-05-28 10:35 grep 阅读(350) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 下一页