2008年12月28日

搭建过程备注:
1. 虚拟机软件Vmware 8.0 Workstation,Windows 2008 Enterprise Server, Sql Server 2008 R2。
2. 俩个节点平台版本必须一致,都为企业版。
3. 与构建Windows 2003群集不同,不能使用vmware的共享磁盘机制。Windows 2008集群对存储要求很高,不支持SCSI硬盘做集群。
    本次使用starwind 5.4代替vmware的共享磁盘实现群集存储。
4. 搭建Windows集群需要3台虚拟机:2个节点+1台存储。
5. 搭建SqlServer 2008集群需要4替虚拟机:2个节点+1台DC+1台存储。

搭建顺序:
1. 安装DC+DNS服务器。
2. 安装集群节点, 配置双网卡,域登录。
3. 安装群集磁盘服务器
4. 在集群节点上配置iSCSI发起。
5. 在集群节点上安装“故障转移群集”功能。
6. 进行故障转移群集验证和创建。
7. 至此,Windows集群环境安装完毕。
8. 在集群节点上按群集方式安装SqlServer 2008。
9. SqlServer 2008集群环境构建完毕。

参考文档:
Windows Server 2008的故障转移群集入门: http://os.51cto.com/art/201007/210286.htm
windows server2008虚拟机+群集: http://wenku.baidu.com/view/5e5b2be8e009581b6bd9eb1a.html
Windows2008+sqlserver2008集群安装:http://wenku.baidu.com/view/601dc74d2b160b4e767fcf46.html

posted @ 2012-06-21 09:23 bluoy 阅读(3918) | 评论 (0)编辑 收藏

神一样的软件,膜拜ing...
连我这天生kernel iptable有缺陷的都能用。

当前版本:2.04.
还是个Open Source的,改天一定要好好观摩一番的。

posted @ 2011-09-28 15:55 bluoy 阅读(293) | 评论 (0)编辑 收藏

If you meet following errors below when you try to build your source code:

 

Checking build tools versions...

build/core/main.mk:72:

************************************************************

build/core/main.mk:73: You are attempting to build on a 32-bit system.

build/core/main.mk:74: Only 64-bit build environments are supported beyond froyo/2.2.

build/core/main.mk:75:

************************************************************

Don’t panic, just change the code:

build/core/main.mk

ifeq ($(BUILD_OS),linux)

build_arch := $(shell uname -m) 

---ifneq (64,$(findstring 64,$(build_arch))) 

+++ifneq (i686,$(findstring i686,$(build_arch)))

 

and change the code in four mk files below from “+=-m64” to “+=-m32”


external/clearsilver/cgi/Android.mk

external/clearsilver/java-jni/Android.mk

external/clearsilver/util/Android.mk

external/clearsilver/cs/Android.mk


LOCAL_CFLAGS += -m32

LOCAL_LDFLAGS += -m32

end.

posted @ 2011-01-07 10:54 bluoy 阅读(348) | 评论 (0)编辑 收藏

I got this idea when i was surfing the web in search of a tool similar to the Nokia Pc Suite for my Linux

This How-To  works with many NOKIA Mobile Phone, especially for Nokia 3230, 6670, 6680, 6682 e 7610, 6120, Sony Ericsson Z1010, LG U8110/8120.

First of all, we have to grant access for Mobile Phone to “dialout” group.

sudo gedit /etc/udev/rules.d/40-permissions.rules

Now we have to add to the end of file:

# NOKIA 6120
BUS==”usb”, SYSFS{idVendor}==”0421″, SYSFS{idProduct}==”002f”, GROUP=”dialout”

where 0421 and 002f could be different depending on your Mobile Phone.
To check your idVendor and idProduct, we have to type on terminal

lsusb
Bus 003 Device 009: ID 0421:002f Nokia Mobile Phones

Now, we have to reload udev permission file:

sudo /etc/init.d/udev restart

We have to add our username on group “dialout”

gpasswd -a username dialout

All basics configurations for USB Data Cable are completed. We can start installation of obexftp and obextool GUI. Obextool GUI is written for tk graphic library, so GUI not have a good design as GTK.

sudo apt-get install openobex-apps libopenobex1 obexftp obextool

If you want start obextool from terminal we have to type for the first time:

export OBEXCMD=”obexftp -t /dev/ttyACM0 -u 1″
obextool

or, we can start it simply by typing:

obextool –obexcmd “obexftp -t /dev/ttyACM0 -u 1″

When we start Obextool we can see this error message:

It seems, that your device does not support the memory status feature.
Memory status will be disabled

To solve this problem we have to set some values on obextool.cfg:

sudo gedit /etc/obextool.cfg

set ObexConfig(config,memstatus) 0
set ObexConfig(config,filemove) 0

Another error message that we can see is:

FIle ‘/FileName/’ could not be uploaded to ‘E:/Path’!
Please check your file permissions.

To solve it:

sudo gedit /etc/obextool.cfg

set ObexConfig(config,dir_slash) 1

Good Job! Now your Mobile Phone works well in Ubuntu Gutsy with ObexTool.
If we want add it as Desktop Entry:

sudo gedit /usr/share/applications/obextool.desktop

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Exec=/usr/bin/obextool –obexcmd “obexftp -t /dev/ttyACM0 -u 1″
Icon=/usr/share/icons/gnome/scalable/devices/phone.svg
Terminal=false
Name=Obextool
GenericName=
Comment=Browser your Mobile Phone
Categories=Application;Utility;

So, you can find it in your Gnome Panel over: “Applications” -> “Accessories” -> Obextool

posted @ 2009-04-23 16:30 bluoy 阅读(364) | 评论 (0)编辑 收藏

下面的例子实现把一个整数的各个位上的数字相加,通过这个例子我们再次理解 connect by.

create or replace function f_digit_add(innum integer) return number
is
outnum integer;
begin
if innum<0 then
return 0;
end if;
select sum(nm) into outnum from(
select substr(innum,rownum,1) nm from dual connect by
rownum<length(innum)
);
return outnum;
end f_digit_add;
/

select f_digit_add(123456) from dual;

posted @ 2009-04-01 17:02 bluoy 阅读(810) | 评论 (1)编辑 收藏

终于搞明白了困惑很久的问题,罪魁祸首还是jdk啊。天杀的。
以下内容转自网络:

测试环境:Win2K Pro日文版,SUN J2SDK 1.5.0-beta2

经过测试,发现Shift_JIS和MS932编码的全角波浪线(“~”)的编码都是 0x8160(16进制,两个字节,高位在前)。通过sun.io.ByteToCharMS932转换后得到Unicode字符'\uFF5E',而通过sun.io.ByteToCharSJIS转换后则得到Unicode字符'\u301C'。

反之,Unicode字符'\uFF5E'通过sun.io.CharToByteMS932转换后会得到MS932编码的本地字符0x8160(16进制,两个字节,高位在前),而Unicode字符'\u301C'通过 sun.io.CharToByteSJIS转换后也会得到Shift_JIS编码的本地字符0x8160(16进制,两个字节,高位在前),两者的转换结果相同。

结论:在WinNT/2K/XP上,MS932和Shift_JIS这两种本地字符集完全相同,只是分别采用JDK的sun.io.ByteToCharMS932和sun.io.ByteToCharSJIS对个别特殊的本地字符进行转换后所得到的 Unicode字符并不一样。实际上,MS932就是WinNT/2K/XP上的Shift_JIS,只是与标准版的Shift_JIS字符集相比,MS932收录了更多的字符,比如NEC和IBM对Shift_JIS的扩展(如日文中的“㊤㊥㊦㊧㊨①..⑳...”等等);然而,JDK中的 ByteToCharSJIS及CharToByteSJIS却使用了标准的Shift_JIS字符集,所以部分扩展字符在从byte转换成char或是从char转换成byte时会出现乱码,这的确是JDK让人非常迷惑的一处。

参考资料1(日文):http://www.asahi-net.or.jp/~ez3k-msym/charsets/jis2ucs.htm

posted @ 2009-02-03 16:52 bluoy 阅读(1355) | 评论 (0)编辑 收藏

1. 函数的overwrite实现时,函数参数类型必须严格一致。与overload不同,并不遵守参数优先匹配的原则。
所以,不能用子类,或这接口的实现类来妄图得到overwrite的目的。
2. 使用反射手法时,getMethod()的调用,参数类型必须与要得到的函数类型严格一致。与overload不同,并不遵守参数优先匹配的原则。
3内部类,要实例化时必须首先实例化包含类。可以理解为内部类只是包含类的数据成员
4非public类,非javabean规范的Bean,内部类BeanUtil类无法进行操作,比如clone()等等。

posted @ 2008-12-28 10:54 bluoy 阅读(173) | 评论 (0)编辑 收藏

虽然java没有提供函数指针的操作,而是必须通过对象来曲线救国。
不过延伸一下这个思路,其实也未必不是件好事。从某种意义上来说,整个java系统,或者对象系统,其实就是不计其数的钩子组成的系统。因为,参数传递的过程中完全依赖着对象,一种行为和数据的结合体。这里,关键词是参数传递和对象的行为,当然离不开多态。
        改变既有代码的行为步骤:
        1. 派生参数类得到新的子类。
        2. 在子类中覆写(overwrite)父类既有方法。
        3. 将子类的实例作为参数传递。
        这样,就得到了改变父类行为的目的。
 对于既有框架自作主张的封装,阻碍自己的目的的时候,这个做法往往能独辟蹊径。

posted @ 2008-12-28 10:40 bluoy 阅读(176) | 评论 (0)编辑 收藏