package com.lipeng;
public class LoopDemo {
/**
* 线程A循环10次,然后线程B循环100次,然后A再循环10次,然后B再循环100次。如此循环50次。
* lipeng
* 2015-4-10
* @param args
*/
public static void main(String[] args) {
MyTa...
分类:
编程语言 时间:
2015-04-14 23:25:54
阅读次数:
180
原以为BIRT中的indexOf函数直接与JavaScript中的一样,就如同substr和replace一样,但是一直遇到function undefined的错误。
domain = row["MEDIUM_STRING_VAL"].substr(1);
i = BirtStr.indexOf('\|', domain);
domain.substr(0, i);...
分类:
其他好文 时间:
2015-04-14 23:22:55
阅读次数:
152
Reverse Words in a String
Given an input string, reverse the string word by word.
For example,
Given s = "the sky is blue",
return "blue is sky the".
Update (2015-02-12):
For C program...
分类:
其他好文 时间:
2015-04-14 23:22:16
阅读次数:
167
Console.WriteLine("请输入您的身份证号码"); string x = Console.ReadLine(); string year=x.Substring (6,4);//从身份证的第六位开始截取,往后截取四位,就是你的出生年份 int x1 = Convert.ToInt32(...
分类:
其他好文 时间:
2015-04-14 23:18:10
阅读次数:
176
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo...
分类:
其他好文 时间:
2015-04-14 23:12:41
阅读次数:
111
在android应中,需要注意3个文件,他们分别是:Main.axml,String.xml和Activity.cs.1.布局文件Main.axml ,该文件保存在Resouses/layout的目录中,这也是所有布局文件常用在的一个目录 的。2.变量文件String.xml该文件中保存了一些常用....
分类:
其他好文 时间:
2015-04-14 23:10:33
阅读次数:
286
namespace 打印乘法口诀{ class Program { static void Main(string[] args) { for (int i = 1; i <=9; i++)//行数循环九次, { for (int j = 1; j<=i; j++)//当i等于1的时候,j等于1, ...
分类:
其他好文 时间:
2015-04-14 23:07:04
阅读次数:
127
String是java中最常使用的类之一,其中内置了很多字符串操作方法。但是从来没有仔细看过其中一共有多少个方法,以及各个方法的使用情景,现在整理一下,以便以后查阅使用。一、非静态方法1.charAt()获取给定索引的字符。2.codePointAt()获取给定索引字符的Unicode编码值。3.c...
分类:
其他好文 时间:
2015-04-14 23:00:34
阅读次数:
261
string trim ( string $str [, string $charlist ] ) -去除字符串首尾处的空白字符(或者其他字符) trim()函数当第二个参数为空时,默认去掉空格、制表符、换行符、回车符、垂直制表符等,当加入第二个参数时 1) trim(' \"stri...
分类:
Web程序 时间:
2015-04-14 22:59:24
阅读次数:
161
while (true) { string s = "★";//s代表五角星 string t = "○";//t代表方格,如果需要只打印正三角形,可用空格键代替 int a = 1;//声明变量,初始值为1 Console.Write("请输入行数"); a = Convert.ToInt32(C...
分类:
其他好文 时间:
2015-04-14 22:55:59
阅读次数:
124