一、eval() //执行一段字符串中的javascript代码。 语法:eval(code); //可以将javascript写在字符串里面执行。 var str = "document.write('你好!');" eval(str);二、EvalError...
分类:
编程语言 时间:
2014-08-04 13:26:37
阅读次数:
253
题目链接:
啊哈哈,选我选我
思路是:对猜测的字符串进行扫描。。看最后猜错的次数是不是大于等于7,还有就是已经踩过的数字在猜算错误,所以用map判一下重即可。。如果知道这个坑,那么就是水马题。
Hangman Judge
In ``Hangman Judge,'' you are to write a program that j...
分类:
其他好文 时间:
2014-08-04 11:12:07
阅读次数:
263
1. 引用上一层目录import syssys.path.append('..')import xx2. python jsonJSON是一种轻量级的数据交换格式。可以解决数据库中文存储问题,对象序列化问题,等等。import jsonencodedjson = json.dumps(obj)d.....
分类:
编程语言 时间:
2014-08-04 10:50:16
阅读次数:
232
eDMA是enhanced Direct Memory Access的简称,即增强型直接内存存取。它是用于快速数据交换的重要技术,具有独立于CPU的后台批量数据传输能力,能够满足实时处理中高速数据传输的要求。在ColdFire系列MCU中的MCF5329EVB平台上实现的音频系统,为了满足系统的实时...
分类:
其他好文 时间:
2014-08-04 10:33:46
阅读次数:
235
字符串:string s="ab";string s1="a\nb";//n:newline或者next的意思。string s="a\\b";string s="c:\\temp\\fasdf\\dd\\aaa\\1.jpg";stirng s="\\\\";string s=@"\\\\"; /...
分类:
其他好文 时间:
2014-08-04 08:18:06
阅读次数:
229
/**pRoot接收要检索的树的根节点,pNode是要确认深度的结点 path存储从根结点到pNode的所有节点,包括了pNode和根节点*/void findPath(BinaryTreeNode *pRoot, BinaryTreeNode *pNode, vector &path){ if (...
分类:
其他好文 时间:
2014-08-04 01:54:46
阅读次数:
230
例如:文件A的路径是/home/web/lib/img/cache.php文件B的路径是/home/web/api/img/temp/show.php那么,文件A相对于文件B的路径是../../lib/img/cache.phpfunctiongetRelativePath($urla,$urlb){
/*******第一步:获取两个文件的相同路径并去掉*****/
//获取路径名
$a_dirnam..
分类:
Web程序 时间:
2014-08-03 23:32:16
阅读次数:
293
//冒泡排序publicvoidmaoPaoSort(intarr[]){
for(inti=0;i<arr.length-1;i++){
for(intj=0;j<arr.length-1-i;j++){
setHuan();
}
}
}
//数组元素的交换方法
publicvoidsetHuan(int[]arr,inti,intj){
if(a[i]>a[j]){
inttemp=a[j];
a[j]=a[i];
a[i]=temp;
}
}
//直接排..
分类:
其他好文 时间:
2014-08-03 23:30:38
阅读次数:
263
很自然想起来递归:
代码:
#include
#include
using namespace std;
typedef struct tree1{
int data;
struct tree1 * lchild;
struct tree1 * rchild;
}Tree,* pTree;
void createTree(pTree & p){
int temp ;
scan...
分类:
其他好文 时间:
2014-08-03 23:23:58
阅读次数:
267
//使用数组queue[ ]存放结点队列void BFS( ) { head=0; tail=1; queue[head]=首结点的值; while (head<tail) //队列不空 { temp=tail; for (k=head; k<=ta...
分类:
其他好文 时间:
2014-08-03 23:03:16
阅读次数:
250