package XXXX;
import java.io.ByteArrayOutputStream;
/**
* Description 字符串(包含中文)和16进制之间的转换
*/
public class CodeChange {
/**
* 16进制数字字符集
*/
private static String hexString="012345678...
分类:
其他好文 时间:
2015-01-06 11:59:30
阅读次数:
173
#include
#include
char a[]={'a','b','a','c','a','c','d','e','k','b'};
typedef char key_type;
typedef struct node{
key_type key;
struct node *next;
}node, *pnode;
void insert(pnode *root, key_type k...
分类:
其他好文 时间:
2015-01-06 11:58:17
阅读次数:
121
(1)CString转换为string
CString cs(_T("cs"));
string s;
s = (LPCSTR)(CStringA)(cs);
(2)string转换为CString
string s ="Hello World!中国";
CString cs(s.c_str());...
分类:
其他好文 时间:
2015-01-06 11:57:22
阅读次数:
165
结构体:相当于是我们自己定义的一种复杂的类型。int... double float bool char string DateTime 数组类型生活中大部份的对象都是复合型的对象。如何定义结构体类型?一般来说结构体的定义要放在class的外面或class的里面,尽量不放在Main的里面。struc...
1 public string GetPage(string posturl, string postData) 2 { 3 Stream outstream = null; 4 Stream instream = null; 5 ...
测试模拟环境:在www.1905.com网站中执行两个用户的登陆退出操作需要的文件有:1、User的实例类:public class User { private String username; private String password; public String get...
分类:
数据库 时间:
2015-01-06 11:32:24
阅读次数:
201
string类型转成byte[]:byte[]byteArray=System.Text.Encoding.Default.GetBytes(str);byte[]转成string:stringstr=System.Text.Encoding.Default.GetString(byteArray)...
1.vector初始化方法1.1vector、list、deque、string初始化方法//四种初始化方法 //初始化方法1 //1.10个1; vector vec1(10, 1); vector vec2{0,1,2};//列表初始化 vector vec3; ...
分类:
其他好文 时间:
2015-01-06 11:29:16
阅读次数:
400
题目:
Given two numbers represented as strings, return multiplication of the numbers as a string.
Note: The numbers can be arbitrarily large and are non-negative.
Answer 1:
基础法
大整数...
分类:
编程语言 时间:
2015-01-06 10:11:54
阅读次数:
222
输入一个字符串,输出最长回文子串。当最长回文子串不止一个时,全部输出。
#include
#include
using namespace std;
#define N 100
string convert(string s)
{
string out="";
int len=s.length();
for (int i=len-1;i>=0;i--)
{
...
分类:
其他好文 时间:
2015-01-06 10:04:03
阅读次数:
134