自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(85)
  • 资源 (2)
  • 收藏
  • 关注

原创 我的博客换地方了

最近实验室开通了自己的博客, 我以后就把博客搬到

2014-05-01 11:02:02 966

原创 UIView in action

UIVIew实战

2014-04-11 21:14:33 1225

原创 UIView 学习

UIView 学习概述在IOS中使用window和view来展现应用程序的内容。windows是不可见的部分但是它提供了一个基本的容器用来放置程序的视图(view)。每一个app都至少包含一个window以及一个view来展现该app的内容。UIKit和其他系统框架也提供了大量预先设计好的视图共开发人员使用。view架构原理在IOS中一切在屏幕上能看见的东西都离不开UIView这个

2014-04-10 20:20:15 1482

原创 UIResponder学习

UIResponder介绍UIResponder 这个类定义了很多用来处理响应和时间处理的类。他的子类有UIApplication,UIView以及UIWindow等。IOS中分为两类事件:触摸事件,和移动事件。最原始的事件处理方是touchesBegan:withEvent:,touchesMoved:withEvent:, touchesEnded:withEvent:, an

2014-04-09 19:58:00 14055 1

原创 IOS手势处理

IOS中触控事件一般是duo'dian'chu

2014-04-08 20:45:33 2781

原创 cocoa 消息机制

在OC中消息的调用都是动态的(如)

2014-04-08 12:09:26 3732

原创 NSObject 学习

NSObject是cocoa中的老祖宗,所有类dou'ji'cheng'zi

2014-04-07 21:55:51 1809

转载 install SWIG for OSX(10.8.2)

使用某個網友的Android audio streaming with OpenSL ES and the NDK時發現它需要SWIG來輔助完成JNI的橋接,但在osx上並沒有提供該程式,接下來就是要說明如何安裝並完成它。什麼是SWIG?SWIG是一個能將C或者C++編寫的程序與其它各種高級語言如Perl, Python, Ruby, 和 Tcl進行聯接的開發工具。

2013-08-02 11:30:52 1639

原创 Prime Cryptarithm

Prime CryptarithmThe following cryptarithm is a multiplication problem that can be solved by substituting digits from a specified set of N digits into the positions marked with *. If the set of pr

2013-04-24 11:10:48 1074

原创 Calf Flac

Calf FlacIt is said that if you give an infinite number of cows an infinite number of heavy-duty laptops (with very large keys), that they will ultimately produce all the world's great palindromes

2013-04-22 21:26:14 988

原创 Barn Repair

Barn RepairIt was a dark and stormy night that ripped the roof and gates off the stalls that hold Farmer John's cows. Happily, many of the cows were on vacation, so the barn was not completely ful

2013-04-21 18:07:03 789

原创 Mixing Milk

Mixing MilkSince milk packaging is such a low margin business, it is important to keep the price of the raw product (milk) as low as possible. Help Merry Milk Makers get the milk they need in th

2013-04-21 12:18:42 976

原创 在c++中qsort()排序函数的使用qsort函数应用大全

在c++中qsort()排序函数的使用qsort函数应用大全七种qsort排序方法一、对int类型数组排序int num[100];Sample:int cmp ( const void *a , const void *b ) { return *(int *)a - *(int *)b; }qsort(num,100,size

2013-04-21 11:34:04 1328

原创 Dual Palindromes

Dual PalindromesMario Cruz (Colombia) & Hugo Rickeboer (Argentina)A number that reads the same from right to left as when read from left to right is called a palindrome. The number 12321 is a pali

2013-04-20 23:17:43 818

原创 Palindromic Squares

Palindromic SquaresRob KolstadPalindromes are numbers that read the same forwards as backwards. The number 12321 is a typical palindrome.Given a number base B (2 <= B <= 20 base 10), print all t

2013-04-20 21:05:22 1376

原创 十进制转任意进制

注意: 转换后的结果是倒叙的int zs_hexConversion(const int& num,const int &zs_hex,char *zsNum){ int tempN; int _num = num; int i=0; for (;_num!=0;i++) { tempN = _num%zs_hex; _

2013-04-20 20:56:45 946

原创 hash_map C++实现

#include#includeconst int MapSize = 1024;struct hashmap_ele{ int key; //key int value; //value int in_use; //开始时位置上无元素,未被占用 hashmap_ele * multis; //hash地址相同的值,通过索引链接他};struct hash_map{ i

2013-04-15 15:48:56 1338 1

转载 Chrome中canvas上drawImage无法画出image的解决办法

Chrome中canvas上drawImage无法画出image的解决办法博客分类: HTML5 & Androidcanvashtml5 在自己写demo的过程中 碰到了这样一个问题 发现drawImage方法没有达到预期的效果 图片没办法显示 而fillRect等画图形的方法却工作良好大概的代码如下:Js代码  $

2013-04-10 20:02:53 1131

原创 LZW数据压缩算法的原理分析

LZW数据压缩算法的原理分析   我希望通过本文的介绍,能给那些目前不太了解lzw算法和该算法在gif图像中应用,但渴望了解它的人一些启发和帮助。抛砖引玉而已,更希望园子里面兄弟提出宝贵的意见。1.LZW的全称是什么?   Lempel-Ziv-Welch (LZW).2. LZW的简介和压缩原理是什么?  LZW压缩算法是一种新颖的压缩方法,由Lemple-Z

2013-04-04 20:13:14 819

翻译 数学数学数学!

I've been working for the past 15 months on repairing my rusty math skills, ever since I read a biography of Johnny von Neumann. I've read a huge stack of math books, and I have an even bigger stack o

2013-04-03 20:35:37 1872 1

原创 iOS开发实例(五)- 自动旋转

iOS开发实例(五)- 自动旋转自动旋转屏幕有3种常用方法:一、自动调整属性(适用比较简单的界面)。       1、创建一个项目Autosize,系统是默认支持Portrait(纵版)、Landscape Left(向左横向)、Landscape Right(向右横向),不支持Upside Down(倒过来),如下图:2、打开.xib文件,在I

2013-02-24 18:46:53 3903

原创 Transformations ACM

TransformationsA square pattern of size N x N (1 <= N <= 10) black and white square tiles is transformed into another square pattern. Write a program that will recognize the minimum transformation

2013-02-24 14:11:46 648

原创 练习

//// main.m// MemoryManagerAutoRelease//// Created by jimzhai on 13-2-8.// Copyright (c) 2013年 jimzhai. All rights reserved.//#import @interface Engine : NSObject{ int power; NS

2013-02-08 21:04:28 647

原创 Milking Cows

Milking CowsThree farmers rise at 5 am each morning and head for the barn to milk three cows. The first farmer begins milking his cow at time 300 (measured in seconds after 5 am) and ends at time

2013-02-05 22:50:25 2959

原创 位图排序

在《编程珠玑》的第一章,就是相当的精彩,这个位图排序就是出自那里。书中讲到的位图排序非常的巧妙(时间和空间都时非常的节省),而这巧妙是来源于对实际问题和数据的透彻分析,然后选取了一种高效的解决方案。结合网上的一些资料以及自己的程序实现来简单记录一下吧。1.位图的理解我 们都明白图形格式中位图储存方式,其实就是以象素为单位的小方块,一格一格的纵横累积起来. 每一个小方块代表一种颜色,当然,如

2013-02-05 21:04:08 1126

原创 sqort函数用法总结

qsort包含在头文件中,此函数根据你给的比较条件进行快速排序,通过指针移动实现排序。排序之后的结果仍然放在原数组中。使用qsort函数必须自己写一个比较函数。函数原型:void qsort ( void * base, size_t num, size_t size, int ( * comparator ) ( const void *, const void * ) );

2013-02-05 21:02:20 6876 3

原创 Broken Necklace

Broken NecklaceYou have a necklace of N red, white, or blue beads (3 1 2 1 2 r b b r b r r b r

2013-02-05 17:45:59 174170

原创 Object-C memory manager 练习与结果分析

练习内容主要是一只狗以及它的主人。代码://// Dog.h// HelloDog//// Created by jimzhai on 13-1-31.// Copyright (c) 2013年 jimzhai. All rights reserved.//#import #import "Person.h"@class Person;@interface

2013-01-31 18:13:16 703

转载 objective-c 编程总结 内存管理

objective-c 编程总结 内存管理oc中内存管理的三项原则:1. 谁创建(new 或者 alloc),谁release。2. 如果你从一个方法中获得一个对象,应该假设这个对象的retaincount是1,而且已经被设置为autorelease,你不需要,也不应该release它。如果需要进一步传递这个对象,你可以进行retain或者copy操作。3. 如果你reta

2013-01-30 10:21:12 427

原创 Objective-C内存管理 理解Autorelease

Objective-C内存管理 理解Autorelease 是本文要介绍的内容,如果你能够真正的理解autorelease,那么你才是理解了Objective-C的内存管理。Autorelease实际上只是把对release的调用延迟了,对于每一个Autorelease,系统只是把该Object放入了当前的Autorelease pool中,当该pool被释放时,该pool中的所有Object会被

2013-01-30 10:11:04 469

原创 Objective-C内存管理 调试内存泄露

Objective-C内存管理 调试内存泄露是本文要介绍的内容,解决内容问题应该每个迭代周期要做一些压力和内存测试,我们先来看内容。1、内存的问题是发现越早,解决的代价就越小。所以最重要的是理解Objective-C内存管理,遵循我之前提到的实践准则和编码规范。另外,在每个迭代周期要做一些压力和内存测试,尽早发现问题。2、利用Clang静态检测工具。在XCode 3.2之后的版本里

2013-01-30 10:09:46 487

原创 Objective-C内存管理教程和原理剖析

Objective-C内存管理教程和原理剖析,是在iPhone 和Mac平台的基础上,我们先来看内容。初学objectice-C的朋友都有一个困惑,总觉得对objective-C的内存管理机制琢磨不透,程序经常内存泄漏或莫名其妙的崩溃。我在这里总结了自己对objective-C内存管理机制的研究成果和经验,写了这么一个由浅入深的教程。希望对大家有所帮助,也欢迎大家一起探讨。一 基本

2013-01-30 10:07:46 481

原创 Objective-C内存管理 实践准则

在进行IPhone开发时,内存管理是个相对比较难以理解的东西。Objective-C 使用了一种介于C#和C++之间的内存管理机制。C#是基于Mark-sweep的GC,C++基本上是程序员自己负责分配和释放。Ojbective-C,是程序员来负责Mark(通过Release,retain,alloc)计数, 系统来进行分配和释放。下面是一些准则,可以避免内存泄露和使用已释放的内存造成程序cr

2013-01-30 10:05:32 678

原创 Friday the Thirteenth

Friday the ThirteenthIs Friday the 13th really an unusual event?That is, does the 13th of the month land on a Friday less often than on any other day of the week? To answer this question, wr

2013-01-29 22:52:04 613

原创 UVA Greedy Gift Givers

Greedy Gift GiversA group of NP (2 ≤ NP ≤ 10) uniquely named friends has decided to exchange gifts of money. Each of these friends might or might not give some money to any or all of the other fri

2013-01-28 21:12:45 1376

原创 Object-C 练习

//// main.m// chapter8//// Created by jimzhai on 13-1-28.// Copyright (c) 2013年 jimzhai. All rights reserved.//#import @interface Car : NSObject{ int V; int speed;}+(void)brake

2013-01-28 17:29:11 512

原创 ACM 问题分类

Hal Burch conducted an analysis over spring break of 1999 and made an amazing discovery: there are only 16 types of programming contest problems! Furthermore, the top several comprise almost 80% of th

2013-01-27 19:50:56 561

原创 HD 1008

ElevatorTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 28919    Accepted Submission(s): 15607Problem DescriptionThe highest bui

2013-01-26 22:13:21 1171 2

原创 HD problem

SafecrackerTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5175    Accepted Submission(s): 2598Problem Description=== Op tech br

2013-01-26 00:39:29 463

原创 大数相乘

#include #include #include using namespace std;int main(int argc, const char * argv[]){ void BigNumPlus(); int str_multiplication(char multiple[],char multiplicand[],char accumulate[]);

2013-01-24 21:39:35 428

精通Windows.API-函数、接口、编程实例无损完美版

详细地讲解了windowsAPI的原理是一本较好的windowsAPI学习书籍。

2012-02-02

绚丽的JS广告特效

非常绚丽的JS广告特效,能够实现多幅图片的切换,适合于初学者使用。

2012-01-03

空空如也

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

TA关注的人

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