/**
* 功能:宏处理定义
* 时间:2014年8月1日09:07:33
* 作者:cutter_point
*/
#include
#include
using namespace std;
#define PRINT(STR, VAR) cout<<STR "=" <<VAR<<endl; //这里宏定义之后,所有PRINT("STR", VAR)
//都会被cout之后的东西所覆盖...
分类:
编程语言 时间:
2014-08-12 22:15:24
阅读次数:
208
poj3261:http://poj.org/problem?id=3261题意:题解: 1 #include 2 #include 3 #include 4 using namespace std; 5 const int maxn=20010; 6 char str[maxn]; 7 int w...
分类:
其他好文 时间:
2014-08-12 21:41:34
阅读次数:
244
poj1743:http://poj.org/problem?id=1743题意:题解: 1 #include 2 #include 3 #include 4 using namespace std; 5 const int maxn=20010; 6 char str[maxn]; ...
分类:
其他好文 时间:
2014-08-12 21:37:44
阅读次数:
259
这个的解决方法其实挺简单的。只要在最外面的框架页面加个div,然后用parent.div的id就可以的。但是必须得弹出框得是一个页面。 //外层弹出框1 function openFirstWin(url, title, width, height) { var strWidth; var str....
分类:
其他好文 时间:
2014-08-12 21:35:34
阅读次数:
159
1. str*系列手写代码a. 一定要注意末尾'\0'的处理,切记切记b. 一定要对输入做有效性判断,多用断言就是了int Strlen(const char* str) { assert(str != NULL); const char* tmp = str; while (*t...
分类:
其他好文 时间:
2014-08-12 21:33:04
阅读次数:
265
poj2774:http://poj.org/problem?id=2774题意:题解: 1 #include 2 #include 3 #include 4 using namespace std; 5 const int maxn=220010; 6 char str[maxn]; ...
分类:
其他好文 时间:
2014-08-12 21:32:44
阅读次数:
267
1. gets与fgets gets函数原型:char*gets(char*buffer);//读取字符到数组:gets(str);str为数组名。 gets函数功能:从键盘上输入字符,直至接受到换行符或EOF时停止,并将读取的结果存放在buffer指针所指向的字符数组中。 读取...
分类:
其他好文 时间:
2014-08-12 21:27:24
阅读次数:
303
至于为什么要去实现对象的深度克隆,这里就不说了,直接说实现,也是看别人代码总结的: 1 function cloneObject( obj ) { 2 var str = ''; 3 var newObj = obj.constructor === Array ? [...
分类:
其他好文 时间:
2014-08-12 21:21:04
阅读次数:
183
代码如下,里面有注释,应该能看懂。function getFile(file_name) local f = assert(io.open(file_name, 'r')) local string = f:read("*all") f:close() return str...
分类:
系统相关 时间:
2014-08-12 18:51:24
阅读次数:
981
#include
#include
#include
using namespace std;
void ComStr(char *str, string &s,int m)
{
if (m == 0)
{
cout<<s<<endl;
return ;
}
if (*str != '\0')
{
s.push_back(*str);
ComStr(str+1,s ...
分类:
其他好文 时间:
2014-08-12 17:14:34
阅读次数:
223