先收着,转:LazyTableImages范例解析近来想了解iPhone的多线程处理,查阅到了官方范例LazyTableImages,发现代码中有不仅有多线程处理,还有XML解析和异步下载图片,感觉官方例子真是全面啊,便花了时间好好研究下。LazyTableImages地址:http://devel...
分类:
其他好文 时间:
2014-05-28 00:06:02
阅读次数:
285
DescriptionGiven m sequences, each contains n
non-negative integer. Now we may select one number from each sequence to form a
sequence with m integers...
分类:
其他好文 时间:
2014-05-28 00:05:22
阅读次数:
298
如果存在正常数c和n0使得当N>=n0时,T(N)=n0,T(N) >=
c*f(N),则记为T(N) =Ω((f(N)) 大于等于 读作:omegaT(N) =Θ(h(N)) 当且仅当T(N)= O(h(N))且T(N)
=Ω(h(N)) 等于 读作:t...
分类:
其他好文 时间:
2014-05-28 00:02:09
阅读次数:
317
http://acm.hdu.edu.cn/showproblem.php?pid=3367
1 #include 2 #include 3 #include 4 #define maxn 20000 5 using namespace std; 6 7
int n,m; 8 int f[m...
分类:
其他好文 时间:
2014-05-28 00:03:30
阅读次数:
451
改脚本查看哪些ip被占用。#!/bin/bashfor i in {1..10}
//赋予i变量1-10do//干什么ping -c1 -w1 192.168.7.$i &> /dev/null //ping
192.168.7.网段 每个ip1次 显示1行全输出到无底洞if [ $? -eq 0 ...
分类:
其他好文 时间:
2014-05-28 00:04:45
阅读次数:
321
http://blog.csdn.net/jkhere/article/details/27113139 1
***一、表的复杂查询 2 1、连接查询 3 1.0连接的基本语法格式: 4 from TABLE1 join_type TABLE2 [on...
分类:
其他好文 时间:
2014-05-28 00:00:07
阅读次数:
445
写一个函数,求俩个整数之和,要求函数体内不得使用+、-、*、/
四则运算符合。看到题目,我们知道,现在只有位运算可以用了,那就用位运算吧。第一步:对2个数的每一位相加,但不进位,我们可以用异或运算完成。第二步:找到进位的位置,并计算进位的值,我们先用与运算可以找到位置,然后左移一位,得到进位的值(比...
分类:
其他好文 时间:
2014-05-28 00:01:28
阅读次数:
369
题意:与原来基本的尼姆博弈不同的是,可以将一堆石子分成两堆石子也算一步操作,其它的都是一样的。分析:由于石子的堆数和每一堆石子的数量都很大,所以肯定不能用搜索去求sg函数,现在我们只能通过找规律的办法求得sg的规律。通过打表找规律可以得到如下规律:if(x%4==0)
sg[x]=x-1; if(x...
分类:
其他好文 时间:
2014-05-27 23:58:54
阅读次数:
354
1、冒泡排序(自己写) #include#define swap(x,y) x=x+y; y=x-y;
x=x-y;void maopao(int *a,int length)
//每次把最大的元素冒泡到数组末尾,从小到大的顺序,length是数组长度,a是数组名,作为形参之后,数组名退化为指针{ ...
分类:
其他好文 时间:
2014-05-27 23:59:27
阅读次数:
434
http://acm.hdu.edu.cn/showproblem.php?pid=1063
1 import java.math.BigDecimal; 2 import java.util.*; 3 public class Main { 4
public static void mai...
分类:
其他好文 时间:
2014-05-27 23:57:40
阅读次数:
491
游戏名称:小小枪战:反恐精英/Little
Gunfight:Counter-terror消费者不是傻瓜!游戏里面的联网对战功能就是玩家与电脑对战。我只能说,这个游戏公司的AI做的不错。证据1:源代码a.a.a.java
里面有一个机器人的玩家名称列表,什么 “极品黑木耳” “爆头王子” “孤与谁共...
分类:
其他好文 时间:
2014-05-27 23:56:58
阅读次数:
379
main.c 1 #include 2 #include"2401.h" 3 4 #define
uint unsigned int 5 #define uchar unsigned char 6 7 sbit KEY8=P3^7; //发送按键 8
sbit beep=P2^3;//...
分类:
其他好文 时间:
2014-05-27 23:56:22
阅读次数:
599
一、统计脚本及代码 1 #!/bin/sh 2 3 root_dir=`pwd` 4
source_file="$root_dir"/operate0526.txt 5 single_file="$root_dir"/single0526.txt
6 result_file="$roo...
分类:
其他好文 时间:
2014-05-27 23:54:25
阅读次数:
524
网上关于开源日志工具log4cplus的说明有很多,但大多略显复杂,本文主要从实用的角度,介绍一种最简单而且又实用的方法。本文的方法已经足够满足实际工程中的使用需求,而且不需要很复杂的流程,可以实现.log文件以及console窗口同时显示log信息。当然,想要深度定制,那就要去看看别的帖子了。st...
分类:
其他好文 时间:
2014-05-27 23:53:10
阅读次数:
400
完全背包。 1 #include 2 #include 3 4 int a[105], c[105];
5 int n, m; 6 int dp[100005]; 7 8 int mymax(int a, int b) { 9 return a>b ?
a:b;10 }11 12 v...
分类:
其他好文 时间:
2014-05-27 23:50:21
阅读次数:
436
面向切面编程(AOP是Aspect Oriented
Program的首字母缩写),我们知道,面向对象的特点是继承、多态和封装。而封装就要求将功能分散到不同的对象中去,这在软件设计中往往称为职责分配。实际上也就是说,让不同的类设计不同的方法。这样代码就分散到一个个的类中去了。这样做的好处是降低了代码...
分类:
其他好文 时间:
2014-05-27 23:48:56
阅读次数:
544
Windows Server Failover Clustering is a high
availability platform that is constantly monitoring the network connections and
health of the nodes in a ...
分类:
其他好文 时间:
2014-05-27 23:48:23
阅读次数:
550
bool CDownLoad_LocalData::WriteToConfigFile(
DownLoadLocalData* downdata ){CCDictionary* pDict =
CCDictionary::create();unsigned int lessonid = downda...
分类:
其他好文 时间:
2014-05-27 23:47:44
阅读次数:
443
复位 Arduino
板子1.打开官方的blink程序。2.重新拔插usb。3.点下载。4.按住左上角的复位按键不放。5.等显示开始下载瞬间松开按键。把握住那个瞬间。6.多试验几次看能下载好不。
分类:
其他好文 时间:
2014-05-27 23:42:55
阅读次数:
400
回文数是指这样的数字:正读和倒读都是一样的。如:595,2332都是回文数,234不是回文数。注意:负数不是回文数Determine whether an
integer is a palindrome. Do this without extra space.Some hints:Could ne...
分类:
其他好文 时间:
2014-05-27 23:44:17
阅读次数:
459