2013-02-27T15:56:51+08:00http://yjyao.comYao YujianCopyright (c) 2011 Yao YujianNUSMorge and My First Hackathon2013-02-27T00:00:00+08:00http://yjyao.com/2013/02/hack-and-roll.html/I had my 24-hour hackathon from this Sunday to Monday. Really great experience. Stayed up all night long coding non-stopped and produced something that actually works. Take a look at my github profile page - there were 108 commits during that period! This is kind of funny because it is exactly half the number of commits I have pushed in a year. Working in a team of four was also great. I don’t have to...Shuffling Cities2012-11-30T00:00:00+08:00http://yjyao.com/2012/11/shuffling-cities.html/So I am currently interning at NonStop Games, an awesome startup that focuses on mobile and social gaming using HTML5 technology and node.js. And here’s an image about an ultra-secret project we are currently working on: Anyway, recently I was assigned a task to write a world map generator for this game, and I thought the algorithm I came up with is worthy of a blog post ;) Please note that all codes in this...A Silly Alarm Clock in HTML2012-09-07T00:00:00+08:00http://yjyao.com/2012/09/a-silly-alarm-clock-in-html.html/This project is hosted on Github I have embeded the page below, but you can also directly access it here Eh iframe not supported? I have made this alarm clock, but I am a bit tired of it so I just release this partially finished app as a demo/concept. As you can see, this is an alarm clock designed to be mobile-friendly (though I don’t really think people will actually use a HTML5 alarm clock...NUS IVLE Downloader2012-08-31T00:00:00+08:00http://yjyao.com/2012/08/nus-ivle-downloader.html/This project is hosted on Github To me, it’s a great hassle to click links to download files from workbins, then move them into a proper folder, and try to remember what the latest files were. So I coded this Dropbox-like solution to free myself (and countless hardworking students) from this extremely time-consuming task. May I introduce to you- THE NUS IVLE Downloader! This is small daemon that keeps running in the background to check...Gomoku In HTML52012-06-04T00:00:00+08:00http://yjyao.com/2012/06/gomoku-in-html5.html/You can play the game here, or install it from Chrome Web Store. It also supports Mobile Safari! Gomoku is one of the very few board games I actually play and get to win sometimes. Since it’s a game with perfect information and very simple rules, I thought it should be easy to make an AI for it, so I coded this game. This game allows playing against human (on the same computer) or against...Some Handy Web Development Tricks2012-03-25T00:00:00+08:00http://yjyao.com/2012/03/some-handy-web-development-tricks.html/In this post, I would like to share some small but useful tricks I found in web development. Set up a simple server locally. For front-end web developers, setting up a PHP and mess around with all the web configurations is just inconvenient. But certain features, like XHttpRequest and web workers, are just not supported by some browsers when the page is accessed locally. Luckily Python has a really interesting utility: python -m SimpleHTTPServer 8000...Canvas Experiments2012-03-24T00:00:00+08:00http://yjyao.com/2012/03/canvas-experiments.html/So I started learning the html5 canvas feature, and here are the three projects I coded. Crazy Paint makes the computer paint randomly on the canvas with a random brush. The brush draws random shapes, some filled, some unfilled, around the point being painted. If you are patient enough, you can try leaving the computer to draw on itself until it makes a nice wallpaper, like the one shown below. Simple Paint uses a lot...New Year, New Platform2012-01-31T00:00:00+08:00http://yjyao.com/2012/01/new-year-new-platform.html/I have just finished setting up my personal site with Jekyll! Hooray!! Why Jekyll? For me, it is because it gives me complete control over the layout and style of the whole site. I also got to host it on Github with git, which is both free and convenient. The customization is way better than Blogspot and much easier to learn. While people describe it as ‘blogging like a hacker’, I found that I don’t...New Year Resolution2012-01-11T00:00:00+08:00http://yjyao.com/2012/01/new-year-resolution.html/Well,this is pretty late, but I will do it any way. Last year my only resolution was 'to learn Qt' and I did it! Although I didn't 'master' Qt, but at least I am now able to write programs with GUI and I am happy with it. I also learnt something outside the plan-client side web development, and I think it seemed more fun. So this is the plan for this year-a much detailed one...How to code a book in CSS2011-10-08T00:00:00+08:00http://yjyao.com/2011/10/long-book.html/This is the first 'theme' I designed. I call it The Long Book, as it is supposed to mimic a book, and turns out to be rather long.... It's probably not a good blog theme-the color is too bright and distracting, the layout is too rigid and the features I used are too new to make this theme work in older browsers. The Mark-up The HTML mark-up is rather straight-forward: <div id='main-body'> <div id='body-left'> <!--...Solitaire three in one2011-10-06T00:00:00+08:00http://yjyao.com/2011/10/solitaire-three-in-one.html/Update: the game has been sold to a company. Some content has been removed and the links are no longer valid. This post is a bit late, but anyway, my HTML Spider is done! I have also merged this game with my previous Solitaire (Klondike) and Freecell, and updated my Solitaire to 'Solitaire Three In One'. The link to the game is here; I have also uploaded it to Chrome Web Store. Shown above is...Wireless@HCI autologin Daemon2011-08-22T00:00:00+08:00http://yjyao.com/2011/08/wirelesshci-autologin-daemon.html/Hullo folks living in HCIBS! Tired of keeping logging into your wireless account every half an hour? Here is an app for you! This app will automatically log into HCI@Wireless with your account every half an hour. During the first time you run the app, it will ask for your login credentials. Click 'login now' after you key in the username and password - and that's it, it will automatically log you in subsequently. To...Treb2011-08-13T00:00:00+08:00http://yjyao.com/2011/08/run-google-task-google-plus-in-your.html/At first I wanted to code a simple Google Tasks client, something that allows me to summon https://mail.google.com/tasks/ig quickly. But as I started coding, my ideas evolved, so finally I kind of merged two new ideas and created this app. Firstly, I think we should be able to use mobile pages on our desktop for quick view of information. For example, instead of building a twitter client, we can just use the mobile twitter to...Solitaire2011-07-23T00:00:00+08:00http://yjyao.com/2011/07/solitaire.html/Update: the game has been sold to a company and the links are no longer valid. My second HTML5 game is done! Grab my Solitaire here! This time it was relatively easy to write because I recycled much of the old codes from the previous Freecell. However, maybe I overused a lot of transformation to achieve the flipping effect, only chrome can run the game fluently :( On firefox it was very laggy, and on...Freecell with HTML52011-07-17T00:00:00+08:00http://yjyao.com/2011/07/freecell-with-html5.html/The game has been sold to a company and the links are no longer valid. I spent some time learning css3 and html5 and coded this game. You can play it here, or install it from Chrome Store here. This game was coded primarily for chrome, so it doesn't work on IE or opera. I added support for firefox, but firefox doesn't render scaled background nicely. It also can't render box-shadow efficiently, so the experience...EMB Desktop Client2011-04-04T00:00:00+08:00http://yjyao.com/2011/04/emb-desktop-client.html/A simple desktop client for Hwa Chong Institution College Section EMB written in C++ with Qt. Coded in collaboration with Jessica You can refer to this webpage for detailed description. Or go to the Sourceforge page here. Below is the screenshot: The code is a bit messy as it is the first 'complete' Qt Program I have written. I also feel that all the functionalities could have been implemented in HTLM5, which could also provide more...My first Qt program2011-02-04T00:00:00+08:00http://yjyao.com/2011/02/my-first-qt-program.html/My 2011 plan is to learn qt, and here comes my first qt program-a simple text editor. As you can see, one of the best thing about qt is its compatibility across the three major platforms-Linux(X11), windows and Mac(not shown here). Another great feature is its rich UI widget set. Almost all the feature of a text editor are already built-in in the QTextEdit widget. All I have to do is just to design an...How to deploy your Qt application without any Dll files2011-02-04T00:00:00+08:00http://yjyao.com/2011/02/how-to-deploy-your-qt-application.html/Running Qt on Ubuntu is great, because most of the supporting libraries are installed by default. However, to deploy a Qt application on Windows, you have to make sure that the application comes with all the Dll files, which I personally find annoying. Of course, it is possible to package the whole Qt application in one exe executable-by linked against the Qt libraries statically. Following the guide here, and you will still get a frustrating...