20 Februari 2013

simple solution of slow treeview in pygtk

I found out that the solution was pretty simple. Instead of putting every value into _attached_ treeview's model, it is much faster to detach the model first, fill it with data, then reattach the model into treeview again. The improvement was very significant.
here is the sample code.
treeVw.set_model(None)
batch_insertdata(dataList)
treeVw.set_model(dataList) 

15 Februari 2013

detecting loop in single linked list

Very nice write up about this problem that made me finally understand. The key explanation is finally the fast pointer (hare) will overlap the slower one (tortoise).

The tortoise moves one step, the hare moves two steps. When there's a loop, no matter when/where, for sure they will on the same position. Amazingly, its complexity is only O(n).

01 Februari 2013

disassembling panasonic CF-T8

My pity that the fan is getting noisy around 50-60 C degrees. Finally I decided to disassemble the panasonic CF-T8. Unfortunately I could not find any clue whatsoever on the net. Even I tried to contact panasonic toughbook customer service, but they did not answer.. The number of the screws and the cute appearance have discouraged me to disassemble this laptop. But I could not bear the noise anymore, here we come!

  1. Prepare a light space to organize the screws. Seriously, the screws are a lot! It can make you dizzy when you reassembly the pieces.
  2. Unscrew all base screws, except these two that holds the main board PCB(see pic 1). Remember that there are still several screws under the keyboard. 
  3. Remove battery and hard disk 
  4. Be brave to pull the corner guards outward, it is toughbook, it is not delicate anyway 
  5. Remove the keyboard, by removing the locking mechanism in the bottom (see pic 2). Yes you have to remove the spill resistant plastic covers. Don't get hesitate to do so, you have no choice. If you have remove the screws which lock the keyboard you still have to fight the double adhesive that sticks the keyboard onto the base. Just carefully pull it. 
  6. Remove the cable of the keyboard from the mother board, again you have to get rid of the spill resistant cover. 
  7. Remove the screws and lock on the VGA port and extension port. 
  8. Remove the cable of touchpad and indicator lamp 
  9. Now you should be able to separate the upper part of the base. It is not easy tough, there is adhesive that sticks the plastic element, just be brave and be careful. 
  10. To remove the main board (see pic 3) you have to unscrew green screws, but don't unscrew the reds because they hold the heatsink. 
  11. Remove _short/tight_ cables on the right side of the main board. 
  12. Remove the main board, but be careful because the space for VGA connector is really tight (marked blue in pic 3). Now you have access to the fan. 
  13. On reassembly dont forget to put the switch in place before screwing. 
  14. Good luck 
I'll be more than happy if you find this post is useful.


pic 1. Two screws that hold mainboard

pic 2. locking mechanism to hold the keyboard

pic 3. screws to open mainboard (yellow)