- 博客(14)
- 资源 (7)
- 问答 (1)
- 收藏
- 关注
原创 Effective Java,Item2——Consider a builder when faced with many constructor parameters
构造函数和静态方法都有一个限制:不适合当有大量的参数时,去生成实例。 通常来说,你会采用 Telescoping constructor pattern public class NutritionFacts { private final int servingSize;// (mL) required private final int servings;// (per
2016-01-15 11:53:37 585
原创 Effective Java——Item 1,Consider static factory methods instead of constructors
Advantages: 静态工厂方法不像构造方法,他可以有自己的名字。
2016-01-14 13:21:39 436
原创 图片显示浏览器兼容问题
function getNatural(DOMelement){var img = new Image();img.src = DOMelement.src;return {width: img.width, height: img.height};}$(document).ready(function(){$("#divPreview").html('/cp/cardmanage?method=
2014-07-28 13:07:30 624
原创 JavaWeb遇到的问题
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/Logistics]] at java
2014-05-20 17:56:39 576
原创 考研复试
由于是二战,觉得考研这一路是比较虐心的。很感谢这一路陪伴我的爱人,我的老妈,还有我的老姨。觉得老公给我的精神鼓励和辅导是最大的帮助。谢谢他们! 自己由于是个小菜鸟,所以近来去玉泉的一些见闻,是鄙人深受打击和备受鼓舞。面试的前一天晚上,和卿大牛一起吃的饭,聊了下她最近的事情。20多度的天,看她还穿着羽绒衣,可以看出由于长时间不运动,体质已经明显下降。每天晚上都要工作到凌晨3点左右,真
2014-03-26 14:43:55 643
原创 05浙大机试 排名
#include #include #include using namespace std; typedef struct Stu{ int score; char no[25]; bool operator if(score != a.score){ return (score > a.score); } int tmp = strcmp(no, a.no);
2014-03-20 15:59:16 587
原创 浙大05机试 开门人和关门人
#include #include #include using namespace std; typedef struct Stu{ char no[25]; int h1, h2; int m1, m2; int s1, s2; bool operator if(h1 != a.h1){ return (h1 } else if(m1 != a.m1){
2014-03-20 15:57:28 435
原创 浙大05机试 畅通工程
#include using namespace std; int tree[1005]; int Find_Root(int x){ if(tree[x] == -1){ return x; } else{ int tmp = Find_Root(tree[x]); tree[x] = tmp; return tmp; } } int main() { int n
2014-03-20 15:54:38 447
原创 浙大05机试 最大连续子序列
#include using namespace std; int main() { int n; int a[10005]; while(cin >> n){ int i; if(n == 0){ break; } for(i = 0; i cin >> a[i]; } int s = -1, t = -1, tmp = 0; int max = -1, sum
2014-03-20 15:51:15 438
原创 浙大05机试A + B
#include #include using namespace std; int GetNum(string a){ if(a == "one"){ return 1; } if(a == "two"){ return 2; } if(a == "three"){ return 3; } if(a == "four"){ return 4; } if(a =
2014-03-20 15:48:53 426
原创 浙大pat Advance 1003
#include #include #define MAXLEN 500 using namespace std; typedef struct Node{ int next; //相邻节点的几点编号 int len; }Node; int main() { vector v[MAXLEN]; int n, m, c1, c2; while(cin >> n >> m
2014-03-16 14:48:24 498
Java Web遇到的问题,求高人指点
2014-05-20
TA创建的收藏夹 TA关注的收藏夹
TA关注的人