FrmMain.cs中存在问题 1. int i=0 设定为了全局常量且未在类顶部,出现问题时不好查找
i 属于常用临时变量,设定全局变量容易引起混乱 2.定义的全局变量但仅在一处方法中使用,定义全局变量过多
3.变量名及控件名等意义不明确又缺少注释,如顶部定义的全局变量 long length =...
分类:
其他好文 时间:
2014-05-12 13:51:01
阅读次数:
370
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
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
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
很简单的题目,一次过,注意为数组空的时候,应返回0而非null 1 public class
Solution { 2 public int searchInsert(int[] A, int target) { 3 int i; 4 if
(A.length...
分类:
其他好文 时间:
2014-05-10 06:51:21
阅读次数:
288
/** * Created by rabbit on 2014-5-9. */ class
ArrayTest2 { public static void BubbleSort(int [] arr) //创建冒泡排序方法 { for (int
x=0;x<arr.length-1;x++) ...
分类:
编程语言 时间:
2014-05-10 06:39:45
阅读次数:
355
int BubbleSort(int a[]){ int length =
sizeof(a)/sizeof(int); int i,j; int temp; for(i = 0;i i;j--) { if(a[j] <
a[j-1]) { ...
分类:
其他好文 时间:
2014-05-10 03:24:40
阅读次数:
233