- 浏览: 49777 次
- 性别:
- 来自: 大连
最新评论
-
sunlz19891215:
楼主厉害啊!很有用的
面试题:一个存放字符串的ArrayList,请按照字符串的长度进行排序 -
EldonReturn:
gog 这种对称的情况呢?
输入一个字符串,输出该字符串中对称的子字符串的最大长度。 -
hudingchen:
chriszeng87 写道这个效率也太低了吧看了帖子,就随便 ...
随机数构成的数组中找到长度大于=3的最长的等差数列 -
chriszeng87:
这个效率也太低了吧
随机数构成的数组中找到长度大于=3的最长的等差数列
文章列表
Oracle中,varchar2 最大长度
- 博客分类:
- Oracle
1.当表的字段类型是varchar2时,无论是varchar2(4000 char)还是varchar2(4000 byte),最大长都是4000字节。
2.当在plsql中的变量是varchar2时,最大长是32767字节。
3.当func的参数类型是varchar2时,最大长是32767字节。
4.当func的返回值类型是varchar2时,最大长是4000字节。
mongoimport -d stock_modeling -c t_tick --type csv --file SH#600000.csv --fields stock_code,tick_time,open,high,low,close,volume,turn_volume,restoration_right,exchange
Interface ChannelPipeline
public interface ChannelPipeline extends Iterable<Map.Entry<String,ChannelHandler>>
A list of ChannelHandlers which handles or intercepts inbound events and outbound operations of a Channel. ChannelPipeline implements an advanced form of the Intercepting Filter ...
jdk :
https://www.digitalocean.com/community/tutorials/how-to-install-java-on-ubuntu-with-apt-get
mysql:
https://help.ubuntu.com/12.04/serverguide/mysql.html
mongodb:
http://askubuntu.com/questions/147135/how-can-i-uninstall-mongodb-and-reinstall-the-latest-version
SELECT t2.team,
MIN(t2.y) start_hm,
MAX(t2.y) end_hm
FROM (
SELECT team,y,y - rank y1 from (
SELECT tmp.team,
tmp.y,
IF(@groupid = tmp.team,@rank := @rank + 1,@rank := 1) AS rank,
@groupid := tmp.te ...
最近看到一个问题(原帖地址:http://topic.csdn.net/u/20120604/09/b56a0996-3c5a-4c35-9423-8b68d1284db6.html)
-- 表TB1
START_ID END_ID
---------- ----------
1 3
4 6
7 9
10 12
13 15
16 18
19 ...
Clean Code
- 博客分类:
- Java
//bad
private void printGuessStatistics(char candidate, int count) {
String number;
String verb;
String pluralModifier;
if (count == 0) {
number = "no";
verb = "are";
pluralModifier = "s";
} else if (count == 1) {
...
菜单自动展开(js实现)
- 博客分类:
- JavaScript
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Untitled
</title>
<script>
window.onload = function() {
var childs = document.getElementById("container") ...
db_file_multiblock_read_count = 32
実行計画
----------------------------------------------------------
0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=35 Card=1 Bytes=13)
1 0 SORT (AGGREGATE)
2 1 TABLE ACCESS (FULL) OF 'T1' (TABLE) (Cost=35 Card=9872 Bytes=128336)
db_fil ...
Oracle的行列转换
- 博客分类:
- Oracle
行转列:
1.列固定的情况,通过max+decode变换。
WITH t AS (
SELECT 1 tid,'A' typeid, 'book1' typename FROM DUAL UNION ALL
SELECT 1 tid,'B' typeid, 'apple1' typename FROM DUAL UNION ALL
SELECT 1 tid,'C' typeid, 'phone1' typename FROM DUAL UNION ALL
SELECT 1 tid,'D' typeid, 'eye1' typename FROM ...
当表的字段个数很多的时候,取得所有字段都是null的个数
字段很少的时候,可以这么写:
select count(*) from tb where a is null and b is null ...
字段很多的时候就不是很方便了,下面用动态sql实现。
DECLARE
TYPE myref IS REF CURSOR;
cur myref;
sqlStr VARCHAR2(200);
tb_name VARCHAR2(20);
TYPE arrays IS TABLE OF VARCHAR2(20) INDEX BY B ...
-- 需求:求出下表指定日期的每个TYPE_ID的新增客户和累计新增客户,
-- 20110703的新增客户=去重(20110703的手机号 MINUS (20110701+20110702的手机号))
-- 20110703累计新增客户 = 去重((20110703+20110702)的手机号 MINUS 20110701的手机号))
SQL> select * from tab;
DATE_ID TYPE_ID USER_PHONE
-------------------- -------------------- ...
官方文档有如下说明:
FIRST/LAST Functions
The FIRST/LAST aggregate functions allow you to return the result of an aggregate applied over a set of rows that rank as the first or last with respect to a given order specification. FIRST/LAST lets you order on column A but return an result of an aggregate applied ...
-- 需求:求出下表的一个小时内id个数的最大值和最小值。
SQL> WITH t AS (
2 SELECT 1 "id",TO_DATE('2011-04-27 14:05:12','yyyy-mm-dd hh24:mi:ss') c_time FROM DUAL UNION ALL
3 SELECT 2,TO_DATE('2011-04-27 15:10:42','yyyy-mm-dd hh24:mi:ss') FROM DUAL UNION ALL
4 SELECT 3,TO_DATE('2011-04-27 15:20:52',' ...
-- 根据公式:log(a)(MN)=log(a)(M)+log(a)(N)
SQL> SELECT POWER(10, SUM(LOG(10, LEVEL)))
2 FROM DUAL
3 CONNECT BY LEVEL <= 6;
POWER(10,SUM(LOG(10,LEVEL)))
----------------------------
720