Implement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.public class Solution { .....
分类:
其他好文 时间:
2015-07-08 22:21:37
阅读次数:
89
create function 函数名 (@pno int) returns int as begin declare @a int if not exists(select * from person where pno=@pno) set @a=-1 else set @a=1 return @...
分类:
数据库 时间:
2015-07-07 12:41:44
阅读次数:
134
Binary to Text (ASCII) ConversionDescription:Write a function that takes in a binary string and returns the equivalent decoded text (the text is ASCII...
分类:
其他好文 时间:
2015-07-06 21:27:54
阅读次数:
115
Implement strStr() : https://leetcode.com/problems/implement-strstr/Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.
如:haystack = “bcbcda”; nee...
分类:
其他好文 时间:
2015-07-05 16:48:14
阅读次数:
342
SequenceSumSum of 'n' Numberssum_of_n(orSequenceSum.sumOfNin Java,SequenceSum.SumOfNin C#) takes an integernand returns aList(anArrayin Java/C#) of le...
分类:
其他好文 时间:
2015-07-05 14:56:44
阅读次数:
102
顾名思义,creat创建新文件,open打开文件。但,open也可以起到创建新文件的作用。 #include?<fcntl.h>
int?creat(const?char?*pathname,?mode_t?mode);
//Returns:?file?descriptor?opened?for?write...
分类:
其他好文 时间:
2015-07-04 15:39:50
阅读次数:
411
这些方法都是在做项目的时候写的,有些可能写的不好,但是收集起来可以做为一个日期格式化工具了。var dateUtils = {
/**
* 格式化日期
* @param date
* @returns {string}
*/
getFormatDay: function(date) {
var dateTime;...
分类:
编程语言 时间:
2015-07-04 11:21:10
阅读次数:
189
Implement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.在一个字符串中查找另外一个字符串是否存在。暴力 O(...
分类:
其他好文 时间:
2015-07-04 09:36:32
阅读次数:
110
称号Implement strStr().Returns a pointer to the first occurrence of needle in haystack, ornullif needle is not part of haystack.方法仅仅须要遍历一遍就可以。 publi...
分类:
其他好文 时间:
2015-07-03 20:28:49
阅读次数:
93
/** * 数字转中文 * @param dValue * @returns */function chineseNumber(dValue) { var maxDec = 2; // 验证输入金额数值或数值字符串: dValue = dValue.toString().repla...
分类:
Web程序 时间:
2015-07-02 21:05:21
阅读次数:
194