1.
信号量机制的缺陷问题:在上面的生产者消费者实例中,信号量的工作机制如下(我们以生产者的代码为例):1 down(&empty);2
down(&mutex);3 enter_item(item);4 up(&mutex);5
up(&full);如果交换1号和2号语句,变成:1 down(&m...
分类:
其他好文 时间:
2014-06-06 22:36:54
阅读次数:
336
httpd:Apache,IIS网页编程语言:ASP,ASP.NET,PHP,CGI,Perl,Python数据库:MySQL,Sqlite,MSSQL,PostgreSQL,Oracle,WWW服务器框架:Windows:IIS+ASP(.NET)+MSSQLLinux:Apache+PHP+My...
分类:
系统相关 时间:
2014-06-06 15:56:22
阅读次数:
259
键盘移动 (Move)一切都从键盘的移动k-> 上 upj-> 下
downh-> 左 leftl-> 右 rightz-> 重画屏幕,当前光标变成屏幕的第一行 (redraw current line at
top of window)CTRL-f-> 跳到下一页 (page down)CTRL-...
分类:
其他好文 时间:
2014-06-05 15:48:07
阅读次数:
354
PostgreSQL Hstore 列性能优化一例。...
分类:
数据库 时间:
2014-06-03 01:51:07
阅读次数:
312
1、Maximum Depth of Binary Tree
Given a binary tree, find its maximum depth.
The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.
clas...
分类:
其他好文 时间:
2014-06-02 23:13:22
阅读次数:
290
本题使用动态规划法, 或者记忆法,加上递归法。
不加上递归法,好像很麻烦,因为我们不知道其初始值,只知道其最终值,所以只能往下递推了,这样使用记忆法就比动态规划要方便了。
使用二维表设计其递归记忆表,防止重复计算。还是十分困难的,动态规划法有时候不一定比记忆法要好。
递归记忆法的学名: top-down with memoization; Introduction to Algorithm的Dynamic programming 这章有介绍...
分类:
其他好文 时间:
2014-06-02 23:04:24
阅读次数:
397
所谓端口聚合,指的是把两个或多个物理端口捆绑成一个逻辑链路,两设备多个端口两两相连,从而增加链路带宽,可起到负载均衡的作用,而且多条线路间还能形成冗余备份。比方说,两个千M端口聚合后带宽就有2G,如果其中一个端口down了或线路出问题了并不影响网络的正常运行,只是..
分类:
其他好文 时间:
2014-06-02 14:25:02
阅读次数:
232
数据访问对象(DAO)
对访问存储在不同数据库管理系统(DBMS)中的数据提供了一个通用的API。Yii DAO 基于 PHP Data Objects (PDO)
构建。它是一个为众多流行的DBMS提供统一数据访问的扩展,这些 DBMS 包括 MySQL, PostgreSQL 等等。因此,要使用...
分类:
其他好文 时间:
2014-06-02 06:17:46
阅读次数:
267
Appliesto:
OracleServer-EnterpriseEdition-Version:8.1.7.4to11.2.0.2.0-Release:8.1.7to11.2
GenericUNIX
当检查oracle实例后台进程不存在这时启动启动数据库报错:
ORA-01081:"cannotstartalready-runningORACLE-shutitdownfirst"
造成此种原因是
Orphanedsharedmemor..
分类:
数据库 时间:
2014-06-02 04:04:29
阅读次数:
844
题意:对数列有三种操作:
Print operation l,?r. Picks should write down the value of .
Modulo operation l,?r,?x. Picks should perform assignment a[i]?=?a[i] mod x for
each i (l?≤?i?≤?r).
Set operation k...
分类:
其他好文 时间:
2014-06-02 02:56:56
阅读次数:
465