a、利用UIBezierPath在DrawRect:中绘制一个给定颜色的三角位图,代码如下:- (void)drawRect:(CGRect)rect{ // Drawing code UIBezierPath *path = [UIBezierPath bezierPath]; [path m.....
分类:
其他好文 时间:
2014-07-16 23:03:57
阅读次数:
161
find [起始目录] 寻找条件 操作还有种表述方式:find PATH OPTION [-exec COMMAND { } \;]因为find命令会根据我们给的option,也就是寻找条件从我们给出的目录开始对其中文件及其下子目录中的文件进行递归搜索,所以我觉的这个地方说是“起始目录”是非常好的。...
分类:
系统相关 时间:
2014-07-16 23:03:03
阅读次数:
332
在VM-->removableDevice-->CD DVD-->加载iso镜像文件:[root@rusky2 mnt]# mount /dev/cdrom /mnt/cdrom mount: block device /dev/cdrom is write-protected, mounting ...
分类:
系统相关 时间:
2014-07-16 22:57:28
阅读次数:
247
保存用户对询问的回答结果,作为进一步推理的条件
还是从GOAL段开始。起始句是write_startform()
write_startform():-
write("\n").
注意!上一句应为write("\n").
GENI虚拟主机没有“cgi-bin”这个子目录。
在GOAL中,紧跟上一句的是assert_conditions(ParmList1)
assert_conditions(...
分类:
Web程序 时间:
2014-07-11 00:18:19
阅读次数:
226
Algorithm.( Augmenting Path Algorithm )
Input:
An X-Y bigraph G, a matching M in G,
and the set U of M-unsaturated vertices in X.
Idea:
Explore M-alternating paths form...
分类:
其他好文 时间:
2014-07-10 23:03:47
阅读次数:
211
前言
一般的排序都是需要进行关键字的比较的。有没有不需要比较的的呢?有的,计数排序就是其中一种。
计数排序
假设输入序列都是0到k之间的整数,则可使用计数排序。具体操作是这样的:创建一个同类型同等大小的临时数组temp,用于备份输入序列。创建一个整型大小为k的数组count,用于统计序列中各元素出现的次数。接下来只需把备份序列从大到小放回原数组即可。一个示例图:...
分类:
其他好文 时间:
2014-07-10 22:59:17
阅读次数:
252
在进行JNI调用的时候,是由java的本地接口调用本地库文件来完成的,但是本地库文件需要放置到指定位置,JNI接口才能调用到,这个路径是由JVM的系统变量“java.library.path”指定的。大家可以将这个变量所指定的路径打印出来 例如:System.getProperty("java.library.path")。 在windows环境下可以看到执行的目录是什么C:/windows/sy...
分类:
其他好文 时间:
2014-07-10 21:10:25
阅读次数:
162
在命令行敲一串长的命令,枯燥麻烦。
#coding:utf-8
import sys
import os
import subprocess
if len(sys.argv) == 2:
#节省输入,不输入后缀
#直接使用参数的第2个值
file = sys.argv[1] + '.ui'
#检查输入文件是否存在
if not os.path.e...
分类:
其他好文 时间:
2014-07-10 20:17:25
阅读次数:
157
Description
Magic Numbers
Write a program that finds and displays all pairs ofintegers and
such that:
neither nor
have any digits repeated; and , where
N is a given i...
分类:
其他好文 时间:
2014-07-10 20:10:06
阅读次数:
238
经验:当std::swap对你的类型效率不高时,提供一个swap成员函数,并确定这个函数不抛出异常
示例:
stl里的swap算法
namespace std{
template
void swap(T &a, T &b){
T temp(a);
a = b;
b = temp;
}
}
//“pimpl手法”(pointer to implementation) --> 文件间的编译依存度
class WidgetImpl{
public:
//...
pr...
分类:
编程语言 时间:
2014-07-10 19:35:50
阅读次数:
240