一、开始调式下面的程序,发现Button在js中设置disabled后无法执行后台代码(btnsave_Click)问题二、有的朋友会认为在js代码后面加上
return true就可以了,但这样也是不可行的。 OnClientClick是执行客户端代码,客户端被禁用了,OnClick是在Subm....
分类:
其他好文 时间:
2014-05-21 23:14:54
阅读次数:
4645
/** * 获取上一年第一天的时间 返回yyyy-MM-dd * * @param enDate *
@return */public Date getPreviousYearFirst(Date enDate) {Date date =
enDate;SimpleDateFormat dateF....
分类:
其他好文 时间:
2014-05-21 22:15:15
阅读次数:
370
package com.bupt.acm;import
java.util.Scanner;public class HeapSort { private int getLeft(int i){ return
2*(i+1)-1; } private int ...
分类:
其他好文 时间:
2014-05-21 22:01:39
阅读次数:
246
【题目】
Given an unsorted integer array, find the first missing positive integer.
For example,
Given [1,2,0] return 3,
and [3,4,-1,1] return 2.
Your algorithm should run in O(n) time and uses constant space.
【题意】
给定一个数组,找出第一个缺失的正数。时间复杂度O(n)
...
分类:
其他好文 时间:
2014-05-21 17:13:07
阅读次数:
219
#include
#include
using namespace std;
class Point
{
public:
Point(double a,double b):x(a),y(b) {}
double getx()
{
return x;
}
double gety()
{
return y;
...
分类:
其他好文 时间:
2014-05-21 10:09:26
阅读次数:
309
/**
* 多重背包:
* 有N种物品和一个容量为V的背包。第i种物品最多有Mi件可用,
* 每件耗费的空间是Ci,价值是Wi。
* 求解将哪些物品装入背包可使这些物品的耗费的空间总和不超过背包容量,且价值总和最大。
*/
#include
#include
int max(int a, int b){
if (a > b)return...
分类:
其他好文 时间:
2014-05-21 10:00:56
阅读次数:
206
题目:
Given an array of integers, find two numbers such that they add up to a specific target number.
The function twoSum should return indices of the two numbers such that they add up t...
分类:
其他好文 时间:
2014-05-21 07:42:18
阅读次数:
230
Reverse a linked list from position m to n. Do it in-place and in one-pass.
For example:
Given 1->2->3->4->5->NULL, m = 2 and n =
4,
return 1->4->3->2->5->NULL.
Note:
Given m, n satisfy the fol...
分类:
其他好文 时间:
2014-05-21 07:18:02
阅读次数:
301
SOl:将原题改为枚举N的每一对因子,计算其是否互素即可。
#include
#include
#include
using namespace std;
inline int gcd(int a,int b)
{
return b==0?a:gcd(b,a%b);
}
int main()
{
int n,T,i,j;
scanf("%d",&T);
while(T...
分类:
其他好文 时间:
2014-05-21 07:07:00
阅读次数:
273
【题目】
Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.
For example,
Given [0,1,0,2,1,0,1,3,2,1,2,1], return 6.
The above elevation map is represente...
分类:
移动开发 时间:
2014-05-21 06:44:38
阅读次数:
359