03 2011 档案

摘要:1. 设置软件源,cn99,sohu,163 都不错2. apt-get install ubuntu-restricted-extras3. apt-get install build-essential4. apt-get install apache25. mysql-server mysql-client libmysql++-dev6. apt-get install php5 php5-mysql phpmyadmin<?php echo phpinfo();?>7. 配置adslpppoeconf 一直回车,输入帐号密码pon dsl-providerpoff dsl 阅读全文
posted @ 2011-03-27 20:20 F.N. 阅读(188) 评论(0) 推荐(0)
摘要:vsftpd 安装以及简单配置os: ubuntu 10.10ftp:vsftpd 2.30安装:apt-get install vsftpd安装完成之后,ftp 目录为 /srv/ftp 755简单配置:开启匿名上传下载1. 备份配置文件cp /etc/vsftpd.conf /etc/vsftpd.conf.bak2. 打开配置文件/etc/vsftpd.conf确保如下几项存在:1)anonymous_enable=YES2)local_enable=YES3)write_enable=YES4)local_umask=0225)anon_upload_enable=YES6)anon_ 阅读全文
posted @ 2011-03-27 16:15 F.N. 阅读(1429) 评论(0) 推荐(0)
摘要:1 /* 2 * ZJU2411.cpp 3 * 4 * Created on: 2011-3-27 5 * Author: Administrator 6 * 7 * 题目分析: 8 * 1. 异点同色之间才能消去 9 * 2. 可以走界外 10 * 11 * 算法分析: 12 * 1. 从一点出发向某个方向扩展直到不能再扩展,其他3个方向相同处理 13 * 2. 如从某一点a出发扩展,若a点方向是0,那么接下去0和2方向不需要再扩展,因为父节点已经扩展过了 14 * 3. 扩展是先入队,不标记,等出队时候再标记,因为存在以下可能: 15 * 棋板如下: 16 * 1)2) 17 * 1). 阅读全文
posted @ 2011-03-27 13:13 F.N. 阅读(605) 评论(0) 推荐(0)
摘要:数据库:CREATE DATABASE test;CREATE TABLE `test` ( `id` int(11) NOT NULL auto_increment, PRIMARY KEY (`id`));ALTER TABLE `test` ADD COLUMN `name` varchar(20);代码: 1 /* 2 ============================================================================ 3 Name : mysql_test.c 4 Author : 5 Version : 6 Copyright : 阅读全文
posted @ 2011-03-25 21:34 F.N. 阅读(14302) 评论(1) 推荐(0)
摘要:一:数据类型和取值范围1)64bit 位数据的类型,输入,输出带符号的(long long):数据范围:-9223372036854775808(19位>-1*10^19) - +9223372036854775807(19位<1*10^19)typename:long long x;input:scanf("%I64d", &x);output:printf("%I64d", x);无符号(unsigned long long):只要用之前加上unsigned 和 改成%I64u就行,数据范围:0 - +18446744073709 阅读全文
posted @ 2011-03-19 16:47 F.N. 阅读(449) 评论(0) 推荐(0)
摘要:ZOJ2421 1 /* 2 * PKU2081.cpp 3 * 4 * Created on: 2011-3-19 5 * Author: Administrator 6 */ 7 8 #include <stdio.h> 9 //#include <set>10 #include <ext/hash_set>11 using namespace std;12 using namespace __gnu_cxx;13 14 const int MAXK = 500000 + 1;15 16 //set<int> s1;17 hash_set&l 阅读全文
posted @ 2011-03-19 11:13 F.N. 阅读(812) 评论(0) 推荐(0)
摘要:1. 先看Java程序public class TestClassEqual {/*** @param args*/public static void main(String[] args) {// TODO Auto-generated method stubBase base = new Base();Base a = new A();Base a2 = new A();Base b = new B();System.out.println(base.getClass()); // class BaseSystem.out.println(a.getClass()); // class 阅读全文
posted @ 2011-03-16 20:33 F.N. 阅读(922) 评论(0) 推荐(1)
摘要:武林Time Limit: 10000/5000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1007Accepted Submission(s): 274Problem Description在一个有12行12列的方形的武林世界里,少林、武当和峨嵋三派的弟子们在为独霸武林而互相厮杀。武林世界的第一行的一列格子的坐标是(1, 1),第一行第二列坐标是(1, 2)……右下角的坐标为(12, 12)。如图:少林派弟子总是在同一列回不停地行走。先往下走,走到头不能再走时就往上走,再到头则又 阅读全文
posted @ 2011-03-16 20:15 F.N. 阅读(1445) 评论(0) 推荐(0)
摘要:1 #include <cstdio> 2 3 using namespace std; 4 5 void seq_to_tree(char seq[]) { 6 puts("seq_to_tree:"); 7 char tmp[20]; 8 printf("sizeof(seq): %d\n", sizeof(seq)); 9 printf("siezof(tmp): %d\n", sizeof(tmp));10 }11 12 int main() {13 char seq[10];14 puts("main( 阅读全文
posted @ 2011-03-13 11:29 F.N. 阅读(460) 评论(0) 推荐(0)
摘要:1. 每个进程组有1个或多个进程组成,可能有一个进程组长,也可能没有2. 每个会话有1个或多个进程组组成,可能有一个领头进程,也可能没有好,贴上测试代码: 1 #include <stdio.h> 2 #include <unistd.h> 3 #include <stdlib.h> 4 #include <sys/param.h> 5 #include <sys/stat.h> 6 #include <sys/types.h> 7 #include <fcntl.h> 8 #include <signa 阅读全文
posted @ 2011-03-10 08:18 F.N. 阅读(1372) 评论(0) 推荐(0)
摘要:1 #include <stdio.h> 2 #include <unistd.h> 3 #include <stdlib.h> 4 #include <sys/param.h> 5 #include <sys/stat.h> 6 #include <sys/types.h> 7 #include <fcntl.h> 8 #include <signal.h> 9 10 void my_daemon() {11 int pid, fd;12 13 // 1.转变为后台进程14 if ((pid = 阅读全文
posted @ 2011-03-09 21:51 F.N. 阅读(4364) 评论(0) 推荐(2)