Eat around the world @ Cosmo Sheffield

First of all, I must warn any readers before proceed further that I don’t normally write a food review. In fact, this is going to be my first review of the sort. But for some reasons I think it has some value to my local, multicultural communities.

I happened to get to a new restaurant in Sheffield called “Cosmo“. It is a new “Pan Asian and world banquet” buffet franchise opening across the UK. Because it’s an “All-you-can-eat” place and I was hungry, so I decided to give it a try.

Their website said about a stunning restaurant, and indeed the place was stunning enough for me.
cosmo01cosmo02

Continue reading

NIfTI 2 MAT Converter

This is an easy-to-use, GUI-based NIfTI <-> Matlab converter.
This program based on The Tools for NIfTI and ANALYZE for Matlab toolbox, written by Jimmy Shen.
Its primary function is to read NIfTI-1 format files (such as .nii, .hdr and .img) and save them into Matlab .mat matrices.
It can also convert matrices back to NIfTI-1 files as well.

nifti2mat

I wrote this small application mainly for my convenience during my own research, but I guess many people will find it useful.
This is an experimental program though, so using it at your own risk.
I will gradually improve it as time passes.
If there is any comments or bug notices, please leave it in the comment. 

DOWNLOAD

* This program requires Matlab Compiler Runtime (MCR) to run. If you don’t have Matlab installed on your PC, you can download the MCR from here

Creative Commons Licence

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

—-  Current version —-
0.2 : Read and save NIfTI-1 files and .mat files.

I am turning 25

This post serves as a milestone (after the previous one few years back) that I’m turning 25.
This 25th year is quite a remarkable age.
In western culture, this is where a child (or teenager, for that matter) turns to be a grown-up.
In my country Thailand, though, this year marks the transition between life’s periods and,thus, is said that many bad lacks will happen.
Some people say these bad lucks are there as challenges to make you more ‘endurable’ as an adult, some say they are there just because, basically, they are there.
In any cases, this truely is a time for many things to be set in motions.
Let’s see what will happen in the next episode of my life.

There are many things I want to do, to learn, to create.
Usually, most of them are never completed.
From now on I will put more commitment into all these things.
They must be done!

——
As usual, there will be a little program I’m releasing as my gift to the world.
This year, of couse, there is one.
It is a Matlab text rendering function.
To my surprise, in the almighty Matlab, there is no such a way to render text string directly into an image.
While it is a standard in most image processing libraries to render some texts into pixel images, Matlab’s ‘matrix’ and ‘text object’ can’t do such a work!
Nevertheless, this function should do the job.
But since there are many details to be documented, I’m afraid anyone have to wait a little bit for me to write them.

Why is it so easy to get a wrong idea?

I saw several of my friends shared this picture on Facebook.

This picture created by Paul Hamon, comparing a public transportation map (mostly subways) between two cities, which are Bangkok , Thailand and Singapore city (which is a country on its own).

What do you think when you see this picture?  Is it obvious that Bangkok’s transport is far more expensive than Singapore’s? Is this a clear evidence of authority’s corruption? Continue reading

l0-Norm, l1-Norm, l2-Norm, … , l-infinity Norm

I’m working on things related to norm a lot lately and it is time to talk about it. In this post we are going to discuss about a whole family of norm.

What is a norm?

Mathematically a norm is a total size or length of all vectors in a vector space  or matrices. For simplicity, we can say that the higher the norm is, the bigger the (value in) matrix or vector is. Norm may come in many forms and many names, including these popular name: Euclidean distance, Mean-squared Error, etc.

Most of the time you will see the norm appears in a equation like this:

\left \| x \right \| where x can be a vector or a matrix.

For example, a Euclidean norm of a vector a = \begin{bmatrix}  3  \\  -2  \\  1  \end{bmatrix} is \left \| a \right \|_2=\sqrt{3^2+(-2)^2+1^2}=3.742 which is the size of vector a

The above example shows how to compute a Euclidean norm, or formally called an l_2-norm. There are many other types of norm that beyond our explanation here, actually for every single real number, there is a norm correspond to it (Notice the emphasised word real number, that means it not limited to only integer.)

Formally the l_n-norm of x is defined as:

\left \| x \right \|_n = \sqrt[n]{\sum_{i}\left | x_i \right |^n}  where n \epsilon \mathbb{R}

That’s it! A n-th-root of a summation of all elements to the n-th power is what we call a norm.

The interesting point is even though every l_n-norm is all look  very similar to each other, their mathematical properties are very different and thus their application are dramatically different too. Hereby we are going to look into some of these norms in details.

Continue reading

Matlab script for sending notification emails

There are so many times that we need to run our Matlab scripts for a very long time. They could take hours or up to days.
Of course , we will never sit down and look at them during this whole period of time. We normally let them run on their own and go out for shopping, especially if your code is running on a server or on a remote computer.

However, many times that we feel insecure, worrying whether our codes are still running normally or dead already. Are there any errors arise? How much are the current progresses? Are they finished already? This is where this little script comes in handy.

NotifyMe script for Matlab let us send notification emails right from our Matlab code to your (or any other) mailbox.

Very simple to use. You can implement them to alert you in any situations you want. If you have a smartphone with a push email service, this script will let you follow your program in a real time, from anywhere with Internet access.

Download here: NotifyMe

Continue reading

US Censorship on the Internet

At the time of this writing (16 November 2011), US Congress is trying to pass their new laws which could threaten the entire Internet. Those laws are the PROTECT-IP Act (PIPA) and the Stop Online Piracy Act (SOPA). It’s a very big disappointment of mine to see the US government, which should stand as a model of liberalism, to think they can stop the online piracies and promoting entertainment industries by taking control over the internet. The piracy-related website and their users can always finding many workarounds to avoid this kind of action. However, using this act, the government and many related sectors could easily shutdown many public service that they feel not comfortable with, or could even use it to shutdown their competitors’ business. This kind of law will just destroy may good services nowadays and return everything in the Internet back to the dark, uncontrolled sources.

Sadly to see the US government going to make the same mistake as some under-developed countries.

For more interesting information, visit the following sites:

http://americancensorship.org/

http://fightforthefuture.org/pipa/

http://www.avaaz.org/en/save_the_internet_d/

http://www.mozilla.org/sopa/?WT.mc_ID=sopa-tw

This post dedicates to the liberalism, free speech, democracy, and the future of the technology.

Online photo editor, Pixlr

If you sometimes need a photo editor to fix and improve your photos, but you don’t have one. The famed Adobe Photoshop is too heavy (and too expansive, of course!). There are many good free and light weight photo editors to use as an alternative. For example, Paint.net is a very light, free , easy-to-use photo editor. Gimp, well known among Linux users, provides rich features, full-function editors, yet quite hard to use for beginners.

However, if you don’t feel comfortable to download and install these software on your computer, you might consider this online photo editor. The Pixlr is a online photo editor which provide a full-function, easy-to-use, and Photoshop-like photo editing experience. The great thing about this one is that it’s really similar to Photoshop, which made me, as well as any other Photoshop users, to start working with it right away.

It can open images from your computer or open directly from URLs. It can also save images onto your computer or directly save and share images to various online albums.

http://pixlr.com/editor/

A little guide to Reference Manager application

No one can say that they never use PDF files nowadays. It’s fast, easier, and reliable file format for storing any documents. I myself also need to read lots of PDFs research papers. At first it seems much easier than go to library and look for some books. However, when all the PDF files came together in your computer, a nightmare begins! Now all these PDFs are all over your computer that you have to look for it everywhere even in the deepest corner (err.. actually folder) of your computer. It’s now take a lot of effort just to find which PDF contains the content you’re looking for, not even think about writing the bibliography! You may try to manage them into order manually, but it’ll surely turn into a painful experience. When it came to this, a good Reference Manager application can save your life ( and lots of time, of course).

Continue reading