- 博客(30)
- 资源 (5)
- 收藏
- 关注
原创 Image Process
package function;import java.awt.image.BufferedImage;import java.io.File;import java.io.IOException;import javax.imageio.ImageIO;public class ImageProcessor { public static Bu
2009-09-04 17:43:00
752
原创 bmp转灰度图
FILE * fp; FILE * newfile; char * path = "E://CarlyFiorina.bmp"; char * newpath = "E://new.bmp"; fp = fopen(path, "rb"); newfile = fopen(newpath, "wb"); fseek(fp, 0L, SEEK_END);
2009-08-19 16:21:00
640
原创 java MySql
final String url = "jdbc:mysql://localhost:3306/filedb"; final String username = "root"; final String password = "123456"; Connection conn; Statement stmt;
2009-08-19 14:52:00
463
原创 Queue
#ifndef _QUEUE_H_INLCUDE#define _QUEUE_H_INLCUDE#define QUEUE_MAXSIZE 10typedef struct{ int * queue; int front,rear;} Queue;void InitQueue(Queue &Q);void EnterQueue(Queue &Q,
2009-08-12 13:57:00
411
原创 LinkList
#include "LinkList.h"#include #include void InitList(LinkList &L){ L = (LinkList) malloc(sizeof(LNode)); L->next = NULL; LinkList p; for (int i = 0; i < 5; i++) { p = (LinkList)
2009-08-11 17:57:00
526
原创 Select Sort
#include "SelectSort.h"int SelectMinKey(SqList * L, int index){ int min = index; for(int i = index; i length; i++) { if(L->r[i].key r[min].key) min = i; } return min;}void
2009-08-10 15:48:00
428
原创 C文件操作常用函数
函数名: fseek 功 能: 重定位流上的文件指针 用 法: int fseek(FILE *stream, long offset, int fromwhere); 程序例: #include long filesize(FILE *stream); int main(void) { FILE *stream; stream
2009-08-07 15:21:00
374
原创 Quick Sort
typedef int KeyType;typedef struct { KeyType key;} RecordType;typedef struct { RecordType * r; int length;}SqList;int Partition(SqList * L, int low, int high){ L->r[0] = L
2009-08-06 13:47:00
373
原创 Bubble Sort
void BubbleSort(SqList &L){ for (int i = L.length; i > 1; i--) { bool change = false; for (int j = 1; j < i; j++) { if(L.r[j + 1].key < L.r[j].key) { KeyType temp = L.r[j].
2009-07-28 15:20:00
322
原创 Insert Sort
#include #include #define MAXSIZE 20;typedef int KeyType;typedef struct { KeyType key;} RecordType;typedef struct { RecordType * r; int length;}SqList;void InitSqList(
2009-07-28 14:41:00
510
原创 javamail发送电子邮件
Properties prop = new Properties(); prop.put("mail.smtp.host", SMTP); prop.put("mail.smtp.auth", "true"); prop.put("mail.debug", "true"); Session session = Session.
2009-07-27 16:08:00
433
原创 斐波那契数列非递归计算
斐波那契数列用递归计算十分的浪费空间int fabo(int n) { if(n <= 0) { return 0; } if(n == 1 || n == 2) { return 1; } int fabo1 = 1; int fabo2 = 1; int result = 1; for (int i = 2; i < n; i+
2009-07-27 14:33:00
561
原创 静态查找表
#include #include typedef int KeyType;typedef struct { KeyType key;} ElemType;typedef struct { ElemType * elem; int length;}SSTable;void Display(SSTable ST);void InitSStabl
2009-07-24 15:17:00
487
原创 3n+1 猜想
问题如下: (1)输入一个正整数n; (2)如果n=1则结束; (3)如果n是奇数,则n变为3n+1,否则n变为n/2; (4)转入第(2)步。问:对于任意正整数n是否会在有限步结束?编程如下:while(n > 1) { cout<<n<<endl; if(n % 2 != 0) { n = 3 * n
2009-07-24 10:25:00
619
原创 批处理--以当前日期创建文件夹
使用命令md创建文件夹,参数%date:~0,10%,其中0,10是指从date这个值的第0个字符开始,截取10个长度
2009-07-20 16:06:00
1316
原创 A common Ant file format for simple java project
debug="true" srcdir="./"> jarfile="./build/*****.jar"
2009-03-17 10:47:00
515
原创 Useful Phrase series-I
be in effect 有效Example: this ticket is in effect from June 10, 2008 to July 5, 2008
2008-10-28 17:13:00
365
原创 The Different Format of Date in English
The two different date format is the following:1.British format: day + month + year,and the day should use ordinal number, For example: 10th March,20082.American format: month + day + year,and
2008-10-28 17:04:00
615
转载 Linux的几种关机命令---转自百度Linux再开发吧
Linux关机命令详解 在linux下一些常用的关机/重启命令有shutdown、halt、reboot、及init,它们都可以达到重启系统的目的,但每个命令的内部工作过程是不同的,通过本文的介绍,希望你可以更加灵活的运用各种关机命令。 1.shutdown shutdown命令安全地将系统关机。 有些用户会使用直接断掉电源的方式来关闭linux,这是十分危险的。因为linu
2008-10-10 16:46:00
490
原创 The amazing efficiency of pointer in C Programming Language
Today I read a book names C Programming Language and Pointer,In some section I found an amazing efficiency programme by using pointer,the examples topic is copy an array.you will see the effect
2008-09-28 13:39:00
412
原创 What is love
love is starting out with nothing but lovelove is speaking her languagelove is being understanding,not demandinglove is giving him another chancelove is wanting to look beautiful for himlove
2008-09-28 09:58:00
579
翻译 约瑟夫问题
说明据说著名犹太历史学家 Josephus有过以下的故事:在罗马人占领乔塔帕特后,39 个犹太人与Josephus及他的朋友躲到一个洞中,39个犹太人决定宁愿死也不要被敌人抓到,于是决定了一个自杀方式,41个人排成一个圆圈,由第1个人开始报数,每报数到第3人该人就必须自杀,然后再由下一个重新报数,直到所有人都自杀身亡为止。然而Josephus 和他的朋友并不想遵从,Josephus要他的朋友先
2008-09-27 14:15:00
422
原创 Microsoft Office Word、Excel and PowerPoint 2007 file format compatible package
Microsoft Office Word、Excel and PowerPoint 2007 file format compatible package Chinese Simplifydownload url:http://www.microsoft.com/downloads/thankyou.aspx?familyId=941b3470-3ae9-4aee-8f43-c6bb7
2008-09-27 10:07:00
522
原创 The Josephus Problem
I recently find a class of questions called the josephus problem,all those questions is similar with the following: long long ago,there was a king,he is a mathematician but crue and brutall ,
2008-09-26 16:31:00
1170
2
原创 System Properties of Java VM
KeyValuejava.versionJava 运行时环境版本java.vendorJava 运行时环境供应商java.vendor.urlJava 供应商的 URLjava.homeJava 安装目录java.vm.specification.versionJava 虚拟机规范版本java.vm.specifi
2008-09-23 16:12:00
793
原创 Java分割txt文件
Java分割txt文件,现在网络小说比较长,好多朋友想用手机或者mp3之类的工具阅读,但是文件太大不方便,于是乎,我就写了一个分割文件的小程序,时间仓促,从有想法到写出初稿大概用来半个小时。先贴上来,以后再修改完善。 简要说明一下注释一下,直接在代码添注释看着不好看,sourceFile是要分割的文件的路径,targetDirectory是分割后的文件的保存位置,prefix是分割后文件的
2008-07-30 15:37:00
3972
原创 Java实现文件复制
个人经历,Java的学习过程,一开始对IO不是太了解,关于file读取操作的类有FileInputStream,FileReader,RandomAccessFile等,不知道该用哪个,后来在网上查资料看到FileInputStream比较适合文件复制。写了一个简单的文件复制类:import java.io.File;import java.io.FileInputStream;import
2008-07-28 15:13:00
562
转载 Smartupload和commons-fileupload介绍与比较
WEB文件上传可能是网站建设中最常用的功能之一,我在项目开发中几乎都需要实现文件上传功能.前段时间自己搜集了一些上传组件.这篇文章中将介绍这些组件的使用方法,并且比较各自的优劣.一,smartupload组件.我想只要做个文件上传的朋友都知道这个组件,我认识的人中使用最多的也是它!我刚到公司的时候,公司也使用的smartupload,这个组件上传相对较小的文件时是个不错的选择.下面给出个使
2008-07-23 15:43:00
482
转载 用JAVA访问共享文件系统
前言在Microsoft 网 络 系 统 中,SMB(Server Message Block, 服 务 信 息 块) 协 议 是Windows for Workgroup(WfWg)、Windows 95、Windows NT 和LanManager 用 来 实 现 共 享 局 域 网 上 文 件 和 打 印 机 的 协 议。 对 于 利 用Linux 和Windows NT 构 建 的 局
2008-07-23 15:23:00
536
JavaScript官方标准
2009-07-16
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人