2010年7月14日星期三

Oracle查询里面用正规表达式

Oracle10g开始支持正规表达式的查询了。

例子

SELECT statistic#, name, class
FROM v$statname
WHERE REGEXP_LIKE (name, '(pga|uga)');

2010年7月9日星期五

Linux画面解像度設定

我的显示器经常不能识别出来,很多时候都是800x600的解析度。
下面是1024x768时的设定,供参考

在Centos里面无需手写,用system-config-display来设置。

cat /etc/X11/xorg.conf
# Xorg configuration created by system-config-display

Section "ServerLayout"
Identifier "single head configuration"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
EndSection

Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
Option "XkbModel" "jp106"
Option "XkbLayout" "jp"
EndSection

Section "Monitor"

### Comment all HorizSync and VertSync values to use DDC:
Identifier "Monitor0"
ModelName "LCD Panel 1024x768"
### Comment all HorizSync and VertSync values to use DDC:
HorizSync 31.5 - 48.0
VertRefresh 56.0 - 65.0
Option "dpms"
EndSection

Section "Device"
Identifier "Videocard0"
Driver "savage"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Videocard0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection


另外用

gtf 1024 768 60

# 1024x768 @ 60.00 Hz (GTF) hsync: 47.70 kHz; pclk: 64.11 MHz
Modeline "1024x768_60.00" 64.11 1024 1080 1184 1344 768 769 772 795 -HSync +Vsync

可以得到modeline的值,有需要可把这行粘帖到Monitor区里面