码迷,mamicode.com
首页 >  
搜索关键字:string    ( 95377个结果)
代码可读性的改良
首先, 有这样的代码,逻辑是没错的,但是长而且可读性不好:message = subAction == "add" ? String.format(format, contentMap.get("owner"), contentMap.get("ownerHomeName")) :...
分类:其他好文   时间:2015-06-13 14:15:45    阅读次数:108
Java 打开文件的两种方式
import java.awt.Desktop;import java.io.File;import java.io.IOException;public class LnkDemo { public static void main(String[] args) throws IOExcep...
分类:编程语言   时间:2015-06-13 14:10:33    阅读次数:143
String s=new String("xyz");创建几个String对象的问题
首先让我们了解几个概念:栈 :由JVM分配区域,用于保存线程执行的动作和数据引用。堆 :由JVM分配的,用于存储对象等数据的区域。常量池constant pool :在堆中分配出来的一块存储区域,用于存储显式 的String,float或者integer.这是一个特殊的共享区域,可以在内存中共享的不...
分类:其他好文   时间:2015-06-13 12:46:10    阅读次数:91
C# / MSSQL / WinForm / ASP.NET - SQLHelper中返回SqlDataReader数据
/// /// Execute a SqlCommand that returns a resultset against the database specified in the connection string /// using the pr...
分类:数据库   时间:2015-06-13 12:33:14    阅读次数:186
LeetCode Basic Calculator
LeetCode Basic Calculator题目思路其实就是前中后缀表达式的转换和计算; 以前写过一个类:前中后缀表达式计算类 但是由于类有点大,只能拆开交(为了检测正确性);代码转为前缀计算class ExpressionTransformation { public: string trans_to_prefix_expression_to_s(string); // 将得到...
分类:其他好文   时间:2015-06-13 11:26:30    阅读次数:113
UVA 247 图论 floyd算法+递归遍历
先用floyd求出传递闭包,构造出一个新图,然后用递归的方法遍历图输出相互联通的节点. #include #include #include #include #include #include #include using namespace std; #define N 500 int d[N][N]; mapq; mapp; string s1,s2; int n,m,cas=0; int...
分类:编程语言   时间:2015-06-13 11:21:53    阅读次数:191
php 垃圾回收
php 垃圾回收php 垃圾回收来源: http://php.net/manual/zh/features.gc.refcounting-basics.phpa: (refcount=2, is_ref=0)='new string'当任何关联到某个变量容器的变量离开它的作用域 (比如: 函数执行结...
分类:Web程序   时间:2015-06-13 11:05:36    阅读次数:145
Leetcode[9]-Palindrome Number
Determine whether an integer is a palindrome. Do this without extra space.Some hints: Could negative integers be palindromes? (ie, -1)If you are thinking of converting the integer to string, note the...
分类:其他好文   时间:2015-06-13 09:48:14    阅读次数:101
字符串
1.截取字符串NSString*string =@"sdfsfsfsAdfsdf";string = [stringsubstringToIndex:7];//截取下标7之后的字符串NSLog(@"截取的值为:%@",string);[stringsubstringFromIndex:2];//截取...
分类:其他好文   时间:2015-06-13 06:15:38    阅读次数:118
动物这样叫
要求1代码: /* *Copyright (c)2015,烟台大学计算机与控制工程学院 *All rights reserved. *文件名称:sum123.cpp *作 者:林海云 *完成日期:2015年6月12日 *版 本 号:v2.0 * *问题描述:根据给出的main()函数和运行结果的提示,设计出相关的各个类,注意观察运行结果,提取出每个类中需要的数据成员,并匹配上需要的成员函数...
分类:其他好文   时间:2015-06-12 23:55:41    阅读次数:139
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!