自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

  • 博客(18)
  • 收藏
  • 关注

原创 《Core Java 2》读书笔记(二)

1,防御性编程。必要时应当考虑采取保护性拷贝的手段来保护内部的私有数据,先来看下面这个例子:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->pubic final class Period{    private final Date st

2009-09-28 14:39:00 611 1

原创 RedHat Enterprise Linux 5下配置Apache+Mysql+Php

第一步:系统与软件的准备系统版本 redhat enterprise linux v5.3 ,内核版本 2.6.18第二步:软件包的准备Apache2软件包:httpd-2.2.13.tar.gzphp5软件包:php-5.3.0.tar.gz第三步, 架设YUM仓库    由于系统连GCC都没有给我们安装,因此是无法直接去make安装上述源代码的,必须先使用系统光

2009-09-24 16:39:00 1139

原创 《Core Java 2》读书笔记(一)

      1,一个线程可以调用interrupt方法来请求终止另一个线程的运行,也就是说线程的 run方法应该不时检查一下它是否应该退出。线程不应该连续不断地工作,应该偶尔进入睡眠或等待状态,以便其他线程由机会得以执行。但当一个线程进入睡眠状态时,它就无法检查自己是否应该终止运行。当另一个线程对当前被中断运行的线程对象调用interrupt方法时,中断调用(sleep或wait)将被

2009-09-22 19:39:00 823

原创 HDU1272 小希的迷宫

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1272Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#includeiostream>using namespace std;const in

2009-09-15 18:39:00 962

原创 HDU1177 "Accepted today?"

题目链接:http://acm.pku.edu.cn/JudgeOnline/problem?id=1177Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#include iostream>#include algorithm>#incl

2009-09-14 20:39:00 812

原创 HDU1042 N!

题目链接:http://acm.pku.edu.cn/JudgeOnline/problem?id=1042Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#includeiostream>#includestdio.h>#includes

2009-09-14 16:39:00 883

原创 解决VMware中没有eth0的问题

早上过来同学碰到一个问题,VMware里面安装的Ubuntu找不到以太网卡eth0了,反而多出一个eth1,但是网络就是不正常,局域网内彼此ping不通。搜索了一下,解决方法如下:以root权限删除 /etc/udev/rules.d/70-persistent-net.rules这个文件,然后重启系统。Code highlighting produced by Actipro C

2009-09-14 10:39:00 1195

原创 HDU1002 A + B Problem II(修正版)

最近又开始做ACM题目了,昨天无意中翻阅自己写的一些blog,在07年写的一篇blog:http://www.cnblogs.com/phinecos/archive/2007/12/22/1011028.html,发现评论中有朋友报了一个bug,随手调试了下程序,发现错误原因在于少了“++”,不过那代码也是AC了的,这说明OJ的测试数据有问题。特此修正代码如下:Code highli

2009-09-14 09:39:00 756

原创 HDU1301 Jungle Roads(克鲁斯卡尔算法版)

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1301通过对数组构造一个静态链表,将在同一个连通分量中的顶点链接起来。对按边权值从大到小排序后的边集合逐条进行判断,若边的起点和终点分别在不同的连通分量链表中(这通过获取其所在链表的表尾元素是否是同一个来进行判定),则此边加入最小生成树的边集合中,并将边的终点加入到边的起点所在的静态链表中。

2009-09-13 23:39:00 690

原创 HDU1301 Jungle Roads(普里姆算法版)

题目链接:http://acm.pku.edu.cn/JudgeOnline/problem?id=2403Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#include iostream>#include limits>using na

2009-09-13 12:39:00 925

原创 POJ1023 The Fun Number System

Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#includeiostream>#include string>using namespace std;string str;;__int64 N;int k;int result[100];i

2009-09-13 10:39:00 815

原创 POJ2121 Inglish-Number Translator

Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#include iostream>#include string>#include map>#include algorithm>using namespace std;mapstring, i

2009-09-12 21:39:00 1453 1

原创 POJ1318 Word Amalgamation

题目链接:http://acm.pku.edu.cn/JudgeOnline/problem?id=1318Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#include set>#include iostream>#include st

2009-09-12 16:39:00 944

原创 POJ2403 Hay Points

题目链接:http://acm.pku.edu.cn/JudgeOnline/problem?id=2403Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#include map>#include iostream>#include st

2009-09-12 15:39:00 683

原创 POJ1287 Networking

题目链接:http://acm.pku.edu.cn/JudgeOnline/problem?id=1287Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#include iostream>#include limits>using na

2009-09-12 14:39:00 642

原创 浅谈大数的进制转换

      在数据结构课关于栈的这一章中,我们都学过用“模2取余法”来将一个10进制数转换为一个二进制数,进而可以推广到“模n取余法”,经其转换为n进制(n任意指定)。确实,这是一个很基础的题目,可你是否想过如果这个10进制数是一个大数(其位数可能上千位,此时用一般数据类型肯定是会溢出的),那么这个问题又如何来求解呢?当然,也许你会说很简单嘛,自己写一个大数类(当然至少要写一个大数

2009-09-11 19:39:00 1157

原创 Ubuntu Server 网络配置

      实验室内部搭建了个网站,放在虚拟机中Ubuntu Server下,需要进行配置以便局域网内都可以访问。0)虚拟机改成"桥接"模式.1)修改IP打开 /etc/network/interfaces Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighl

2009-09-11 18:39:00 648

原创 Ubuntu Server下安装Discuz7.0

1,安装数据库和Web服务器Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->$sudo apt-get install apache2 mysql-server php5 php5-mysql php5-gd phpmyadmin2,安

2009-09-10 23:39:00 680

空空如也

空空如也

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

TA关注的人

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