码迷,mamicode.com
首页 >  
搜索关键字:string    ( 95377个结果)
hackerrank---Find a string
题目链接在字符串a中查找字符串b出现的次数...貌似不可以用a.count()附上代码:1 a = raw_input().strip()2 b = raw_input().strip()3 cnt = 0;4 for i in xrange(len(a)):5 cnt += 1 if a....
分类:其他好文   时间:2014-05-14 04:13:06    阅读次数:308
WPF多线程访问控件
大家知道WPF中多线程访问UI控件时会提示UI线程的数据不能直接被其他线程访问或者修改,该怎样来做呢?分下面两种情况1.WinForm程序 1 2 1)第一种方法,使用委托: 3 private delegate void SetTextCallback(string text); 4 ...
分类:编程语言   时间:2014-05-14 03:01:21    阅读次数:246
Leetcode | Substring with Concatenation of All Words
You are given a string, S, and a list of words, L, that are all of the same length. Find all starting indices of substring(s) in S that is a concatena...
分类:其他好文   时间:2014-05-12 22:27:04    阅读次数:265
Android学习--apk打包过程
1. 使用aapt工具,给所有的res目录下的资源文件生成对应的id,id会被放进R.java文件中2. JavaC编译器,将所有Java文件转换为Class文件,其中,内部类会分别生成.class文件,命名格式为MainActivity$内部类.class R$String.class等3. 将c...
分类:移动开发   时间:2014-05-12 22:20:50    阅读次数:420
C# 简单的特殊输出
class Program { static void Main(string[] args) { int i = 940; int j = 73; Console.WriteLine("{0,5}\n+{1,4}\n------\n{2,4}",i,j,i+j); Console.ReadKey(); } }输出结果为:...
分类:其他好文   时间:2014-05-11 22:28:49    阅读次数:298
c++ vector
vector类为内置数组提供了一种替代表示,与string类一样 vector 类是随标准 C++引入的标准库的一部分 ,为了使用vector 我们必须包含相关的头文件  : #include 使用vector有两种不同的形式,即所谓的数组习惯和 STL习惯。 一、数组习惯用法 1. 定义一个已知长度的 vector : vector ivec( 10 );  //...
分类:编程语言   时间:2014-05-11 22:21:45    阅读次数:415
ZOJ 1151 Word Reversal反转单词 (string字符串处理)
链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=151 For each list of words, output a line with each word reversed without changing the order of the words. This problem contains multi...
分类:其他好文   时间:2014-05-11 22:20:43    阅读次数:443
一个功能更强大的函数,也是用正则表达式写的
Option Explicit Function stripHTML(strtext)  dim arysplit,i,j, strOutput  arysplit=split(strtext," if len(arysplit(0))>0 then j=1 else j=0 for i=j to ubound(arysplit)  if instr(arysplit(i),">") ...
分类:其他好文   时间:2014-05-11 21:56:06    阅读次数:355
并发 错误 java.lang.IllegalMonitorStateException: current thread not owner 分析
public class ThreadTest implements Callable { public String call() throws Exception { // TODO Auto-generated method stub wait(10000); return "hello"; } }调用代码: public static void main(Stri...
分类:编程语言   时间:2014-05-11 21:27:24    阅读次数:533
【Android数据存储】- File
读写本应用程序数据文件夹中的文件         此种方法读写的文件在/data/data/中         android 中提供了 openFileInput(String fileName) 和 openFileOutput(String fileName, int mode) 两个方法来读取本应用程序数据文件夹中的文件和向其写入。     openFileInput...
分类:移动开发   时间:2014-05-11 18:34:50    阅读次数:480
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!