最新文章列表

Web报表工具FineReport的JS开发之字符串

在报表开发过程中,有些需求可能无法通过现有的功能来实现,需要开发人员二次开发,以FineReport为例,可以使用网页脚本、API接口等进行深入的开发与控制。 考虑到JS脚本开发的使用较多,这里先先简单介绍如何用JS对字符串进行操作,比如如何判断字符串是否为空,字符串的长度,替换,查找,截取,或者将字符串转换为其他类型等。 1. 字符串的长度 1.1 返回字符串长度 获取字符串长度,可以 ...
绿色滑板鞋 评论(0) 有1087人浏览 2016-03-31 12:15

Repeated DNA Sequences

All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: "ACGAATTCCG". When studying DNA, it is sometimes useful to identify repeated sequences within the DN ...
KickCode 评论(0) 有371人浏览 2016-03-03 03:10

Bulls and Cows

You are playing the following Bulls and Cows game with your friend: You write down a number and ask your friend to guess what the number is. Each time your friend makes a guess, you provide a hint that ...
KickCode 评论(0) 有355人浏览 2016-02-28 03:30

Word Pattern

Given a pattern and a string str, find if str follows the same pattern. Here follow means a full match, such that there is a bijection between a letter in pattern and a non-empty word in str. Example ...
KickCode 评论(0) 有582人浏览 2016-02-27 03:29

Largest Number

Given a list of non negative integers, arrange them such that they form the largest number. For example, given [3, 30, 34, 5, 9], the largest formed number is 9534330. Note: The result may be very la ...
KickCode 评论(0) 有525人浏览 2016-02-17 03:14

Compare Version Numbers

Compare two version numbers version1 and version2. If version1 > version2 return 1, if version1 < version2 return -1, otherwise return 0. You may assume that the version strings are non-empty an ...
KickCode 评论(0) 有633人浏览 2016-02-16 04:17

js日期长整型和字符串转换

Date.prototype.format = function (format) {      var o = {          "M+": this.getMonth() + 1,          "d+": this.getDate(),          "h+": this.getHours(),          ...
olym2012 评论(0) 有2282人浏览 2016-01-26 10:04

Longest Substring Without Repeating Characters

Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which th ...
KickCode 评论(0) 有708人浏览 2016-01-24 07:47

js 时间 和字符串之间的转化

之前写到过,js中new Date()能接受的字符串格式,各个浏览器不一样,这次写了个关于时间对象和字符串之间的转化的方法   时间对象转化为字符串   function formatDate (date, format) { var convert, res = ''; convert = { 'y': function (str) { ...
leeqq 评论(0) 有980人浏览 2015-12-29 21:50

String format 索引下标进行字符串格式化

string.format根据参数的索引下标对字符串进行格式化 代码如下所示: System.err.println(String.format("%2$s %1$s","第一个参数","第二个参数"));  输出结果: 第二个参数 第一个参数  解释说明:     %:特殊字符     1$:指定参数索引 ...
TimerBin 评论(0) 有1686人浏览 2015-12-01 15:04

Python字符编码问题

python对多国语言的处理是支持的很好的,它可以处理现在任意编码的字符,这里深入的研究一下python对多种不同语言的处理。     有一点需要清楚的是,当python要做编码转换的时候,会借助于内部的编码,转换过程是这样的:         原有编码 -> 内部编码 -> 目的编码     python的内部是使用unicode来处理的,但是unicode的使用需要考虑的是它 ...
字符串 评论(0) 有566人浏览 2015-11-28 11:08

Shell编程实例

1. 在/home目录中创建一百个目录,目录名称依次为a1……a100. 2.  编写一个脚本,自动将用户主目录下所有小于5KB的文件打包成XX.tar.gz.(提示:用ls,grep,find等命令,文件一般指普通文件) 3.写一个程序,可以将/et/passwd的第一列取出,而且每一列都以一行字符串“the 1 account is “root””来显示 4. 编写一个程序,他的作用是先 ...
音频数据 评论(0) 有1611人浏览 2015-11-26 16:29

Javascript操作字符串方法集合

1.函数 split():使用一个指定的分隔符把一个字符串分割储存到数组 str="apple,banana,orange"; array-str.split(",");//array是一个包含各类水果的数组  2.函数 join ():使用指定的分隔符将一个数组合并为一个字符串 var my_array=["jpg",&quo ...
Turbo12138 评论(0) 有326人浏览 2015-11-15 13:23

oc字符串的简单使用

接触oc才几天的时间,最难看的还是oc的一些语法不习惯,只有每天下班后才有点时间看oc相关的文档和csdn博客,这一段时间公司的项项目还能处理的过来,主要就是修复测试提出的bug   字符串的简单操作 1,判断字符串是否相等 isEqualToString     NSString *ns = @"nihao"; NSString *str1 = @&quo ...
百合不是茶 评论(0) 有900人浏览 2015-11-03 23:59

【前端学习】javascript正则表达式和字符串RegExp and String(二)

http://blog.csdn.net/xtu_xiaoxin/article/details/48831047
XTU_xiaoxin 评论(0) 有737人浏览 2015-10-08 09:13

javascript格式化时间戳为自定义类型的字符串格式

Date.prototype.format = function (fmt) {   var o = {   "M+": this.getMonth() + 1, //月份   "d+": this.getDate(), //日   "h+": this.getHours(), //小时   &q ...
腾讯rep 评论(0) 有554人浏览 2015-10-07 18:38

jstl格式化字符串日期

  <fmt:parsetDate>和<fmt:formatDate>标签,一旦指定pattern属性,标签就忽略它的type、dateStyle和timeStyle属性。<fmt:parsetDate>根据pattern属性设置的自定义格式解析value属性指定的日期和/或时间字符串,所以,要解析的日期和/或时间字符串必须严格符合pattern属性设置的自定 ...
happyqing 评论(0) 有1931人浏览 2015-09-08 20:41

最近博客热门TAG

Java(141744) C(73651) C++(68608) SQL(64571) C#(59609) XML(59133) HTML(59043) JavaScript(54919) .net(54785) Web(54514) 工作(54118) Linux(50905) Oracle(49875) 应用服务器(43289) Spring(40812) 编程(39454) Windows(39381) JSP(37542) MySQL(37267) 数据结构(36424)

博客人气排行榜

    博客电子书下载排行

      >>浏览更多下载

      相关资讯

      相关讨论

      Global site tag (gtag.js) - Google Analytics