字符串的相乘,可用于解决大数相乘,注意首尾颠倒
class Solution {
public:
string multiply(string num1, string num2) {
if(num1 == "0" || num2 == "0") return "0";
int l1 = num1.length(), l2 = num2.length();
i...
分类:
其他好文 时间:
2015-03-01 21:04:55
阅读次数:
132
普通的ajax的调用后台选择返回json数据(当然也可以返回string的字符串等等),return Json(new { msg = "Datetime from server:" + DateTime.Now.ToString("HH:mm:ss"),msgType="ok" }, ...
分类:
Web程序 时间:
2015-03-01 21:02:01
阅读次数:
178
//把日期转为字符串publicstaticStringConverToString(Datedate){DateFormatdf=newSimpleDateFormat("yyyy-MM-dd");returndf.format(date);}//把字符串转为日期publicstaticDateC...
分类:
其他好文 时间:
2015-03-01 20:51:27
阅读次数:
173
Java获取本地服务器IP,我们最简单的写法:
import java.net.InetAddress;
public class CatchIp{
public static void main(String[] args)
{
try
{
// 获取IP地址
String ip = InetAd...
分类:
编程语言 时间:
2015-03-01 19:49:15
阅读次数:
189
ZOJ 3818 Pretty Poem (暴力模拟 string(substr))...
分类:
其他好文 时间:
2015-03-01 18:31:25
阅读次数:
144
1 public static string GetMD5(string str) 2 { 3 //创建MD5对象 4 MD5 md5 = MD5.Create(); 5 //开始使用MD5对象进行加密 6 ...
分类:
其他好文 时间:
2015-03-01 18:27:35
阅读次数:
136
package test;public class Condition_Phase { public static void main (String[] args) { //The Traditional Mode int money = 9...
分类:
编程语言 时间:
2015-03-01 18:21:33
阅读次数:
180
func?getSSID()?->?String??{
????????let?interfaces:?CFArray!?=?CNCopySupportedInterfaces()?.takeRetainedValue()
????????if?interfaces?==?nil?{?return?nil?}
?...
分类:
编程语言 时间:
2015-03-01 17:16:41
阅读次数:
660
#include<iostream>
#include<string>
#include<cstring>
#include<string.h>
#include<algorithm>
#include<cstdlib>
#include<stdio.h>
using?namespace?std;
const?int?maxn?=?10017;
const?int?max...
分类:
其他好文 时间:
2015-03-01 17:15:02
阅读次数:
152
EF 6 支持Enum 的处理这里只说一下概念,因为我没有使用这个做法.首先说一下 mysql 和 sql server 的区别mysql 是有 Enum 这个类型的 , insert 时是放入 int , 出来的时候它会是 string (int to str 是设定在 mysql 内的)mssq...
分类:
编程语言 时间:
2015-03-01 16:59:42
阅读次数:
149