如将字符串‘张三,李四,王五,赵六,'转换成1. 张三2.李四3.王五4.赵六REGEXP_SUBSTR查询语句:WITH TEST AS (SELECT‘张三,李四,王五,赵六,' AS STR FROM DUAL)SELECT DISTINCT REGEXP_SUBSTR(STR, '[^,]+...
分类:
数据库 时间:
2014-07-11 21:06:05
阅读次数:
258
1 public class Product 2 { 3 public string Name { get;set;} 4 public int Code { get; set; } 5 } 6 ...
分类:
其他好文 时间:
2014-07-09 17:39:41
阅读次数:
182
在日常作业中,有时候可能是一些活动要抽出得奖人或选出抽查的一些名单,就常常会使用到 Order BY Newid() 的方式来做随机数选出,但有可能的状况需是要搭配到 DISTINCT 来选出,这时候如 DISTINCT 与 Order By Newid()同时使用就会遇到错误讯息 「如果已指定 S...
分类:
其他好文 时间:
2014-07-07 00:23:21
阅读次数:
286
SubsetsTotal Accepted:13267Total Submissions:48509My SubmissionsGiven a set of distinct integers,S, return all possible subsets.Note:Elements in a sub...
分类:
其他好文 时间:
2014-07-06 17:50:21
阅读次数:
170
N-Queens IIFollow up for N-Queens problem.Now, instead outputting board configurations, return the total number of distinct solutions.solution:#includ...
分类:
其他好文 时间:
2014-07-06 16:06:08
阅读次数:
198
Given a stringSand a stringT, count the number of distinct subsequences ofTinS.A subsequence of a string is a new string which is formed from the orig...
分类:
其他好文 时间:
2014-07-06 16:01:23
阅读次数:
203
You are climbing a stair case. It takes n steps to reach to the top.
Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?
有f(n) = f(n - 1) + f(n...
分类:
其他好文 时间:
2014-07-04 08:39:44
阅读次数:
304
Given a stringSand a stringT, count the number of distinct subsequences ofTinS.A subsequence of a string is a new string which is formed from the orig...
分类:
其他好文 时间:
2014-07-04 00:12:20
阅读次数:
249
SPOJ Problem Set (classical)
694. Distinct Substrings
Problem code: DISUBSTR
Given a string, we need to find the total number of its distinct substrings.
Input
T- number of ...
分类:
其他好文 时间:
2014-07-03 16:32:42
阅读次数:
212
Given a stringSand a stringT, count the number of distinct subsequences ofTinS.A subsequence of a string is a new string which is formed from the orig...
分类:
其他好文 时间:
2014-07-03 13:05:28
阅读次数:
210