Monday, August 4, 2008

Printing Large Visio Diagram


My friends in SE team seem to have some passions with the diagrams. That makes the diagram big and cannot fit on a single A4 paper.

To print one of these diagrams onto multiple sheets of A4 paper, you can simply go to Page Setup. And then under the "Print Zoom" section, adjust the "Fit to x sheet(s) across by y sheet(s) down". After that, you can print the diagram as usual by go to File->Print. You will then need the scissors, glue and some hand works :D

Sunday, August 3, 2008

Live.com Doesn't Like Thai People

Long time ago, I was trying to sign up an e-mail account for my friend, Nattaporn, at live.com. But I was unable to. Live.com tell me that the user name "nattaporn" contains word that is not allowed.

Today, I tried to sign up with my mother name again and got the same error message.

What the two names have in common is the "porn" segment which is very common for Thai names. I am sure there are millions of Thai people those have their names containing "porn" (-พร). For instance, Siriporn (สิริพร), Nattaporn (ณัฎฐ์พร), Tuangporn (ตวงพร), Pornchai (พรชัย), Pornsook (พรสุข). "Porn" is, in fact, a good word in Thai which means "Blessing".

Live.com may has to reconsider this name filtering criteria since it is losing many of Thai users.

Sunday, July 27, 2008

Is Microsoft Visio Too Smart ?

Disable the auto-align feature of MS Visio

While there are many open-source software and freeware alternatives, Microsoft Visio is still one of the most well-known diagram-drawing software by the students. It can be used to create various type of diagram and it is installed on most PCs with MS Office installed.

However, certain features of MS Visio is annoying. When you try to move one object onto another object, Visio automatically moves the existing objects away which destroys your layout.

Usually, we want the objects to be laid on the screen the way we draw it. To disable this auto-align feature, go to File -> Page Setup ... -> Go to Layout and Routing tab. And then remove the check in front of "Move other shapes away on drop" at the bottom of the screen. Click OK button to finish.

Sunday, July 13, 2008

ASP.NET Provider Model Support in MySQL

After a long googling, I found that ASP.NET Membership Provider seems to be a good architectural choice for my project at the faculty. Microsoft prepared the providers for SQL Server out of the box. But I need my data store to be MySQL server. So something is needed to be done.

I first downloaded and installed MySQL Connector/Net 5.2.2. The installer also configured the machine.config file on my system too.

After that, I configured my project's web.config file to override the default connection string.

<connectionStrings> <remove name="LocalMySqlServer"/> <add
name="LocalMySqlServer"
connectionString="Datasource=localhost;Database=mydb;uid=root;pwd=root;"
providerName="MySql.Data.MySqlClient"/> </connectionStrings>

Then, I loaded the ASP.NET Web Site Administration Tool from Visual Studio 2008 and click on the Provider Configuration / Select a different provider for each feature (advanced) links to config MySQL providers with my project.

After the providers are configured, I went to the Security page but it provide me with error message.
Unable to initialize provider. Missing or incorrect schema.
I found out later that I need to create the database before MySQL connector can generated the schema. This is easily done by using MySQL's create database mydb command. Everything works fine in the end. All tables are generated.
mysql> show tables
-> ;
+-------------------------+
| Tables_in_mydb |
+-------------------------+
| my_aspnet_applications |
| my_aspnet_membership |
| my_aspnet_profiles |
| my_aspnet_roles |
| my_aspnet_schemaversion |
| my_aspnet_users |
| my_aspnet_usersinroles |
+-------------------------+
7 rows in set (0.00 sec)

Hope this helps people who are struggling with this problem :)

Other helpful blog on the topic:

Wednesday, June 25, 2008

Nerd Test

Haven't update this blog for a while. I am now very busy with senior/course projects.

Found this fun test from my friend's blog.


NerdTests.com says I'm a High Nerd.  What are you?  Click here!


Shocked to see myself scored 54% in Dumb-Donk category!

Sunday, March 30, 2008

Prevent _IG_FetchContent from caching data

_IG_FetchContent is a Java Script function provided by Google for facilitating iGoogle's Gadget development. Its function is simply to fetch data from a HTTP location.
_IG_FetchContent('http://www.google.com/', function (responseText) {
// do something
}
);

However, the HTTP request is NOT directly send from client to web server of that location like most AJAX calls. Google itself cache the content too. Which cause problems for Gadgets which need dynamic data.

To prevent Google from caching the data, the third parameter which is refreshInterval has to be specified.
_IG_FetchContent('http://www.google.com/', function (responseText) {
// do something
}
,{ refreshInterval: 1 });
The '1' means that the content at this location is cached for one second. Which is a reasonable amount of time.

Wednesday, March 12, 2008

My New Toy: X360 Controller for Windows

It is my summer! And I am spending my free time playing Need for Speed Prostreet, learning some new programming skills, and prepare myself for the internship program at IBM Solution Delivery, Thailand which will start at 17th this month.

When I played Need for Speed Prostreet for the first time, I found that Microsoft Wireless Keyboard was not responsive enough for playing this kind of game.

So, I decided to buy a new toy :)



I bought it from Pantip, Thailand's biggest computer store [and software vendors' nightmare :P], at the price of 1500 THB which seems to be too expensive for a game controller. I bought the wired version because some people in the forum said that the wired version is more responsive than the wireless ones. The wireless version also costs around 1900 THB.

The design is exactly the same as XBOX360 version. It has two analog sticks, one D-pad and four buttons. Despite the fact that I am a SONY fanboy. I have to say that this design is great!




There are more things to note about the controller's package design. First, there was a green stick wrapped around the end of the USB cord to warn the users to install hardware driver before plug the controller into USB port. It is really a great package design technique which can prevent technical problems for most users.



Second, it has a part in its cord that is loosely connected. So when people walk over the cord and accidentally trapped by it. The cord is consequently taken apart. So, the damage is not done to the game console, or the USB port of the computer.





My brother seems happy playing with it too. Here is photo of my brother playing Need for Speed :)