元素模式(最新Jolt大奖得主彻底颠覆传统GoF设计模式的里程碑著作)【美】JasonMcC.Smith(杰森.史密斯)著高博凌杰徐平平译ISBN978-7-121-23468-22014年6月出版定价:69.00元364页16开编辑推荐本书介绍一类全新的设计模式——元素模式(ElementalDesignPattern)。元素模式植根..
分类:
其他好文 时间:
2014-07-30 17:47:25
阅读次数:
335
PreparedStatement获取自动生成键使用可以获取自动生成键方法Statement.RETURN_GENERATED_KEYS表示返回生成键PreparedStatementpstmt=conn.prepareStatement(sql,Statement.RETURN_GENERATED_KEYS);//获取生成键的结果集ResultSetrls=pstmt.getGeneratedKeys();getGeneratedKey..
分类:
其他好文 时间:
2014-07-30 17:47:14
阅读次数:
179
Two elements of a binary search tree (BST) are swapped by mistake.
Recover the tree without changing its structure.
Note:
A solution using O(n)
space is pretty straight...
分类:
其他好文 时间:
2014-07-30 17:46:04
阅读次数:
244
A - Colored Sticks
Time Limit:5000MS Memory Limit:128000KB 64bit IO Format:%I64d & %I64u
Submit Status
Description
You are given a bunch of wooden sticks. Each endpoint of each...
分类:
其他好文 时间:
2014-07-30 17:45:54
阅读次数:
246
The Accomodation of Students
Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 2244 Accepted Submission(s): 1056
Problem Description
There a...
分类:
其他好文 时间:
2014-07-30 17:45:44
阅读次数:
266
B - Balance
Time Limit:1000MS Memory Limit:30000KB 64bit IO Format:%I64d
& %I64u
Submit Status
Description
Gigel has a strange "balance" and he wants to poise it. Actually, t...
分类:
其他好文 时间:
2014-07-30 17:45:24
阅读次数:
271
//16进制颜色(html颜色值)字符串转为UIColor
+(UIColor *) hexStringToColor: (NSString *) stringToConvert
{
NSString *cString = [[stringToConvert stringByTrimmingCharactersInSet:[NSCharacterSet whites...
分类:
其他好文 时间:
2014-07-30 17:44:54
阅读次数:
231
#include
#include
#include
using namespace std;
struct node{
int x , y ;
} p[2600];
int q[1200] ;
bool cmp(node a,node b)
{
return a.y < b.y || ( a.y == b.y && a.x < b.x ) ;
}
int main()
{...
分类:
其他好文 时间:
2014-07-30 17:44:44
阅读次数:
219
在大矩形中找一个小矩形
使小矩形包含的*最多
暴力或者DP 水题
暴力:
#include "stdio.h"
#include "string.h"
int main()
{
int n,m,w,i,s,t,j,k,l,ans,sum,x,y;
int map[101][101];
while (scanf("%d",&w)!=EOF)
...
分类:
其他好文 时间:
2014-07-30 17:44:24
阅读次数:
201
F - Dragon Balls
Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d
& %I64u
Submit Status
Description
Five hundred years later, the number of dragon balls will increa...
分类:
其他好文 时间:
2014-07-30 17:44:23
阅读次数:
282
#include
#include
using namespace std;
typedef struct node
{
int val;
node *next;
}node;
node * create_list();
void traverse_list(node *pHead);
int get_len_list(node *pHead);
bool delete_list(no...
分类:
其他好文 时间:
2014-07-30 17:43:54
阅读次数:
237
大二上的时候,写过一个AVL的操作演示,今天一看Splay,发现和AVL其实一样,加上线段树的基础,懒惰标记什么都知道,学起来轻松许多哦
我参考的模板来自这里 http://blog.csdn.net/u013480600/article/list/2
里面有大量的ch[r][0] ch[r][1]等 我建议用宏定义取代,写的时候方括号少打了很多,等做的题多得时候,我再把自己使用的模板发来
...
分类:
其他好文 时间:
2014-07-30 17:43:44
阅读次数:
263
Tcl作为一种脚本语言具有非常高的效率,因此在实际的设计中我们可以采用TCl来完成一些对性能要求不是很高但是用C却需要很长开发周期的任务,而只把执行时间有很高的要求的部分采用C语言设计
1 在C中引用TCL时要包含头文件编写,c中的所有tcl命令均通过TCL解释器Tcl_Interp完成。他是一个C结构体
主要的函数有
Tcl_Interp * Tcl_CreateInterp();//产生...
分类:
其他好文 时间:
2014-07-30 17:43:34
阅读次数:
1060
这道题目,算数学题吗?算二分题吗?充其量算个水题吧...
首先,没有用二分,但是发现了一种新的解法来代替二分。
若果按照i从0,每次增加0.00000001来一直枚举到h的话,绝逼超时。枚举量太大了
但是可以分成两步来呀:
#include
#include
#define pai acos(-1.0)
double r1,r2,h,v;
double get_v(double temp...
分类:
其他好文 时间:
2014-07-30 17:43:14
阅读次数:
208
I NEED A OFFER!
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 15669 Accepted Submission(s): 6210
Problem Description
Speakless很早就想...
分类:
其他好文 时间:
2014-07-30 17:42:14
阅读次数:
219
在阅读Linux Driver源代码时,我们经常会在文件的结尾处看到诸如:MODULE_AUTHOR、MODULE_DESCRIPTION、MODULE_LICENSE等宏定义,这些宏主要是定义了一些模块信息。但这些模块信息具体是怎么加到模块里的?就需要深入分析一下这些宏定义具体是怎么定义的。下面我们以MODULE_AUTHOR为例,来具体分析一下有关module信息的宏。
首先,我门来看一下M...
分类:
其他好文 时间:
2014-07-30 17:42:04
阅读次数:
272