①where 子句里面根据传入参数 决定使用哪一个条件 SQL> select 1 from dual where decode(1,1,1,0)=1; SQL> select 1 from dual where (case when 1=1 then 1 else 0 end) = 1;
分类:
数据库 时间:
2015-01-04 15:08:06
阅读次数:
147
在实际生产环境中,不能进行调试,所以程序通常需要编译一个DEBUG版本来辅助我们找出问题所在,编译这样的DEBUG版本最常用的手段就是在关键处输出我们关心一些变量的值到屏幕。如果输出的简单的变量值,那么直接输出即可,但如果是向量或者队列等容器,那么就没办法直接输出了,而且写循环遍历也很麻烦,可以使用...
分类:
其他好文 时间:
2015-01-04 12:06:24
阅读次数:
181
讨论分为3种,第一种是搜索队列中任意我们需求的结果,第三种我们需求队列中有多个返回第一个,第四种未我们搜索队列中有多个返回最后一个元素的index。
第一种: 在一行排好序队列a中搜索target,一定有。
int binarySearch(int a[],int n, int target)
{
int start = 0,end = n-1;
while(start...
分类:
编程语言 时间:
2015-01-04 11:31:06
阅读次数:
152
最近做的系统中老出现的一些问题不太明白,在使用 Response.End、Response.Redirect 或 Server.Transfer 时出现 ThreadAbortException ,本来系统是没有问题的,在保存数据时也可以正常,本来使用try-catch 语句是用来捕获一异常情况的,...
分类:
编程语言 时间:
2015-01-04 09:49:36
阅读次数:
240
------------------------------------------------------------------------
“缩进问题”暂时用 选则(选灰)然后用键实现缩进……
缩进还是问题啊!
希望以后 Python 能添加 {}(代码块,或者 : 用 “end”实现代码块的结束……而不是强制缩进!
=====================================================================...
分类:
编程语言 时间:
2015-01-04 08:40:36
阅读次数:
213
记录双系统CentOS安装后所做的一些工作。以下工作需要root权限
1.电脑上原本有win7,我又装上了CentOS7,电脑启动就进入CentOS7,找不到win7引导。
注意正常安装情况win7引导并没有被覆盖,只是不能被识别而已。
解决办法(前提:win7装在sda1上面,一般来说win7都是在sda1上的):
在终端输入
vi /etc/grub2.cfg
在“###END...
分类:
Web程序 时间:
2015-01-03 21:08:51
阅读次数:
239
#include
#include
#include
using namespace std;
int main()
{
string s;
cin>>s;
sort(s.begin(), s.end());
cout
return 0;
}...
分类:
其他好文 时间:
2015-01-03 21:05:36
阅读次数:
146
Binary Tree Maximum Path SumGiven a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the be...
分类:
其他好文 时间:
2015-01-03 11:52:22
阅读次数:
137
list容器就是一个双向链表,可以高效地进行插入删除元素。
构造函数
list c0; //空链表
list c1(3); //建一个含三个默认值是0的元素的链表
list c2(5,2); //建一个含五个元素的链表,值都是2
list c4(c2); //建一个c2的copy链表
list c5(c1.begin(),c1.end...
分类:
编程语言 时间:
2015-01-03 09:24:56
阅读次数:
209
#import "ViewController.h"@interface ViewController ()@property (nonatomic, strong) UIButton *btn;@end@implementation ViewController@synthesize btn;- ...
分类:
移动开发 时间:
2015-01-02 22:21:27
阅读次数:
293