自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(28)
  • 收藏
  • 关注

原创 Ubuntu 下 apache服务器配置实验

[实验目的] 1. 了解互联网应用层基本原理2. 自己设计一个静态网页[实验原理]网络应用软件的体系结构可分为C/S模型和B/S模型。飞信是典型的C/S模型,而WebQQ则是典型的B/S模型。本次实验所将要搭建的静态网页采用的是B/S模型。服务器端软件采用的是广泛使用的apache服务器。1. 关于apache服务器Apache HTTP Server(简称

2013-05-28 21:50:52 604

原创 Learn to Write Your Makefile

[实验目的] 1. 掌握基本的Linux下makefile的编写技能2. 能够阅读常见的makefile[实验任务]在linux平台上编译Sonia的一个project:    [Sonia] Implementation of Huffman Algorithm将上述工程文件编译成可执行文件huffman  [基本原理]1. 依

2013-05-28 11:49:47 490

原创 网络配置的四大基本要素: IP + Netmask + Gateway + DNS

1.  IPIP地址(英语:Internet Protocol Address)是一种在Internet上的给主机编址的方式,也称为网际协议地址。常见的IP地址,分为IPv4与IPv6两大类。IP地址就像是我们的家庭住址一样,如果你要写信给一个人,你就要知道他(她)的地址,这样邮递员才能把信送到。计算机发送信息就好比是邮递员,它必须知道唯一的“家庭地址”才能不至于把信送错人家。只不过我

2013-05-27 15:00:34 7802 1

原创 正则表达式

1. 基本概念        在计算机科学中,是指一个用来描述或者匹配一系列符合某个句法规则的字符串的单个字符串。在很多文本编辑器或其他工具里,正则表达式通常被用来检索和/或替换那些符合某个模式的文本内容。许多程序设计语言都支持利用正则表达式进行字符串操作。例如,在Perl中就内建了一个功能强大的正则表达式引擎。正则表达式这个概念最初是由Unix中的工具软件(例如sed和grep)普及开的

2013-05-27 08:43:39 446

原创 From Source Code to an Executalbe File ----- Learning of Gcc on Linux Operating Systems

Windows make you fool and to learn the computer, you'd better use the linux from now on !

2013-05-25 15:09:39 540

原创 Mercurial -- An Excellent Version Control Tool

0. Install a mercurial on Ubuntu    sudo apt-get install mercurial1.  Create a project and commit     >  hg  init         my_dir     >  [ add some files ]     >  hg add   [new files or

2013-05-25 10:23:08 429

原创 C++ 编程练习3

C++版Dijkstra最短路径算法///////////////////////////////////////////////////////////////////////////////////////file:ShortestPath.h#ifndef _SHORTESTPATH_H_#define _SHORTESTPATH_H_#define MAX_

2013-05-15 08:27:22 511

原创 Redhat 网络配置

1. /etc/sysconfig/network-scripts/ifcfg-eth1DEVICE=eth1ONBOOT=yesBOOTPROTO=staticIPADDR=10.2.8.70NETMASK=255.255.0.0GATEWAY=10.2.0.254DNS1=159.16.39.1 2. /etc/resolv.conf    name

2013-05-13 15:05:17 432

原创 c++编程练习2

1. 给定一个带权(非负)有向图,打印输出从节点S到节点T的最短路径(要求打印最短路径长度和具体的路径)int main() { Graph G;   // Graph is a class with template G.build(data.txt);  // build the graph Path path;  //Path is a class with templa

2013-05-06 11:04:42 356

原创 Function object

#ifndef _SHAPE_H_#define _SHAPE_H_#include using namespace std;class Shape{public: virtual double area() const = 0; virtual double perimeter() const = 0;};class Square;class Rect

2013-05-05 16:53:39 360

原创 inheritance and virtual

#ifndef _INHERIENCE_H_#define _INHERIENCE_H_#include using namespace std;class vehicle{private: char* id; double price; char* owner;public: vehicle(char* iden = NULL, double pr

2013-05-01 17:29:00 639

原创 C++ 编程练习1

1. 编写日历打印程序,要求实现如下的main函数:    class Calendar;    int main() {        Calendar c0;        Calendar c1(2013);        Calendar c2(2013, 4);        Calendar c3(2013, 4, 23);         cout

2013-04-23 13:53:54 394

原创 The complex class

// File name : complex.h#ifndef _COMPLEX_H_#define _COMPLEX_H_#include using namespace std;class complex {public: complex(double x = 0, double y = 0) { real = x; imag = y; }

2013-04-21 16:44:35 434

原创 [Linux] Touch--Change the time of files after changing your system time

Use command:   touch  Update the access and modification times of each FILE to the current time.Format:           1) find . |  xargs touch           2) find ./ -type X | xargs touch

2013-04-11 08:52:16 455

原创 编程进阶练习3

1. Dijkstra 最短路径算法//File name: shortest_path.h#ifndef _SHORTEST_PATH_H_#define _SHORTEST_PATH_H_#include #include #define MAX_NUM 20#define MAX 1000struct graph { int nodes_n

2013-04-07 19:31:11 442

原创 JVM-20130326

1. public static void main (String args[]) {long startTime = System.currentTimeMillis(); int x = 1; int y = 1; int z = 1; a.cal1(x, y, z); a.cal2(x, y, z)

2013-03-26 11:23:54 359

原创 JVM-20130325

class a { public static int addmult(int x, int y, int z) { int temp = x + y; return z * temp; } public static int cal1(int x, int y, int z) { int sum = 0;

2013-03-25 20:10:10 520

原创 编程进阶练习2

1. 给定一个图G, 判断是否存在一条从 S 到 T  的长为 K 的路径。[Accepted 2013/03/27] 1) 邻接矩阵版//File name : is_path.hpp#ifndef _IS_PATH_H_#define _IS_PATH_H_#include #include #define MAX_NUM 100struct

2013-03-25 11:36:35 390

原创 Micro Java Programs for JVM

1.public class Main { public static void main(String[] args) { for(int i=0; i<100; i++) foo(); } private static void foo() { for(int i=0; i<100; i++)

2013-03-19 16:29:08 355

原创 编程进阶练习1

1. 编程实现大数乘法(十进制128位以上,乘数与被乘数均不超过1024位)[Accepted 2013/03/21]#include #include #define MAX_LEN 1024void print(char data[]) { int i = 0; for(i = 0; i < 2 * MAX_LEN; i++) { if(data[i]

2013-03-19 14:43:46 463

原创 初学者编程练习3

1. 快速排序算法    [Accepted 2013/03/12]void quick_sort(int data[], int low, int high) { //对data[]做快速排序 int pivoc = 0; if(low < high) { //长度大于1 pivoc =

2013-03-12 08:56:36 403

原创 初学者编程练习2

1. 给定一个链表N,将其逆置;    [Version 1: Accepted 2013/03/05]// File name: inverse_link.h#ifndef _INVERSE_LINK_H_#define _INVERSE_LINK_H_#define MAX_LEN 100#include #include struct node

2013-03-04 21:57:47 252

原创 [Sonia] Implementation of Huffman Algorithm

首次使用自顶向下的方法进行编程,初步感受到了增量式编码与调试的优点,能独立解决编程过程中出现的各种Bug。 进步明显且迅速,特此表扬,(*^__^*) …… //File name: h_tree.h#ifndef _H_TREE_H_#define _H_TREE_H_#define MAX_NODES 100#define MAX_CODE_LEN 100#

2013-03-04 21:44:52 360

原创 [Sonia] Implementation of a Binary Tree Sort in C

[First Accepted Time: 2013/02/26]1. Basic binary tree structure definition//File name: binary_sort.h#ifndef _BINARY_SORT_#define _BINARY_SORT_#include #include struct binary_tree{

2013-02-27 14:51:51 293

原创 初学者编程练习1

[2013年2月26日]1. 编程判断两棵给定的二叉树是否相等    Version 1 [Accepted 2013/02/27]bool equal_bin_tree(struct binary_tree* b_tree1, struct binary_tree* b_tree2){ if(b_tree1 == NULL) { if(b_tree2 == NU

2013-02-26 21:14:23 417

原创 Fool's Scripts for Some Debugging

1. regressionfor v in *.java; do name=`echo $v | cut -d. -f1` echo == $name == #/usr/lib/jvm/java-6-openjdk/bin/java $name \ /mnt/j2sdk-image/bin/java \ -server \ -Xint

2013-02-24 16:10:12 440

原创 [Segmentation Fault] Oops! The filename points to a constant string

We can compile the following program using the gcc compiler.  But when running it, we get a segmentation fault.Why ?#include int main(){ // The following statement is equal to " cons

2013-02-24 15:49:43 400

原创 Hello world in Java

Hello everyone ! This is my first blog. The following is a hello world program in Java.class hello { public static void main(String args[]) { System.out.println("hello world !");

2013-02-24 11:15:38 465

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除