2011年3月8日 星期二

SQL server management 安裝

今天在安裝SQL server management 2008 時,安裝到一半顯示失敗。

查一下原因,是因為要先裝vs2008 sp1。

安裝玩sp1之後,在安裝SQL server management 200

Done.搞定收工。

2011年3月4日 星期五

85

[perl] ???

#!/usr/bin/perl
my @array;
my @array=qw{
/abc
/def
/ghi
/qqq
};




my @array2=("aa","bb","cca","dd");

#($array[0],$array2[0])=($array2[0],$array[0]);
#(@array,@array2)=(@array2,@array);


for($i=0;$i<=$#array;$i++)
{
        ($array[$i],$array2[$i])=($array2[$i],$array[$i]);
        print "array[$i]=$array[$i]  ; array2=[$i]=$array2[$i]  \n"
        
}
@testsrc=undef;
pop(@testsrc);
push @testsrc,@array;
print "@testsrc\n";

print "=========\n";

shift @testsrc;
print "@testsrc\n";
unshift @testsrc,xxx;
print "@testsrc\n";

@a=qw[aaa bbb ccc];
@a=reverse @a;
foreach (@a)
{
        print "this is $_\n";
}
print "=========\n";
@b=qw[a c d b e l z k i u q a x];
@b=sort @b;
foreach (@b)
{
        print "this is $_\n";
}

#chomp(@string=<STDIN>);
#print "@@@@@@@@@@@@@@@@@@\n";

use 5.010;
#print "@string[0]\n";
sub callme
{
        state $s=0;
        $s+=$_[0];
        my $a=@_;
        print "call me function test $s\n"
}
print &callme(111,"222",333)."\n";
print &callme(111,"222",333)."\n";
print &callme(999,"222",333)."\n";






2011年3月3日 星期四

[詩][非誠勿擾2] 見與不見

你見,或者不見我

我就在那裏

不悲不喜

你念,或者不念我

情就在那裏

不來不去

你愛,或者不愛我

愛就在那裏

不增不減

你跟,或者不跟我

我的手就在你手裏

不捨不棄

來我的懷裏

或者

讓我住進你的心裏

默然 相愛

寂靜 歡喜


You meet me, or not meet me

I'm there

no sorrow or happy

You miss me, or not miss me,

the memory is there,

not coming, not going

You love me, or not love me,

love is there,

can't be added, can't be ended

You be with me, or you leave me,

I lace my hand in yours,

never be aparted

Rest in my arms

or

let me go into your mind,

in silence, and in love,

so quiet, and so fascinating

2011年3月1日 星期二

[linux]make kernel part1

呼,今天考完中山,這禮拜要繼續衝。

紀錄一下kernel 編譯結果

環境:Ubuntu 10.04 LTS
NB:HP Presorio V3000

第一次build linux kerenl,編譯完kernel之後遇到重新開機卻無法順利開機問題。

build steps如下:
1.下載linux-2.6.37.2.tar.bz2
2.cd linux-source
3.cp /boot/config-2.6.32-28-generic .config
4.make clean
5.sudo make menuconfig
6.Load .config file , exit and saved.
7.make-kpkg --revision 0.0.1 --initrd kernel_image kernel_headers
8.build done.
9.dpkg -i linux-headers-2.6.37.2_0.0.1_amd64.deb
10.dpkg -i linux-image-2.6.37.2_0.0.1_amd64.deb

以上,build 完之後,有正常產生headers 及image,然後下完指令dpkg -i,reboot 電腦,選擇Ubuntu,Linux 2.6.37.2 卻無法正常開啟。
顯示的msg如下:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)



後來經過前輩指導,在ubuntu 10.04以後的版本,在最後還要多一個步驟建立 initrd的image檔

cd /boot
sudo mkinitramfs -k -o initrd.img-2.6.37.2_0.0.1_amd64 2.6.37.2_0.0.1_amd64
sudo update-grub2

ref http://www.question-defense.com/2010/09/26/how-to-recompile-your-ubuntu-10-10-kernel-for-patching-or-to-add-support-for-a-specific-device


Update 一下資訊:

1.下載linux-2.6.37.2.tar.bz2
2.cd linux-source
3.cp /boot/config-2.6.32-28-generic .config
4.make clean
5.sudo make menuconfig
6.Load .config file , exit and saved.
7.make-kpkg --revision 0.0.1 --initrd kernel_image kernel_headers
8.build done.
9.dpkg -i linux-headers-2.6.37.2_0.0.1_amd64.deb
10.dpkg -i linux-image-2.6.37.2_0.0.1_amd64.deb
***11.sudo update-initramfs -c -k 2.6.37.2
12.sudo update-grub
13.reboot