码迷,mamicode.com
首页 >  
搜索关键字:frequent values    ( 8692个结果)
android之初识Intent
首先修改values\strings.xml文件代码如下: mytab Settings Intent操作 发送Intent的Activity程序. 接收Intent的Activity程序. 然后定义send_main.xml文件代码如下: 相应的定义Send.ja...
分类:移动开发   时间:2014-09-23 13:26:34    阅读次数:181
Leetcode_num6_Unique Binary Search Trees
题目: Given n, how many structurally unique BST's (binary search trees) that store values 1...n? For example, Given n = 3, there are a total of 5 unique BST's. 1 3 3 2...
分类:其他好文   时间:2014-09-22 20:55:03    阅读次数:203
【POJ】3368-Frequent values(RMQ或线段树)
RMQ和线段树都能过,而且时间都500MS左右。 这道题主要还是思路的问题,特殊处理l,r所在的区间,中间的区间就用线段树区间求最值解决,想上去了代码很好实现。 RMQ代码: #include #include #include #include #include #include #include #include #include #include #include using name...
分类:其他好文   时间:2014-09-22 20:35:53    阅读次数:127
The Django Book的一个view函数改用django模板实现
view函数#views.pydefdisplay_meta(request): values=request.META.items() values.sort() html=[] fork,vinvalues: html.append(‘<tr><td>%s</td><td>%s</td></tr>‘%(k,v)) returnHttpResponse(‘<table>%s</table>‘%‘\n‘.joi..
分类:其他好文   时间:2014-09-22 19:55:53    阅读次数:251
Binary Tree Preorder Traversal
[leetcode]Given a binary tree, return the preorder traversal of its nodes' values....
分类:其他好文   时间:2014-09-22 13:38:03    阅读次数:215
Spring中SimpleJdbcTemplate的更新操作
SimpleJdbcTemplate更新操作 String insertsql="insert into users values(2,'lisi',2)";         //向表中插入一行记录,row表示受影响的行数          int row=stj.update(insertsql);                System.out.println(row);//1...
分类:数据库   时间:2014-09-22 11:00:02    阅读次数:255
三层之D层数据库操作
前提: 三层中我们已经知道D层主要的作用是针对数据库,进行基本的操作(数据连接和增删该查功能) 1、基本的sql语句 查:SELECT 字段名列表 FROM 数据表名  where"条件" 增 INSERT INTO 表名(字段名1,字段名2..)VALUES("表达式1","表达式2") 该 UPDATE 表名 SET 字段名1 ="表达式1",字段名2 ="表达式2".... W...
分类:数据库   时间:2014-09-22 00:27:01    阅读次数:292
MySQL5.5+版本关于日期类型的修改
数据库字段:create_date,类型为datetime执行以下SQL语句 insert into XX (create_date) values (?)参数传递为 new java.util.Date()报错如下:Datatruncation:Incorrectdatetimevalue:''f...
分类:数据库   时间:2014-09-21 18:14:31    阅读次数:182
HashMap和HashSet原理及底层实现
HashMap底层用哈希算法实现,下面看一下哈希算法的整体概括: 当map.put(“key”,”values”);的时候,底层是这样的:   static final Entry[] EMPTY_TABLE = {};    transient Entry[] table = (Entry[]) EMPTY_TABLE;  /** * The number of key-...
分类:其他好文   时间:2014-09-21 16:37:10    阅读次数:361
一条insert语句批量插入多条记录 AND 多条件游标更新 变CASE WHEN更新法提高速度
一条insert语句批量插入多条记录常见的insert语句,向数据库中,一条语句只能插入一条数据:insertintopersons(id_p,lastname,firstName,city)values(204,'haha','deng','shenzhen');(如上,仅插入了一条记录)怎样一次...
分类:其他好文   时间:2014-09-20 18:37:49    阅读次数:273
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!