05 2013 档案

摘要:进入fedora12,然后打开命令行输入su回车,输入你root用户的密码,这样就以超级管理员的身份操作命令行了,然后输入以下命令:gedit /boot/grub/grub.conf这样就会打开系统启动的设置文件,不要怕命令行下报错,没有问题,直接在gedit下编辑这个grub.conf文件,在“rhgb quiet”这句后面,加上楼主自己找到的vga=792,成为这样:(以我fedora12的grub.conf为例)kernel /vmlinuz-2.6.31.1-56.fc12.i686.PAE ro root=UUID=0a86cf1f-ea02-4016-9c15-c9c537489 阅读全文
posted @ 2013-05-19 15:27 Levi.duan 阅读(1050) 评论(0) 推荐(0)
摘要:关系数据库中的关系必须满足一定的要求。满足不同程度要求的为不同范式。数据库的设计范式是数据库设计所需要满足的规范。只有理解数据库的设计范式,才能设计出高效率、优雅的数据库,否则可能会设计出错误的数据库.目前,主要有六种范式:第一范式、第二范式、第三范式、BC范式、第四范式和第五范式。满足最低要求的叫第一范式,简称1NF。在第一范式基础上进一步满足一些要求的为第二范式,简称2NF。其余依此类推。范式可以避免数据冗余,减少数据库的空间,减轻维护数据完整性的麻烦,但是操作困难,因为需要联系多个表才能得到所需要数据,而且范式越高性能就会越差。要权衡是否使用更高范式是比较麻烦的,一般在项目中,用得最多的 阅读全文
posted @ 2013-05-15 22:43 Levi.duan 阅读(338) 评论(0) 推荐(0)
摘要:DescriptionIn the summer vacation, LRJ wants to improve himself in computer science. So he finds out N books of computer science in the school library. The books are numbered from 0 to N-1.To finish reading the i-th book, it takes LRJ time[i] minutes. But some books are similar in the content. If th 阅读全文
posted @ 2013-05-15 20:07 Levi.duan 阅读(245) 评论(0) 推荐(0)
摘要:1 public class MyThread extends Thread { 2 public static int i=0; 3 4 public static synchronized void test(int x){ 5 System.out.println(i+"::::"); 6 i=x+i; 7 } 8 9 public void run(){10 //the method is overwritten 11 // int i=0;12 whil... 阅读全文
posted @ 2013-05-11 10:09 Levi.duan 阅读(170) 评论(0) 推荐(0)
摘要:1 import java.util.Arrays; 2 4 public class Work { 7 public static void main(String[] args) { 8 int num[]=new int [10]; 9 // 扩容因子 为 20% 10 12 14 17 10 for(int i=0;i<100;i++){11 //***12 /**13 * 14 * 1.什么情况下需要扩容,什么情况不需要?15... 阅读全文
posted @ 2013-05-10 17:34 Levi.duan 阅读(250) 评论(0) 推荐(0)
摘要:Python 发送微博 1 #!/usr/bin/env python 2 # -*- coding: utf-8 -*- 3 4 from weibo import * 5 6 def press_sina_weibo(): 7 8 APP_KEY = 'XXXX' 9 APP_SECRET = 'XXXX'10 11 CALLBACK_URL = 'https://api.weibo.com/oauth2/default.html'12 13 client = APIClient(app_key=APP_KEY, app_secret=... 阅读全文
posted @ 2013-05-10 14:37 Levi.duan 阅读(271) 评论(0) 推荐(0)
摘要:Linux vi: 1 " F5编译和运行C程序,C++程序,Python程序,shell程序,F9 gdb调试 2 " 请注意,下述代码在windows下使用会报错,需要去掉./这两个字符 3 4 " <F5> 编译和运行C 5 map <F5> :call CompileRunGcc()<CR> 6 func! CompileRunGcc() 7 exec "w" 8 exec "!gcc % -o %<" 9 exec "! ./%<"10 endfu 阅读全文
posted @ 2013-05-08 07:45 Levi.duan 阅读(1177) 评论(0) 推荐(0)
摘要:1 #include <stdio.h> 2 3 /* count lines in input */ 4 int 5 main() 6 { 7 int c, pc; /* c = character, pc = previous character */ 8 9 /* set pc to a value that wouldn't match any character, in case10 this program is ever modified to get rid of multiples of other11 ... 阅读全文
posted @ 2013-05-02 15:31 Levi.duan 阅读(227) 评论(0) 推荐(0)
摘要:1 #include <stdio.h> 2 #include <string.h> 3 #define MAX 1000 4 5 int p[MAX]; 6 int rank[MAX]; 7 void init(int n){ 8 int i; 9 // memset(rank, 0, sizeof(rank));10 for(i=1;i<n;i++) {p[i]=i;rank[i]=0;}11 }12 13 14 int find_root_digui(int x){15 if(x!=p[x])16 return p[x]=find_roo... 阅读全文
posted @ 2013-05-02 10:34 Levi.duan 阅读(205) 评论(0) 推荐(0)