Code Syntax Highlighter updated

Friday, July 15, 2011
By keiji
SyntaxHighlighter updated to 3.0.83.
The Dynamic Brush Loading is cool feature.

Code Syntax Highlighter
SyntaxHighlighter 3.0.83
Copyright 2010 Alex Gorbatchev.
http://www.dreamprojections.com/syntaxhighlighter/

IE8/9 compatibility mode

Thursday, June 02, 2011
By keiji
To direct IE browser to use modern rendering method, you need to specify the following meta tag.

<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />

Reference: Defining Document Compatibility

.NET 4 & IIS 7.5 & SQL Server 2008 R2

Thursday, May 12, 2011
By keiji
All the code is now using .NET framework 4, C#/ASP.NET, running on IIS 7.5, using SQL Server 2008 R2.
DocType is now HTML5.
I'm planning to clean up code to use full HTML5 with IE9 and Firefox4.

Mobile mode meta tags

Saturday, October 30, 2010
By keiji
To be able to see the site with mobile device such as iPhone, you need to put a meta tag.
Without this, the screen resolution could be wrongly recognized.

<meta name="viewport" content="width=device-width, initial-scale=1.0">

TakTrack.NET now recognize the mobile user agents and renders the layout to fit the small screen size.

mouseenter/mouseleave

Wednesday, May 27, 2009
By keiji
Category: Javascript, jQuery, Tips
Recently, I encountered an issue regarding "mouseenter/mouseleave" events.
Those events are supported by only IE, but non by non-IE browsers.

There are similar events "mouseover/mouseout" supported by most browser.

Essentially, "mouseenter/mouseleave" won't be triggered by child elements, whereas "mouseover/mouseout" will.
You can google "mouseenter/mouseleave", and find many article about that.

The difference is fundamental and we can't use those events for the purpose of "mouseenter/mouseleave".

Fortunately, jQuery provide special function .hover()
By using that, you can easily implement the "mouseenter/mouseleave" callback function.
Using custom error pages to redirect the page from virtual URL to actual page is a common trick to implement so called "URL rewrite" on IIS.
It works fine on IIS 5 & 6.
However, it won't work on IIS7 (e.g. Windows Server 2008), as there is a bug on IIS.

You need to install the following Hotfix from Microsoft.

The POST data is unavailable for custom error pages in IIS 7.0
http://support.microsoft.com/kb/956578

Once you install the fix, it works just fine.

At first, I thought there is a bug in my code and tried to figure out what's the possible difference on IIS6 and IIS7, but I couldn't come up with any idea why.
Then, I googled and found this KB page.
Anyway, it's good at least they confirmed the bug and provided a fix actually.

Generating unique ID using GUID

Tuesday, August 05, 2008
By keiji
Category: .NET, Tips, VBscript
Sometimes I wanted to generate a unique ID. I often uses random number combined with date/time. But, recently I found better way of getting that.
The trick is to use "GUID". It is kind of guaranteed to generate a unique ID.

If you are using VBscript, then the function is like this:
public function GenGUID()
        dim TypeLib,strTG
        Set TypeLib = Server.CreateObject("Scriptlet.TypeLib")
        strTG = TypeLib.Guid
        GenGUID = mid(strTG, 2,len(strTG)-4)
        Set TypeLib = Nothing
end function

If you are using .NET language, then use the built-in function:
System.Guid.NewGuid.ToString()

Syntax Highlighting

Monday, January 14, 2008
By keiji
Now TakTrack support the Syntax Highlighting, using "Code Syntax Highlighter".

Code Syntax Highlighter.
Version 1.3.0
Copyright (C) 2004 Alex Gorbatchev.
http://www.dreamprojections.com/syntaxhighlighter/

    function GetProjURL(sFieldName)
    {
        var sURL="";
        var sPID=$v(sFieldName);
        var p=sPID.indexOf(":");
        if(p>=0){
            sURL=sPID.substr(p+1);
        }
        return sURL;
    }

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
	<title>YUI Grids CSS </title>
	<!-- Source File -->
	<link rel="stylesheet" type="text/css" href="reset-fonts-grids.css">
</head>
<body>
<div id="doc">
   <div id="hd"><!-- header --></div>
   <div id="bd"><!-- body --></div>
   <div id="ft"><!-- footer --></div>
</div>
</body>
</html>

Mapping

Wednesday, June 06, 2007
By keiji
This is a map using MS Virtual Earth. It was quite easy to incorporate the component.
To deal with multiple maps in one entry is a little tricky, though.

Dev Log Started

Monday, June 26, 2006
By keiji
I'm going to log about the development of the TakTrack system here.

The topics would be CSCW (Computer Supported Cooperative Work), Blogging System, CMS, HCI (Human-Computer Interaction: Usability/User Experience things), C#.NET, ASP.NET, JavaScript, XHTML, XML, XSLT, SQL, etc, etc, ... well, lots of things involved to develop a web based system!