自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(216)
  • 收藏
  • 关注

转载 转,Oracle中关于处理小数点位数的几个函数,取小数位数,Oracle查询函数

关于处理小数点位数的几个oracle函数()1. 取四舍五入的几位小数select round(1.2345, 3) from dual;结果:1.2352. 保留两位小数,只舍select trunc(1.2345, 2) from dual;结果:1.23select trunc(1.2399, 2) from dual;结果:1.233.取整数返回大于或等于x的最大整

2016-12-20 11:46:04 701

转载

// _ooOoo_// o8888888o// 88" . "88// (| -_- |)// O\ = /O//

2016-06-15 16:24:21 1007 2

转载 Oracle10G各版本下载以及补丁地址

转载地址:http://blog.chinaunix.net/uid-20802110-id-3338656.html下载OTN上的这些软件,你需要一个OTN免费帐号,不过如果通过迅雷进行下载,就不用登陆OTN了: Oracle Database 10g Release 2 (10.2.0.1.0) Enterprise/Standard E

2016-05-12 22:47:08 8456

转载 PL/SQL程序之存储过程和存储函数

点击打开链接http://blog.csdn.net/w_l_j/article/details/7380506点击打开链接http://czmmiao.iteye.com/blog/1815000存储过程和存储函数指存储在数据库中供所有用户程序调用的子程序叫存储过程、存储函数。创建存储过程:用CREATE PROCEDURE命令建立存储过程和存储函数。语法:c

2016-03-22 10:18:40 621

转载 PL/Sql 中创建、调试、调用存储过程

点击打开链接http://www.cnblogs.com/gossip/archive/2011/09/23/2186232.html存储过程   所用函数说明   功能:求和与差   原形:GetSumAndSub(p1 in number , p2 in number ,m out number , b out number)    参数:m=p1+p2 b=p1-

2016-03-21 20:06:10 410

转载 PL/SQL中游标和游标变量的使用

http://blog.csdn.net/junmail/article/details/1480395?ticket=ST-71275-43AdUsqM1AVgJX53a7vx-passport.csdn.net游标是什么:游标字面理解就是游动的光标。用数据库语言来描述:游标是映射在结果集中一行数据上的位置实体,有了游标用户就可以访问结果集中的任意一行

2016-03-21 17:05:11 708

转载 PLSQL:MERGE的用法

PLSQL:MERGE的用法MERGE INTO fzq1 aa --fzq1表是需要更新的表USING fzq bb -- 关联表ON (aa.id = bb.id) --关联条件WHEN MATCHED THEN --匹配关联条件,作更新处理 UPDATE SET aa.chengji = bb.chengji + 1, aa.name

2016-03-21 11:01:56 3165

转载 Oracle高级查询之OVER (PARTITION BY ..)

为了方便大家学习和测试,所有的例子都是在Oracle自带用户Scott下建立的。注:标题中的红色order by是说明在使用该方法的时候必须要带上order by。一、rank()/dense_rank() over(partition by ...order by ...)现在客户有这样一个需求,查询每个部门工资最高的雇员的信息,相信有一定oracle应用知识的同学都能写

2016-03-17 15:30:51 276

转载 case when

. CASE WHEN 表达式有两种形式--简单Case函数 CASE sex WHEN '1' THEN '男' WHEN '2' THEN '女' ELSE '其他' END --Case搜索函数 CASEWHEN sex = '1' THEN '男' WHEN sex = '2' THEN '女' ELSE

2016-03-16 12:35:50 342

转载 在oracle sql 中处理日期大全

在oracle中处理日期大全 TO_DATE格式 Day: dd number 12 dy abbreviated fri day spelled out friday ddspth spelled out, ordinal twelfth Month: mm number 03 mon abbreviated mar

2016-03-16 10:47:20 1580

转载 The connection to adb is down, and a severe error has occured.问题解决方法小结

The connection to adb is down, and a severe error has occured.问题解决方法小结遇到了几次这个问题:The connection to adb is down, and a severe error has occured.You must restart adb and Eclipse.Please en

2015-11-11 00:37:36 374

转载 web.xml文件的作用

每个javaEE工程中都有web.xml文件,那么它的作用是什么呢?它是每个web.xml工程都必须的吗? 一个web中可以没有web.xml文件,也就是说,web.xml文件并不是web工程必须的。 web.xml文件是用来初始化配置信息:比如Welcome页面、servlet、servlet-mapping、filter、listener、启动加载级别等。当你的web工

2015-09-28 21:54:24 272

转载 getAttribute()与getParameter的区别

当两个Web组件之间为转发关系时,转发源会将要共享 request范围内的数据先用setAttribute将数据放入到HttpServletRequest对象中,然后转发目标通过getAttribute方法来取得要共享的数据。而MVC中用的就是Web组件之间的转发。下面整理一下getParameter和getAttribute的区别和各自的使用范围。(1)HttpServletRe

2015-09-28 21:43:24 263

转载 九大内置对象

九大对象:内置对象(又叫隐含对象,有9个内置对象):不需要预先声明就可以在脚本代码和表达式中随意使用1-out:  javax.servlet.jsp.JspWriter类型,代表输出流的对象。作用域为page(页面执行期)request:javax.servlet.ServletRequest的子类型,此对象封装了由WEB浏览器或其它客户端生成地HTTP请求的细节(参数,属性

2015-09-28 21:40:15 365

转载 conn.setAutoCommit()用法及作用

事务操作数据:(一)eg:假如银行转账系统从张三的账户转1000元到小罗的账户这个操作需要分两步1.张三账户减少1000元2.小罗账户增加1000元假如于到断电等等,而刚好张三减了1000,而此时小罗却不增加。。。。可以想象银行这下有事做了所以使用事务操作数据来搞定 (2)java使用事务非常简单,首先调用conn.setAutoCommit(boo

2015-08-09 16:38:28 428

转载 IO整理

IO整理链接 http://http://www.cnblogs.com/rollenholt/archive/2011/09/11/2173787.html //创建按一个文件 public static void main(String[] args) { File f = new File("j:\\hello.txt"); try { f.create

2015-08-06 16:30:22 312

转载 StringTokenizer类的用法

StringTokenizer是一个用来分隔String的应用类,相当于VB的split函数。1.构造函数public StringTokenizer(String str)public StringTokenizer(String str, String delim)public StringTokenizer(String str, String delim, boolean

2015-07-12 15:32:53 1059

翻译 背包资料

http://blog.csdn.net/whyorwhnt/article/details/8611243http://www.wutianqi.com/?p=539http://www.cnblogs.com/ACMan/tag/%E8%83%8C%E5%8C%85DP/default.html?page=2http://www.ahathinkin

2013-09-12 21:38:54 497

原创 poj 3628 01 背包

题意: 给一群牛 求出不小于书架最小的高度  然后和书架做差 #include #include #include using namespace std;int dp[20000000], v[24];int n, m, sum;void onetwopack(int v, int jz){ for(int i = sum; i >= v; i--)

2013-09-12 21:22:50 724

原创 poj 3624 01 背包

#include #include #include using namespace std;int dp[13000], v[4000], jz[4000];int n, m;void onetwopack(int v, int c){ for(int i = m; i >= v; i--) dp[i] = max(dp[i], dp[i-v]+c);}

2013-09-12 20:37:48 509

原创 hdu1203 01背包

至少得反面是一个没有 所以方程为 max(dp[j], 1-(1-dp[j-v[i]])*(1-c[i]))#include #include #include using namespace std;double dp[10050], c[10005];int v[10010];int main(){ int n, m; while(scanf("%d %d

2013-09-12 19:57:13 503

原创 hdu 2955 01背包

按照01 背包知道 概率应该作为背包 但是浮点型不能直接减, 所以转换下将钱的总和作为背包 被抓的概率转换为不被抓的概率 作为价值;#include #include #include #include using namespace std;double dp[10050], c[110];int v[110];int main(){ int t, sum;

2013-09-12 17:10:06 536

原创 poj 3974

#include #include using namespace std;const int maxn = 1e6+10;char b[maxn], a[maxn<<1];int p[maxn<<1];int main(){ int tcase = 0; while(scanf("%s", &b[1]) != EOF && b[1] != 'E') {

2013-09-08 16:45:24 389

原创 hdu 3068 回文串

#include #include #include using namespace std;const int maxn = 110010;char b[maxn], a[maxn<<1];int p[maxn<<1];int main(){ while(scanf("%s", &b[1]) != EOF) { int i; fo

2013-09-08 11:50:07 445

原创 hdu 2846 经典字典树

思路:因为字典树只能读取前缀有多少个相同的, 对于求子串可以将字符串分成多个字串看成单独的字符串 进行建 字典树,但要注意这两个字符串 abab, ab他们的字串都有 ab a 所以在建树时 判断是否同一个字符串 不同就加 1 ;#include #include #include #include using namespace std;struct Trie{ i

2013-09-06 21:48:17 549

原创 hdu 1671 字典树

#include #include #include #include struct Trie{ int num; Trie *next[10];}root;void createTrie(char *str){ int len = strlen(str); Trie *p = &root, *q; for(int i = 0; i <

2013-09-06 16:01:17 526

原创 hdu 1075 字典树

在建树的时候记录每个火星单词对应的英语单词位置,在查找时候输出相应的位置 #include #include #include #include using namespace std;struct Trie{ int x; Trie *next[26];} root;char ch[1000010][15], ch1[15], str[3002];v

2013-09-06 15:57:31 536

原创 hdu 1671 字典树 模板

#include #include #include #include struct Trie{ int num; Trie *next[10];}root;void createTrie(char *str){ int len = strlen(str); Trie *p = &root, *q; for(int i = 0; i <

2013-09-04 22:51:03 543

原创 hdu 1305 字典树 模板

#include #include #include #include using namespace std;struct Trie{ int num; Trie *next[2];} root;void createTrie(char *str){ int len = strlen(str); Trie *p = &root, *q;

2013-09-04 22:18:15 611

原创 1251 字典树 模板

#include #include #include #include using namespace std;struct Trie{ int num; Trie *next[26];//指针数组}root;void createTrie(char *str)//建树{ int len = strlen(str); Trie *p = &ro

2013-09-04 17:27:24 418

原创 hdu 2154 跳舞毯

#include #include #include using namespace std;const int maxn = 1e4+9;int s[maxn];int main(){ s[1] = 0; s[2] = 2; for(int i = 3; i <= 1000; i++) { int sum = 1;

2013-08-19 18:31:28 511

原创 hdu 1867 A + B for you again

题意:给你两个字符串a,b相加 a+b,合并a的后缀和b的前缀 得到ab在 将 b a 相加 b+a 合并b的后缀和a的前缀 得到ba 在先比较ab ba长度 短的优先 如果长度相同 按字典树小的优先 #include #include #include using namespace std;const int maxn = 1e5+10;char fa[maxn], c[m

2013-08-19 16:06:41 425

原创 hdu 2203 亲和串

思路:如果第一个串长度小于第二个就no 将第一个串后面加上第一个串前x个字符 (x是第二个串的长度);因为如果这样还不能匹配就循环多少都不会匹配;#include #include #include using namespace std;const int maxn = 200000;char a[maxn], b[maxn];int nextval[maxn];int l

2013-08-18 15:44:02 472

原创 hdu 2594 Simpsons’ Hidden Talents

题意:求两个串的前缀和后缀最大的长度,思路:将第一个串作为模式串 第二个作为原串,进行KMP当 i == len1 作为结束条件#include #include #include using namespace std;const int maxn = 50000+10;char s1[maxn], s2[maxn];int len1, len2;int nextval[

2013-08-18 14:48:50 421

原创 hdu1686

#include #include #include using namespace std;const int maxn = 1000000+9;const int maxn1 = 10000+9;char a[maxn];char b[maxn1];int nextval[maxn1], len1, len2;void get_nextval(){ int i =

2013-08-17 23:27:37 549

原创 hdu 1711 KMP

#include #include #include using namespace std;const int maxn = 1e6+9;const int maxn1 = 1e4+9;int a[maxn], b[maxn1];int n, m;int next[maxn1];void Next(){ next[0] = -1; for(int j = 1

2013-08-16 16:27:43 425

转载 hdu 2802 找循环节 的方法

#include #include using namespace std;int f[5000];int main(){ f[1] = 1; f[2] = 7; int i; for(i = 3; i < 5000; i++) { f[i] = (f[i-2]+3*i*i-3*i+1)%2009; if(f[i]

2013-08-16 15:59:44 834

翻译 KMP

参考:  http://www.cnblogs.com/BeyondAnyTime/archive/2012/07/09/2583133.html以hdu 1711 为模板#include #include #include using namespace std;const int maxn = 1e6+9;const int maxn1 = 1e4+9;in

2013-08-14 22:56:29 480

原创 poj Cows 树状数组

题意: 给出每个牛的吃草的范围,求比他优秀的牛有多少 si ej-sj先对ei 降序排序在对si 进行树状数组 就行#include #include #include #include using namespace std;const int maxn = 1e5+9;int c[maxn], f[maxn], n;struct node{ int x

2013-08-14 18:35:58 481

原创 SGU 180. Inversions 离散 + 树状数组

#include #include #include #include using namespace std;const int maxn = 70000;int n, aa[maxn], c[maxn];struct node{ int num; int ix;}a[maxn];bool cmp(node a, node b){ return a

2013-08-14 14:11:57 454

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除