原题地址想当年初学C++的时候写个大整数加法都快屎了,现在觉得自己还是成长了不少哇。代码: 1 string multiply(string num1, string num2) { 2 int len1 = num1.length(); 3 int len2 = n...
分类:
其他好文 时间:
2015-01-27 07:02:41
阅读次数:
155
public static string FullTextSpecialSymbols(string strText) { strText = strText.Trim(); strText = strText.Replace("\"","‘‘"); return strText; } 当然中间可以继续追加需要的过滤。 参考 :http://stac...
分类:
数据库 时间:
2015-01-27 02:00:03
阅读次数:
181
mongodb、redis、memcached区别:
1、tps方面:
redis和memcache差不多,要大于mongodb
2、操作数据方面:
redis提供string、hash、list、set、zset等结构,并支持mapReduce
memcached结构单一,但可以缓存图片、音频、视频等
mongodb提供丰富的查询表达式
3、内存方面:
...
分类:
数据库 时间:
2015-01-27 01:56:34
阅读次数:
273
调用库函数:String[] s = {"aa","bb","cc","dd","ee"};List list =Arrays.asList(s);String[] s1 = (String[]) list.toArray();String[] s = {"aa","bb","cc","dd","e...
分类:
编程语言 时间:
2015-01-27 01:51:44
阅读次数:
188
Http:1从网络获取数据a从网络获取图片,以byte[]字节数组保存,并构建一个Bitmapb.从网络获取为xml/Json,要解析,并封装成对象。public byte[] getNetImage(String path) throws IOException{ URL url = new U....
分类:
移动开发 时间:
2015-01-27 01:49:25
阅读次数:
211
import java.io.*;import java.util.*;import java.net.*;public class GetIP { public static void main (String[] args) throws Exception { /* ...
分类:
编程语言 时间:
2015-01-27 01:48:29
阅读次数:
167
1.仅得到@string/liyuejiao的ID作为com.rytong的值2定义Widget(extends AppWidgetProvider)当Widget被添加,删除时,根据 3通过 android.appwidget.provider这个固定的名字取得Widge...
分类:
移动开发 时间:
2015-01-27 01:47:00
阅读次数:
170
1.选自http://szh-java.iteye.com/blog/1666630String 1,Stirng是对象不是基本数据类型2,String是final类,不能被继承。是不可变对象,一旦创建,就不能修改它的值。3,对于已经存在的Stirng对象,修改它的值,就是重新创建一个对象,然后将新...
分类:
其他好文 时间:
2015-01-27 00:34:04
阅读次数:
120
Longest Substring Without Repeating CharactersGiven a string, find the length of the longest substring without repeating characters. For example, the ...
分类:
其他好文 时间:
2015-01-27 00:33:39
阅读次数:
161
ZigZag ConversionThe string"PAYPALISHIRING"is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern i...
分类:
其他好文 时间:
2015-01-27 00:30:10
阅读次数:
202