Drought problem in Myanmar

Our country, Myanmar encounter drought problem in this summer because of lack of raining and some trees have been ruined by Nargis. Unfortunately, several people have been killed and some are struggling for water because of this problem. We, behave of Myanmar citizen need your hand to get out of drought problem and any helps will be deeply appreciated in advance.

We are the world

Send them your heart So they'll know that someone cares And their lives will be stronger and free As God has shown us by turning stone to bread So we all must lend a helping hand

Automatically adjust DIV height

In my project, search page has been created two DIV. One DIV is for search item portion and the rest one is result page. For result page, I've set "overflow" attribute on it. To set overflow attribute, we gotta define "specific" width and height on it. To define specific width and height is ok for specific screen resolution. For various resolution, there are so many space for large resolution. That's why I was dilemma on it. That's why I've created and embed small javascript on it.

Her you go:

view plain print about
1var myWidth = 0, myHeight = 0;
2if( typeof( window.innerWidth ) == 'number' ) {
3//Non-IE
4myWidth = window.innerWidth;
5myHeight = window.innerHeight;
6} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
7//IE 6+ in 'standards compliant mode'
8myWidth = document.documentElement.clientWidth;
9myHeight = document.documentElement.clientHeight;
10} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
11//IE 4 compatible
12myWidth = document.body.clientWidth;
13myHeight = document.body.clientHeight;
14}
15
16var mf_height = myHeight - 100 <em>(it's user define height for upper DIV)</em>;
17document.getElementById('main_frame').style.height = mf_height;

Stackoverflow

I'm very new to using Stackoverflow in this month. It's cool to ask questions and answer the questions which you know. You're a geek of one or any specific programming language, you can solve their problems to get more reputations there. Even if you can't answer, you can discuss or vote with their answers. It's cool.

I'm there : http://stackoverflow.com/users/343623/ppshein

Webcamps

I attend Microsoft Webcamps on last week. It's neither seminar nor promoting of Microsoft products. It's just simple training for how to use Microsoft Visual Studio 2010 including MVC (Model, View and Controller). It's really nice. They're focus on VS 2010, MVC 2 and IIS 7. I feel Microsoft is crazy over SEO structure like PHP and Ruby on Linux.

Documentation, patching and me

I'm so far to keep in touch with CFML in these days except reading some lesson for CF8 exam. Now that I'm about to write documentation for my so-called third project in my company and doing pitching taught by new boss. Honestly, these two are I don't want to do but I got new experiences from them.

Appreciate to all who give me new experience.

Display row count in GridView

ASP.NET Gridview is kinda complicate to handle sometimes. First time, I didn't know how to display row count in Gridview. Whatever I tried is displaying vistual ID of database. After that, I found how to display row count in Gridview.

view plain print about
1<asp:TemplateField>
2<ItemTemplate>
3<%# Container.DataItemIndex + 1 %>
4</ItemTemplate>
5</asp:TemplateField>

SES for Coldfusion

Do you wanna do all of your URLs to be familiar to search engine? It's ok that sesConverter can fulfill your desire. It's simple to implement and manipulate. First of all, download sesConverter.cfm. Then, you need to include this file into your application.cfm file. After that, move to sub-directory such as news, blogs and so on.

in application.cfm file

view plain print about
1<cfset SESdummyExtension = ".cfm">
2<cfset SESrBaseName = "baseHREF">
3<cfinclude template="sesConverter.cfm">

In index.cfm file of sub-folder, you need to write like :

view plain print about
1<base href="http://www.mywebsites.com/news/">
Change like that in all of your href:

view plain print about
1http://www.mywebsite.com/news/read.cfm/id/10/category/2

instead of

view plain print about
1http://www.mywebsite.com/news/read.cfm?id=10&amp;category=2

Tour de Coldfusion

Beta version of Tour de coldfusion is launched. The purpose of this software is you can realize how do CF functions and tags work on the fly especially for CFMX9. Likewise, you will see which functions and tags will be useful for your development. Like beta version, I found some bugs and errors in this software but I can know a lot of knowledge from it anyway.

Ref:

Facebook "Like" API

Now 9:30pm Singapore Time. I saw some websites integrate Facebook "Like" API in their website. I feel it's awesome and can communicate their customers between their websites and facebook. That's why I like to add this API on my so-called website, Planet.com.mm. Using this API is very simple. You need to define your dynamic URL and type of like button. Normally, there are two types of Like API. One is standard and the rest one is count. Standard one can describe detail information (full name) of how many people click on it and show name if your friends also did. Count one is just for count.

It's for standard one

view plain print about
1<invalidTag src="http://www.facebook.com/widgets/like.php?href=[Your Website URL]" scrolling="no" frameborder="0" style="border:none; width:450px; height:23px"></iframe>
If you don't define any value in Layout attribute, default is standard.

For count, use it so.

view plain print about
1<invalidTag src="http://www.facebook.com/widgets/like.php?href=[<em>Your Website URL</em>]&amp;<strong>layout=count</strong>" scrolling="no" frameborder="0" style="border:none; width:450px; height:23px"></iframe>

cftimer

In the past, I always used gettickcount function when I want to know the debugging of Query and page executing time. I can't say it's great at all but useful for my past

view plain print about
1<cfset start = GetTickCount()>
2<cfquery name="qryGetUser" datasource="#application.datasource#">
3SELECT USER_ID, USER_NAME FROM tblUsers
4</cfquery>
5<cfset end = GetTickCount()>
6<cfoutput>it took #end-start# ms</cfoutput>
But starting CF7, we can use if we want to know the Query executing time. It's very useful and simple. But, we will have to open debugging mode.
view plain print about
1<CFTIMER label="getQrySpeed">
2<cfquery name="qryGetUser" datasource="#application.datasource#">
3SELECT USER_ID, USER_NAME FROM tblUsers
4</cfquery>
5</CFTIMER>

Top of Page