public static String md5(String src){ try { StringBuffer buffer = new StringBuffer(); char[] chars = {'0','1','2','3','4'...
分类:
其他好文 时间:
2014-07-16 23:24:53
阅读次数:
192
1.数据类型:整型 实型(浮点型) 字符型 int 4(字节)short 2 (字节) long 4字节(在32位的操作系统中)8字节(在64位的操作系统中) float 4(字节)double 8(字节)char 1(字节)2.变量三部分组成:类型修饰符 变量名 =初值 int age ...
分类:
编程语言 时间:
2014-07-16 23:22:30
阅读次数:
326
#include int main(int argc, const char * argv[]){ // insert code here... //计算十进制42转换为二进制、八进制、十六进制分别对应的值 int number1=42; /* int number1=42; for (number...
分类:
编程语言 时间:
2014-07-16 23:20:11
阅读次数:
394
1,限制只能输入数字 private void txtSize_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar != 8 && e.KeyChar != 13 && !char.IsDi...
分类:
Web程序 时间:
2014-07-16 23:18:55
阅读次数:
256
/// /// 创建验证码 /// /// private string GenerateCheckCode() { int number; char code; string checkCode = String.Empty; ...
分类:
Web程序 时间:
2014-07-16 23:12:18
阅读次数:
205
1.个位数统计:
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
char s[1005];
int n, a[10];
int main(){
while(gets(s)) {
memset(a,...
分类:
其他好文 时间:
2014-06-28 08:55:24
阅读次数:
191
#include "my_file.h"
//将文件内容拷贝到指定文件
int mycopy(const char *filename)
{
ifstream infile(filename, ios::binary);
ofstream outfile("TRACE.txt", ios::binary);
if (!infile.is_open() || !outfile...
分类:
其他好文 时间:
2014-06-28 08:46:56
阅读次数:
199
学习过C语言的同学都知道,再写代码的时候,位操作运算总比算数运算操作快,
本文就是用C语言提供的位运算实现两个数的加法。
本文使用的代码都经过调试正常并且能够运行,调试环境centos gcc 一下是实现代码,以及测试结果:
#include
#include
int main(int argc, char **argv)
{
int add_a,add_b;...
分类:
其他好文 时间:
2014-06-28 07:26:38
阅读次数:
183
main一般没有参数intmain(char*string)导致运行出错char*string="a";(对)char*string=‘a’;(错)chara;(对)char*b=&a;*b=‘c‘;char*b=‘c‘;(错)int*p;*p=7;错给指针指向的数据赋值,这里的p还没有指向,所以不能赋值。这种指针称为“悬浮指针”,俗称“野指针”,是不..
分类:
编程语言 时间:
2014-06-28 06:03:46
阅读次数:
240
This question is not so difficult.
First,my thoughts were we should use a lot of code to find out the loop block,but there is no need to do that .
you just need to get every new position of char in ...
分类:
其他好文 时间:
2014-06-27 23:39:44
阅读次数:
293