`
zjjzmw1
  • 浏览: 1371827 次
  • 性别: Icon_minigender_1
  • 来自: 开封
社区版块
存档分类
最新评论
文章列表
#include<stdio.h>#define MAX1 8800000 //准备查找成语文件的大小。//把成语转换为二进制形式。void toBinary(char *c,char *binaryArray) {    char ch[9] = {'\0'};    int k = 0;    int i;    int j = 0;    while ('\0' != c[j])//一个字一个字的循环。    {        if (c[j] != ',') {//当没有遇见逗号的时候。            for (i = 7;i >= 0;i--)         ...
//行的高度。-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{   NewNotificationCell *cell = (NewNotificationCell *)[self tableView:tableView cellForRowAtIndexPath:indexPath];    cell.myLabel.text = [self.dataArray objectAtIndex:indexPath.row];    labelSize = [c ...

ios 内存管理

    博客分类:
  • iOS
用导航控制器时,如果返回的时候蹦,那就是因为dealloc里面重复释放了。 PersonCenterViewController *personCenterVC = [[PersonCenterViewController alloc]initWithNibName:@"PersonCenterViewController" bundle:nil];    [self.navigationController pushViewController:personCenterVC animated:YES];    [personCenterVC release]; // ...
  ///当_headerImageV.layer.cornerRadius的值是图片的长宽的 一半的时候是圆。 _headerImageV.layer.cornerRadius = 20.0f;           _headerImageV.layer.masksToBounds = YES;     [cell.myButton setImage:[UIImage imageNamed:@"cai.png"] forState:UIControlStateNorm ...
在IOS应用程序开发中,为了减少与服务端的交互次数,加快用户的响应速度,一般都会在iOS设备中加一个缓存的机制。 这篇文章将介绍一下如何在iOS设备中进行缓存,本文先介绍一下将内容缓存到内存中,下一篇文章就介绍一下在iOS磁盘上缓存内容。 使用缓存的目的是为了使用的应用程序能更快速的响应用户输入,是程序高效的运行。有时候我们需要将远程web服务器获取的数据缓存起来,减少对同一个url多次请求。 内存缓存我们可以使用sdk中的NSURLCache类。NSURLRequest需要一个缓存参数来说明它请求的url何如缓存数据的,我们先看下它的CachePolicy类型。 1、NSURLReq ...
iOS开发:安装真机调试证书 源地址:http://iphone.tgbus.com/dev/iosdev/201205/20120523110841.shtml     安装开发证书 1.使用开发者帐号登录IOS Provisioning Portal:https://developer.apple.com/ios/manage/overview/index.action 2. 进入Certificates管理页面, 点击右页面低下的链接“click here to download now”,会下载一个名为“AppleWWDRCA.cer”的证书。 3.双击Ap ...
#include <stdio.h>#include <stdlib.h>#include <string.h>#define N 100//将中缀表达式转换为前缀表达式。typedef struct Node{    char key;    struct Node * left;    struct Node * right;}Node;//search for the operator with the highest grade in aint search(char a[], int begin, int end){    int tag = -1; ...
原文地址:CAEmitterLayer作者:文刀始问道         简介:CAEmitterLayer提供了一个基于Core Animation的粒子发射系统,粒子用CAEmitterCell来初始化。 粒子画在背景层盒边界上   Properties:          birthRate:粒子产生系数,默认1.0;  
第一步:在Supporting Files 中新建一个文件Localizable.strings .方法:在Supporting Files 上右键选择New File 选择Resource ----》Strings File 。 第二步:现在有InfoPlist.strings 和Localizable.strings 两个文件。这两个文件前一个用于改变项目在手机总 ...
bool balance(pbtree &t)  //判断一个二叉树是否是平衡二叉树   {       if (t != NULL)       {           int m, n;           m = depth(t->lchild);           n = depth(t->rchild);           if (m - n & ...
http://student.zjzk.cn/course_ware/data_structure/web/gailun/gailun1.1.1.htm
读google c++ style的总结。   1.     头文件应该尽量写在.m里面。应该用前置声明代替,为了减低编译依赖,防止修改一个头文件引发的多米诺效应。 2.     定义函数时参数顺序为:输入参数在前,输出参数在后。 3.     包含 ...

链表的增删改查

#include <stdio.h>#include <stdlib.h>//先定义链表里面的元素。typedef struct node{    int data;    struct node *next;}MyNode;//定义整个链表。typedef struct link{    MyNode *head;//把head指向的元素定为第一个元素。}MyLink;int isEmpty_to_MyLink(MyLink ...
- (void)viewDidLoad{    [super viewDidLoad];    self.view.backgroundColor=[UIColor grayColor];           self.navigationController.navigationItem.title=@"A";    self.navigationItem.leftBarButtonItem=[[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemAction target:self ...
关于iOS6应用中第三方类库不支持armv7s的问题解决     ld: file is universal (3 slices) but does not contain a(n) armv7s slice: /Users/zhangmingwei/Desktop/QR code/QR code/ZBarSDK/libzbar.a for architecture armv7sclang: error: linker command failed with exit code 1 (use -v to see invocation) ld: file is uni ...
Global site tag (gtag.js) - Google Analytics