2008年5月29日 星期四

Cache coherency problems

cache coherency problems could happened in SMP or DMA presented situations

Cache thrashing
Cache sloshing
False cache line sharing

Performance Benchmarks Guide - Windows NT 4.0

SMP systems that provide separate caches for each processor introduce additional issues that affect application performance. Memory caches must maintain a consistent view of memory for all processors. This is accomplished by dividing up memory into small chunks (called a cache line) and tracking the state of each chunk that is present in one of the caches. In order to update a cache line, a processor must first gain exclusive access to it by invalidating all other copies in other processor's caches. Once the processor has exclusive access to the cache line, it may safely update it. If the same cache line is being continuously updated from many different processors, the cache line will bounce from one processor's cache to another. Since the processor cannot complete the write instruction until its cache acquires exclusive access to the cache line, it must stall. This behavior is called cache sloshing, since the cache line "sloshes" from one processor's cache to another.

False cache line sharing

(false cache line sharing)
It occurs whenever two or more threads in a parallel program are assigning different data items in the same cache line
How to avoid false cache line sharing ?- not let it happen in the first place
ensure there is no concurrent access (CPUs & device DMA) to the same cache line
  • allocate buffer slightly bigger (+ L1_CACHE_BYTES) than needed, shift start address to align next cache line(shift max L1_CACHE_BYTES), pad the end address to the next cache line
or simply disable cache

DMA, small buffers, and cache incoherence

The only way to deal with this problem is to not let it happen in the first place. A number of possibilities are being considered. One way, suggested by Roland, is to create a __dma_buffer attribute which can be used in the declaration of small buffers; on non-cache-coherent systems, this attribute would force the size and alignment of the buffer such that it would not share cache lines with any other data. Another approach is to require that all DMA buffers be allocated separately; the kernel memory allocation primitives already ensure that even the smallest buffers are properly aligned and padded. Yet another approach could be to simply disable caching for the page(s) in question while the operation is in progress; most architectures support this in their page tables. This approach could create performance problems, however (if the page in question has heavily-used data), and it could be complex.

David Miller, who wrote much of the current DMA code, has a different approach. He thinks that this kind of subtle cache issue is a trap for driver writers that should be simply avoided altogether. Rather than come up with new ways of working around incoherent caches, it's better to just change the rules and tell driver writers to allocate their small DMA buffers using the "PCI pool" interface. This interface, which was added in 2.4.4, was designed for just this purpose: allocating small buffers for DMA. Rather than make driver writers deal with this sort of cache coherence issue - and watch some of them get it wrong, David would bury it in the PCI pool code. While no real resolution has been proclaimed, this last option appears to be the likely outcome.
PCI DMA to small buffers on cache-incoherent arch
[Roland Dreier] Re: PCI DMA to small buffers on cache-incoherent arch

[David S. Miller] Re: PCI DMA to small buffers on cache-incoherent arch

System architectures

Cache thrashing occurs when two or more data items that are frequently needed by the program both map to the same cache address. Each time one of the items is encached, it overwrites another needed item, causing cache misses and impairing data reuse.

False Cache Line Sharing vs "Cache Sloshing"

Thoughts on Shared Caches

2008年5月28日 星期三


簡單說,房貸利息 多於 儲蓄利息免稅=max(儲蓄利息,27)萬 的部份才能列舉扣除
可列舉扣除的房貸利息=max(房貸利息-max(儲蓄利息,27) , 30)萬
ps. 年利率3% 且 只還利息的情況下,貸100萬一年的利息3萬(=100*3%),貸300萬一年利息9萬,貸1000萬利息才會到30萬

  1. 房貸利息<儲蓄利息<27萬<30萬==>儲蓄利息免稅,不能列舉扣除
  2. 房貸利息<27萬<儲蓄利息<30萬==>儲蓄利息27萬免稅,不能列舉扣除
  3. 房貸利息<27萬<30萬<儲蓄利息==>儲蓄利息27萬免稅,不能列舉扣除
  4. 27萬<房貸利息<儲蓄利息<30萬==>儲蓄利息27萬免稅,列舉扣除(房貸利息-27)萬
  5. 27萬<房貸利息<30萬<儲蓄利息==>儲蓄利息27萬免稅,列舉扣除(房貸利息-27)萬
  6. 27萬<30萬<房貸利息<儲蓄利息==>儲蓄利息27萬免稅,列舉扣除(房貸利息-27)萬,最多到30萬

  7. 儲蓄利息<房貸利息<27萬<30萬==>儲蓄利息免稅,列舉扣除(房貸利息-儲蓄利息)
  8. 儲蓄利息<27萬<房貸利息<30萬==>儲蓄利息免稅,列舉扣除(房貸利息-儲蓄利息)
  9. 儲蓄利息<27萬<30萬<房貸利息==>儲蓄利息免稅,列舉扣除(房貸利息-儲蓄利息),最多到30萬
  10. 27萬<儲蓄利息<房貸利息<30萬==>儲蓄利息27萬免稅,列舉扣除(房貸利息-27)萬
  11. 27萬<儲蓄利息<30萬<房貸利息==>儲蓄利息27萬免稅,列舉扣除(房貸利息-27)萬,最多到30萬
  12. 27萬<30萬<儲蓄利息<房貸利息==>儲蓄利息27萬免稅,列舉扣除(房貸利息-27)萬,最多到30萬
from http://blog.pixnet.net/melissakai/post/8698609







2008年5月26日 星期一

Building 2.4 kernel modules in 2.6 environment

error occur while running

$ make modules_install
cd /lib/modules/2.4.27-star; \
mkdir -p pcmcia; \
find kernel -path '*/pcmcia/*' -name '*.o' | xargs -i -r ln -sf ../{} pcmcia
if [ -r System.map ]; then /sbin/depmod -ae -F System.map 2.4.27-star; fi
Version requires old depmod, but couldn't run /sbin/depmod.old: No such file or directory
make: *** [_modinst_post] Error 2
can be temporarily fixed by
ln -s /sbin/depmod /sbin/depmod.old

Re: 关于Linux下高版本内核编译低版本内核的问题
FC5(Fedora Core5)下编译内核总结

2008年5月20日 星期二

Shrink a VirtualBox 1.5.0 Windows Guest Virtual Disk

VirtualBox - Shrink your VDI images. Image size = Space used up inside VM.

from http://murga-linux.com/puppy/viewtopic.php?t=21797
Problem: Your XP virtual disk file in VirtualBox 1.5.0 has grown too large due to fragmentation. Even though you only have 4 gigs of stuff on the disk, the file is 12GB large!

Here's what you need to do:
1. Defragment the disk, moving files to the beginning of the disk.
2. Overwrite all empty space in the disk file with zeros.
3. Close the windows VM and compact the disk file

You need these free tools:

First, boot up your Windows VM under VirtualBox.

DirMS will defragment the disk and move all files to the beginning (leaving all the free space at the end of the disk.) Run the command:

dirms c -q
dirms c

You may need to run this several times. Run the built-in XP defrag utility to get a visual map after running dirms. You'll see the improvements.

Now wipe the free space with zeros:

sdelete -c c:

Now, exit your Windows VM and go back to a Puppy prompt:

VBoxManage modifyvdi compact

That should compact your disk file!

2008年5月19日 星期一

"Pure" L2TP on Windows

Windows的L2TP預設是有IPsec Encryption的,關掉它
"ProhibitIPSec"=dword:00000001 =>改成0

How to disable the automatic L2TP/IPsec policy in Windows 2000 Server

2008年5月18日 星期日

Windows Tools

媲美 ACDSee 的免費秀圖軟體 - FastStone Image Viewer
比 FlashGet 更好用又完全免費的下載管理軟體

準媽媽愛打手機 寶寶過動風險增


準媽媽愛打手機 寶寶過動風險增
自由 更新日期:2008/05/19 04:09


七歲以下兒童用手機 風險更大






Warning: Using a mobile phone while pregnant can seriously damage your baby

Study of 13,000 children exposes link between use of handsets and later behavioural problemsBy Geoffrey Lean, Environment Editor
Sunday, 18 May 2008

Women who use mobile phones when pregnant are more likely to give birth to children with behavioural problems, according to authoritative research.

A giant study, which surveyed more than 13,000 children, found that using the handsets just two or three times a day was enough to raise the risk of their babies developing hyperactivity and difficulties with conduct, emotions and relationships by the time they reached school age. And it adds that the likelihood is even greater if the children themselves used the phones before the age of seven.

The results of the study, the first of its kind, have taken the top scientists who conducted it by surprise. But they follow warnings against both pregnant women and children using mobiles by the official Russian radiation watchdog body, which believes that the peril they pose "is not much lower than the risk to children's health from tobacco or alcohol".

The research – at the universities of California, Los Angeles (UCLA) and Aarhus, Denmark – is to be published in the July issue of the journal Epidemiology and will carry particular weight because one of its authors has been sceptical that mobile phones pose a risk to health.

UCLA's Professor Leeka Kheifets – who serves on a key committee of the International Commission on Non-Ionizing Radiation Protection, the body that sets the guidelines for exposure to mobile phones – wrote three and a half years ago that the results of studies on people who used them "to date give no consistent evidence of a causal relationship between exposure to radiofrequency fields and any adverse health effect".

The scientists questioned the mothers of 13,159 children born in Denmark in the late 1990s about their use of the phones in pregnancy, and their children's use of them and behaviour up to the age of seven. As they gave birth before mobiles became universal, about half of the mothers had used them infrequently or not at all, enabling comparisons to be made.

They found that mothers who did use the handsets were 54 per cent more likely to have children with behavioural problems and that the likelihood increased with the amount of potential exposure to the radiation. And when the children also later used the phones they were, overall, 80 per cent more likely to suffer from difficulties with behaviour. They were 25 per cent more at risk from emotional problems, 34 per cent more likely to suffer from difficulties relating to their peers, 35 per cent more likely to be hyperactive, and 49 per cent more prone to problems with conduct.

The scientists say that the results were "unexpected", and that they knew of no biological mechanisms that could cause them. But when they tried to explain them by accounting for other possible causes – such as smoking during pregnancy, family psychiatric history or socio-economic status – they found that, far from disappearing, the association with mobile phone use got even stronger.

They add that there might be other possible explanations that they did not examine – such as that mothers who used the phones frequently might pay less attention to their children – and stress that the results "should be interpreted with caution" and checked by further studies. But they conclude that "if they are real they would have major public health implications".

Professor Sam Milham, of the blue-chip Mount Sinai School of Medicine in New York, and the University of Washington School of Public Health – one of the pioneers of research in the field – said last week that he had no doubt that the results were real. He pointed out that recent Canadian research on pregnant rats exposed to similar radiation had found structural changes in their offspring's brains.

The Russian National Committee on Non-Ionizing Radiation Protection says that use of the phones by both pregnant women and children should be "limited". It concludes that children who talk on the handsets are likely to suffer from "disruption of memory, decline of attention, diminishing learning and cognitive abilities, increased irritability" in the short term, and that longer-term hazards include "depressive syndrome" and "degeneration of the nervous structures of the brain".

Prenatal and Postnatal Exposure to Cell Phone Use and Behavioral Problems in Children.
Epidemiology. POST AUTHOR CORRECTIONS, 7 May 2008
Divan, Hozefa A. a; Kheifets, Leeka a; Obel, Carsten b; Olsen, Jorn a

2008年5月14日 星期三

Firefox Extensions

Firefox Extensions: Bookmarks Tab

Firefox Extensions: Fire Analytics

Stop-or-Reload Button 0.2.2

Video DownloadHelper 3.0.4

PDF Download


  • Planar Pattern (AMP/ASMP)
  • Grid-on-Chip (AMP/ASMP)
  • SMP

Three design models for multicore systems (pdf lost)
Multicore systems-on-chip can handle embedded designs
Useful design patterns for building embedded multicore systems
AMD: Redefine software to program multicore CPUs

Reduce XP Size

[GUIDE]: Making your windows folder smaller!

This has been tested on
Windows XP Pro Final and SP1 (Not home, but it should work fine)
Windows 2003 Enterprise Server 3700
The Free Evaluation version (Any 2k3 version should work fine)
Windows 2000 Pro

If you can not delete a folder, just delete the files inside

C:\Windows and C:\Program Files assumed.

1. c:\windows\system32\dllcache\*

NOTE: DON’T DELETE THIS FOLDER, JUST ALL THE FILES INSIDE! This folder uses a LOT of hard drive space, it holds a backup of every system file that windows uses. Deleting this will cause a SFC error when you replace a system file instead of windows putting back the original file. For people who want to mod there system, this is a good thing.

2. c:\windows\servicepackfiles\i386\*

NOTE: DON’T DELETE THIS FOLDER, JUST ALL THE FILES INSIDE! This folder only exists if you installed a service pack on XP, if you did a slipstream it won’t be here either. This folder is the same as the dllcache, but has the new files that were updated by a service pack. If you delete the dllcache, deleting this is just like finishing the job.

3. c:\windows\$Uninstall----$

These $uninstall----$ folders are used whenever you want to uninstall a windows update. If you delete them, you can not uninstall the update(s), but if the updates are working fine for you, there should be now reason to remove them.

4. c:\windows\cursors\

This folder contains some custom cursers for windows, if you are happy with the default cursers, or use your own set like Blue Curve, then deleting this wont effect you at all.

5. c:\windows\driver cache\i386\

NOTE: DON’T DELETE THIS FOLDER, JUST ALL THE FILES INSIDE! This is one you may not want to delete, this takes up a bit of space (about 80mb) but windows uses if you ever add or remove windows components and things like printer drivers. If you’re your hardware is already working fine, you don’t need this folder on your hard drive. For example, if you delete this folder, and try to install IIS, windows will ask for the CD or Network share with the files on it, if you don’t need to add or remove windows components often, deleting this will free up some space for you.

6. c:\windows\help\

NOTE: DON’T DELETE THIS FOLDER, JUST ALL THE FILES IN SIDE! This folder contains all of the windows help files. If you are like me, and think they having 50mb of help files is a waste, then you probably want to delete it. If you delete this folder and try to view a help file, the Help and Support center will come up with a 404 error. No harm is done, you just can’t view the help files (because you deleted them…). There is also a tours folder inside of the help folder, you can delete everything in this folder also, but windows won’t let you remove the actual folder.

7. c:\windows\inf\

NOTE: DON’T DELETE THIS FOLDER, JUST ALL THE FILES INSIDE! This folder contains a lot of windows drivers, if you ever add new hardware, windows looks in this folder, then on your CD drive for the latest drivers. Any hardware you might get will probably come with the drivers on a disk, so this folder is just a wasting space on your hard drive with outdated drivers. If all of your hardware is working fine, and you don’t plan on adding any new hardware for a while, deleting this wont effect your system at all. If you don’t want to delete everything in it, you can go into the folder, press CRTL+F and search for mdm*.* and delete everything that comes up. These are all modem drivers, and it is very unlikely you will ever need them because you either have a modem installed already, or if you do add one, it will come with newer drivers.

8. c:\windows\srchasst

This folder is the XP Search assistant, if you delete it, windows will just use the classic 2k style search instead, which is more functional and easier to use.

WARNING: Some people have reported problems with this, and have not been able to search, try this at your own risk!!!

9. c:\windows\downloaded installations\

This folder holds the installers for some programs you download and install, for example, Tweak UI puts its installer in this folder, and so you can repair it or update its components later. Deleting this folder won’t harm any programs I have ever seen, but you should look inside this and see what you are deleting first.

10. c:\windows\media\

These are the default windows sounds, if you don’t want them, deleting them wont hurt anything.

11. c:\windows\system32\restore\

This is the system restore apps, if you delete this, system restore will no longer work. Before you delete this, you should go into System Restore, and delete all your restore points, and then you should go to the system properties and disable system restore. After that, you can delete this folder, and not worry about system restore slowing down your system or sucking up space.

12. c:\windows\system32\usmt\

This folder is the File and Settings Transfer wizard. If you have no need for it, then deleting this wont have any other effects besides the File and Settings Transfer wizard not working anymore.

13 A. c:\program files\msn
13 B. c:\program files\netmeeting\

These are the MSN Explorer and Net Meeting applications. If you don’t need or use them, then you can delete these folders (For net meeting, you can only delete the files inside) and the only thing it will effect is that these programs will know longer work.

14. C:\windows\system32\oobe

NOTE: DON’T DELETE THIS FOLDER, JUST ALL THE FILES INSIDE! In this folder is the Out of Box Experience (The screens you see right after you have installed XP for the first time), and the XP Product Activation stuff. If you have a Retail or OEM version of XP, and you think you might ever need to activate again, DON’T DELETE THIS. So unless you are using XP or 2k3 CORP, you may still need this folder someday.

15. c:\windows\msagent

This folder holds the MS Agent program. The MS Agent is a gay little wizard thing that looks like the Office Assistant, I personally hate this thing, and removing it will get rid of it for good! If windows wont let you remove the folder, just delete everything inside of it, and everything inside of the intl folder.

16. c:\windows\java

This is the crappy MS Java components that don’t work well, and MS got sued over. If you have Windows XP slipstreamed with SP1a you wont have this because MS no longer distributes it. If you use websites that use Java Applets, you should keep this, or remove it and install Suns Java VM.

17. c:\windows\mui

This is a little app that allows you to switch between multiple languages, if you only use one language, then deleting this wont effect you at all. NOTE: I think this folder only exists on XP Pro because Home Edition doesn’t support multiple languages.

Post Deletion:

After you have deleted everything you want to, I recommend you run the Regisrty Cleaner from jvPowerTools ( http://www.vtoy.fi/jv16 ). This will remove all the references to things you deleted so a window doesn’t look for the files any more. If you delete the Java Folder, RegCleaner will find at least 50 reg entries related to it, and can remove them for you if you want.

What else can I do to make the windows folder smaller?

If you want to make your windows folder even smaller, and you use NTFS, you can use NTFS compression to make the windows folder smaller. Although you can compress everything it, compressing EXEs and DLL files will make you system a little bit slower, so I recommend compressing everything BUT EXE and DLL files.

Using this guide, you should easily be able to make your windows folder less then 1gb, but because some programs add there own files to the windows dir, your results may differ from what other people have gotten there folder sizes to. After a clean install, it is fairly easy to get your windows folder less then 700mb so you can put a image file of your clean install on one CD and be able to restore it easily.

That is all for now, if you have your own, feel free to post them below and if my system still works well after deleting them, I will add them to this guide!

2008年5月13日 星期二


(powerpoint file) from http://faculty.ltu.edu.tw/includes/file_down.php?id=5948&uid=P080011


  1. 指數型房貸
    指數型房貸ARMs(Adjustable Rate Mortgages)是一種依據約定利率做為房貸訂價的基礎,也就是先訂定「指標利率」,做為調整房貸利率的標準,然後再「加減碼」的房屋貸款。隨著基準利率上下浮動的利率。最常見的是以中華郵政,或國內某幾大行庫定儲利率平均值為基準值,當利率調升時,指標利率也會隨之上揚。



  2. 固定利率房貸

  3. 抵利型房貸

  4. 理財型房貸

    計算方式:利息費用 = 動用餘額× 年利率/365 × 動用期間

  5. 理債型房貸

  6. 保險(壽險)型房貸

  7. 綜合型房貸

  8. 回復型房貸

  9. 遞減型房貸

  10. 循環型貸款


  1. 本金平均攤還法


    平均每月應攤付本金金額 = 貸款本金 ÷ 還款總月數
    每月應付本息金額 = 每月應還本金 + 每月應付利息
    每月應付利息金額 = 本金餘額 × 月利率

  2. 本息平均攤還法


    每月應付本息金額之平均攤還率 ={ [ (1 + 月利率 )^月數 ] × 月利率 } ÷ { [ (1+月利率)^ 月數 ] - 1 }
    平均每月應攤付本息金額 = 貸款本金 × 每月應付本息金額之平均攤還率
                = 每月應還本金金額 + 每月應付利息金額
    每月應付利息金額 = 本金餘額 × 月利率
    每月應還本金金額 = 平均每月應攤付本息金額 - 每月應付利息金額

  3. 本金到期一次清償法


    每月應付利息金額 = 本金餘額 × 月利率
    每月應攤還金額 = 每月應付利息金額
    每月應付利息金額 = 本金餘額 × 月利率

  4. 附寬限期攤還本息法


  5. 加速繳:

  6. 輕鬆繳:

  • 掌握利率資訊

  • 加碼幅度越少越好

  • 貸款年限

  • 最好有寬限期

  • 提前清償違約金

  • 綁約限制越少越好

  • 特定對象優惠加碼



xfrm4_rcv -> xfrm4_rcv_encap ->

  • ((struct xfrm_state*)x)->type->input ------->esp_input
  • netif_rx
dst_output -> skb->dst->output() -------------> xfrm4_output -> xfrm4_output_finish ->
  • xfrm4_output_one -> skb->dst->xfrm->type->output() ---------> esp_output
  • dst_output -> skb->dst->output() ------------->ip_output

2008年5月12日 星期一

Ubuntu Releases and Code Name

Peace/Ubuntu 版本开发号

Ubuntu Bluetooth

apt-get install bluez-utils
hcitool dev

hidd --search
hcitool scan

hidd --connect aa:bb:cc:dd:ee:ff

Edit /etc/default/bluetooth, Change the following settings


HIDD_OPTIONS="--master --server"
HIDD_OPTIONS="--connect aa:bb:cc:dd:ee:ff --server"

echo hidp | sudo tee -a /etc/modules

Miraculist的Ubuntu筆記/Bluetooth 設定

HOWTO: Tweak your ext3 filesystem for a performance boost

from http://ubuntuforums.org/showthread.php?t=107856

for ext3 and ReiserFS

The ext3 filesystem provides more journaling which makes it "safer" and recovery of files in case of a crash is more likely. This has its price in performance thou.
ReiserFS is a faster filesystem but with less safety.

Ext3 & ReiserFS has three kinds of journaling methods:
  1. Journal Data Writeback
  2. Journal Data Ordered
  3. Journal Data
the difference of the three is when the actual data is written to the filesystem in relation to the metadata and its entrance into the journal.

By default the the 2nd method is used.

To speed things up we will make it use method 1.
price: old data might appear in files after a crash and journal recovery. The last things you wrote or did prior a crash isn't recovered.

Make ext3 or reiserfs use journal data writeback
Edit /etc/fstab, Add the following line
/dev/hda1 / ext3 defaults,errors=remount-ro,atime,auto,rw,dev,exec,suid,nouser,data=writeback 0 1
Edit /boot/grub/menu.lst, and add the bold part
# defoptions=quiet splash rootflags=data=writeback
# altoptions=(recovery mode) single rootflags=data=writeback
sudo update-grub

(There have been reports of problems when rebooting if the following is not done) Note! tune2fs only works for ext3. Reiserfs can't change the journal method on the fly.
Before rebooting change the filesystem manually to writeback.
 sudo tune2fs -o journal_data_writeback /dev/hda1
Check that it is running
 sudo tune2fs -l /dev/hda1

Remove update of access time for files
According to the manual the only thing that might happen if you turn this off is that when compiling certain things the make might need that info.

Edit /etc/fstab, add the following marked in bold
/dev/hda1 / ext3 defaults,errors=remount-ro,noatime,auto,rw,dev,exec,suid,nouser,data=writeback 0 1

Disable Linux Beep

Disable the PC speaker beep in Linux console and X windows


To completely prevent the PC speaker from beeping you can disable the module loading at startup. To do this add the pcspkr module into the MOD_BLACKLIST array in /etc/rc.conf:


To disable the annoying PC speaker beep in X:
xset b off
You can put this into ~/.xinitrc or similar to disable it every time X starts.

To disable it in console:
setterm -blength 0

Another way is to edit ~/.inputrc, add this:
set bell-style none


無: ... <img style="cursor: pointer;" ...
置左: ... <img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" ...

2008年5月11日 星期日

Acer Aspire 4720Z on Ubuntu 8.04


  1. bluetooth
    Couldn't display "obex://[XX:XX:XX:XX:XX:XX]/"
    (not work yet)

  2. modem
  3. irda
  4. 1394
  5. wlan
  6. recording sound
    Edit the file /etc/modprobe.d/alsa-base, add the following line:
    options snd-hda-intel model=acer
    由外接mic的聲音破破的,內建的mic根本錄不到聲音(XP ok)
    Gutsy Intel HD Audio Controller
    Ubuntu Question #20970: acer aspire 4720 sound card Intel alc268 mic disfunctional

  7. dual monitor
    xrandr --output VGA --auto (enable VGA==>只投影)
    Add the part marked red to /etc/X11/xorg.conf
    Section "Screen"
    Identifier "Default Screen"
    Monitor "Configured Monitor"
    Device "Configured Video Device"
    SubSection "Display"
    Virtual 2560 2560
    xrandr -q (List output狀態)
    xrandr --output VGA --left-of LVDS --auto (把VGA放在LVDS左邊)
    xrandr --output LVDS --off (關掉LVDS)

    grandr &

    用grandr的話,在[Layout]裡VGA不能直接放在LVDS的左邊,要先右再左 (直接選在LCD左邊會爛掉)。又,不要去Enable [Hot Key],會讓shift鍵沒有用。總之用xrandr似乎問題較少

    獨立桌面 沒弄出來(可能要改/etc/X11/xorg.conf, 跟crtc, blablabla的有關)

    之前爛掉的原因不確定,可能是兩個螢幕的解析度不同所導致的,之前用的是ViewSonic VA905 12:9的螢幕,很難找到個可以搭起來的組合;現在拿到ㄧ台ViewSonic VA1912wb 16:10,4720Z也是16:10,問題就比較少了(-->還是有問題): 解析度差太多顯示也怪怪的,偏偏兩個螢幕沒一個解析度一樣,而且不知道為什麼,toolbar總是出現在外接的螢幕上,目前:
    VGA 1152x864 74.8Hz
    LVDS 1280x768800 60Hz

    xrandr --output LVDS --mode 1280x800; xrandr --output VGA --mode 1152x864 --right-of LVDS;

    xrandr --output LVDS --mode 1280x800; xrandr --output VGA --mode 1280x1024 --right-of LVDS
    xrandr --output LVDS --mode 1280x800; xrandr --output VGA --mode 1280x960 --right-of LVDS

    由於virtual buffer最大只能到2560x2560,設到最大解析度無法左右並列(2720=1440+1280)--那就上下放吧
    xrandr --output LVDS --mode 1280x800; xrandr --output VGA --mode 1440x900 --below LVDS

    xrandr --output LVDS --mode 1280x800; xrandr --output VGA --mode 1280x960 --right-of LVDS

  8. sd card reader
  9. playing sound
  10. webcam
    apt-get install luvcview
    luvcview -f yuv
  11. CPU Frequency Scaling Monitor
    • (right click on panel) -> Add to Panel -> select "CPU Frequency Scaling Monitor"
    • sudo dpkg-reconfigure gnome-applets
      (read all the warning, and if you are sure about this, say yes)
    • killall gnome-panel
      (restart the Panel or only the applet. And then you'll have four frequencies available to control.)
  12. Sensor - Temperature Monitoring
    • sudo aptitude install lm-sensors sensors-applet hddtemp
      (Install the sensors daemon and applet)
    • sudo sensors-detect
      (say yes to all questions)
    • reboot
    • add the applet "Hardware Sensors Monitor" to Panel

Linux on an Acer Aspire 4720z
Acer 4520 Complete Guide (or Almost) (7.10)
Re: Acer 4520 Complete Guide (or Almost)
The problem of incrementing eth#
This happens because somehow the MAC address is reported to linux in reverse.
To fix this do the following :
(i) dmesg | grep Mac
this gives the mac address in reverse ( a line with Invalid Mac ...)
note that down. that is the mac address in reverse

(ii) sudo nano /etc/udev/rules.d/70-persistent-net.rules
delete any line that ends with NAME="eth#"
add the following line
SUBSYSTEM=="net", DRIVERS=="forcedeth", NAME="eth0"
now save the file

(iii) now do sudo nano /etc/network/interfaces
add the line
pre-up /sbin/ifconfig eth0 hw ether

(iv) now reboot the system

Ubuntu 8.04 Apps Install Note

apt-get install gcin compizconfig-settings-manager tftpd virtualbox-ose virtualbox-ose-modules-`uname -r` vim netspeed cu subversion ctags
apt-get build-dep linux-headers-`uname -r`

  1. apt-get install gcin
    對 右上角 的輸入法按右鍵 -> 設定 (輸入法) -> [Default input method and toggle key]
  2. apt-get install compizconfig-settings-manager

    System->Preference->Appearance->Visual Effects 選Extra
    System->Preference->Advance Desktop Effects Settings
    • General Options
      • General -> Desktop Size->Horizontal Virtual Size: 2 => 4
      • Key bindings -> Show Desktop => Super-d
    • disable Wobbly Windows
    • disable Application Switcher
    • disable Desktop Wall
    • enable Desktop Cube
    • enable Rotate Cube
    • enable Scale
      Bindings -> Initial Window Picker => Ctrl-Alt-Up
    • enable Ring Switcher
      Key Bindings
      • Next Window => Alt-Tab
      • Previous Window => Alt-Shift-Tab
      Misc. Options
      • Speed => 5.0
      • Timestep => 0.1000
    • endisable Shift Switcher (it's window doesn't rearrang according to MostRecentlyUsedFirst)
      Key Bindings
      • Next Window => Alt-Tab
      • Previous Window => Alt-Shift-Tab
      Misc. Options
      • Fade Speed => Max
      • Shift Speed => Max
      • Timestep => 5
    • 之前常常不知道碰到什麼鍵,突然視窗就變半透明,也不知道怎麼改回來。乾脆disable掉。
      [General Options] -> [Opacity Settings]
      • [Increase Opacity] = Button4 ==> Disabled
      • [Decrease Opacity] = Button5 ==> Disabled
    • 只是記一下快速鍵,要關掉也行
      Enhance Zoom Desktop
      • [Zoom In/Out] -> [Zoom In]: Button4
      • [Zoom In/Out] -> [Zoom Out]: Button5
    Super-Shift-s 靜態選視窗

  3. firefox-3.0以上不能使用foxmarks(080714: 現在可以了)
    apt-get install firefox-2
    update-alternatives --install /usr/bin/firefox firefox /usr/bin/firefox-2 52
    update-alternatives --install /usr/bin/firefox firefox /usr/bin/firefox-3.0 53
    update-alternatives --config firefox (選firefox-2)
    mv ~/.mozilla ~/.mozilla3 (原來的.mozilla是firefox3的,不移掉會導致待會的firemark安裝失敗)
  4. skype
    apt-get install libqt4-dev
    dpkg -i skype-debian_2.0.0.68-1_i386.deb
  5. apt-get install tftpd
    tftpd預設使用/srv/tftp, 但不會預設建立該目錄
    mkdir /srv/tftp -p;
    ln -s /home/tftp /srv/tftp;
    /etc/init.d/openbsd-inetd restart;
  6. apt-get install virtualbox-ose virtualbox-ose-modules-`uname -r`
    sudo adduser $USER vboxusers
  7. apt-get build-dep linux-headers-`uname -r`
  8. 如果嫌pc喇叭聲太吵可以
    rmmod pcspkr;
    Edit /etc/modprobe.d/blacklist, add
    blacklist pcspkr
  9. 開vi的顏色
    apt-get install vim
    Edit /etc/vim/vimrc, uncomment
    syntax on
  10. Netspeed - Traffic monitor applet for GNOME
    找了好幾個看interface traffic的tool,這個勉強堪用,當然還是比不上DU Meter
    apt-get install netspeed

Ubuntu 7.04--比Vista更華麗的3D作業系統

VMware Server for linux Installation Note

Product Downloads(http://www.vmware.com/download/)
Download VMware Server (http://www.vmware.com/download/server/)
Serial Numbers (http://www.vmware.com/vmwarestore/serial_number.html)

NOTE: VMware Server doesn't support shared folders, use samba instead.
VMWare For Linux Setup Guide

  • tar -zxvf VMware-X.X.X-XXX.tar.gz
  • mv vmware-distrib /usr/local/src
  • run "vmware-install.pl." in /usr/local/src/vmware-distrib
  • run ./vmware in where it it installed, ex: /usr/local/vmware.
  • install an OS, setup network access to internet
  • Install VMware Tools
    • Boot up Virtual Machine
    • Requirement:
      • linux-headers-`uname -r`
      • X
    • [VM] -> [Install VMware Tools...]
    • mount /dev/cdrom /cdrom
    • tar xf VMwareTools-X.X.X-XXXXX.tar.gz
    • cd vmware-tools-distrib/;./vmware-install.pl
A virtual appliance primer

my first time to try VMware and it shut down?
it is 08:50 am in TPE and 3am PDT=3+15=23 in TPECST, which means I have to wait til 23:00....damn...

Ubuntu 8.0.4, Linux-2.6.24-17-generic
tar xf VMware-server-1.0.5-80187.tar.gz
cd vmware-server-distrib
Building the vmmon module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config1/vmmon-only'
make -C /lib/modules/2.6.24-17-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.24-17-generic'
CC [M] /tmp/vmware-config1/vmmon-only/linux/driver.o
In file included from /tmp/vmware-config1/vmmon-only/./include/vmware.h:25,
from /tmp/vmware-config1/vmmon-only/linux/driver.c:48:
/tmp/vmware-config1/vmmon-only/./include/vm_basic_types.h:161: error: conflicting types for ‘uintptr_t’
include/linux/types.h:40: error: previous declaration of ‘uintptr_t’ was here
In file included from /tmp/vmware-config1/vmmon-only/linux/driver.h:20,
from /tmp/vmware-config1/vmmon-only/linux/driver.c:49:
/tmp/vmware-config1/vmmon-only/./include/compat_wait.h:37:5: warning: "VMW_HAVE_EPOLL" is not defined
/tmp/vmware-config1/vmmon-only/./include/compat_wait.h:43:5: warning: "VMW_HAVE_EPOLL" is not defined
In file included from /tmp/vmware-config1/vmmon-only/linux/driver.h:20,
from /tmp/vmware-config1/vmmon-only/linux/driver.c:49:
/tmp/vmware-config1/vmmon-only/./include/compat_wait.h:60: error: conflicting types for ‘poll_initwait’
include/linux/poll.h:65: error: previous declaration of ‘poll_initwait’ was here
/tmp/vmware-config1/vmmon-only/linux/driver.c:147: warning: initialization from incompatible pointer type
/tmp/vmware-config1/vmmon-only/linux/driver.c:151: warning: initialization from incompatible pointer type
/tmp/vmware-config1/vmmon-only/linux/driver.c: In function ‘LinuxDriver_Ioctl’:
/tmp/vmware-config1/vmmon-only/linux/driver.c:1659: error: ‘struct mm_struct’ has no member named ‘dumpable’
make[2]: *** [/tmp/vmware-config1/vmmon-only/linux/driver.o] Error 1
make[1]: *** [_module_/tmp/vmware-config1/vmmon-only] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.24-17-generic'
make: *** [vmmon.ko] Error 2
make: Leaving directory `/tmp/vmware-config1/vmmon-only'
Unable to build the vmmon module.

For more information on how to troubleshoot module-related problems, please
visit our Web site at "http://www.vmware.com/download/modules/modules.html" and

Execution aborted.


Starting VMware services:
Virtual machine monitor done
Virtual ethernet done
Bridged networking on /dev/vmnet0 done
Host-only networking on /dev/vmnet1 (background) done
Host-only networking on /dev/vmnet8 (background) done
NAT service on /dev/vmnet8 done
remote console connection port [902]
virtual machine files in [/var/lib/vmware/Virtual Machines]

# vmware
/usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_3.4' not found (required by /usr/lib/libcairo.so.2)
/usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib/libstdc++.so.6)
/usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_3.4' not found (required by /usr/lib/libcairo.so.2)
/usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib/libstdc++.so.6)
/usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_3.4' not found (required by /usr/lib/libcairo.so.2)
/usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib/libstdc++.so.6)

My Fix
sudo mv /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1 /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1.disabled

cd /usr/lib/vmware/lib/libgcc_s.so.1
sudo mv libgcc_s.so.1 libgcc_s.so.1.disabled
sudo ln -sf /lib/libgcc_s.so.1 libgcc_s.so.1

删了 /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1及 /usr/lib/vmware/lib/libpng12.so.0/libpng12.so,便解决了,且运行一切正常



I didn't find an exact match on the net, but similar hits recommended moving the offending library out of the way:

david@david-ubuntu:~$ cd /usr/lib/vmware/lib
david@david-ubuntu:/usr/lib/vmware/lib$ sudo mkdir bak

david@david-ubuntu:/usr/lib/vmware/lib$ sudo mv libgcc_s.so.1/libgcc_s.so.1 bak/
... and now I'm back :)

UbuntuHelp:VMware/Server Installing from Source

* Ubuntu 8.04 (Hardy Heron)
Run [1] after the initial install fails when compiling kernel modules. AMD64 users may get this error
/usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_***' not found
Install Getlibs and enter the following commands.
getlibs /usr/lib/vmware/bin/vmware
sudo mv /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1 /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1-old
sudo ln -s /usr/lib32/libgcc_s.so.1 /usr/lib/vmware/lib/libgcc_s.so.1/

I had the same problem and fixed it like this
I copied
it seems that the libraries shipped with the vmware server do have problems with the cairo library (no version given ??).

This fixed my issue
cp /usr/lib/libpng12.so.0
cp /usr/lib/gcc/i486-linux-gnu/3.4.6/libgcc_s.so

I can't start VMware by [Applications] -> [System Tools] -> [VMware Server Console]
# vmware
VMware Server doesn't support shared folders.
Complete Installation
A complete installation installs the utilities to enhance the performance of the guest operating system, and all the drivers — the VMware SVGA driver, the VMware Mouse driver, the VMware SCSI driver, the VMware vmxnet networking driver (the vlance driver is installed automatically when you created the virtual machine) and the shared folders driver (for use by virtual machines with VMware Workstation).

礦泉水瓶重複使用致癌? 假的


環境檢驗所 助理研究員 黃壬瑰


保鮮膜加熱 有害健康

(環保署管考處 賴麗瑩)


Bottled Water Vs. Tap Water
By Janet Majeski Jemmott
Sources: Earth Policy Institute, As You Sow, Container Recycling Institute.
From Reader's Digest - February 2008

The Plastic Problem
Most bottled water comes in polyethylene terephthalate bottles, indicated by a number 1, PET or PETE on the bottle's bottom. (No, it's not the same phthalate mentioned earlier.) The bottles are generally safe, says Ken Smith, PhD, immediate past chair of the American Chemical Society's division of environmental chemistry. But scientists say when stored in hot or warm temperatures, the plastic may leach chemicals into the water.


In the meantime, experts have raised a warning flag about a few specific chemicals. Antimony(銻) is a potentially toxic material used in making PET. Last year, scientists in Germany found that the longer a bottle of water sits around (in a store, in your home), the more antimony it develops. High concentrations of antimony can cause nausea, vomiting and diarrhea. In the study, levels found were below those set as safe by the EPA, but it's a topic that needs more research.

Last summer, a National Institutes of Health (NIH) committee agreed that bisphenol A (BPA)(雙酚甲烷A), a chemical found in polycarbonate(聚碳酸酯, PC) (used to make watercooler jugs, sport-water bottles and other hard plastics, but not PET), may cause neurological and behavioral problems in fetuses(胎兒), babies and kids. A separate NIH-sponsored panel found that the risk was even greater, saying that adult exposure to BPA likely affects the brain, the female reproductive system and the immune system. The FDA has reviewed these reports and says it will keep monitoring the data to see if the agency needs to take regulatory action.


部分學者認為其裏面有一種叫做diethylhydroxylamine (乙基己基胺)或簡稱DEHA的潛在致癌物質,用一次是安全的,如果你因節儉或方便而重複使用,就有致癌危機。

換句話說,儘管對於DEHA的致癌性有不同的答案,但是對於重複使用PET水瓶 會不會釋出DEHA這個問題,目前已知的科學家們認為並沒有明顯的證據。根據FASI最後的結論,與其擔心沒有明顯證據的DEHA威脅,不如注意重複使用 時的清潔--當然,這一點對所有的杯碗瓢盆都是適用的。

2008年5月9日 星期五

Linux SMP on Ubuntu 8.04


  • enable "RTC support"
  • (x86 kernel) do NOT enable APM (advanced power management)
  • (x86 kernel) enable "MTRR (Memory Type Range Register) support"

Ubuntu alread has SMP support?
test@test-laptop:~$ uname -a
Linux test-laptop 2.6.24-16-generic #1 SMP Thu Apr 10 13:23:42 UTC 2008 i686 GNU/Linux

test@test-laptop:~$ cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel(R) Pentium(R) Dual CPU T2370 @ 1.73GHz
stepping : 13
cpu MHz : 800.000
cache size : 1024 KB
physical id : 0
bogomips : 3471.09
clflush size : 64

processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel(R) Pentium(R) Dual CPU T2370 @ 1.73GHz
stepping : 13
cpu MHz : 800.000
cache size : 1024 KB
physical id : 0
bogomips : 3466.76
clflush size : 64


top + "1"

Cache coherency functions


struct cpu_cache_fns {
void (*flush_kern_all)(void);
void (*flush_user_all)(void);
void (*flush_user_range)(unsigned long, unsigned long, unsigned int);

void (*coherent_kern_range)(unsigned long, unsigned long);
void (*coherent_user_range)(unsigned long, unsigned long);
void (*flush_kern_dcache_page)(void *);

void (*dma_inv_range)(unsigned long, unsigned long);
void (*dma_clean_range)(unsigned long, unsigned long);
void (*dma_flush_range)(unsigned long, unsigned long);

* dma_flush_range(start, end)
* Clean and invalidate the specified virtual address range.
* - start - virtual start address
* - end - virtual end address
* This is actually the same as fa_coherent_kern_range()
.globl fa_dma_flush_range
.set fa_dma_flush_range, fa_coherent_kern_range


.type fa_cache_fns, #object
.long fa_flush_kern_cache_all
.long fa_flush_user_cache_all
.long fa_flush_user_cache_range
.long fa_coherent_kern_range
.long fa_coherent_user_range
.long fa_flush_kern_dcache_page
.long fa_dma_inv_range
.long fa_dma_clean_range
.long fa_dma_flush_range
.size fa_cache_fns, . - fa_cache_fns

* Note! struct processor is always defined if we're
* using MULTI_CPU, otherwise this entry is unused,
* but still exists.
* NOTE! The following structure is defined by assembly
* language, NOT C code. For more information, check:
* arch/arm/mm/proc-*.S and arch/arm/kernel/head.S
struct proc_info_list {
unsigned int cpu_val;
unsigned int cpu_mask;
unsigned long __cpu_mmu_flags; /* used by head.S */
unsigned long __cpu_flush; /* used by head.S */
const char *arch_name;
const char *elf_name;
unsigned int elf_hwcap;
const char *cpu_name;
struct processor *proc;
struct cpu_tlb_fns *tlb;
struct cpu_user_fns *user;
struct cpu_cache_fns *cache;

.section ".proc.info.init", #alloc, #execinstr

.type __fa526_proc_info,#object
.long 0x66015261
.long 0xff01fff1
.long PMD_TYPE_SECT | \
PMD_BIT4 | \
b __fa526_setup
.long cpu_arch_name
.long cpu_elf_name
.long cpu_fa526_name
.long fa526_processor_functions
.long fa_tlb_fns
.long fa_user_fns
.long fa_cache_fns
.size __fa526_proc_info, . - __fa526_proc_info

.init : { /* Init code and data */
_stext = .;
_sinittext = .;
_einittext = .;
__proc_info_begin = .;
__proc_info_end = .;
__arch_info_begin = .;
__arch_info_end = .;
* Look in include/asm-arm/procinfo.h and arch/arm/kernel/arch.[ch] for
* more information about the __proc_info and __arch_info structures.
.long __proc_info_begin
.long __proc_info_end
3: .long .
.long __arch_info_begin
.long __arch_info_end

Openswan KLIPS


ipsec_rcv is registered as L4 protocol handler of ESP(50)/AH(51)/IPCOMP(108)

ipsec_tunnel_start_xmit is registered as the hard_start_xmit of the ipsec device.

2008年5月8日 星期四


在Preparing installation時會跳出Reginal and Language Options
Tab [Regional Options] Location選Taiwan
Tab [Languages] 選Install files for East Asian language,在Detail中加入輸入法
Tab [Advanced] Language for non-Unicode programs設定為Chinese(Taiwan),並在Code page conversion tables加入1002 (MAC - Traditional Chinese Big5)

"fuck" in linux-2.6.16

不知道fuck要怎麼用? 查字典? 遜掉了。到你的linux source下去敲

# grep fuck . -rHiIn | grep -v svn

./include/linux/netfilter/xt_limit.h:18: /* Ugly, ugly fucker. */
./net/netfilter/nf_queue.c:171: /* James M doesn't say fuck enough. */
./net/netfilter/xt_limit.c:5: * Alexey is a fucking genius?
./net/ipv4/netfilter/ip_nat_snmp_basic.c:1032: * (And this is the fucking 'basic' method).
./net/xfrm/xfrm_algo.c:687: /* Fuck, we are miserable poor guys... */
./sound/oss/aci.c:160:/* The four ACI command types are fucked up. [-:
./sound/oss/opl3.c:837: * What the fuck is going on here? We leave junk in the beginning
./lib/vsprintf.c:9: * Wirzenius wrote this portably, Torvalds fucked it up :-)
./fs/jffs/intrep.c:2996: don't fuck up. This is why we have
./fs/binfmt_aout.c:325: /* Fuck me plenty... */
./Documentation/DocBook/kernel-locking.tmpl:1375: If you don't see why, please stay the fuck away from my code.
./drivers/media/video/bt819.c:209: BUG? Why does turning the chroma comb on fuck up color?
./drivers/mtd/mtd_blkdevs.c:370: registered, to prevent the link/init ordering from fucking
./drivers/char/watchdog/shwdt.c:115: * brain-damage, it's managed to fuck things up one step further..
./drivers/net/sunhme.c:1027:/* Only Sun can take such nice parts and fuck up the programming interface
./drivers/net/sunhme.c:2100: /* This card is _fucking_ hot... */
./drivers/net/b44.c:905: /* ??? What the fuck is the purpose of the interrupt mask
./drivers/ide/pci/cmd640.c:16: * These chips are basically fucked by design, and getting this driver
./drivers/scsi/esp.c:2570: * how bad the target and/or ESP fucks things up.
./drivers/scsi/esp.c:2659: * phase things. We don't want to fuck directly with
./drivers/scsi/esp.c:3354: /* Be careful, we could really get fucked during synchronous
./drivers/scsi/qlogicpti.h:64:/* Am I fucking pedantic or what? */
./drivers/scsi/NCR53C9x.c:1763: * how bad the target and/or ESP fucks things up.
./drivers/scsi/NCR53C9x.c:2689: /* Be careful, we could really get fucked during synchronous

足足 幹 了24次,linux developer 很愛引經據典這個我知道,沒想到也很愛 幹

2008年5月7日 星期三


戶口 分戶


080529明年起 200萬優惠房貸一生兩次


from http://tw.money.yahoo.com/finedu_con_article/adbf/d_a_070525_47_kw2g

有 意申請勞工住宅貸款之勞工朋友,每年10月底行政院勞工委員會將會予以公告,11月初可至本〈市〉府勞工局、海線縣政服務中心、屯區縣政服務中心、本縣各 鄉鎮(市)公所、行政院勞工委員會委託承貸銀行(尚待公告)等單位,免費索取;或於該會網站下載(網址www.cla.gov.tw)。

from http://www.tccg.gov.tw/sys/SM_theme?page=41624702


2008年5月6日 星期二



大約是四月底的時候,中X房屋帶我們看了兩間房子,我們對其中的一間 優仕貴閣 有興趣,但是要等父母上來看過

5/3 (六)
仲介釋放 有人打算出價560,但是還沒正式出價

5/4 (日)
仲介突然連絡,說 他們跟 信X房屋 有合作,信X房屋 下午要來出價,希望我們先出價。下午就帶著出價單來,而且說一定要以斡旋金的方式出價,不然會沒有優先權

5/5 (一)
與屋主見面。以為會是面對面談,但其實是屋主與我分兩個房間,由他們分別代傳對方的價格 並撮合。
對方同意!! 但因為我一定要父母來簽約,因此沒有立即簽約,要5/17父母才上來簽約,仲介還強調如果這段時間有人出更高價,這個價格會失效。


  1. 爸媽覺得仲介有挖價格動給我們跳的嫌疑。並且製造 假事件 來催促出價。
    雖然沒有明顯證據,但事後覺得可能性很高,而且 信X房屋 要來出價 和 有人要出價 的資訊很可能是假的!! 有人出價的芳面,仲介看房子時說那人出560,但是5/5他們經理卻說是540,矛盾。另外他們說信X房屋出價大約會在540,如果是這樣,他們成交的可能更高。
  2. 只看過兩次房子,三天內就決定要出價。不該太快決定,如果有人要出價,那就讓他去出。
  3. 仲介會跟你套交情,讓你感覺是站在你這邊。但其實也是為了自己的利益。其實講價格也不是雙方在講價格,是 三方,買方、賣方、和仲介,各自為了各自的利益勾心鬥角
  4. 不應該被說服簽斡旋金,才會進一步沒有退路,非得出價不可,但其實548甚至538對方都可能接受
  5. 說老實話,底限是538,一開始就不該出538,至少是520之類的,才有些buffer能談
  6. 雖然仲介說如果有人更高價,這個價格會失效,但是我看多半是不可能

前陣子開始下大雨,想到去看房子,發現幾個窗戶會滲水,另外小房的牆邊有輕微壁癌狀況,仲介先是說找了水泥工去看,說那是 "ㄍㄡˊ"壁 的時候水泥沒弄平,第一次看也沒什麼經驗,就相信了他的說法。後來請防漏的去看,才知道那就是滲漏水。窗子是算正常,13年的屋子多少都會這樣;小房的牆壁則是因為隔壁就是客廳和陽台,陽台沒有作防水的關係。我這邊的人估價要兩萬五,他們去找 台灣漿造 估了一萬多?? 跟他們要個估價單拖拖拉拉的,等到給的時候跟我說做完了?? 有沒有問題到現在(080701)是看不出來啦,但是完全不尊重我,我還有跟他說讓我考慮看看,如果有需要我還寧可貼錢自己做勒。





2008年5月5日 星期一


from http://tw.myblog.yahoo.com/anshin-26656101/article?mid=4



  • 一種是自建地下室的自建停車位、獎勵停車位,可以專有或公共設施來辦理產權登記
  • 另外一種是防 空避難室附設的法定停車位,這種「法停」在,「九一八」之前可以當一樓附屬建物登記,也可以併入一樓主建物,或當一般區分所有建物,或以大公或小公登記, 一共多達五種。


由上歸納可知,法規上,目前停車位主要分為自行增設停車位、獎勵停車位與法定停車位三種可是檯面下卻還有建商私畫車位、無車道車位、先持分到全部住戶再賣一次使用權車位三種等於多達六種, 不但令承購戶搞不清楚,更易衍生許多糾紛。而除了「法停」的買賣和登記方式較明確之外,依照內政部各相關法令來看,「自停」和「獎停」只要坐落位置與法定 停車位有明確區隔且有獨立出入口,似可由當事人合意,在非屬共同使用部分時,並編有門牌、領有戶政機關核發的地下室證明書或地下室所有地址證明書者,得依 土地登記規則第七十三條辦理建物所有權第一次登記申請獨立權狀,有獨立產權就能獨立使用也可以自由買賣,可是「自停」的確實位置應依使用執照所附峻工平面 圖上所標示的位置為準;至於登記方式,可以以大公、小公或主建物來登記。


  1. 係指建築物按其總樓地板面積之多寡,依建築法及建築技術規則規定之比例所應設置之停車位。
  2. 法定停車位在「九一八」之前可以當一樓附屬建物登記,也可以 併入一樓主建物,或當一般區分所有建物,或以大公或小公登記,一共多達五種。
  3. 法定停車位依民國八十年九月十八日內政部函令,法定停車位必須登記為公共 設施,故沒有權狀,在辦理產權登記時只能登記為「大公」,產權由全體住戶所持有;或登記為「小公」,經由合議由部分住戶共同持分,不想要車位之住戶就不須 分攤持分。
  4. 法定停車位是屬於防空避難室兼停車位使用,是以公共設施持分方式來分配給承購者,故購買停車位應注意其屬性。
  5. 民國八十年九月二十八日及八十五年七月二日實施的公寓大廈管理條例均規定,法定停車空間不得與主建物分離,應為區分所有權人持分的公共設施,建商不得讓售或為大樓以外的住戶設定專用使用權。也就是說,法定停車位沒有獨立權狀,必須隨著主建物才能辦理產權移轉。


  1. 係指在法定停車位之外,建商或起造人自行增加規劃之停車位。
  2. 此類停車位可以登記為大公、小公,若與法定停車位在構造上及使用上各具獨立性,並取得「防 空避難室所在地址」證明,也可以登記為主建物單獨移轉。即建商自行增設的停車位與獎勵停車位若登記為主建物,便可獨立買賣,而可不排除建築所有權人以外者 使用。

    註:「自停」只要坐落位置與法定停車位有明確區隔且有獨立出入口,似可由當事人合意,在非屬共同使用部分時,並編有門牌、領有戶政機關核發的地下室 證明書或地下室所有地址證明書者,得依土地登記規則第七十三條辦理建物所有權第一次登記申請獨立權狀,有獨立產權就能獨立使用也可以自由買賣,可是「自停」的確實位置應依使用執照所附峻工平面圖上所標示的位置為準。


  1. 係指政府為配合都市發展,實際需要解決日趨嚴重的都市問題,獎勵建商於建造時依「台灣省建築物增設停車空間鼓勵要點」、「台北市建築物增設室內公用停車空 間鼓勵要點」或「高雄市鼓勵建築物增設停車空間實施要點」等規定,在政府以增加樓地板面積等為鼓勵條件之情形下,鼓勵建商增設停車位供公眾使用,以解決停 車間題,所有權人也屬公眾範圍。
  2. 此類停車空間若與法定停車空間在構造上及使用上各具獨立性,並取得「防空避難所在地址證明」,即可登記為主建物單獨移 轉,若與法定停車空間在同一層,構造上及使用上無法區隔,就必須以公共設施方式辦理登記。即建商自行增設的停車位與獎勵停車位若登記為主建物,便可獨立買 賣,而可不排除建築所有權人以外者使用。

    註:「獎停」只要坐落位置與法定停車位有明確區隔且有獨立出入口,似可由當事人合意,在非屬共同使用部分時,並編 有門牌、領有戶政機關核發的地下室證明書或地下室所有地址證明書者,得依土地登記規則第七十三條辦理建物所有權第一次登記申請獨立權狀,有獨立產權就能獨 立使用也可以自由買賣
  3. 依規定購買獎勵停車空間之所有權人必須提供給「公眾」使用,還必須負擔管理費用,產權移轉時也必須明確告知承接戶,但根據內政部 84.10.3 函令,所有權人也包括在「公眾」範圍內,因此「獎勵增設」停車空間無論由所有權人自行使用或供任何不特定人約定使用,均屬「供公眾使用」。

from http://1950.tycg.gov.tw/news/case/upt.asp?p0=34

from http://www.rclaw.com.tw/SwTextDetail.asp?Gid=6760

  • 法定停車位無獨立產權,其係依照法令規定建設物必須留設停車空間及防空避難設備,通常避難設備也兼做法定停車位。
  • 獎勵停車位是指各種獎勵設置停車位辦法而增加設置的停車位,可以辦理建物所有權登記,申請獨立門牌或地址為主建物登記,並且可單獨出售。
  • 增設停車位比較 少見,通常是大型基地的開發才可能發生,少見的原因在於增設停車位就整體建築開發效益而言是不敷成本的,增設停車位與獎勵停車位一樣可以辦理建物所有權登 記,亦得申請獨立門牌或地址為主建物登記,兩者法律性質相近。

Asynchronous Linux Crypto - info

crypto lib feature

  • synchronous/asynchronous
  • hardware accelerator
  • protocol/packet acceleration
  • chaining operation
Openswan git

  • David McCullough
  • Asynchronous Crypto suppor for MPC8360E's Security Engine
    it seems there was difference between ocf from sf.net and ocf from xelerance, however, http://hifn.xelerance.com/ is no longer available.
    You don't say if you ported OCF from sf.net, or from the OCF git tree
    on http://hifn.xelerance.com/

    The latter is based upon 2.6.18 kernel, so perhaps not.

    There have been numerous improvements in the past 4 months to OCF, but
    we are still not seeing multiple packets being submitted to the hardware
    driver layer from OCF
    . As such, the hardware's pipeline is not being
    kept full.
  • [Openswan dev] Openswan 3.0.00 release (unstable): msg#00002
    Since April 2006, Xelerance has been hard under contract with Hifn to provide support in Linux and FreeBSD for the Hifn product line. {Likely, it will eventually work on NetBSD, and OSX too}

    We are finally putting the finishing touches on code that has slowly evolved. We have been trying to move our kernel component into a state where it could deal with doing asynchronous symmetric cryptography operations. Similarly, in userland we want to support doing asynchronous asymmetric public key operations. Being able to do this means being able to offload these things to hardware.

    We are pleased to announce a 3.0.00 release. It includes offload of both symmetric and assymetric operations.

  • http://www.openswan.org/code/
    Openswan 3.x
    3.0.xx is the first release to support the Open Cryptographic Framework(mkl:not ocf2), including hardware accelerators from Hifn.
  • not accept by linux kernel
Async blkcipher


我的Outlook2003已經把預設郵件格式改用html了,但是使用Linux/Google mail收信的同事仍然不能正常收到我的信。

後來發現,在寄出郵件時,選擇 [檢視]->[選項],更改附加郵件的格式為MIME/BINHEX時可以解決這個問題,使用 預設值/UUEncode都會有問題


在 Outlook 2003 中部分收件者看不到電子郵件附件
Outlook 2000 中 Transport Neutral Encapsulation Format (TNEF) 的說明

2008年5月2日 星期五


from http://jp.hjenglish.com/page/4410/

東京都 とうきょうと

北海道 ほっかいどう

京都府 きょうとふ 大阪府 おおさかふ

愛知県 あいちけん 青森県 あおもりけん
秋田県 あきたけん 石川県 いしかわけん
茨城県 いばらきけん 岩手県 いわてけん
愛媛県 えひめけん 大分県 おおいたけん
岡山県 おかやまけん 沖縄県 おきなわけん
香川県 かがわけん 鹿児島県 かごしまけん
神奈川県 かながわけん 岐阜県 ぎふけん
熊本県 くまもとけん 群馬県 ぐんまけん
高知県 こうちけん 埼玉県 さいたまけん
佐賀県 さがけん 滋賀県 しがけん
静岡県 しずおかけん 島根県 しまねけん
千葉県 ちばけん 徳島県 とくしまけん
栃木県 とちぎけん 鳥取県 とっとりけん
富山県 とやまけん 長崎県 ながさきけん
長野県 ながのけん 奈良県 ならけん
新潟県 にいがたけん 兵庫県 ひょうごけん
広島県 ひろしまけん 福井県 ふくいけん
福岡県 ふくおかけん 福島県 ふくしまけん
三重県 みえけん 宮崎県 みやざきけん
宮城県 みやぎけん 山形県 やまがたけん
山口県 やまぐちけん 山梨県 やまなしけん
和歌山県 わかやまけん



  • 狄斯奈樂園
  • 東京站->築地站->台場海濱公園站->銀座站->東京站
  • 東京站->原宿站->新宿站->六本木站->赤羽橋站->東京站
  • 東京站->箱根湯本站->強羅站->早雲山->強羅站
  • 強羅站->箱根湯本站->新宿站->淺草站->東京站

Wii Linux


只是改了要拿來做什麼呢...我想想... Wii Linux | WiiLi

What you could do with Wii Linux:

  • Surf the Internet (using the wiimote control as a mouse pointer)
  • Stream moves, MP3 music, etc, from a PC to a TV using Nintendo Wii in the middle. Think Apple iTV for free.
  • Connect USB Keyboard and Mouse.
  • Write a document with a regular USB keyboard and print it with any USB printer.
  • Email and chat with your friends.
  • Use an external USB storage device to backup and play your movies, games, mp3's.
  • Play old classic game roms using the MAME and other console emulators.
  • Develop your own programs and games.
  • Control Wii from your PC using the WiFi connection.
  • Use Wii as a Network Attached Storage (NAS) by connecting it to an external USB HD.
  • Anything you could possibly do with a regular computer.
Wii can also be converted into a media center extender using WiiLi.
總之都是Thin Client的應用,沒有硬碟嘛

這個應該是http://www.wiili.org的solution,用Zelda hack....
Nintendo Wii and Linux - Give It a Try Today!

Wii modchips have been around since the start of the year in one form or another,but some folks at the 24th Annual Chaos Communication Congress just demoed a new Wii hack that lets them have full access to the console,including all the hardware. By using a custom serial interface, they were able to grab access to the encryption and decryption keys during runtime by doing memory dumps. Don't worry about the details if you'renot sure what's going on, just know that you're going to be able to run even better homebrew and "backup" Wii games in the near future.