2016年1月20日 星期三

VirtualBox : How to automatically start VM in background

http://www.itechlounge.net/2013/06/virtualbox-how-to-automatically-start-vm-in-background/



VirtualBox : How to automatically start VM in background

By  | June 15, 2013

Oracle VirtualBox do not have such feature through the GUI. However, you can use the command line and the task scheduler to do so.
First, you need to grab guest virtual machine ID that you want to be started in background. Open the command prompt, and change directory as followed :
Then use this command to list the VMs on your host with their IDs :
Now create a batch file with the following :
*UUID is the actual ID of your VM including the quote.
Now open up the Task Scheduler through Administrative Tools and create a new task.
In the General tab, select the following :
– Run whatever user is logged in or not
– Run with highest privileges
In the Trigger tab, at Begin the task, click New and select :
– At startup
In the Action tab, click new and select :
– Start a program as action
– Browse to the batch file you created earlier as for Program/Script
In the Settings tab, uncheck the box :
– Stop if the task if it runs longer than…
You’re now done for the automatic startup! Now we need to do something to graceful shutdown the VM when the computer stop.

*If your guest VM is a Linux machine and this command have no effect at all, then make sure ACPI daemon (acpid) is installed and running!

2016年1月3日 星期日

Conjunction

Simple sentence has SV.
Compund sentence has independent SV, and independent SV.
Complex sentence has independent SV because dependent.
Coordinate conjunction contains 7 words. They are and, or, nor, for, yet, so, but.

2015年12月20日 星期日

Multivitamin Comparison Medicine

Start

Brand Wyeth Materna elevit Pronatal Vitabiotics Pregnacare Wyeth Centrum 康鈣C
Manufacturer Pfizer Canada Bayer Indonesia Thompson & Capper UK
Price $130 $90
Size 100 tablets 30 capsules 30 tablets
Vitamins
Palmitate (source of Vitamin A) 4000 IU
Beta-Carotene (source of Vitamin A) 1500 IU 4.2 mg
Vitamin A (Acetate) 1500 IU 5000 IU
Vitamin E (Acetate) 30 IU 20 mg 30 IU
Vitamin C (ascorbic acid) 100 mg 100 mg 70 mg 90 mg 1000mg
Folic Acid (= Folacin) 1 mg 800 ug 400 ug 400 mcg
Vitamin B1 (thiamine mononitrate) 3 mg 1.6 mg 3 mg 2.25 mg
Vitamin B2 (riboflavin) 3.4 mg 1.8 mg 2 mg 2.6 mg
Niacinamide (= Nicotinamide, Vitamin B3) 20 mg 19 mg 20 mg 20 mg
Vitamin B6 (pyridoxine hydrochloride) 10 mg 2.6 mg 10 mg 3 mg
Vitamin B12 (cyanocobalamin) 12 mcg 4.0 ug 6 ug 9 mcg
Vitamin D3 (cholecalciferol) 250 IU (12.5 ug) 500 IU 2.5 ug (100 IU) 400 IU
Biotin ( = Vitamin H) 30 mcg 0.2 mg 45 mcg
Pantothenic Acid (calcium pantothenate) 10 mg 10 mg 10 mg
Vitamin K1 200 ug 25 mcg
Minerals
Calcium (calcium carbonate) 250 mg 125 mg 162 mg 260mg
Magnesium (magnesium oxide) 50 mg 100 mg 150 mg 100 mg
Iodine (potassium iodine) 0.15 mg 140 ug 150 mcg
Iron (ferrous fumarate) 60 mg 60 mg 20 mg 27 mg
Copper (cupric oxide) 2 mg 1 mg 1 mg 2 mg
Zinc (zinc oxide) 25 mg 7.5 mg 15 mg 15 mg
Chromium (chromium chloride) 25 mcg 25 mcg
Manganese (manganese sulfate) 5 mg 1 mg 5 mg
Molybdenum (sodium molybdate) 25 mcg 25 mcg
Selenium (sodium selenate) 25 mcg 25 mcg
Phosphorus 125 mg 125 mg
Potassium (as Potassium Chloride) 30 mg
Chloride (as Potassium Chloride) 27.2 mg




End

2015年12月15日 星期二

How to Fix the Broken Bootcamp Partition after Resizing Mac OS X Partition

http://nerdr.com/bootcamp-partition-lost-repairing-mac-partitions/

How to Fix the Broken Bootcamp Partition after Resizing Mac OS X Partition

First, we need to download some software to handle the partition fixing.  Get gptfdisk from here:
Download the latest version (I used 0.8.6) and because you’re on a Mac you will need the .pkg version.
Once you have downloaded gptfdisk double click the file and install the .pkg file that downloaded.  That’s all the software we’ll be using.  Now it’s just you and terminal.
NOTICE – Now is a good time to plug your Macbook in to charge, you don’t want the power going out while changing the MBR.  Trust me.  Also a great time to BACKUP everything on your Mac and Windows Bootcamp partition.  I just backed up my Mac side because I like to live dangerously and my Windows Bootcamp partition is just for games and testing.
Now back to fixing.
Open terminal.  For a quick shortcut to open it press (CMD + spacebar) to open the spotlight quick search and type terminal.  That will open terminal.  It has >_ as it’s icon.
Let’s see what the state of your MBR is first.  Type these three things.  After each one press enter.  You will need your password for them because we use sudo.  None of the lines change anything on your computer and are used so you can get information about the state of your MBR and partitions.  Type carefully, and that is a vee vee not double you on line 1, and it is disk-numberzero not disk-oh.
  1. sudo gpt -r -vv show disk0
  2. sudo fdisk /dev/disk0
  3. diskutil list
One shows you disk status and partitions.  Two shows you types and three shows you your hard disk partition setup.  Three is the most important.
Output of line 3:
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *250.1 GB disk0
1: EFI 209.7 MB disk0s1
2: Apple_HFS SSD 125.0 GB disk0s2
3: Apple_Boot Recovery HD 650.0 MB disk0s5
4: Microsoft Basic Data exfat1 24.2 GB disk0s6
5: Microsoft Basic Data BOOTCAMP 100.0 GB disk0s4
IMPORTANT! note down the number on the left of BOOTCAMP when you do line three above!  For me this number was 5.  For you it might be 4.  This is what we will use to tell the MBR it’s a boot drive.
That’s the setup and preparation complete.  Now it’s time to go deep.  Open a new terminal window.  Anywhere that says <enter> means press enter.
Type the following line to start disk:
sudo gdisk /dev/disk0
r <enter>        go to the recovery & transformation menu
h <enter>        create a new hybrid MBR.
STOP! the next line is the most important.  Use whatever your bootcamp partition was above when we did line 3.  My Bootcamp partition on my Mac was 5.  Yours may be 4 or even 3.
5 <enter>        add partion 5 to the MBR.  Your’s may be different! Use what you got from line 3 above.
y <enter> if you are asked “Place EFI GPT (0xEE) partition first in MBR (good for GRUB)?”
<enter>          accept the default MBR hex code of 07
y <enter>        set the bootable flag
n <enter>        do not protect more partitions
o < enter>       print (display) the MBR.
You will see a message telling you it’s go time to actually write the partition.  It will say “Disk size is …” and list two MBR partitions it will make.   This is essentially a notification of what the new MBR will look like.  Look at it and if it looks acceptable then hit w <enter> to write out the table:
w <enter>     Recovery/transformation command (write partition table to disk)
y <enter>  Say yes to question: do you want to proceed.
It will recommend you reboot your Macbook.  Do it and when it’s booting up hold the left ALT/option key like you always do to boot up into Bootcamp.  It should work.
If it did work, great!  Don’t do it again :)  If it didn’t work…try the link at the top to the Apple forum post.  It’s 45 pages long right now so good luck with that but the guy seems very helpful.
Final disclaimer.  This post is for my personal use only and I accept no responsibility for anything you do with it or if anything bad or good happens because you followed the instructions above.  This fix worked for me once and will hopefully work next time I accidentally destroy my Bootcamp partition and stop Windows bootcamp from booting or showing in the startup choice menu when starting my Mac.




2015年12月8日 星期二

2015 交稅優惠

12月交稅
建行用CCB EYE CARD 4304 網上交稅 "01-稅款"
HKD$3000-$20000 回贈$50
$20001-$50000 rewards $100
$50001-$80000 rewards $150
$80001+ rewards $200

2015年12月7日 星期一

My Hotel

Thailand
Rama Gardens Hotel Bangkok, 9/9 Vibhavadi Rangsit Road, Laksi, Bangkok, Thailand
Louis Tavern, 79 Mod 3 Soi Vibihavadirangsit 64, Vibhavadirangsit Road, Talad Bangkhen, Laksi, Bangkok
All Season Hotels Gold Orchid Hotel, 375 Vibhavadi Rangsit Road, Phayathai, Bangkok 10400, Thailand

Philippines
Acacia Hotel Mania, 5400 East Asia Drive corner Commerce Ave. Filinvest Corporate City 1781, Alabang, Muntinlupa City 1781

南通
金石國際大酒店 南通市祟川區祟川路85號

中壢
麗寶福容大飯店 320桃園中壢市中正路89號

翰品酒店 桃園市民生路107號

台北
K Hotel  柯達大飯店 新北市永和路一段103號

高雄
蓮潭國際會館 813高雄市左營區祟德路801號
京城大飯店 高雄市三民區九如二路263號

Seoul
Hotel BluePearl, 129-3,4,6 CheongDam-DOng, Kangnam-Gu, Seoul 135-957, Korea
Ellui Hotel, 129, Cheong Dam-Dong, Kangnam-Ku, Seoul, Korea 135-100

2015年11月30日 星期一

Credit Suisse



拿到offer,把面试过程中遇到的一些题贡献出来。我申请的主要是risk,偶尔有quant strats。, l$ g; y6 i- r. c+ H0 v0 d9 |

C++及编程:6 {$ B7 \* o6 o: D/ \" `
1)what is an object? difference between object and class;/ H8 Q1 X: z& v3 |
2) difference between pointer and reference;
3) what is static variable? static function?' D4 E, C# Y" E) x" w& x! v5 ^
4) 一些片断挑错题;
5) 计算factorial;
6) 识别prime number;7 w' f% r# z$ v  B( a
7) 写一个程序从一本书里挑出有特定字母的词语。
7 Q  y8 y2 [* S: q
数学、统计、brainteaser:7 [( @& p$ A; p* e: ]3 E! N$ z0 r
1) 有一个直径已知的圆,从圆周上随机挑两个点,问平均距离多少;1 i1 Q3 [; `& [8 s- J2 `5 @8 |
2) 什么是central limit theorem,假设是什么?
3) 讲出一个var=无穷的distribution,写出一个var=无穷的distribution的density function;
4) 假设有一张圆桌子,你和面试官轮流放硬币上去。硬币不能重叠放,也不能有一部分悬空。放下最后一个硬币的人就赢了。问怎样放才能稳赢;; T* z) V6 s9 x, c1 {  B0 n+ ?# W" |
5) 100!有多少位数?

金融、金融数学:& {$ s( o  e7 f
1) 什么是VaR?如何计算?8 s- P  g, d% Q9 _7 Y
2) OU process的各种性质;8 V; _2 A( b" g& C2 C* \
3) 如何导出BS PDE?
4) 证明各种process是否martingale;martingale hits boundary的问题;
5) Local volatility model,stochastic volatility model及smile;, p" P7 t/ H* l' u/ O  N% I7 b
6) 近期时事。



【经验分享】瑞信银行Credit Suisse - Summer Intern IBD面经

文 / 见闻学堂 2014年12月09日 10:47:58  0
中国最好的金融求职培训:见闻学堂(微信号:top-elites)

Online test
网申通过之后会收到online test的邀请。如果各位没有接触过此类的测试,小职君在这里建议大家最好现在就开始练习。根据各位前辈的经验来看,这些OT并不是靠临场发挥就能搞定的。大量的练习才是顺利过关的保证。
电面
OT如果做得不错,就可以开始准备电面了。一般面试官会提前和你约定面试时间,比较少见pop internview。下面是电面中需要注意的一些点:
1. 不一定所有的电话面试都会问typical question。有同学电面是一印度VP面,完全没问why sales or why CS, 上来就问"Do you have any question for me?"。
2. 电面一般会问一些behavioral questions,比如“告诉我最能表现你领导力的一件事”。这就要求你在准备cv的时候,尽量能做到让你的每一个经历都有一段故事,把公司所要求的各类素质都附加进去。
3. 电面可能会问很多cv上的问题,比如有同学被问他大学的制度,3年和4年有什么不同,他的further study plan etc,社团,在过去经历里在团队里的角色,internship。所以fully prepare ur CV is highly recommended。
4. 电面也可能是analyst或associate面。Technical的问题可能会问三张表都有啥,depreciation对三张表的影响,DCF需要作什么assumption,3种valuation方法各自优劣。
AC面
终面的面试官是2个MD和1个senior associate,第一个人自我介绍问完简历后就狠狠的问了technical questions。
之后就开始问behavioral问题,比如星期一要做什么什么今天要OT了你怎么做阿,AB客户都要见你你怎么做啊,让你做一个事情你会先跟谁商量啊,做不完怎么办阿之类的。
余下的遇到的问题也差不多,问简历问的特别深,比如以前做那个project的动机是什么从头到尾都干什么问的很深,还让说介绍一个熟悉的行业说里面的风险有什么,然后就同样的,被抓着问private equity问了好久好久。
Suggestions
面试中,有一些各大公司面试都通行的注意事项,整理如下:
1. 不太容易说得东西就不要放在简历上了,我有个大家都没怎么仔细做的比赛写上去了,结果答的很不顺,被问的灰头土脸的;如果已经放上去了,做好被寻根究底问的准备
2. Technical questions答不出来就算了,错一个两个没关系,别因为打错而紧张导致后面本来会的问题答不出来。
3. 常见的behavioral面试前还是上网查一查攻略,做好准备。
4. 英文说得好一点就行,一定要顺,别卡,显得从容一点笑容多一点。简历经历motivation上会被问特别特别特别多的why,可以说慢点拖久一点。
5. IBD问的问题都很有套路的,就都是能预测的,最常见的tech总结以下:
-三张报表都是什么?
-depreciation多算了100个M,对三张表都有何影响
-trading comps和DCF优劣
-EV/EBITDA和P/E比较
-trading comps步骤
-让你做DCF会有哪些assumption,怎么算FCF(要记得有levered和unlevered之分哦),怎么算WACC