Introduction

Anjuta is a versatile Integrated Development Environment (IDE) for C and C++ on GNU/Linux. It has been written for GTK/GNOME and features a number of advanced programming facilities including project management, application wizards, an interactive debugger and a powerful source editor with source browsing and syntax highlighting.

Anjuta is an effort to marry the flexibility and power of text-based command-line tools with the ease of use of the GNOME graphical user interface. That is why it has been made as user-friendly as possible.

Any sort of suggestions or patches for Anjuta are most welcome.

Anjuta is licensed under the GNU GPL. Please read the file COPYING that comes with the distribution for details.

http://www.anjuta.org/


Windows 2003 ACL
http://www.microsoft.com/windowsserver2003/howtobuy/licensing/caloverview.mspx

Windows 2003 Edition Comparison
http://technet.microsoft.com/en-us/library/cc758523.aspx

SQL Server 2005 Licensing
http://www.microsoft.com/sqlserver/2005/en/us/licensing.aspx
SQL Server 2005 is available under three different licensing options: per processor or per server plus device/user client access licenses (CALs)
(Source: http://www.eit.name,  admin.net[(at)]163.com)

SQL Server Multicore Licensing Policy
http://www.microsoft.com/sqlserver/2005/en/us/Special-Considerations.aspx

Oracle Licensing
http://www.orafaq.com/wiki/Oracle_Licensing

Oracle multicore licensing
http://www.oracle.com/corporate/press/2005_dec/multicoreupdate_dec2005.html

Oracle Edition Comparison
http://www.oracle.com/database/product_editions.html


我们都知道,微软的Server系列产品,不同的版本可支持处理器(Processor)数与记忆体容量上限不同,以Windows 2003为例,共有Web Edition、Standard Edition、Enterprise Edition、Datacenter Edition等四个版本,其中Web版只支持到两个处理器、Standard版4个、Enterprise版8个、Datacenter版则可以到32 个。(详细资料请看这里)

不过,问题来了! 近代的CPU开始走多核风(Multicore),市面上的CPU,Dual Core双核已经是基本要求,连Quad Core四核版本的CPU价位也日益平民化。当四核CPU愈来愈普及,双CPU插座的主机板插上两个,Windows Task Manager里顿时会冒出8个CPU的使用率上下跳动,爽快归爽快,另一个问题来了,依据前面所说的,Windows 2003 Standard Edition的CPU上限是4个CPU,可以安装在两个四核CPU的主机上吗? 会不会Task Manager里只能看到4个CPU? 不然干脆一点买Enterprise Edition就不用担心这麽多了? 别开玩笑了,依据官方报价,Standard与Enterprise版本的价差达四倍呢($999 vs $3,999)!!


因此我们要理清的问题是,版本比较文件里所说的4 way SMP support,指的是最多四个实体的CPU呢? 或是超过一个四核CPU就破表? (这个问题价值十万元呢!)

有份官方文件可以精准地回答我们的疑问:


For Microsoft software with processor limits, each processor counts as a single processor regardless of the number of cores and/or threads that the processor contains. For example, Windows Server 2003 R2 Standard Edition can be used on a four-processor system, whether the processors in the system are single-core, hyperthreaded, or multicore.

换句话说,MS的规格文件里,所提到的n-way SMP,是指"实体上"的n个CPU,即便它可以开启Hyper-Thread、或内建双核或四核,不管Task Manager看到多少个CPU Usage,都只算一个。所以如果有一台四个CPU Socket的主机器插上四个四核CPU,在Windows Standard Edition里看到16条CPU Usage Bar跳动,也是可能的。


题外话,并不是每家软体厂商都采行像微软一样以实体处理器数量 (或说Per CPU Socket)为认定基准,有些厂商会订定每个核心的换算比例(约当处理器数吗? XD),例如: 一个核心相当於0.75个处理器,IBM甚至发明了Value Process Unit为CPU的计算能力计价。

apache认为client传来的webdav请求是utf-8的编码,但对中文来说实际上更多是gb编码。

mod_encoding是日本人做的一个产品,解决了apache针对webdav的编码支持问题。

mod_encoding支持apache1.3和apache2,在debian上有对应的包libapache2-mod-encoding。配置参数包括:

EncodingEngine (on|off)
编码转换引擎开关
SetServerEncoding <enc>
设置服务器文件系统的编码
AddClientEncoding <agent> <enc> [<enc> ...]
设置某个客户端请求代理的编码

DefaultClientEncoding <enclist>
缺省的客户端编码清单

NormalizeUsername (on|off)
是否规范话用户名。Windows平台上(特别是WinXP)认证的适合传递的用户名格式是"hostname\\username",这个不标准,自动去除hostname。
典型的配置如:

LoadModule encoding_module modules/mod_encoding.so
<Location /dav>
 EncodingEngine on
 NormalizeUsername on
</Location>
SetServerEncoding UTF-8
DefaultClientEncoding UTF-8 gb18030 big5
AddClientEncoding "Microsoft .* DAV 1.1" gb
AddClientEncoding "(Microsoft .* DAV $)" UTF-8 gb18030 big5
AddClientEncoding "Microsoft .* DAV" UTF-8 gb18030 big5
AddClientEncoding "(Microsoft .* DAV 1.1)" gb18030 big5
AddClientEncoding "Microsoft-WebDAV*" UTF-8 gb18030
AddClientEncoding "RMA/*" gb18030
AddClientEncoding "xdwin9x/" gb18030
AddClientEncoding "cadaver/" UTF-8 gb18030
AddClientEncoding "Mozilla/" gb18030

mod_encoding对中文用户很重要,但目前几乎没有中文资料。原始网站也是日文的,也没有太多英文文档,只有去看源代码,抓出这个文档 :-(

写这个帖子的同时,发现了一个中日文翻译工具,虽然翻译出来的东东实在不怎么样。


在SQL Server中,如果安装并启动了SQL Server Agent,你可以使用“维护计划”来自动备份数据库。

鱼漂提醒:SQL Server 2005 & 2008的维护计划自动备份数据库,还需要安装“SQL Server Integration service ”,否则,维护计划里的备份数据库无法执行。

1. 软件下载

Apache 2.2 (这里有2.2.11为例)
http://httpd.apache.org/download.cgi
下载文件:apache_2.2.11-win32-x86-openssl-0.9.8i.msi
(注意,如果打算用到HTTPS,请下载包含openssl的版本)

Subversion (这里以1.5.3为例)
http://subversion.tigris.org/getting.html
下载文件:Setup-Subversion-1.5.3.msi

(此文档来源: http://www.eit.name ,原创作者: 鱼漂; 转载请注明)

2.安装规划

Apache2.2的安装路径为 D:\www\Apache
Subversion的安装路径为D:\www\Subversion
Subversion Repository的路径为D:\www\svnRep

3.安装

运行apache_2.2.11-win32-x86-openssl-0.9.8i.msi安装到D:\www\Apache目录,端口为80
运行Setup-Subversion-1.5.3.msi安装到D:\www\Subversion,安装时选择"Binding for Apache 2.2.x"

4.配置Subversion Repository

A.初始化Repository

手动创建D:\www\SVNRep目录;
打开DOS命令行cmd,进入D:\www\subversion\bin目录,运行以下命令初始化Repository:
D:\www\Subversion\bin>svnadmin create D:\www\SVNRep

B.创建Repository目录结构

在D:\www\tmp目录下创建以下目录结构:
――ProjectOne
| |
| ――branches
| |
| ――tags
| |
| ――trunk
|
――ProjectTwo
|
――branches
|
――tags
|
――trunk
使用以下命令,导入到Subversion:

D:\www\Subversion\bin>svn import D:\www\tmp file:///D:/www/SVNRep/ -m "init"
(需要特别注意的是file:///D:/www/SVNRep/的语法,这里是正斜杠)

导入完后,D:\www\tmp可以删除了

5. 配置Apache

复制D:\www\Subversion\bin目录下的mod_dav_svn.so,mod_authz_svn.soD:\www\Apache\modules目录。
配置Apache的conf/httpd.conf文件,在很多#LoadModule的后面,加下:

LoadModule dav_module modules/mod_dav.so
LoadModule dav_svn_module modules/mod_dav_svn.so
#LoadModule authz_svn_module modules/mod_authz_svn.so
<Location /svn>
DAV svn
SVNPath "D:/www/SVNRep"
AuthType Basic
AuthName "TomZhou's SVN"
AuthUserFile "D:/www/Apache/conf/svn.passwd"
Require valid-user
</Location>


使用Apache和htpasswd创建D:/www/Apache/conf/svn.passwd文件:


D:\www\Apache\bin>htpasswd -c -m D:\www\Apache\conf\svn.passwd tomzhou
New password: ********
Re-type new password: ********
Adding password for user tomzhou

D:\www\Apache\bin>htpasswd -m D:\www\Apache\conf\svn.passwd ipaddr
New password: ********
Re-type new password: ********
Adding password for user ipaddr

D:\www\Apache\bin>

注意,需要先进入到D:\www\apache\bin目录运行,同时,使用"-c"参数创建密码文件,第二次添加用户时不需要"-c"

重启Apache即可进行测试了。打开IE访问以下进址:
http://localhost/svn
输入刚才创建的用户名和密码,即可访问了。


6.按不同的目录定义权限

可以使用mod_authz_svn.so来实现,Apache配置如下:
LoadModule dav_module modules/mod_dav.so
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
<Location /svn>
DAV svn
SVNPath "D:/www/SVNRep"
AuthType Basic
AuthName "TomZhou's SVN"
AuthUserFile "D:/www/Apache/conf/svn.passwd"
AuthzSVNAccessFile "D:/www/SVNRep/conf/authz.conf"
Require valid-user
</Location>

使用上面的方法,创建svn.passwd文件。


创建D:/www/SVNRep/conf/authz.conf文件,内容如下:

#两个分组:committers,developers
[groups]
committers = tomzhou ipaddr richard
developers = jimmy michel spark sean
#在根目录下指定所有的用户有读权限
[/ProjectOne]
* = r
#追加 committers 组用户有读写权限
@committers = rw
#在 branches/dev 目录下指定 developers 组的用户有读写权限
[/ProjectOne/trunk]
@developers = rw
#在 /tags 组下给予用户 tony 读写权限
[/ProjectOne/tags]
tomzhou = rw
#禁止所有用户访问 /private 目录
[/ProjectOne/private]
* =
#给 committers 组用户读权限
@committers= r


另外,你还可以结合Apache的Allow,Deny,Order,Satisfy等指令来配置基于IP的访问规则。


其它参考:

a.HTTPS的配置只渗及到Apache,可参考我的其它文章或CATools工具.
b.Linux下的配置方式大同小异.
c.Subversion官方的文档,对Subversion的使用和配置描述得非常清楚,有时间可以参考.


PHP: Autoloading Objects - Manual

[不指定 2009/03/02 11:40 | by ipaddr ]

http://www.php.net/autoload

Autoloading Objects

Many developers writing object-oriented applications create one PHP source file per-class definition. One of the biggest annoyances is having to write a long list of needed includes at the beginning of each script (one for each class).

In PHP 5, this is no longer necessary. You may define an __autoload function which is automatically called in case you are trying to use a class/interface which hasn't been defined yet. By calling this function the scripting engine is given a last chance to load the class before PHP fails with an error.


<?php
function __autoload($class_name
) {
    require_once 
$class_name '.php'
;
}

$obj  = new MyClass1
();
$obj2 = new MyClass2
(); 
?>

分页: 1/1 第一页 1 最后页 [ 显示模式: 摘要 | 列表 ]