码迷,mamicode.com
首页 >  
搜索关键字:string    ( 95377个结果)
leetcode 151. 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".click to show clarification.Cl...
分类:其他好文   时间:2015-01-11 12:12:04    阅读次数:128
一句胜千言
// 第一个Java程序1 package first;2 3 public class Hello {4 public static void main(String[] args){5 System.out.println("Hello world!");6 }7...
分类:其他好文   时间:2015-01-11 12:08:50    阅读次数:109
测试自动登录58
1 public void Login58(string name, string pass) 2 { 3 HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://passpo...
分类:其他好文   时间:2015-01-11 10:52:56    阅读次数:207
android内存管理工具类
public class MemoryManager { private static final String TAG = "MemoryManager"; private static final int MAXMEMORY=50*1024*1024;//程序运行的最大内存 /** * 判断系统是否在低内存下运行 * @param context * @return */...
分类:移动开发   时间:2015-01-11 09:46:22    阅读次数:201
String split()
勤劳一日,可得一夜安眠;勤劳一生,可得幸福长眠。——达·芬奇 本讲内容:字符串分割split(String regex)和split(String regex,int limit) 在java.lang包中有String.split()方法,返回是一个数组。 一、“.”和“|”都是转义字符,必须得加"\\"; 例一: public class Text{ ...
分类:其他好文   时间:2015-01-11 09:44:53    阅读次数:136
学习笔记三十二:音频流
奋斗之心人皆有之。——李叔同 本讲内容:播放音频 import java.io.*; import javax.sound.sampled.*; public class Text{ public static void main(String[] args) { //播放开战声音 AePlayWave apw=new AePlayWave("e:/tank.wav")...
分类:其他好文   时间:2015-01-11 09:39:03    阅读次数:193
2015-1-11
1、c#中构造函数可以使用静态构造static,而java中不可以,java使用的是静态域2、数组的初始化例如:java代码可以采用如下形式:static void printArray(String ... args){}调用:printArray("abc","def","gh");或者是pri...
分类:其他好文   时间:2015-01-11 09:33:41    阅读次数:101
OJ练习2——T171
题目:按如下格式输出:A -> 1B -> 2C -> 3...Z -> 26AA -> 27AB -> 28 是上一篇题目的逆输出,相当于26进制转换为10进制。其计算顺序应当是由左向右计算。class Solution {public: int titleToNumber(string s...
分类:其他好文   时间:2015-01-11 09:33:20    阅读次数:93
类 求数组最大最小平均
packagecom.ctu.java.exer; publicclassTestArray{ publicstaticvoidmain(String[]args){ int[]arr=newint[]{12,4,76,0,-98,-54,4,100}; ArrayUtilau=newArrayUtil(); intmax=au.getMax(arr); System.out.println("最大值为:"+max); intavg=au.avg(arr); Sy..
分类:编程语言   时间:2015-01-11 06:23:52    阅读次数:235
将一篇文本中的单词保存在一个字符串数组中
charstring[]="IloveiosIwanttomakeanprojectzpplanou";char*strs[255]={0};inti=0,count=0;intwordcount=0;while(*(string+i)!=‘\0‘){chartemp[100]={0};intk=0;staticintm=0;if(*(string+i)!=‘‘){count++;}else{char*str=malloc(count+1);wordcount++;for(intj=i-count;j<..
分类:编程语言   时间:2015-01-11 06:20:52    阅读次数:154
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!