1.先看一下完善的代码,也就是最终的答案! function GetContent() { return CKEDITOR.instances.nEditor.getData();//这里nEditor是textarea的name值 } $("#btnAdd").click(function (.....
分类:
其他好文 时间:
2014-10-18 12:37:55
阅读次数:
234
//扩展方法$.extend($.fn.tree.methods, { getLevel:function(jq,target){ var l = $(target).parentsUntil("ul.tree","ul"); return l.length+1; ...
分类:
其他好文 时间:
2014-10-18 12:25:17
阅读次数:
283
格式化输出的控制
#include
int main(void){
float a=111123.681111f;
printf("%1.3f",a);
return 0;
}
结果:111123.680
所以1.3只是针对小数部分的。
格式化输入
#include
int main(void){
int a=0;
scanf("%8d\n",...
分类:
编程语言 时间:
2014-10-18 11:14:31
阅读次数:
217
//重点在于函数中需要手动push一些寄存器, 且以ebp为基址计算参数的地址.#include "stdafx.h"__declspec(naked)int strcmpA(char *s1, char *s2) //__declspec(naked) 不用编译器自动附带各种push ebp p....
分类:
其他好文 时间:
2014-10-18 10:58:06
阅读次数:
156
题目描述:Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".解题方案: 1 class Solution { 2 public: 3 s...
分类:
其他好文 时间:
2014-10-18 10:56:14
阅读次数:
160
共同点: 从右向左压栈实参. 压栈顺序: 1.压实参 2. 压EIP值 3.进入函数后,压EBP值......区别:__cdecl 返回后ADD ESP, 4 (一个int参数)__stdcall返回前 RETN 04 (一个int参数)__fastcall 如果只有两个参数,则不需...
分类:
其他好文 时间:
2014-10-18 09:42:23
阅读次数:
200
Then-queens puzzle is the problem of placingnqueens on ann×nchessboard such that no two queens attack each other.Given an integern, return all distinc...
分类:
其他好文 时间:
2014-10-18 07:33:43
阅读次数:
263
Follow up for N-Queens problem.Now, instead outputting board configurations, return the total number of distinct solutions.Solution:N-Queens 问题的简化版。pu...
分类:
其他好文 时间:
2014-10-18 07:32:25
阅读次数:
159
GivennumRows, generate the firstnumRowsof Pascal's triangle.For example, givennumRows= 5,Return[ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1]...
分类:
其他好文 时间:
2014-10-18 05:23:21
阅读次数:
275
将一个长为n的数组中左移或右移m位,比如数组 {1, 2, 3, 4, 5}右移3位之后就变成{3, 4, 5, 1, 2}。思路:1、整个数组倒置2、倒置后的数组中选取前m个元素倒置3、选取后n-m个元素倒置#include using namespace std;void reverse(int...
分类:
编程语言 时间:
2014-10-18 03:01:39
阅读次数:
167