DescriptionYou are to write a program that has
to decide whether a given line segment intersects a given rectangle.An
example:line: start point: (4,9)...
分类:
其他好文 时间:
2014-05-07 13:55:45
阅读次数:
387
1.流与FILE对象unix
I/O系统调用都是针对文件描述符的标准C的I/O函数都是针对流(文件指针)的,我们使用一个流与一个文件相关联2.缓冲标准I/O库提供缓冲的目的就是尽可能减少read和write系统调用的使用次数标准I/O提供三种类型的缓冲:(1)
全缓冲:在填满标准I/O缓冲区后才进行...
分类:
其他好文 时间:
2014-05-07 01:35:27
阅读次数:
321
vmkfstools -z
/vmfs/devices/disks/t10.ATA_____ST4000NM00332D9ZM170_________________________________Z1Z0EFNZ
/vmfs/volumes/datastore0/data/disk_st4000g...
分类:
其他好文 时间:
2014-05-07 01:22:16
阅读次数:
593
写时拷贝(copy-on-write) COW技术...
分类:
其他好文 时间:
2014-05-06 23:42:43
阅读次数:
270
1,可以用route命令临时修改:
route add default gw
2, 通过修改/etc/sysconfig/network 文件永久修改:
脚本:
#!/bin/sh
#configure default gw
# $1 is ip of gateway
defgw=$1
sed -i "s/NETWORKING.*/NETWORKING=yes/" /et...
分类:
其他好文 时间:
2014-05-06 23:37:22
阅读次数:
374
【题目】
原文:
1.4 Write a method to decide if two strings are anagrams or not.
译文:
写一个函数判断两个字符串是否是变位词。
【分析】
变位词(anagrams)指的是组成两个单词的字符相同,但位置不同的单词。比如说, abbcd和abcdb就是一对变位词。该题目有两种思路:
【思路一】
由于变位词只是字...
分类:
其他好文 时间:
2014-05-06 23:17:56
阅读次数:
383
Chef develops his own computer program for playing chess. He is at the very beginning. At first he needs to write the module that will receive moves written by the players and analyze it. The module w...
分类:
其他好文 时间:
2014-05-06 23:11:26
阅读次数:
497
1. 修改MySQL安装目录下(C:\Program Files\MySQL\MySQL Server 5.5)的my.ini文件
设置: default-character-set=utf8
character-set-server=utf8
然后重启MySQL服务,MySQL 没有重启的命令,要先停止,然后再启动。开始 -> cmd -> net stop mys...
分类:
数据库 时间:
2014-05-06 22:59:11
阅读次数:
397
启用分组模块非常简单,配置下APP_GROUP_LIST参数和DEFAULT_GROUP参数即可。
'APP_GROUP_LIST'=>'Admin,Home',
'DEFAULT_GROUP'=>'Home',将Home设为默认的项目。
在我们启用项目分组之前,由于使用的两个项目,所以URL地址分别是:
http://serverName/index.php/Index/...
分类:
Web程序 时间:
2014-05-06 22:39:00
阅读次数:
520
今天学习了python的输入输出、异常处理和python标准库1.文件通过创建一个file类的对象去处理文件,方法有read、readline、write、close等[root@reed0505]#catusing_file.py
#!/usr/bin/python
#filename:using_file.py
poem=‘‘‘Programingisfun
whentheworkisdone
usePython!..
分类:
编程语言 时间:
2014-05-06 17:05:03
阅读次数:
448