Vasya's birthday is approaching and Lena decided to sew a patterned handkerchief to him as a present. Lena chose digits from 0 to n as
the pattern. The digits will form a rhombus. The largest digit ...
分类:
其他好文 时间:
2014-07-22 23:04:32
阅读次数:
412
STL 中取第 n 小数的算法 nth_element 的函数原型如下
template
void nth_element(RandomAccessIterator first, RandomAccessIterator nth, RandomAccessIterator last);
算法说明:
1、功能:执行 nth_element 后,nth 所指位置的元素将是整个区间有序时在该处的元素。对 [first, nth) 中的任意迭代器 i 和 [n...
分类:
其他好文 时间:
2014-07-22 23:03:14
阅读次数:
345
final类型的成员变量初始化值:
1、声明时候直接赋值
2、构造方法中赋值,如果一个类中有多个构造方法,就要保证在每个构造方法中都要完成对final类型变量的初始化工作
3、静态final成员变量必须在声明时赋值,且不能在构造方法中赋值
4、final成员变量指的是引用不能改变,即该变量的引用不能在指向其他的对象,但是对象的内容是可以改变的,比如stringbuffer可以通过append、remove等对该对象的内容作出改变。...
分类:
编程语言 时间:
2014-07-22 23:03:14
阅读次数:
348
题意:多维的曼哈顿最远距离
思路:做了1,2,3维的,其实就是枚举所有绝对值的可能的表达式
#include
#include
#include
#include
using namespace std;
const int MAXN = 100005;
const int M = 5;
const double inf = 1e200;
struct node{
double x...
分类:
其他好文 时间:
2014-05-01 17:31:01
阅读次数:
283
题目:寻找最长上升自序列。
代码:
#include
#include
#include
#include
using namespace std;
struct node
{
int w,s; //重量,速度
int num; //编号
int t; //用来记录当前编号...
分类:
其他好文 时间:
2014-05-01 17:17:32
阅读次数:
285
经常会遇到一个会话中存在sql性能问题,但无法定位哪一个sql导致DB性能问题较高,这是我们需要对这个session进行监控可以通过dbms_monitor包来实现。
首先确定要监控的会话sid及serial#,可以通过v$session视图获得
select sid, serial#, username from v$session where ...
确定session...
分类:
数据库 时间:
2014-04-30 22:23:38
阅读次数:
413
需求:把oracle数据库中符合条件的N多表,导出成csv文本文件,并以表名.csv为文件名存放。
实现:通过存储过程中UTL_FILE函数来实现。导出的csv文件放入提前创建好的directory中。
使用方法:使用以下命令数据预执行的SQL脚本
SELECT 'EXEC sql_to_csv(''select * from ' ||T.TABLE_NAME ||
'''...
分类:
其他好文 时间:
2014-04-30 22:11:40
阅读次数:
332
1. $('node+next') == $('node').next()
2. $('node~siblings') == $('node').nextAll();
3. :gt(index)大于index序号的的元素,从0开始
4. :lt(index)小于index序号的元素,从0开始
4. :header 获取所有h1,h2,h3,h4...的元素...
分类:
Web程序 时间:
2014-04-29 13:45:20
阅读次数:
322
在11g中,默认自动收集统计信息的时间为晚上10点(周一到周五,4个小时),早上6点(周六,周日,20个小时),如下所示:
select a.window_name, a.repeat_interval,a.duration
from dba_scheduler_windows a, dba_scheduler_wingroup_members b
where a.window_na...
分类:
数据库 时间:
2014-04-29 13:28:21
阅读次数:
469
mysql> select * from a
;
+----+------+--------------+
| id | name | descri |
+----+------+--------------+
| 1 | a1 | 我是第一个a1 |
| 2 | a2 | 我是第一个a2 |
| 3 | a3 | 我是a3 |
| 4...
分类:
其他好文 时间:
2014-04-29 13:16:21
阅读次数:
228