码迷,mamicode.com
首页 >  
搜索关键字:string    ( 95377个结果)
topcoder SRM 618 DIV2 WritingWords
只需要对word遍历一遍即可 int write(string word) { int cnt = 0; for(int i = 0 ; i < word.length(); ++ i){ cnt+=word[i]-'A'+1; ...
分类:其他好文   时间:2014-06-17 14:01:50    阅读次数:206
c# TCP Socket通讯基础
在做网络通讯方面的程序时,必不可少的是Socket通讯。那么我们需要有一套既定的,简易的通讯流程。如下:public class PublicSocket { public const string DOWNLOAD_STATUS_WAIT = "1"; publi...
分类:其他好文   时间:2014-06-17 13:52:42    阅读次数:185
复选框操作
分类:其他好文   时间:2014-06-17 13:48:51    阅读次数:154
topcoder SRM 618 DIV2 LongWordsDiv2
此题给出的条件是:(1)word的每个字母都是大写字母(此条件可以忽略,题目给的输入都是大写字母)(2) 相等字符不能连续,即不能出现AABC的连续相同的情况(3)word中不存在字母组成xyxy的形式,即不存在第一个字符和第3个字符相等同时第2个字符和第4个字符相等的情况对于第(2)种情况,只需要...
分类:其他好文   时间:2014-06-17 13:47:36    阅读次数:192
工作笔记(一)
1.The GetCurrentDirectory function retrieves the current directory for the current processDWORD GetCurrentDirectory( DWORD nBufferLength, // size of d...
分类:其他好文   时间:2014-06-17 13:44:58    阅读次数:206
Java编程:实现双色球彩票生成器,生成不重复随机数
public static void main(String[] args) {System.out.print("红色的号码为:");Set set=new HashSet();while (true) {int i=(int)(Math.random()*33+1);set.add(i);if ...
分类:编程语言   时间:2014-06-17 13:35:14    阅读次数:748
Java编程:万年历,根据用户输入的年份,月份,显示日历
public static void main(String[] args) {Scanner scanner=new Scanner(System.in);//根据日历类对象的方法,实例化一个当前的日历类对象Calendar calendar=Calendar.getInstance();Syst...
分类:编程语言   时间:2014-06-17 13:24:54    阅读次数:335
Welcome to Swift (苹果官方Swift文档初译与注解十二)---77~83页(第二章)
Optionals (可选类型) 当一个值可能有值,也可能没有值,这种情况你可以使用可选类型.可选类型的意思是: 有个一个值,它等于x,或者,根本没有任何值. 注意点: 可选类型的概念在C和OC中都是没有的.在OC中最相似的情况是,一个方法返回nil或者返回一个对象.OC中返回nil意...
分类:移动开发   时间:2014-06-17 13:09:58    阅读次数:292
Java编程判断是否是回文数
import javax.swing.JOptionPane;自然数中还有一类数被称为回文数。回文数就是一个数的两边对称,如11,121,1221,9339,30203等等public class CircleTest{public static void main(String[] args){S...
分类:编程语言   时间:2014-06-17 13:00:53    阅读次数:339
SimpleCursorAdapter(Context, int, Cursor, String[], int[]) is deprecated???
ListAdapter bookAdapter = new SimpleCursorAdapter(this,R.layout.booklist,cursor,from,to);提示:The constructor SimpleCursorAdapter(Context, int, Cursor,....
分类:其他好文   时间:2014-06-17 12:58:51    阅读次数:472
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!