码迷,mamicode.com
首页 >  
搜索关键字:string    ( 95377个结果)
使用正则表达式寻找字符串中出现了几个[***]样式的字符串
使用正则表达式寻找字符串中出现了几个[***]样式的字符串源码如下:- (NSUInteger)analyseRX:(NSString *)string withPatternString:(NSString *)patternString{ // \\[[^\\]]+\\] 用以匹...
分类:其他好文   时间:2014-05-27 00:42:18    阅读次数:245
SSH整合(配置方式)
工程目录:/SSH1/src/cn/itcast/domain/Book.javapackage cn.itcast.domain;/** * 图书 */public class Book { private Integer id; // 图书编号 private String name...
分类:其他好文   时间:2014-05-27 00:33:58    阅读次数:310
C语言宏#和##
C语言宏#和##一、基本用途#用于将宏定义中的参数转换为字符串。例:存在宏#define TO_STRING(x) #x则TO_STRING(hello)展开为"hello"##用于拼接Token。例:存在宏#define DECLARE_HANDLER(x) x##_handler则DECLARE...
分类:编程语言   时间:2014-05-27 00:19:05    阅读次数:357
将string数组转化为sql的in条件
例如:我想将String[] str = {"4","5","6"}转化为“‘4’,‘5’,‘6’”字符串。这样我就可以用sql查询:select * from tableName id in (字符串)了。 项目中实现的源码如下: StringBuffer idsStr = new StringBuffer(); for (int i = 0; i < i...
分类:数据库   时间:2014-05-23 01:55:42    阅读次数:390
Dom4j 读取一个XML文件和将String写成XML文件
dom4j保存文件xml格式和读取XML文件内容,代码如下: package com.qmjs.imut import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.io.InputStream; import org.apache.log4j.Logger; impor...
分类:其他好文   时间:2014-05-23 01:45:47    阅读次数:267
一个有趣的Timer应用
import java.util.Date; import java.util.Timer; import java.util.TimerTask; public class TraditionalTimerTest { static int count; public static void main(String[] args) { class MyTimerTask exte...
分类:其他好文   时间:2014-05-23 01:45:11    阅读次数:226
c# webBrowser全掌握
一、获取网页源代码      1.不含有框架       string s=WB1.DocumentText;  //webbrowser1命名为WB1,下同       2.含有框架       引用mshtml;          //位置C:\Program Files\Microsoft.NET\Primary Interop Assemblies\Microsoft.mshtml...
分类:Web程序   时间:2014-05-23 01:30:49    阅读次数:283
synchronized用法的一个实例
public class TraditionalThreadTest { static class Outputer { public void output1(String name) { synchronized (Outputer.class) { for (int i = 0; i < name.length(); i++) { System.out.pri...
分类:其他好文   时间:2014-05-22 23:53:45    阅读次数:442
最短摘要生成
题目: Alibaba笔试题:给定一段产品的英文描述,包含M个英文字母,每个英文单词以空格分隔,无其他标点符号; 再给定N个英文单词关键 字,请说明思路并编程实现方法String extractSummary(String description,String[] key words), 目标是找出此产品描述中包含N个关键字(每个关键词至少出现一次)的长度最短的子串,作为产品简介输出。(不限...
分类:其他好文   时间:2014-05-22 22:37:55    阅读次数:405
python用正则表达式怎么查询unicode码字符
import re data = open('a.txt') fh = open('b.txt', 'w') """Search the string begining with '【'""" p = re.compile(r'\s*[\u3010]') for each_d in data:     if re.match('\s*3\d{4}', each_d):    ...
分类:编程语言   时间:2014-05-22 17:26:17    阅读次数:293
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!