# 拱猪要拱几张Q

Scenario 1) 107张牌里放着一张黑桃Q。另一张黑桃Q放一边，所以是107张牌。
Scenario 2) 108张牌里两张黑桃Q。要全用鼻子拱出来。

$\hat{N} = m (1+\frac{1}{n})+1$

$\hat{N} = 92 (1+\frac{1}{5})-1 = 109.2$

$\hat{N} = m (1+\frac{1}{n})-1$

我们可以得到

$\hat{m} = n\frac{N+1}{n+1}=\frac{2}{3}(108+1)=72.667$

Run了100000个simulation。果然如此。mean of Xs = 54.03, mean of Ys = 72.67

# Fight with Margaret in Persona 4 Golden (PS Vita)

In Persona 4 Golden (P4G), there's this golden trophy for defeat the hidden ultimate boss Margaret, see Trophy One Who Has Proven Their Power.

I Googled and found that several sources (such as this one) seem to indicate that, in order to get the invitation (Aqua Invitation) from Margaret for the battle with her, one of the pre-requisite is that you need to defeat all the optional bosses (those boss in all dungeons that you have already cleared for the 1st time in the story plot.) by December 3. But actually, the latest time/ chance for fulfilling that is February 13 when you were in the ski trip Dungeon (the one with Marie).

Also, remember that you can only obtain the Aqua Invitation from Margaret after you talked to Igor and received the Orb of Sight, and before talking with the gas station attendant. So the steps are: (1) get the Orb of Sight (2) get out and re-enter the Velvet Room (3) Receive the Aqua Invitation (4) talk to the attendant.

Hope this helps.

# Persona 4 Golden (PS Vita Game)

I was playing Persona 4 Golden (P4G) for the whole May, and finally got the Platinum trophy. Quite a wonderful game. Highly recommended. Best PS Vita game so far. Here are some screen shots I took in the game.

# My All Time Favorite Games

Saw Diablo 2 battlechest dropped to \$9.99 today. Guess it's time to make my ATF games list.

1. Diablo2 (with LoD expansion pack)
2. Horeos of Might and Magic. (with 2 expansion packs)
3. Might and Magic 6
4. 金庸群侠传
5. 炎龙骑士团
6. Fallout 2
7. God of War
8. Gears of War
9. Final Fantasy VI
10. DOTA 2

Some runner ups: Starcraft 1, Red Alert, CS, Pokemon Green, 第二次超级机器人大战, 侍魂4，New Super Mario Bros DS，FF8，真三国无双3. NFS:Underground2, Sleeping Dogs

Definitely not in the list : 仙剑奇侠传。

# How to run a program/script when windows shutdown

I need to run a script to record something whenever windows shutdown.Here's what I found. I am running windows 7, but I believe the following should work for other recent versions as well.

Step1: In windows7, open the Local Group Policy Editor via running gpedit.msc. (You can use win+R to call up the "Run" window and then type gpedit.msc and click OK)

Step2: In the left panel of Local Group Policy Editor, Navigate Local Computer Policy --> Computer Configuration --> Windows Settings --> Scripts (Startup/ Shutdown), then double click Shutdown on the right hand side panel

# grabbed a Logitech m510 mouse

I got one Logitech m510 mouse to replace my two year old compact size m305.
The m510 is a full size mouse, and it feel great with my big hands. The side button is particularly handy, with the "bump up" shape design.
Side buttons are always not so handy to me as my thumb doesn't have the necessary agility to press them efficiently. I have two mice with side buttons: The Logitech performance MX, and CM Storm Xornet Gaming mouse. Both are great mice and I love them, however, the side buttons on those two are almost useless to me. Now with m510, i finally begin to see the greatness of having size buttons. I can see how they will become useful in DOTA2 with I assign item shortkey to them. XD.

# AHCI vs "native IDE" mode

Just noticed that the SSD on my new build 2 days old desktop is actually running on "native IDE" mode, as shown in the BIOS, south bridge configurations (motherboard: biostar A75MG). The SSD drive was that Kingston HyperX 3K 120G I mentioned in the previous post. I did some google and it turns out that  the "native IDE" mode is not recommended for SSD, while AHCI should be the choice. Hence I changed it to AHCI, can not get into windows. After more googling and I found this and followed the procedures described there and everything works out just fine. I re-ran the benchmark using CrystalDiskMark for the SSD to see if there 's any performance improvement for AHCI over IDE, and here's the strange thing.

The left one is on "native IDE" and the right is AHCI . The reading performance is greatly improved (esp. the random 4k QD32), while the writing seems to get worse. That's really strange, and I don't have a good explanation for that. But ... the loading and system overall performance is more related to the random small reading, thus I am indeed (with conservation) satisfied that I changed to AHCI.

Update: Nov/8/2012: Windows Experience Index (WEI) jumped from 7.6 to 7.9 (max) when changed to AHCI mode in bios.

# SSD drives

Finally I got myself into the SSD hunting safari, and got my two SDD drive:

# Kingston HyperX 3K 120 GB SATA III   [link]

I have tried them both on my 3 years old Thinkpad X200s, which have SATA II interface. Here are the benchmarks by crystalDiskMark:

From Left to Right: my 7200RPM SATA2 HDD; Intel X25-M 80G SATA2, Kingston Hyper X3 SATA 3 on SATA2. Even though both works on SATA 2 machine, the SATA 3 one seems to outperform the SATA 2 SSD. Also, you can see the huge difference between SDD and mechanical HDD, especially for benchmarks on 4k random access

# Open two Excel files in two separate windows [Microsoft Office 2003]

I have been using Office 2003 for almost a decade. I was very reluctant to upgrade to Office 2007 when it first released, partly because I am too old to adapt to a radically renewed GUI. But Office 2003 is decent and I don't any reason I should abandon it in the next two or three years.

Among several annoying features of Office 2003, that have been improved in later version, is that normally you can not just open two Excel spreadsheets in two excel windows side by side. This problem becomes particularly annoying when now we have large dual screen and high resolution.

I recently come across a trick for this issue. After you open you spreadsheet, you hold the SHIFT key to double click (or single click if in the Program Memu) to open another Excel program. This should open a new separate window. Then you can load another excel file into that new window. Please don't try to hold SHIFT and open another xls file directly, it won't work. You have to open another empty Excel window first.

This only works for Excel in Office 2003. I tried PowerPoint without any luck succeeding.