(一)Windows下使用MinGW和Code::Blocks环境配置libxml2 笔者此次是在windows 7下使用MinGW和Code::Blocks开发C程式的,手上的一个项目需要使用socket通讯接收远端主机发来的xml报文,使用C程式解析,所以需要配置libxml2。 首先先到...
分类:
其他好文 时间:
2014-07-16 21:32:17
阅读次数:
302
首先大家要了解 dispatch_queue 的运作机制及线程同步
我们可以将许多 blocks 用 dispatch_async 函数提交到 dispatch_queue ,如果类型是DISPATCH_QUEUE_SERIAL (串行),那么这些 block 是按照 FIFO (先入先出)的规则调度的,也就是说,先加入的先执行,后加入的一定后执行,但在如果类型是DISPATCH_QUEUE_C...
分类:
编程语言 时间:
2014-07-13 16:56:40
阅读次数:
268
Creating a selection filter that finds dynamic blocks in AutoCAD using .NETAn interesting question came in via email from Rob Outman. He’s interested ...
分类:
其他好文 时间:
2014-07-09 13:51:57
阅读次数:
324
系统自带的UIAlertView只能支持delegate方式. 如果你只有一个UIAlertView这种方式可能无关紧要. 但如果你有二个或多个UIAlertView, 你需要在委托方法中进行判断是哪个UIAlertView实例的产生的委托, 接着又要判断是响应哪个button. 如果你曾经这样做过, 想想这是多杂的代码. Objective-C是支持块代码的, 如果对UIAlertView添加块...
分类:
其他好文 时间:
2014-07-09 09:55:44
阅读次数:
256
题意:给你正视和侧视图,求最多多少个,最少多少个
思路:贪心的思想,求最少的时候:因为可以想象着移动,所以我们统计每个视图不同高度的个数,然后计算,至于的话,就是每次拿正视图的高度去匹配侧视求最大
#include
#include
#include
#include
using namespace std;
const int MAXN = 1000;
int k;
int vie...
分类:
其他好文 时间:
2014-07-08 17:30:56
阅读次数:
149
POJ 3734 Blocks 矩阵快速幂 组合数学...
分类:
其他好文 时间:
2014-07-08 14:21:17
阅读次数:
274
Divide an array into the maximum number of same((-))sized blocks, each of which should contain an index P such that A[P - 1] A[P + 1].
分类:
其他好文 时间:
2014-07-06 15:30:31
阅读次数:
465
Consecutive Blocks
Time Limit: 2 Seconds
Memory Limit: 65536 KB
There are N (1 ≤ N ≤ 105) colored blocks (numbered 1 to
N from left to right) which are lined up in a row. And the i-th b...
分类:
其他好文 时间:
2014-07-01 06:51:52
阅读次数:
218
Blocks are a way to define a block of code that you will use at a later time.Sometimes people refer to blocks as anonymous functions because they are ...
分类:
其他好文 时间:
2014-06-30 15:21:04
阅读次数:
220
《STL源码剖析》中,指出SGI STL的list底层数据结构式循环双向链表,并且在链表尾端留一个空白节点,让end指向它。由于是双向的,那么list的迭代器必须是Bidirectional Iterator类别的。
下面,分别验证vs2010下和code blocks(gcc)下,list的底层实现是否是循环链表。
#include
#include
using namesp...
分类:
其他好文 时间:
2014-06-30 00:21:54
阅读次数:
202