2010年2月24日 星期三

Wine 小技法

想把 Flash Builder 4 for windows 裝在 Linux 下面 
How to install Flash Builder on Linux

其中提到了 winetricks

這程式可以選擇要裝什麼 win32 元件,像是 vc runtime, .net runtime
$ wget http://www.kegel.com/wine/winetricks
$ sh winetricks

ZK Framework 相關

Data Binding

Using scrolling tabs on tabbox

ZK Calendars Doc

ZK Layout

ZK 開發文件 (html, pdf)

• ZK中文開發手冊 3.5.1
• ZK Developer's Guide Version 3.0.4
• ZK Developer's Reference Version 3.0.4
• ZK Quick Start Guide Version 3.0.4
• ZK JSP Tags User Guide Version 1.2
• ZK Studio User Guide Version 0.5.2
• ZK Mobile for Android The Quick Start Guide Version 0.8.1
• ZK Mobile The Quick Start Guide Version 0.8.6

Anatomy of the Linux slab allocator

2010年2月23日 星期二

DropBox 的替代品

DropBox 相當好用,類似的服務也很多 http://alternativeto.net/desktop/ifolder/

目前看到 opensource 的方案有 iFolder
但官網釋出的 server 版,"只有" for openSUSE
改天有空再來試試怎麼裝在 Debian/Ubuntu

另外 DropBox 也有提供 CLI 工具

Pythonic Web 應用平台對比


2010年2月22日 星期一

幾種 Flex Data Binding 的方法


使用變數 Binding 到 Label/Text

var str:String;

<s:Label id="clabel" text="Label"/>
<fx:Binding source="{labelText}" destination="clabel.text"/>
<mx:Text text="{labelText}"/>

Java 啟動參數大全




Java Support for Large Memory Pages


JBoss performance tuning

Part 1

Part 2

Innodb Performance Optimization Basics


HOWTO: Monitor i/o performance

sudo iostat -xcknd 15


Read I/Os

  • rrqm/s: # read requests merged per second queued for the device
  • r/s: Read requests issued to the device (realize requests can be joined together, so you are basically looking at the total of rrqm + r to get total read requests, assuming SOME may not be merged, I'm not 100% sure about that, but at a minium rrqm/s is reads per second)
  • rkB/s: Number of kilobytes read from the device per second
  • wrqm/s: Write version of rrqm/s
  • w/s: Write version of r/s
  • wkB/s: Write version of rkB/s
  • avgrq-sz: Average size (in sectors) of the requests that were issued to the device. Is the sector size 512 bytes for your device? Where do you check this (I'm not sure without searching, however we're primarily looking for what is relatively busy to either isolate WHY it's busy, or determine what subsystem needs to be upgraded, so I don't care a lot about this column even though it sounds fairly important).
  • avgqu-sz: The average queue length of the requests that were issued to the device - This one I do care about more - When things are queued up for the disks they aren't keeping up. Does that matter? That depends on a LOT of factors, is your software WAITING for the disk to complete it's operation? Usually reads that is the case, for writes it could be in a writeback cache and not a big concern.
  • await: The average time (in milliseconds) for I/O requests issued to the device to be served. This includes the time spent by the requests in queue and the time spent servicing them. - This one again I DO care about. This is even more important than the number in the queue for some applications (for example copying a file, you really don't care about the NEXT item in the queue when you are doing sequential writes). On the other hand if you are a file server and have a million small files you care about this, but at least as importantly you care about how many other requests were pending.
  • svctm: The average service time (in milliseconds) for I/O requests that were issued to the device - I view this one as useful for finding if you devices are performing roughly as expected. In this case my demo is using a quite old single disk, I don't doubt it took 11.5ms to seek to another sector, read/write it, and return. If I had a 15k rpm latest generation scsi drive and saw 11.5ms I'd maybe wonder why that was. This will also depend on how much seeking your disk has to do, this number being high is NOT always bad - for example with drives re-ordering read/write operations to make less head movement you could have this number higher on a new drive yet have significantly higher throughput. This probably is confusing, but think about trying to play hot-potatoe with 100 people between point A and B - if your ONLY goal is to get every person to hold the potatoe do you want it just randomly tossed about ONLY to decrease the time it spent in someones hands? Instead moving it so each person only sees it once should decrease your total time to reach all 100 people.
  • %util: Percentage of CPU time during which I/O requests were issued to the device (bandwidth utilization for the device). Device saturation occurs when this value is close to 100%.

2010年2月12日 星期五

忘記 mysql 密碼

mysqld --skip-grant-tables

>use mysql
>update user set password=password("new_pass") where user="root";
>flush privileges; 

Linux Kernel with PAE


Linux jimmy-desktop 2.6.31-19-generic-pae #56-Ubuntu SMP

Linux server 2.6.18-4-686-bigmem #1 SMP

2010年2月8日 星期一


若是  Innodb, 在 5.0.3 之前的 truncate 是一筆一筆把 row 給刪除
之後是先 drop table 再 create table,因為這點,所以要注意權限設定
truncate table 需要有 drop table 的權限。


程式執行時,吐說找不到 lib

經 Jack 大師指教,除了 ldd 之外,原來還有 strace, objdump 可以用,先記一下

Partition, Mounting in Linux




fstab with UUID



2010年2月4日 星期四

NVIDIA Nexus - Visual Studio-based GPU Development

NVIDIA Nexus - Visual Studio-based GPU Development

CUDA Toolkit 3.0 beta released, now with public downloads

MySQL Backup/Restore Large Databases/Tables

To dump large tables, you should combine the --single-transaction option with --quick.


It will allow the live application to use the mysql database as normal without locking any tables and preventing the application to change the database.

In most of case, we have to avoid to use "extended insert" , It will generate too many command line (sql commands)

DO NOT USE "mysqldump --extended-insert", especially huge table!

instead of "mysqldump --extended-insert=FALSE"

MySQL Dump Importer (called BigDump)
In this file, after mysql_connect(), It has to execute "@mysql_query("SET NAMES 'utf8'");" to avoid 亂碼

change the configuration, like below
$linespersession = 600;  // lines per session, It's perhaps to avoid "max_packet_size is too small"
$delaypersession = 6000;  
// how many micro seconds delay after one session

SQLite with Network



2010年2月2日 星期二