码迷,mamicode.com
首页 >  
搜索关键字:string    ( 95377个结果)
安卓获取当前周的日期
List<String>list=newArrayList<String>(); Calendarca=Calendar.getInstance(Locale.CHINESE); intstart=ca.getFirstDayOfWeek(); intend=ca.getMaximum(Calendar.DAY_OF_WEEK); for(inti=start;i<=end;i++){ ca.set(Calendar.DAY_OF_WEEK,i); StringaString=c..
分类:移动开发   时间:2015-03-09 11:08:29    阅读次数:146
编程珠玑:单词频率最高选取
问题描述: 对一个输入文本中的每个单词的出现次数统计,并选取出现频率最大的10个单词 #include #include #include string> #include #include #include using namespace std; typedef pairstring, int> PAIR; int cmp...
分类:其他好文   时间:2015-03-09 11:04:33    阅读次数:119
面试10大算法题汇总-字符串和数组6
11.String转int,即atoi函数实现。 主要考虑以下几种情况: 1.      String为空 2.      String中存在非数字字符,如空白字符,abcd等 3.      String的正负 Code: public class test { public static int atoi(String str) { if (str == null || st...
分类:编程语言   时间:2015-03-09 11:00:42    阅读次数:175
送分啦
/**  * 输出yes或no 用随机数产生两个数  */ public class 送分啦 { public static void main(String[] args) { int n = (int) (Math.random() * 2 + 1); if (n == 1) System.out.println("yes"); else System.out.pri...
分类:其他好文   时间:2015-03-09 10:56:06    阅读次数:123
实现在线压缩文件的实现程序代码
[引入using System.Diagnostics;using Microsoft.Win32;]#region 使用GZip压缩文件,返回bool值/// 要压缩的源文件名/// 压缩后的文件名/// 压缩后的成功类型public static bool GZipFile(string Fil...
分类:其他好文   时间:2015-03-09 10:37:38    阅读次数:222
【LeetCode笔记】Compare Version Numbers
int compareVersion(string version1, string version2) { stringstream s1(version1), s2(version2); while(1){ int i1= 0, i2 = 0; if(getline(s1, version1, '.')) //if读取成功,将字符串convert为整型 i1 = stoi(ver...
分类:其他好文   时间:2015-03-09 09:25:30    阅读次数:158
Java中的数组
二维数组计算最低值与最高值publicclassConutMark{publicstaticvoidmain(String[]args){//定义二维数组intgrades[][]={{77,68,86,73},{96,87,89,81},{70,90,86,81}};intlowGrade=grades[0][0];//定义保存最低分数的变量for(inti=0;i<grades.length;i++){//循环遍历数组for(i..
分类:编程语言   时间:2015-03-09 01:53:12    阅读次数:197
序列化、反序列化的版本控制以及序列化、反序列化集合对象
当涉及到跨进程甚至是跨域传输数据的时候,我们需要把对象序列化和反序列化。 首先可以使用Serializable特性。 [Serializable] public class Person { public string _firstName; public string _secondName; /...
分类:其他好文   时间:2015-03-09 00:25:41    阅读次数:122
Hibernate中各种关联关系配置
一、单向多对一 举例:多个订单对应一个顾客 顾客类Customer.java:public class Customer{ private Integer customerId; private String customerName;//get() set() 省略} 订单类Or...
分类:Web程序   时间:2015-03-09 00:20:57    阅读次数:236
【POJ2887】【块状链表】Big String
DescriptionYou are given a string and supposed to do some string manipulations.InputThe first line of the input contains the initial string. You can a...
分类:其他好文   时间:2015-03-08 22:58:09    阅读次数:697
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!