码迷,mamicode.com
首页 >  
搜索关键字:string    ( 95377个结果
Web 在线文件管理器学习笔记与总结(7)重命名文件
rename($oldname,$newname) 重命名文件或目录{$content}"; //高亮显示PHP代码 //高亮显示字符串中的PHP代码 if(strlen($content)){ $newContent=highlight_string($content,tr...
分类:Web程序   时间:2015-04-04 13:29:51    阅读次数:202
Python与shell的交互方式
hello.py代码如下:#!/usr/bin/python print "hello, world!"TestInput.py代码如下:#!/usr/bin/python str = raw_input() print("input string is: %s" % str)1.os.system(cmd)这种方式只是执行shell命令,返回一个返回码(0表示执行成功,否则表示失败)retcode...
分类:编程语言   时间:2015-04-04 12:19:22    阅读次数:227
std::string类详解
之所以抛弃char*的字符串而选用C++标准程序库中的string类,是因为他和前者比较起来,不必 担心内存是否足够、字符串长度等等,而且作为一个类出现,他集成的操作函数足以完成我们大多数情况下(甚至是100%)的需要。我们可以用 = 进行赋值操作,== 进行比较,+ 做串联(是不是很简单?)。我们...
分类:其他好文   时间:2015-04-04 12:07:06    阅读次数:109
(转) lucene+paoding亲密接触
lucene是什么?lucene是一个开源的,广泛应用的,对数据进行索引、查询的一个框架,更详细的介绍请查看www.lucene.com.下面简单的描述一下索引和查询过程。1. 做索引简单过程://获取索引存储路径String strindexDir =“”;File indexDir = new ...
分类:Web程序   时间:2015-04-04 12:00:55    阅读次数:142
分析复制文件,在复制过程中更改文件后缀名
这是我自己的做法: 将一个目录下的所有.java文件复制到另一个目录,但是要在复制的过程中更改文件后缀名。 思路:跟上一个一样,只是动作稍稍有一些不同,直接上代码 package pack; import java.util.*; import java.io.*; class CopyRenameFile{ public static void main(String[] args)th...
分类:其他好文   时间:2015-04-04 10:44:50    阅读次数:193
Big String 块状数组(或者说平方分割)
Big String 给一个字符串,长度不超过 106,有两种操作: 1. 在第 i 个字符的前面添加一个字符 ch 2. 查询第 k 个位置是什么字符操作的总数不超过 2000如果直接模拟的话,移动到后面的数据量太大。我们分块的话,...
分类:编程语言   时间:2015-04-04 10:28:22    阅读次数:148
leetcode-8 String to Integer (atoi)
?? 问题描述: Implement atoi to convert a string to an integer. Hint: Carefullyconsider all possible input cases. If you want a challenge, please do not seebelow and ask yourself what are the...
分类:其他好文   时间:2015-04-04 09:19:09    阅读次数:162
[LeetCode 93] Restore IP Addresses
题目链接:restore-ip-addresses import java.util.ArrayList; import java.util.List; /** * Given a string containing only digits, restore it by returning all possible valid IP address combination...
分类:其他好文   时间:2015-04-04 09:14:43    阅读次数:113
JUnit单元测试举例(@Test,@Before,@After,@beforeClass,@afterClass,assertEquals,assertTrue等)
需要测试的类Person: package cn.edu.lstc.junit; public class Person { public void run() { System.out.println("run..."); } public void eat() { System.out.println("eat..."); } public String a() ...
分类:其他好文   时间:2015-04-04 09:12:11    阅读次数:110
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!