案例代码: 结果是: 开始替换: 结果是: 把html里填的标签换成字符串: 结果: 总结: 替换节点 关键字: replaceWith replaceAll 区别: 1、语法: $(标签对象).replaceWith(html); $(html).replaceAll(标签对象); 2、用法限制上 ...
分类:
Web程序 时间:
2019-09-13 17:44:17
阅读次数:
162
在iOS的实际开发中,常会出现需要去除空格的情况,总结有三种情况: 去除字符串首尾连续字符(如空格); 去除字符串首部连续字符(如空格); 去除字符串尾部连续字符(如空格); 去除字符串首尾连续字符(如空格) NSString *a = @" a sdf "; [a stringByTrimming ...
分类:
移动开发 时间:
2019-08-29 16:05:32
阅读次数:
133
<Service name="Tomcat_1"> <Connector port="8888" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" URIEncoding="gbk"/> <Engine name="T ...
分类:
其他好文 时间:
2019-08-28 18:43:20
阅读次数:
98
/** * 根据正则是,替换对应内容 * @return */ public static String replaceByRegex(String regex,String src,String tar) { if(regex == null || "".equals(regex)) { retu ...
分类:
其他好文 时间:
2019-08-26 23:01:46
阅读次数:
83
replace用法 (1)replace(char a,char b) 用b替换掉a (这两个参数都是字符串) (2)replaceAll(String a, String b) 用b代替a中所有匹配字符串。(a参数是个正则匹配式,b是个字符串) (3)replaceFirst(String a, ...
分类:
编程语言 时间:
2019-08-10 17:32:58
阅读次数:
78
1、freemarker 获得当前时间戳 2、业务场景支付时效为两个小时,超过即不可支付的校验 ...
分类:
其他好文 时间:
2019-07-16 18:56:20
阅读次数:
125
import java.io.IOException;import java.io.UnsupportedEncodingException;import org.apache.commons.httpclient.HttpClient;import org.apache.commons.httpc ...
分类:
其他好文 时间:
2019-07-03 13:25:38
阅读次数:
106
Collections是一个包装类,其中包含有各种有关集合操作的静态多态方,比如可以作用在List和Set上,此类不能实例化。 排序Integer[] array = new Integer[]{3, 10, 4, 0, 2};List<Integer> integers = Arrays.asLi ...
分类:
其他好文 时间:
2019-07-02 11:00:00
阅读次数:
104
简述 在博客园记录了一些文章,想把它备份到github上,还好大部分博文都是markdown格式的,博客园也支持备份导出,但是到处的是单个的XML文件。 为了把每一篇博文单独提取出来,所以写了一个小程序来提取。 github中需要如下图所示的格式,方能正确的分类 文件名需要日期开头,文件内容中最前面 ...
分类:
其他好文 时间:
2019-06-24 22:50:16
阅读次数:
248
unit uJSONDB; interface uses SysUtils, Classes, Variants, DB, DBClient, SuperObject, Dialogs; type TJSONDB = class private class function getJsonField ...