问题描述:
Given two binary strings, return their sum (also a binary string).
For example,
a = "11"
b = "1"
Return "100".
代码:
public class AddBinary { //java
public String addBinary(St...
分类:
其他好文 时间:
2014-10-28 20:06:26
阅读次数:
183
public string GetTime(DateTime dt) { Int64 retval = 0; DateTime st = new DateTime(1970, 1, 1); TimeSpan t = (...
分类:
编程语言 时间:
2014-10-28 17:18:48
阅读次数:
161
public?static?void?toBmp(String?str,String?transactionID){
??BASE64Decoder?decoder?=?new?Decoder.BASE64Decoder();
??byte[]?bytes1;
??try?{
???bytes1?=?decoder.decodeBuffer(st...
分类:
其他好文 时间:
2014-10-28 12:25:32
阅读次数:
220
考虑暴力递归求解的情况:f(i)=min(a(i),f(i-1),f(i-2),...,f(1))由于只要参数相同,f()函数的返回值是一样的,因此导致了大量的重复计算,所以我们可以记忆下来。 1 #include 2 #include 3 #include 4 using namespace st...
分类:
其他好文 时间:
2014-10-27 21:03:40
阅读次数:
180
原文链接:http://www.2cto.com/kf/201301/186760.html其实他们两个都是委托【代理】的简写形式。一、【action】指定那些只有输入参数,没有返回值的委托Delegate的代码:[csharp] public delegate void myDelegate(st...
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ListSort{ class Program { static void Main(st...
分类:
编程语言 时间:
2014-10-27 00:12:52
阅读次数:
198
一、结构体的定义
1、定义形式
struct 结构名
{成员列表;}; //定义为语句,分号不能丢
2、结构类型变量的声明
(1)声明形式1
struct student
{
int number;
char name[10];
float score;
};
struct student st...
分类:
编程语言 时间:
2014-10-26 22:53:30
阅读次数:
220
1 package test; 2 import java.io.*; 3 import java.nio.channels.FileChannel; 4 import java.util.*; 5 public class Test10_26 6 { 7 public st...
分类:
数据库 时间:
2014-10-26 22:37:07
阅读次数:
260
本文永久地址为http://www.cnblogs.com/ChenYilong/p/4052362.html,转载请注明出处。iOS开发关于Block代码错误Incompatible block pointer types sending 'void (^)([ClassNameA]] *__st...
分类:
移动开发 时间:
2014-10-26 18:20:25
阅读次数:
192
TheFirstPigProgram环境: Hadoop-1.1.2 pig-0.11.1 linux系统为CentOS6.4 jdk1.6在伪分布式下模式下运行启动:pig或pig–xmapreduce启动后会看到这样的界面就表示启动成功了我们来运行一个例子输入数据st...
分类:
其他好文 时间:
2014-10-26 14:16:29
阅读次数:
237