//5种迭代器,为了激活重载机制,定义的5个类型。每种迭代器就是一个类型。
struct input_iterator_tag{};
struct output_iterator_tag{};
struct forward_iterator_tag : public input_iterator_tag{};
struct bidirectional_iterator_tag:public fo...
分类:
其他好文 时间:
2014-08-09 11:43:17
阅读次数:
275
1、绝对值函数
abs()仅对整型求绝对值
对浮点数求绝对值使用fabs()函数。
2、连接字符串函数-----strcat(a,b)
将字符串b连接在字符串a后面
注意:字符串a的大小要足以容纳a+b
3、
void f(int a)
{
int i,j,k;
for(i=1;i*i
fo...
分类:
其他好文 时间:
2014-08-09 09:08:07
阅读次数:
310
Binary Tree Level Order TraversalGiven a binary tree, return thelevel ordertraversal of its nodes' values. (ie, from left to right, level by level).Fo...
分类:
其他好文 时间:
2014-08-08 23:51:06
阅读次数:
265
要想明白struts的控制流程以及它核心API的实现原理(比如 Action/DispatchAction/ActionForm的实现原理),玩转struts1.2的关键就是能够玩转 ActionForm。
ActionForm的应用
1、——ActionForm的特性
1.创建一个form类必须继承于四个父类中的一个,比如ActionForm、ValidatorForm。
2.一个fo...
分类:
其他好文 时间:
2014-08-07 13:08:30
阅读次数:
242
function getdirallfiles($path){ $result=array(); $temp=array(); $dir=scandir($path); if($dir===false) { }else { fo...
分类:
Web程序 时间:
2014-08-07 12:54:19
阅读次数:
232
在根目录下的index.php前面加上以下这段代码即可;if(preg_match("/zh-cn/is",$_SERVER['HTTP_ACCEPT_LANGUAGE'])){ header("HTTP/1.1 404 Not Found"); header("Status: 404 Not Fo...
分类:
其他好文 时间:
2014-08-07 12:18:39
阅读次数:
185
题目:Validate if a given string is numeric.Some examples:"0" => true" 0.1 " => true"abc" => false"1 a" => false"2e10" => trueNote: It is intended fo...
分类:
编程语言 时间:
2014-08-06 04:10:20
阅读次数:
251
Problem HHelp is needed for DexterTime Limit: 3 SecondDexter is tired of Dee Dee. So he decided to keep Dee Dee busy in a game. The game he planned fo...
分类:
其他好文 时间:
2014-08-05 00:21:08
阅读次数:
315
【Camera’s Depth Texture】 In Unity a Camera can generate a depth or depth+normals texture. This is a minimalistic G-buffer texture that can be used fo....
分类:
其他好文 时间:
2014-08-02 15:05:33
阅读次数:
202
调用窗体(父):Form1,被调用窗体(子):Form2 方法1: 所有权法 //Form1: //需要有一个公共的刷新方法 public void Refresh_Method() { //... } //在调用Form2时,要把Form2的所有者设为Form1 Form2 f2 = new Fo...