原文http://knowyouknowme.iteye.com/blog/574974一、decode在Oracle/PLSQL中,decode具有和
IF-THEN-ELSE 一样的功能。decode函数语法如下:decode( expression , search , result [, s...
分类:
数据库 时间:
2014-05-16 20:41:51
阅读次数:
540
上一节实现了对TableExpression的解析,通过反射创建实例以及构建该实例的成员访问表达式生成了一个TableExpression,并将其遍历格式化为”Select
* From TableName ”之类的SQL语句,本节继续对其他QueryExpression进行解析。先回顾一下几个类的...
分类:
其他好文 时间:
2014-05-16 08:26:20
阅读次数:
361
题目: Evaluate the value of an arithmetic expression
inReverse Polish Notation.Valid operators are+,-,*,/. Each operand may be an
integer or another e.....
分类:
其他好文 时间:
2014-05-16 05:56:07
阅读次数:
221
题目链接:10312 - Expression Bracketing
题意:有n个x,要求分括号,判断非二叉表达式的个数。
思路:二叉表达式的计算方法就等于是Catalan数的,那么只要计算出总数,用总数减去二叉表达式个数,得到的就是非二叉表达式的个数。那么计算方法是什么呢。
看题目中的图,对于n = 4的情况,可以分为这几种情况来讨论:
四个1, 一个2两个1,一个3一个1,一个4,对应...
分类:
其他好文 时间:
2014-05-15 07:11:23
阅读次数:
218
Regular Expression Matching,正则表达式...
分类:
其他好文 时间:
2014-05-15 02:35:05
阅读次数:
241
Regular Expression Special Characters
"."---Any single character(a "wildcard")
"["---Begin character class
"]"---End character class
"{"---Begin count
"}"---End count
"("---Begin grouping
")"...
分类:
其他好文 时间:
2014-05-15 01:41:09
阅读次数:
548
【题目】
Implement regular expression matching with support for '.' and '*'.
'.' Matches any single character.
'*' Matches zero or more of the preceding element.
The matching should cover the entire input string (not partial).
The function prototype shoul...
分类:
其他好文 时间:
2014-05-14 21:36:52
阅读次数:
348
grep命令可以从文本中或者通过管道送过来的字符流中或一个"-"符号代替文件名来搜索精确或者模糊的匹配信息,grep家族有三个命令:grep,egrep,fgrep。grep支持正则表达式匹配查找egrep支持扩展正则表达式匹配查找fgrep不支持正则表达式匹配查找grep命令的格式:grep[OPT]‘PATTERN‘F..
分类:
系统相关 时间:
2014-05-14 17:24:27
阅读次数:
428
还没有处理lambda、上下文等,有待完善。
main
{
for
putsl(eval(getsl))
}
rstr eval(rstr s)
{
s=tokenize(s)
v=s.split(' ')
if v.get(0)!='('
return v.get(0)
next=find(v.sub(2))+2
switch v.get(1)
case '+'
r...
分类:
其他好文 时间:
2014-05-14 15:32:34
阅读次数:
323
公用表表达式(CTE,Common table
expression)是和派生表很相似的另一种形式的表表达式,而且具有一些重要优势。CTE 是在 SQL Server 2005 中引入的,是ANSI SQL
(1999及以后版本)标准的一部分。例:WITH USACusts AS( SELECT ....
分类:
其他好文 时间:
2014-05-14 13:26:16
阅读次数:
242