其实不想走,其实我想留;
确实应该走,确实不该留。
拖拖拉拉,迟疑不定的我,终于还是到了结束校园生涯的这一天。
写了一张清单,特此纪念华盛顿湖畔,象牙塔里无知的青春:
2 Degrees;
3 Fellowships & Awards;
4 Advisors;
6 Summer Internships;
7 Years;
10 Papers+Patents;
3000 Email Contacts;
40000 Email Messages;
1000GB Data+Craps;

Comments 2 Comments »

Finding deals is always a hot topic, especially under current economic conditions. dealsea/bensgargin/dealnews are just samples of hundreds of deal websites that collect sales/deal information online. But the nature of the collection process determines that you are always going to be behind the deal publishers. Is there a way to act before the deal is even published?

Let’s take a look at how Neiman Marcus releases their sales items: admins first updates the inventory, then the website releases/links these items onto the sales page. Those lucky web-surfers catch a glimpse of the 60% off prada bags while refreshing the sales page, and in one second, those deals/steals are gone.

It turns out that with some engineering efforts, it’s possible to grab on deals before they even get published onto the sales page.

Imagine you are one of those Prada fans that are desperate for Prada handbags. Here is what you need to do to get the bags you want:

  1. Scrape the entire inventory of Neiman Marcus.
    Neiman Marcus website is designed in such a way that inventory of each product can be accessed via: http://www.neimanmarcus.com/store/catalog/prod.jhtml?itemId=prodXXXXXXXX
    So if you can enumerate all possible product IDs, you can scrape the entire inventory of Neiman Marcus. With cloud computing, it took me less than 8 hours to collect the inventory using 16 nodes.
  2. Filter out all items but Prada Bags.
    From millions of item pages, you can classify the pages by brand, and item type. If you are only interested in Prada handbags, that will narrow down the item list to a couple of hundred items only. Note you want to store available items as well as unavailable ones, as they might turn available with a sales tag and deep cut price.
  3. Online monitoring all Prada Bags.
    Now that you have collected the item list, all you need to do is to constantly check whether there is any deal popping out on these items in your background processes. An email service could come in handy to alert you as soon as your websearch routine returns a bag updated with a sales tag in the inventory.

I know you would ask: how effective is this and how soon do I have to act upon the deals?

After getting to see all the discounted prada bags, what I found out was: it usually took websites over 20 minutes to publish/update their inventory change, since they have millions of products in stock. But even if you are on a single PC, it took only 5 minutes to check through the entire Prada bag list. So you win over on average 15 minutes, which is about enough for you to call your friends, search reviews and make orders!

I actually built a system to do exactly mentioned above, not because I love Prada bags (although I did buy a few after seeing the discount and the price). I was looking for building some interesting internet search applications, and this turns out to be perfect given all the technical elements in it: web crawling, cloud computing, text processing, and web programing.

*ps: Again, I don’t recommend/encourage anyone to do this for commercial purpose. It’s all about getting your friends happy and convincing them IT can do good deeds!

Comments 1 Comment »

BootCamp provides Mac users with a close-to-perfect solution to run dual-boot on their mac machines. You can access the windows partition on a mac easily with BootCamp, but not the other way around. 🙁

I would like to access my Mac partition while running Windows XP, and for that, there are bunch of third party solutions: MacDrive, TransMac, and HFSExplorer. I tried all three and I’m reporting some first-hand experience with these products. It’s by no means a thorough analysis with any side-by-side detailed comparisons. Even worse, some of the glitches I ran into might not even due to any of these systems, but at the end of the day, it’s your gut feeling that really makes the call, isn’t it? 🙂

  • MacDrive provides the best interface and functionality. The Mac drive looks, feels and runs exactly like a windows drive. I fell in love with it for a few days, but after endless of failures to reboot, I finally located some serious pitfalls for MacDrive. For one, I noticed some weird behavior after enabling write access on Mac drive. It somehow modifies the mac indexing every time you modifies the Mac drive via Windows XP, so once boot in Mac, lookup has to re-index the drive (time consuming). Moreover, if you have the System Restore turn on, and you disable the write access to your Mac drive, then the system gets very fragile. I guess one reason is System Restore tries to make backup copies on the disk and fails due to read-only access. However, when I tried to disable System Restore, I wasn’t able to do so for some reason. I ended up un-install MacDrive, and all problems seem gone.
  • TransMac is very stable and simple to use with its file-explorer like interface. One note: you need to make sure you have administrator right in order to access your Mac Drive. The access to the Mac drive is done indirectly implicitly. Meaning, if you want to open a file on your Mac drive, TransMac makes a local copy onto your windows disk, and access from there.
  • HFSExplorer has the smallest feature set among the three. But it’s purely free. It has an interface very similar to TransMac, and data access is explicitly indirect. You have to extract the file to your windows local directory before any operation on the file.

So here is the take-away message: if you don’t want to pay anything and you know what you are doing, HFSExplorer is all you need; MacDrive and TransMac cost about the same(50$), I see MacDrive as a solution for dummies (in a nice yet unreliable way), and TransMac seems a nice balance among the three.

Comments No Comments »

感谢livesync,终于可以把自己网站的blogmsn的space二合为一。

在牛年的第一天做这件事情,也是希望往后能多写点自己的心情和体会。

忽然发觉自己的生活,从来不缺乏戏剧的因子,

所以新年的愿望是:

1. 多拍点照片,记录跌宕时刻

2. 早点结束游荡,该干嘛干嘛

Comments 2 Comments »

If you want to play high-quality videos in your powerpoint slides, this is a must-read to avoid embarrassing black box during your presentation.

  • How does Powerpoint play videos?

Powerpoint doesn’t uses windows media player for video playback by default. Instead, It uses Media Control Interface (MCI). That means even if your videos play fine on windows media player, it has nothing to do with whether they will render fine in your presentation.

Take-away message: So you should always test your videos on MCI first!

Microsoft has an article explaining the How in details here.

  • How to test videos on MCI?

You may test your machine set up by manually starting the MCI player and playing the media file. To do so, for Windows XP, click Start > Run and type “mplayer2.exe” in the command line box and click OK. This will start the MCI player (Not the Windows Media Player) used by PowerPoint. You may then open your media file in the normal manner and play it. If the media fails to play in the MCI player it will not play properly in PowerPoint. (Note, Microsoft removed the MCI executable from Windows Vista, however the functionality is the same in PowerPoint.)

  • Crap, my files don’t play on MCI, now what?

Solution 1: Convert videos to .wmv and disable Hardware Acceleration!

Convert all your videos to the powerpoint-friendlier windows media format(.wmv). To do so, you may download Windows Media Encoder, which is a great tool that does the convertion for free.

However, .wmv isn’t the entire magic solution. When your videos are encoded at a high bit-rate for quality purpose, MCI might fail to render properly. This is partly due to the DirectX technology MCI uses. To work around, you need to disable or turn down Hardware Acceleration.

  1. Click on Start > Control Panel.
  2. In the classic view, double click on the Display icon.
  3. Select the Settings tab and click on the Advanced button. The Advanced Settings dialog box appears.
  4. Click on the Troubleshoot tab.
  5. You can disable the hardware acceleration completely by dragging the slider to the extreme left of the scale. Or you can also choose to turn down the hardware acceleration by selecting an intermediate value.

Now your videos should play fine in MCI, thus Powerpoint. 🙂

Solution 2: Convert videos to .mpg using QuicktimePro and that’s it!

MCI doesn’t support quicktime .mov files, but it supports MPEG-4 very well. So this solution uses QuicktimePro to convert all videos into MPEG-4 format. Notably, I’m using H.264 codec as it’s currently one of the best codecs out there. Here are the detailed steps:

  1. Open your video in QuicktimePro
  2. Select export… under File
  3. Choose Movie to MPEG-4, and click Options
  4. Choose H.264 for Video Format
  5. Set Data Rate to 4000 kbits/sec (this is suffice quality for most videos)
  6. Set Image Size and Frame Rate accordingly
  7. Hit OK to convert
  8. Change the file extension from .mp4 to .mpg so that Powerpoint can recognize the file as video for insertion

Once converted, there is no need to disable hardware acceleration, and the .mpg videos should play properly in MCI.

I personally recommend Solution 2, as no performance needs to be sacrificed, although you need to have QuickTimePro. 🙂

Solution 3: Bypass MCI & just Embed Windows Media Player

If the aforementioned MCI trick doesn’t work for you, there is another route: bypass MCI and just embed Windows Media Player in a PowerPoint slide full-screen. Here are the detailed steps:

  1. Go to the slide where you want your video to appear.
  2. You will need the control toolbox to be displayed. Click View > Toolbars > Control Toolbox, click on the last icon which should be “More Controls”. (For PowerPoint 2007, Click Developer tab. Under Controls, click on the icon “More Controls”.)
  3. Scroll to the bottom and click Windows Media Player. Cursor changes to crosshairs.
  4. Start at the top left corner and draw a box that covers the entire slide. Right click in the middle of your slide and select Properties. This will bring up the properties dialog box.
  5. Double-click fullscreen so it is set to True. In the URL setting, enter the filename of your video (include the path if it’s in a different directory).
  6. Close the dialog box and you are done.

If you have many videos to show in your slides, this solution could become tedious as you have to embed the windows media player for every slides you wanna play video on.

I just bypass the whole MCI issue and embed Windows Media Player in a PowerPoint slide full-screen.
1. Go to the slide where you want your video to apper.
2. You will need the control toolbox to be displayed. Click View > Toolbars > Control Toolbox.
3. In the Control Toolbox, click on the last icon which should be “More Controls”. (For PowerPoint 2007, Click Developer tab. Under Controls, click on the icon “More Controls”.)
4. Scroll to the bottom and click Windows Media Player. Cursor changes to crosshairs.
5. Start at the top left corner and draw a box that covers the entire slide.
6. Now, right click in the middle of your slide and select Properties. This will bring up the properties dialog box.
7. Double-click fullscreen so it is set to True
8. In the URL setting, enter the filename of your video (include the path if it’s in a different directory)
9. Close the dialog box.
One minor irritant I’ve noticed. If you press Escape while you’re testing the video in your presentation, it flips the fullscreen flag back to False. Make sure you right-click, select Properties and flip fullscreen back to True before you save your projec

To this end, I would really hope Microsoft to step up and solve this. MCI issue has been there for over 10 years, and the success of PowerPoint urges MS to really perfect it.

If the solutions don’t work for you, feel free to comment/email me.

Comments 52 Comments »

This is not about a cheap Chinese student looking for get-arounds to pirating. It’s just once a while, we encounter secured pdf files that we get denied to copy/paste/print its content even for good deeds.

I have tried a bunch of approaches, including:

  • Print the pdf using free 3rd party pdf writer such as Cutepdf to get the unlocked version: This doesn’t work for me.
  • Use Advanced PDF Password Recovery Application:  This works, but you have to pay in order to get the full version of apdfpr.
  • Use the Free PDF Unlock Online Utility: This works like breeze.I upload the pdf, and get back the unlocked version! Note you have to use IE7 so that the unlocked version can be saved.

So, here comes to my recommendation:
if you need a quick dirty hack, and the file is not classified or super sensitive, you can get it done easily using ensode’s free online service. And it works!

*Repeat: I’m not teaching you how to pirate proprietary documents. And I don’t get paid by ensode to promote their service. I have faith that you will use this trick properly for the good!

Comments 20 Comments »

I am always a big fan of puzzles. And the fact that I’m graduating and hunting for jobs gives me the best reason/motivation for cracking them. 

I was checking the Facebook Puzzles today. Facebook engineers have done a great job motivating their puzzles. Well, for someone with a computer science background, some of their puzzles are clearly classical CS problems. 

It’s A Small World” problem has another name in CS: the k-nearest neighbor problem. Instead of checking with every datapoint, the solution to the problem could be accelerated by limiting the search to certain regions only, which can be achieved with KD-tree. ANN(approximate nearest neighbor) is a good example of such approaches. 

User Bin Crash” problem is a classical dynamic programing problem. Once you follow the DP approach to nail down the metric, the break-down and the initial value, it’s a shoe-in DP problem. 🙂

Now that I have done the “snacks”, I’ll start thinking about the harder ones…

btw: I’m not providing any solutions to the puzzles, just my 2 cents on how to crack them. 🙂

 

Comments 2 Comments »

It’s fun watching planes, ancient, old and new and my dad jumping up and down!

Comments 1 Comment »

pano_duke.jpg

Duke is pretty cool. I like the brick-stoned buildings, and the lovely southern accent.
Oh, yes, the morning rain on the graduation day makes it like Seattle, and that’s my favorite!

Comments 1 Comment »

The website has been upgraded smoothly from WordPress 2.3 to WordPress 2.5.1

Still, I found the update involves too much human intervention.

The most tricky part for me is to re-set the access permission for files. I wonder if any easier ways are provided other than mannually chmod every folder and files necessary.

Comments No Comments »