自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(98)
  • 收藏
  • 关注

原创 ng-init ng-bind

姓名为

2016-02-05 14:32:30 1340

原创 Angular-JS初见

!DOCTYPE html>html>head>meta charset="utf-8">script src="http://apps.bdimg.com/libs/angular.js/1.4.6/angular.min.js">/script>/head>body>div ng-app=""><!--div 是anjs的所有着-->  p>名字 :

2016-02-05 14:13:41 337

转载 拿来老外的 layoutSubviews

init does not cause layoutSubviews to be called (duh) addSubview: causes layoutSubviews to be called on the view being added, the view it’s being added to (target view), and all the subviews of

2015-06-10 16:53:51 391

原创 sql 谓词

Like 和__  配合使用.Like模糊匹配__精确匹配

2015-03-03 15:19:20 1200

原创 SQL 函数

1 算术函数2 字符串函数3 日期函数4 转换函数5 聚合函数(count,sum,avg,max ,min)  算术函数

2015-03-03 13:10:44 402

原创 sql 标量子查询

返回结果只有一行的查询叫标量子查询.SELECT shohin_mei shohin_bunrui FROM Shohin WHERE hanbai_tanka > (SELECT AVG(hanbai_tanka) FROM Shohin);标量子查询可以和列一样mysql> SELECT shohin_id ,shohin_mei,shohin_bunrui,\

2015-03-02 18:19:59 6451

原创 sql VIEW

mysql> CREATE VIEW ShohinSum (shohin_bunrui,cnt_shohin)\    -> AS\    -> SELECT shohin_bunrui,COUNT(*) \    -> FROM Shohin \    -> GROUP BY shohin_bunrui;mysql> SELECT shohin_b

2015-03-01 18:33:51 349

原创 sql 事务

UPDATE Shohin SET torokubi = '2009-09-01';START TRANSACTIONCOMMIT;ROLLBACK;DELETE FROM Shohin;---清空表数据

2015-03-01 18:32:37 310

原创 TRUNCATE

TRUNCATE  舍弃表

2015-03-01 15:29:09 343

原创 sql 排序

SELECT hanbai_tanka,shiire_tanka FROM Shohin  ORDER BY hanbai_tanka ASC,shiire_tanka ASC;DESC ASC 修饰不同的列.含有NULL的会在开头或者结尾汇总,因为NULL是不能运算的。

2015-03-01 13:52:49 296

原创 HAVING 子句

mysql> SELECT shohin_bunrui,COUNT(*) FROM Shohin GROUP BY shohin_bunrui HAVING COUNT(*)=2;SELECT shohin_bunrui ,COUNT(*) FROM Shohin GROUP BY shohin_bunrui;SELECT shohin_bunrui,COUNT(*) FR

2015-03-01 13:33:03 366

原创 SQL聚合函数

SELECT COUNT(shohin_mei) FROM Shohin;--去掉NULL值SELECT SUM(shiire_tanka) FROM Shohin ;SELECT MAX(shiire_tanka) FROM Shohin;SELECT MIN(shiire_tanka) FROM Shohin;SELECT AVG

2015-02-14 15:55:33 342

原创 sql 运算

mysql> SELECT shohin_mei,shohin_bunrui,hanbai_tanka,hanbai_tanka*2 AS "hanbai_tanka*2" FROM Shohin;sql 常用的运算符 +-*/包含NULL的运算结果是NULLSELECT (100+200)*3 AS keisan;--比较洋的写法 常用的比较运算符

2015-02-10 12:42:56 429

原创 sql查询

SELECT ID AS AID FROM TABLESELECT DISTINCT shohin_bunrui FROM Shohin;//去重SELECT shohin_mei ,shohin_bunrui FROM Shohin  WHERE hanbai_tanka > 200;mysql> /* 注释   /*> 也是注释   /*>

2015-02-10 11:24:20 288

原创 table 操作

drop 删除表.ALTER TABLE ADD COLUMN varchar(100)ALTER TABLE DROP COLUMN

2015-02-09 13:14:39 358

原创 数据库语言划分

1 数据定义语言DDL  CREATE 创建库表 DROP    删除库表        ALERT 更新库表2 数据操作语言 DML        SELECT 查询语言        INSERT  插入语言         UPDATE 更新        DELETE 删除3 流程控制语言  COMMIT 提交  ROLLBACK 取消操作 

2015-02-09 10:44:06 276

原创 mysql root 启动

mysql -uroot

2015-02-09 10:26:15 457

转载 git branch

分支开发原则:如果本地dev分支有修改,则需要先切换到master分支,把本地分支的修改merge回master(git merge dev),然后在master上把合并后的内容push到master上;然后再切换回本地分支,再把master的内容merge回分支,然后就继续在分支开发。开发流程:// 查看本地分支git branch// 显

2014-12-09 17:57:19 466

转载 断点续传

fileHandle = [NSFileHandle fileHandleForWritingAtPath:temporaryPath];    offset = [fileHandle seekToEndOfFile];    NSString *range = [NSString stringWithFormat:@"bytes=%llu-",offset];     

2014-05-22 18:03:22 410

原创 objc_message

http://www.cppblog.com/kesalin/archive/2011/08/15/objc_message.html

2014-05-22 17:06:29 403

转载 老外写的coreimage

http://www.raywenderlich.com/22167/beginning-core-image-in-ios-6

2014-05-20 11:06:30 455

转载 捕捉异常

void UncaughtExceptionHandler(NSException *exception)   {    NSArray *arr = [exception callStackSymbols];       NSLog(@"arr=:%@",arr);    NSString *reason = [exception reason];       NSLog(@

2014-05-16 12:03:47 375

转载 cocoaGCD别人整理

http://www.cocoachina.com/applenews/devnews/2014/0428/8248.html

2014-05-16 07:52:36 341

转载 block使用

http://tanqisen.github.io/blog/2013/04/19/gcd-block-cycle-retain/

2014-05-15 12:15:56 324

转载 wangyouzhengli

http://blog.csdn.net/wzzvictory/article/details/8629036

2014-05-15 08:01:16 332

转载 gcd并行串行

http://www.cnblogs.com/touchme/archive/2012/05/14/2499630.html

2014-05-15 00:04:43 375

转载 runtime 机制

如您所见,NSObject的对象非常之简单,Class 类型的,我们再看Class 是什么:#include       // for __DARWIN_NULL#include #include typedef struct objc_class *Class;typedef struct objc_object {    Class isa;} *id;

2014-05-14 13:49:34 544

转载 setget方法

@property (retain) Object obj;?12345678910- (Object *)obj {    return_obj;} - (void)setObj:(Object *)new

2014-05-09 15:00:46 486

转载 坐标转换

// controllerA 中有一个UITableView, UITableView里有多行UITableVieCell,cell上放有一个button// 在controllerA中实现:CGRect rc = [cell convertRect:cell.btn.frame toView:self.view];// 或CGRect rc = [self.view conver

2014-05-03 15:46:48 579

转载 getAttributedStringHeightWithString

- (int)getAttributedStringHeightWithString:(NSAttributedString *)  string  WidthValue:(int) width  {     int total_height = 0;          CTFramesetterRef framesetter = CTFramesetterCreateWithAt

2014-04-18 09:45:22 880

原创 NSRegularExpression

NSString *parten = @"#([^\\#]+)#";    NSError* error = NULL;        NSRegularExpression* regex = [[NSRegularExpression alloc]                                  initWithPattern:parten       

2014-04-17 15:19:32 421

原创 存取文件高手绕道

BOOL saved = [NSKeyedArchiver archiveRootObject:object toFile:filePath];    if (!saved)    {        DLOG(@"file at %@ save failed", filePath)    }

2014-04-15 15:52:33 381

原创 雕虫

int [] myarray = {3,1,6,2,9,0,7,4,5,8};int temp;for (int i = 0; i length; i++) {for (int j = 0; j length-1-i; j++) {if (myarray[j]>myarray[j+1]) {temp = myarray[j];

2014-04-12 16:47:36 394

原创 雕虫小技

typedef struct {unsigned short header;unsigned int  contents;unsigned short tail;} msg;...msg *pmsg;pmsg = (msg *)malloc(sizeof(msg));memcpy(pmsg, &source ,sizeof(msg));

2014-04-01 12:37:19 423

原创 yaoxue shenyao

登陆http://mail.126.com/,用户名:[email protected],密码:shenyao

2014-03-16 15:01:44 370

原创 静态地图

http://api.map.baidu.com/staticimage?center=116.403874,39.914889&width=400&height=300&zoom=15&markers=116.403874,39.914889&markerStyles=-1,http://api.map.baidu.com/images/marker_red.png,-1,23,25

2014-03-10 17:17:05 676

转载 __block typeof(self) bself = self;

block对于其变量都会形成strong reference,对于self也会形成strong reference ,而如果self本身对block也是 strong reference 的话,就会形成 strong reference 循环,造成内存泄露,为了防止这种情况发生,在block外部应该创建一个week(__block) reference。所以在block内如果有self

2014-01-21 18:21:24 1786

转载 weak

The difference is that an object will be deallocated as soon as there are no strong pointers to it. Even if weak pointers point to it, once the last strong pointer is gone, the object will be dealloca

2014-01-16 10:16:48 470

原创 过去&现在

现在比过去重要。

2014-01-14 15:27:43 406

转载 NSdate时间转换问题

使用NSDateFormatter转换时间字符串时,默认的时区是系统时区,如我们使用一般都是北京时间(+8),如果直接使用[cpp] view plaincopyprint?[dateFormatter dateFromString:@"2012-01-01 00:00:00"];  你会发现实际转换为2011-12-31 16:00

2013-12-10 10:44:56 456

空空如也

空空如也

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

TA关注的人

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