#include #include #include using namespace std;#define mod 1003int quick_power(int a, int b){ if(a == 0) return 0; int ret = 1; while(b) {...
分类:
其他好文 时间:
2015-01-09 20:48:56
阅读次数:
188
简单的FTP下载 ,不加任何异常判断。
import os
from ftplib import FTP
ftp_addr = '10.10.0.1'
f=FTP(ftp_addr)
f.login('anonymous')
f.cwd("apk_download/")
remote_file = '20141223140651.apk'
f.retrbinary("RET...
分类:
编程语言 时间:
2015-01-09 17:32:39
阅读次数:
464
Follow up for "Remove Duplicates":What if duplicates are allowed at mosttwice?For example,Given sorted array A =[1,1,1,2,2,3],Your function should ret...
分类:
其他好文 时间:
2015-01-09 15:27:07
阅读次数:
142
https://oj.leetcode.com/problems/single-number/http://blog.csdn.net/linhuanmars/article/details/22648829publicclassSolution{
publicintsingleNumber(int[]A)
{
//SolutionA
//returnsingleNum_Xor(A);
//SolutionB
returnsingleNum_BitCompare(A);
//SolutionC
//ret..
分类:
其他好文 时间:
2015-01-08 18:16:14
阅读次数:
141
package main
import (
"fmt"
"log"
"os"
"runtime"
"syscall"
"time"
)
func daemon(nochdir, noclose int) int {
var ret, ret2 uintptr
var err syscall.Errno
darwin...
分类:
系统相关 时间:
2015-01-07 16:59:28
阅读次数:
1557
Follow up for "Remove Duplicates":What if duplicates are allowed at mosttwice?For example,Given sorted array A =[1,1,1,2,2,3],Your function should ret...
分类:
其他好文 时间:
2015-01-07 00:23:00
阅读次数:
245
判断客户端是否为IEpublic static boolean isIE(HttpServletRequest request) { String userAgent = request.getHeader("User-Agent").toLowerCase(); ret...
分类:
Web程序 时间:
2015-01-06 20:01:23
阅读次数:
156
题目:(DP, Backtracing)Given a stringsand a dictionary of wordsdict, add spaces insto construct a sentence where each word is a valid dictionary word.Ret...
分类:
其他好文 时间:
2015-01-02 06:23:46
阅读次数:
122
题目链接:点击打开链接
好久没发题解了,
第一维的线段树更新到底,叶子节点建一棵线段树。
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
template
inline bool rd(T &ret) {
char c; in...
分类:
其他好文 时间:
2015-01-01 21:18:20
阅读次数:
368
CREATE PROCEDURE [dbo].[ReplaceSameStr]@str varchar(8000)ASdeclare @ret varchar(8000),@return varchar(8000) select @str = @str select @str = @str+...
分类:
数据库 时间:
2014-12-31 18:01:53
阅读次数:
188