javascript不能支持函数的重载,如下:function f(length) {
alert("高为:"+length); } function f(length,width) {
alert("高为:"+length+",宽为:"+width); } 上面那段代码其实是行不通...
分类:
Web程序 时间:
2014-05-12 04:18:43
阅读次数:
407
1、格式化字符串操作String.prototype.format = function(args)
{ if (arguments.length>0) { var result = this; if (arguments.length == 1
&& typeof (args) == "objec...
分类:
编程语言 时间:
2014-05-12 04:17:43
阅读次数:
314
//基本类型for(int i=0;i<d.length;i++){for(int
j=i+1;j<d.length;j++){if(d[i]<d[j]){double
temp=d[i];d[i]=d[j];d[j]=temp;基本类型排序,需要注意2点,1,排序过程中,需要引用中间值,类似2个瓶...
分类:
其他好文 时间:
2014-05-12 02:53:40
阅读次数:
257
开发网站时,经常需要网站中有上传文件的功能,上传文件的功能有两种:将文件名称保存到数据库,文件保存到服务器指定位置;将文件直接保存到数据库中 该方法介绍
将文件以二进制的形式保存到数据库中 (可以保存word文档,记事本文本,图片,压缩包……) if (this.Fi...
分类:
数据库 时间:
2014-05-12 00:40:15
阅读次数:
325
链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=151
For each list of words, output a line with each word reversed without changing the order of the words.
This problem contains multi...
分类:
其他好文 时间:
2014-05-11 22:20:43
阅读次数:
443
function getServiceUrl() {
var serverUrl = Xrm.Page.context.getServerUrl();
if (serverUrl.match(/\/$/)) {
serverUrl = serverUrl.substring(0, serverUrl.length - 1);
}
retur...
分类:
其他好文 时间:
2014-05-11 22:01:16
阅读次数:
261
Squares
Time Limit: 3500MS
Memory Limit: 65536K
Total Submissions: 15489
Accepted: 5864
Description
A square is a 4-sided polygon whose sides have equal length and adja...
分类:
其他好文 时间:
2014-05-11 20:56:36
阅读次数:
416
题意:417 - Word Index
题意:每个字符串按题目中那样去映射成一个数字,输入字符串,输出数字
思路:这题还是比较水的,由于一共只有83000多个数字,所以对应一个个数字去映射就可以了,注意字符串进位的情况处理即可
代码:
#include
#include
#include
#include
using namespace std;
char str[10];
ma...
分类:
其他好文 时间:
2014-05-11 20:49:23
阅读次数:
428
Given an array of words and a length L, format
the text such that each line has exactly L characters and is fully (left and
right) justified.You shoul...
分类:
其他好文 时间:
2014-05-11 15:15:29
阅读次数:
287
这道题之前一直没敢做,没想到前天用递归一遍过了。。
当时为什么想着用递归,而不是dp呢,因为我想到达某个位置的情况有很多,即使从当前位置开始的搜索是已知的,但之前的状态是怎样的也无从得知啊,实话实说,我是不会用dp解这个。。
递归的思路就好说多了,从当前点开始,有上下左右四个位置可以探测,如果探测成功的话,要把当前的位置用其他符号标记出来,以免重复访问。实际上就是DFS嘛,只不过入口多一些。
...
分类:
其他好文 时间:
2014-05-11 14:20:56
阅读次数:
321