private static final int STREAM_BUFFER_LENGTH = 1024;private static final String ALGORITHM_MD5 = "MD5";public static String md5File(File file) { ...
分类:
移动开发 时间:
2015-04-23 19:20:35
阅读次数:
178
Httpprivate String getHttpValue() { String str=""; String url = "http://test"; URL getUrl; HttpURLConnection connection; ...
分类:
移动开发 时间:
2015-04-23 19:12:27
阅读次数:
214
进制转换例如十进制转换其他进制#include<stdio.h>
#include<string.h>
voidconvto(char*s,intn,intb)
{
charbit[]={"0123456789ABCDEF"};
intlen;
if(n==0)
{
strcpy(s,"");
return;
}
convto(s,n/b,b);
len=strlen(s);
s[len]=bit[n%b];
s[len+1]=‘..
分类:
其他好文 时间:
2015-04-23 18:02:55
阅读次数:
137
最近做一个题,用递归方法将整数n转换成为字符串,做了半天做好了才发现有一个库函数直接就可以实现这个功能,真是日了狗了。。。。小二,上代码。。。#include<stdio.h>
#include<stdlib.h>
#include<string.h>
//这个turnover函数是为了将字符串调转过来,..
分类:
其他好文 时间:
2015-04-23 17:43:12
阅读次数:
115
Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.
Below is one possible representation of s1 = "great":
great
/ gr ...
分类:
其他好文 时间:
2015-04-23 17:40:47
阅读次数:
205
cnmm22 原创。功能 把 1 转化成 A0, 2-B0, 3-C0, 21-U0, 87-I3, 2131-Y81以此类推。package dw;public class dw {
static int a;
static int b; public static void main(String[] args) { int l = 2131;...
分类:
其他好文 时间:
2015-04-23 17:40:37
阅读次数:
135
public enum QQState { OnLine=1, OffLine, Leave, Busy, QMe }枚举转int:QQState state = QQState.OnLine; //枚举类型默认可以跟int类型互相转换 枚举类型跟int类型是兼容的 int n = (int)sta...
分类:
其他好文 时间:
2015-04-23 17:21:54
阅读次数:
168
/* ***********完完整整的用堆排序来对一个序列进行排序 ************ * */import java.util.Random;public class HeapSort { public static void main(String args[]){ i...
分类:
编程语言 时间:
2015-04-23 17:20:39
阅读次数:
130
在C/C++等语言中,函数执行到 return 部分之后,将立即停止函数的执行,并返回值 但是在Delphi中不同 函数中,执行到result时,并不同于比如C/C++ 中的return,跳出函数,而是会继续执行下去,直到函数结束 下列代码:function(var A:string):s...
分类:
编程语言 时间:
2015-04-23 17:12:23
阅读次数:
139
字符串在.NET中项目中非常常用。关于String的介绍就不多说了。 背景:今天和同事讨论一个问题,。 问题描述:一段字符串,去除字符串中小括号中的内容,小括号可能有嵌套情况。 解决思路:1、先去除最内层的小括号;2、进行完第一步之后得到新的字符串,再执行第一步。3、直到最后没有括号。 ...
分类:
其他好文 时间:
2015-04-23 17:08:15
阅读次数:
128