Rohan Thomas' Weblog
Direct contact : xtreme.net(at)Gmail.com
Affliations
Singapore Professional .Net Usergroup
Moderator for .Net Message Boards at :
"No problem can sustain the assault of sustained thinking."
- Voltaire
|
 |
Thursday, May 05, 2005
VS.NET 2005 Beta2 and SQL Server April CTP
Well, finally after some persuation for kitkai, I am back on the blogging track...
I've wasted my 2 precious days installing VS.Net Beta 2 and SQL Server Server April CTP on my laptop, I was so lost I even had to reformat my system and lost all my mail and my favourites... What a shame... But that was because I ran out of patience and decide to do things in haste... Guess I deserved it...
Now that my PC is reformatted and I tried installing it all over again, VS.NET installed successfully. SQL Server CTP installed successfully. But, the shortcuts to SQL server are all missing...
nothing in the start menu... nothing...
Why me? why is this happening to me?
Just my luck with SQL Server CTP...
Posted at Thursday, May 05, 2005 by XtremeDotNet
Get Link for this post
Gmail has decided to go all out and provide its customer with ever growing storage algorithm... Currently its 2052.517600 megabytes (and counting)..
I have no idea of what to do with so much space....
Posted at Thursday, May 05, 2005 by XtremeDotNet
Get Link for this post
Wednesday, March 16, 2005
Posted at Wednesday, March 16, 2005 by XtremeDotNet
Get Link for this post
Wednesday, February 23, 2005
Modal Pop-Up window(ASP.NET JavaScript)
Problem:
We all require Modal Web Dialogs once in a while, and so came my turn. I used js to pop up a modal dialog like so :
function OpenModalDialog(strUrl,strFeatures,aID,hours)
{
if (strFeatures == '')
strFeatures = "resizable=no;dialogWidth:510px;dialogHeight:350px;help:no;maximize:yes;minimize:yes;scrollbars:yes";
//set the cookie values
document.cookie = "AID=" + aID + ";path=/";
document.cookie = "Hours=" + hours + ";path=/";
var r = window.showModalDialog(strUrl,'',strFeatures);
if(r == true)
{
document.Form1.txhBool.value = '1';
}
else
{
document.Form1.txhBool.value = '0';
}
document.Form1.submit();
}
This function pops-up a modal web dialog. Now you have the modal dialog floating on top of the browser.
I wrote a few lines of code on the modal dialog and put a button in to make it submit. But to my surprise, another window(non-modal) poped up. I was very surprised and tried to get help but was told that modal dialogs cannot do a postback... Well I was very surprised at MS to let a loophole like this exist in IE. But I just continued my work due to lack of time to do some R&D. So now the only option was using js, so I used this function in my popup dialog and called it on the click on a <input> button (not asp button - as using asp button would force a postback!)
function ClosePopUp(val)
{
window.returnValue = val;
window.close();
}
What this fn does, is to pass the value val to the parent browser's function that poped this modal dialog up.
Lamentations :
So I process the value that is retrurned by the modal dialog and continued the processing on the parent page. The down side of this way according to me were three-fold.
1)All process had to be done on the page load of the Parent page(becuase the js function does a postback after getting a value from the child modal dialog.
2)A lot of time was wasted due to the fact that processing had to passed to the parent
3)The page modal was not so elegant
Many chances came where I needed to use modal dialogs, and all the way I used this method, thinking all this while that modal dialogs can't postback. Little did I know that I was so wrong!
Resolution :
Earlied when I was helping a person on one of the forums, Eliyahu Goldin, told me so!!
He said all I needed to do is to add this line inside the <head> </head> tag of the modal page :
<base target=_self>
Without wasting a second I opened one of the projects with the former js modal dialog implementation and tested it, and it worked totally!!!
So much time wasted, so much pain suffered just becuase I didn't bother to google for this one little piece of code! :(
I owe this to Eliyahu...Cheers man..
Posted at Wednesday, February 23, 2005 by XtremeDotNet
Get Link for this post
Monday, February 21, 2005
Disabling Enter Key (JavaScript,ASP.NET)
Just a Question I came across browing one of my forums;
Q. How do I disable the enter key?
A. Well its just a piece of code which goes like this :
function modifKey(e)
{
var modif='';
if (event.altKey)
{
modif+='[ Alt ] ';
}
if (event.ctrlKey)
{
modif+='[ Ctrl ] ';
}
if (event.shiftKey)
{
modif+='[ Shift ] ';
}
getKey(e,modif);
}
function getKey(e,modif)
{
if (e.keyCode)
{
keycode=e.keyCode;
}
else
{
keycode=e.which;
}
char=String.fromCharCode(keycode);
xCode=char.charCodeAt(0);
if (xCode == 13) //Enter key is pressed!!
{
window.event.keyCode = 0;
}
else
{
return true;
}
}
So as you can see, we are trying to catch the enter key and return true if any key except the enter key is pressed!
Since we want this to work for the whole page, put this is the body tag of the page :
<body MS_POSITIONING="GridLayout" onkeypress=' return modifKey(event);'>
</body>
There you go, enter key disabled. :)
Posted at Monday, February 21, 2005 by XtremeDotNet
Get Link for this post
Saturday, February 19, 2005
Took another of the Tickle tests... This is the result.. I think the downside part is quite true... :-|
You are
That means you are able to draw on the strengths of both the right and left hemispheres of your brain, depending upon a given situation.
When you need to explain a complicated process to someone, or plan a detailed vacation, the left hemisphere of your brain, which is responsible for your ability to solve problems logically, might kick in. But if you were critiquing an art opening or coming up with an original way to file papers, the right side of your brain, which is responsible for noticing subtle details in things, might take over.
While many people have clearly dominant left- or right-brained tendencies, you are able to draw on skills from both hemispheres of your brain. This rare combination makes you a very creative and flexible thinker.
The down side to being balanced-brained is that you may sometimes feel paralyzed by indecision when the two hemispheres of your brain are competing to solve a problem in their own unique ways.
Posted at Saturday, February 19, 2005 by XtremeDotNet
Get Link for this post
Tuesday, February 15, 2005
Bought an O2 mini PPC-Phone yesterday. I must say I had some reservations about buying a PDA phone.
My kind CTO gave me a hp PDA(not PDA phone) to play around with last year when I told him about my interest in buying a PDA phone. After using that PDA for some time, I realised that PDA wasn't really of much use to me.
One of the major factors was because of the size, I didn't like keeping it with me always, and if your PDA is not with you always, I dont think its of much use. You dont expect someone to come home and put down all the details in his/her PDA just becuase he/she didn't carry it along!
Because of all these factors, I went and bought myself a Nokia 6630 16 days ago, just because nokia advertised 6630 as an 'office phone'.
6630 had some features, but none of them matched the 'office phone' image that nokia potrayed. I would say its more like a semi-multimedia phone.
One of the things that I realised after buying the O2 mini is that its very difficult for a phone to be an 'office phone' without a stylus!
I was very dissapointed about my decision of spending so much and buying a phone that didnt achieve any purpose for me.
At last(yesterday), I couldn't keep the guilt of my misjudgement inside me any longer and sold my 6630, toped up, and bought an O2 Mini.
And it's amazingly superb! Now this is what you can call an office phone.
Yes I had all these features in the PDA too... But who carries that giant around? and who will keep on pulling it out from the bag(i.e if u decide to carry it in your bag)? call me lazy but the PDA that my CTO gave me to use (which is still with me except for demo times) is dead IF NOT used everyday..
And me who use to carry Nokia 6600 can't carry another big device on me..
And now that I have that whole PDA ( and a lot more ) inside my phone, ahhh.... swweeeeeet!!
Have to thank my CTO for letting me have the PDA to test out! :)
Go for O2 mini !
Cheers!
Posted at Tuesday, February 15, 2005 by XtremeDotNet
Get Link for this post
Thursday, January 27, 2005
Took a Test from Tickle yesterday : Inkblot Test.
Here is what they said :
Your subconscious mind is driven most by
You are driven by a higher purpose than most people. You have a deeply-rooted desire to facilitate peacefulness in the world. Whether through subtle interactions with love ones, or through getting involved in social causes, it is important to you to influence the world.
You are driven by a desire to encourage others to think about the positive side of things instead of focusing on the negative. The reason your unconscious is consumed by this might stem from an innate fear of war and turmoil. Thus, to avoid that uncomfortable place for you, your unconscious seeks out the peace in your environment.
Usually, the thing that underlies this unconscious drive is a deep respect for humankind. You care about the future of the world, even beyond your own involvement in it. As a result, your personal integrity acts as a surrogate for your deeper drive toward peace and guides you in daily life towards decisions that are respectful toward yourself and others.
Posted at Thursday, January 27, 2005 by XtremeDotNet
Get Link for this post
Monday, January 24, 2005
I read this post by one of the guys from 3rd Rock From the Sun, Keith Barrows.
Here's the excerpt :
A young and successful executive was traveling down a neighborhood street, going a bit too fast in his new Jaguar. He was watching for kids darting out from between parked cars and slowed down when he thought he saw something.
As his car passed, no children appeared. Instead, a brick smashed into the Jag's side door! He slammed on the brakes and backed the Jag back to the spot where the brick had been thrown.
The angry driver then jumped out of the car, grabbed the nearest kid and pushed him up against a parked car shouting, "What was that all about and who are you?
Just what the heck are! you doing?
That's a new car and that brick you threw is going to cost a lot of money.
Why did you do it?"
The young boy was apologetic.
"Please, mister..please, I'm sorry but I didn't know what else to do," He pleaded.
"I threw the brick because no one else would stop..."
With tears dripping down his face and off his chin, the youth pointed to a spot just around a parked car.
"It's my brother," he said. "He rolled off the curb and fell out of his wheelchair and I can't lift him up."
Now sobbing, the boy asked the stunned executive, "Would you please help me get him back into his wheelchair? He's hurt and he's too heavy for me."
Moved beyond words, the driver tried to swallow the rapidly swelling lump in his throat.
He hurriedly lifted the handicapped boy back into the wheelchair, then took out a linen handkerchief and dabbed at the fresh scrapes and cuts.
A quick look told him everything was going to be okay..
"Thank you and may God bless you," the grateful child told the stranger.
Too shook up for words, the man simply watched the boy push his wheelchair-bound brother down the sidewalk toward their home.
It was a long, slow walk back to the Jaguar.
The damage was very noticeable, but the driver never bothered to repair the dented side door.
He kept the dent there to remind him of this message:
"Don't go through life so fast that someone has to throw a brick at you to get your attention!"
God whispers in our souls and speaks to our hearts.
Sometimes when we don't have time to listen, He has to throw a brick at us.
It's our choice to listen or not.
Posted at Monday, January 24, 2005 by XtremeDotNet
Get Link for this post
Wednesday, January 19, 2005
The most personal blog entry
Not mine, but of Pat Helland - here
This blog entry reminded me that there are more important things in life than pursuing my interests - the people whom I care about/who care about me.
P.S : Pat Helland's blog is a excellent resource of Software Architechure.
Posted at Wednesday, January 19, 2005 by XtremeDotNet
Get Link for this post
|