tag:blogger.com,1999:blog-91644112024-03-14T08:07:45.111+05:00(Tech)LifeDotComThis is the tech hangout for an early twenty something who doesn't look, and doesn't certainly feel like it, is a perfectionist and standards-compliant, hates typos and grammatical errors in official documents, is a little cynic and hilariously witty and thinks he should be invited for "The Bachelor" (he has all the capabilities :\)
Talks about himself in third-person...
<br>
And is certainly a geek!uXufhttp://www.blogger.com/profile/03011736869854687184noreply@blogger.comBlogger266125tag:blogger.com,1999:blog-9164411.post-3113482864685931732008-10-12T02:35:00.002+06:002008-12-18T08:36:54.554+05:00Code Nuggets: A Side-effect of Using DropDownList AppendDataBoundItems With DataBound Items<p>Picture this: You have a webform with two <code>DropDownList</code>s, both of them are databound to some data you get from a database. Now the first DropDownList's selection determines the contents of the second dropdown. So you simply do a AutoPostBack = true for the first dropdown and populate the second dropdown in the handler function. Right?</p> <p>But wait. What if you are required to put in a static item in the dropdown? Something like <strong>"-- Please Select --"</strong> as the first item in the list to force the user to make a conscious choice. Hmmm, so you look around and find the nice little property named AppendDataBoundItems that will take care of that. All you have to do is declare the first (static) item in the Items collection in the designer (or put a <asp:ListItem> tag inside your <asp:DropDownList> tags) and set AppendDataBoundItems to true. This nice little property tells the DropDownList to add the databound items after the statically declared items, so you can have your happy little "-- Please Select --" in your dropdown.</p> <h4>The Side-effect:</h4> <p>The side-effect becomes evident when you play around with your two dropdowns. Its immediately clear that something is not quite right. The AppendDataBoundItems property forces your dropdown's items from the <em>previous </em>postback to be treated as static objects on <em>this</em> display. Sort of where you get an ever-growing second dropdown with a hangover from the postback, which is clearly not what you wanted in the first place!</p> <h4>The Nugget:</h4> <p>So the quick solution is to use a loop to remove items selectively from your dropdown. Remember you still want to retain your first item, so that's why you use a loop. And a while loop at that.</p> <p><code>while (DropDownList1.Items.Count != 1) <br />{ <br />    DropDownList1.Items.Remove(DropDownList1.Items[1]); <br />}</code></p> <p>There. You won't have a problem with your static-dynamic dropdowns anymore! You can even extend it to other purposes, if you have several static items that you want to preserve, or if you want to preserve static items that are of a particular <em>value</em>. The possibilities are endless, and the pain in your back is gone.</p> <h4>Other Possible Solutions Others Propose:</h4> <p>Some people think that doing a DropDownList1.Items.Clear() would do the trick, but it doesn't. Remember, you want to retain your first object. Or if you want to add your first (static!) object manually again then perhaps you can do that.</p> <p>Yet others propose a rather swashbuckling <code>DropDownList1.EnableViewState = false</code>, do this <strong><em>only</em></strong> at your own risk and if you are sure that your user would never have to land on this page again during the current flow of your application (of course for which you cannot be sure, what if there is a network timeout?).</p> <h4>A Note:</h4> <p>Perhaps you'd want to use a for loop in place of that while loop, trying to do a quick </p> <p><code>for (int i = 0; i < DropDownList1.Items.Count; i++) <br />{ <br />    DropDownList1.Items.RemoveAt(i); <br />}</code></p> <p>but believe me, it wouldn't work. Why? Because the DropDownList shrinks as you remove items from it, so your loop is bound to fail at some point, terminating <em>earlier</em> than it should. And of course I don't have to remind anyone that you cannot remove items from a collection while using an Iterator.</p> <p>So that's it, I think the nugget had pretty much sauce alongside it!</p> <p>(You can get a low-down on AppendDataBoundItems on <a href="http://weblogs.asp.net/scottgu/archive/2006/01/29/436804.aspx">ScottGu's blog</a> or <a href="http://weblogs.asp.net/andrewrea/archive/2008/01/23/test-post.aspx">Andrew Rea's blog</a>)</p>uXufhttp://www.blogger.com/profile/03011736869854687184noreply@blogger.com1tag:blogger.com,1999:blog-9164411.post-29710189642232539572008-09-28T23:43:00.001+06:002008-09-28T23:56:10.430+06:00Code Nuggets: Getting two SQL column values in a single column<p>Well this type of thing doesn't come up very frequently (at least to me) and if you're like me working on multiple databases it gets very frustrating when it does come up. Since I don't use it very frequently, I tend to forget how to do it properly in the database system I am using at the time.</p> <p>So it goes something like this: Suppose you have a simple SQL table called Users. Now this table has three columns, id (int), firstName (varchar) and lastName (varchar). Sometimes you have to return the full name from the database in a single column (for reasons of sanity, or otherwise). How do you do it depends on your DBMS. (We assume that we have a record <code>(1, 'George', 'Lucas')</code> in the table.)</p> <h4>MySQL:</h4> <p>MySQL supports it via the CONCAT function. You can have as many values as you want as the parameters to the function.</p> <p>Example: <br /><code>SELECT CONCAT(firstName, LastName) from Users</code></p> <p>would return: <br /><code>GeorgeLucas</code></p> <p>and would even be better if you use a <code>CONCAT(firstName, " ", LastName)</code> in its place which would give you a nice space in between the names.</p> <h4>Oracle:</h4> <p>Oracle also supports the CONCAT function, but you are restricted to only two values as parameters. However you can CONCAT the CONCAT function itself on the cost of getting your code ugly. Another way of concatenating multiple strings in Oracle is actually using the || operators. </p> <p>Example: <br /><code>SELECT CONCAT(firstName, CONCAT(" ", lastName)) from Users</code></p> <p>or</p> <p><code>SELECT firstName || " " || lastName from Users</code></p> <p>both accomplish the same thing and would return:</p> <p><code>George Lucas</code></p> <h4>SQL Server:</h4> <p>With SQL Server it actually gets a little bit easier if you are used to concatenate your strings through the '+' operator. However make sure that you CAST any numeric values to varchar before trying to concatenate it, as '+' also works as the addition operator.</p> <p>Example: <br /><code>SELECT firstName + " " + lastName from Users</code></p> <p>That's all to it to the concatenation function, and remember that selecting two values and displaying them as a single values is also called concatenation (a thing that I usually look over).</p> uXufhttp://www.blogger.com/profile/03011736869854687184noreply@blogger.com0tag:blogger.com,1999:blog-9164411.post-73053318223052152032008-09-03T04:23:00.005+06:002008-09-29T00:13:47.495+06:00java.CompilerError when running RMIC<p>The other day I was trying out a Java RMI program in connection to an assignment. Let me be very clear here: I really like Java as it was one of my first proper programming languages (mind you, I am talking here circa 1999-2000 when Java-fever hadn't caught up) and I am a big fan of its elegance. The only turn-off which made me head towards Microsoft's direction was the lack of a proper, Visual Studio-league IDE for Java in those days. Much water has passed under the bridge, and there are many <span style="font-style: italic">better </span>IDEs for Java now, like Eclipse and NetBeans, but the curse still remains. (You might also want to give <a href="http://www.jcreator.com">JCreator</a> a shot, one of my favorite Java editing tools)</p> <p>So back to where I was, trying RMI. I made a simple interface class, which compiled fine, and then an implementation class, which compiled fine in itself too. Then I had to run RMIC on one of the classes (which I tried doing from command line, since I am not sure how NetBeans handles it), and plop, I got a <span style="color: rgb(0,0,102); font-family: courier new">java.CompilerError</span> stating that something has gone horribly wrong and the compiler is now mangled, and that I am supposed to file a bug report. Something like this (extra line-breaks have been added for readability):</p> <pre>error: An error has occurred in the compiler;
please file a bug report (http://java.sun.com/cgi-bin/bugreport.cgi).
1 error
----------log:rmic(7/491)----------
sun.tools.java.CompilerError: mangle NItem1Impl javasoft$sqe$tests$api$java$rmi$Naming$NItem2Impl javasoft$sqe$tests$api$java$rmi$Naming$NItem3Impl javasoft$sqe$tests$api$java$rmi$Naming$NItem4Impl
at sun.tools.java.Type.mangleInnerType(Type.java)
at sun.tools.java.Type.tClass(Type.java)
at sun.tools.java.ClassDeclaration.<init>(ClassDeclaration.java)
at sun.rmi.rmic.Main.doCompile(Main.java)
at sun.rmi.rmic.Main.compile(Main.java)
at sun.rmi.rmic.Main.main(Main.java)
</init></pre>
Undaunted, I ran a Google search for the error which lead me to <a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4073162">this</a> bug report. Mind you, there is no solution in there. I figured the solution out myself. You just have to make sure that the <span style="font-family: courier new">jdk/bin</span> directory is in your PATH variable (I am talking about Windows), and then compile the class from the command line from the class's directory. For example, earlier I was trying to run:
<pre>C:\Sun\SDK\jdk\bin>rmic
"C:\Documents and Settings\uxuf\RMITest\build\RMIImpl"</pre>
but this threw an error everytime, so after setting the path variable (through System Properties->Advanced->Environment Variables) I found out that I had to pass the parameter to <span style="font-family: courier new">rmic </span>without the quotes, which automatically means without any spaces :) and became something like:
<pre>C:\Documents and Settings\uxuf\RMITest\build>rmic RMIImpl</pre>
So if you are stuck in a similar situation, when no solution to that stupid error is in sight, try out <span style="font-family: courier new">rmic</span> from the directory which contains the class. It worked for me! uXufhttp://www.blogger.com/profile/03011736869854687184noreply@blogger.com1tag:blogger.com,1999:blog-9164411.post-6833538703053184292008-04-20T22:20:00.005+05:002008-04-21T10:34:07.831+05:00The Apple Software UpdateWith all the talk about Apple apparently forcing <a href="http://www.apple.com/safari/">Safari </a>on unsuspecting <a href="http://isc.sans.org/diary.html?storyid=4313">users through the Apple Software Update</a>, I wanted to get a piece of it too. Apple Software Update is usually installed if any software from Apple is installed on your computer, like iTunes or QuickTime. I had iTunes installed on my system as I found it quite convenient to use my iPod with, and since then it (iTunes) has become my de facto audio player.<br /><br />
So I fired up Apple Software Update, and voila! There was no Safari in the list, let alone being checked by default. There was an update to Apple Software Update though, and an update to Apple QuickTime + iTunes. So I randomly updated Apple Software Update to the latest version, and when the update completed, there I had little Safari sitting innocently on my list checked already :)<br /><br />
Moral of the story: Update your Software Update before quipping on Apple.<br /><br />
Epilogue: I might give Safari a spin, because I had played a bit with it when the public beta came out last year. But I am not terribly impressed, not much to ditch my existing Firefox 3 Beta 5, which itself is light years fast of Firefox 2.uXufhttp://www.blogger.com/profile/03011736869854687184noreply@blogger.com0tag:blogger.com,1999:blog-9164411.post-47606695182616611662008-03-31T03:38:00.003+05:002008-03-31T03:47:42.860+05:00PHP: Getting your user's IP AddressIt's easy, just use <code>$SERVER['REMOTE_ADDR']</code>. Echoing the user's IP address would look something like this:
<blockquote>
<code>
echo "IP Address: " . $SERVER['REMOTE_ADDR'];
</code>
</blockquote>
But that works only in PHP versions greater than 4.1.0. If you're still using earlier versions, use <code>HTTP_SERVER_VARS</code>, and for heavens' sake, upgrade.
<br /><br />
Source: <a href="http://sg.php.net/manual/ru/reserved.variables.php">PHP: Predefined Variables - Manual</a> (This page should be on the thumbs of all PHP developers)uXufhttp://www.blogger.com/profile/03011736869854687184noreply@blogger.com0tag:blogger.com,1999:blog-9164411.post-28642829848201070342006-12-20T01:40:00.000+05:002006-12-20T02:19:07.935+05:00<div style="text-align: center;"><img src="http://i2.photobucket.com/albums/y25/fuxuf/Invitation-resized2.gif" /></div>uXufhttp://www.blogger.com/profile/03011736869854687184noreply@blogger.com0tag:blogger.com,1999:blog-9164411.post-26886381565402558422006-10-13T20:01:00.001+05:002006-10-13T20:01:54.471+05:00Moved... http://uxuf.wordpress.comFinally it was time to bid adieu to Blogger, and all its eccentrities.<br>The Regulatory Authority in Pakistan has not helped either…<p>The final nail in the coffin was the blocking of the beta.blogger.com<br>domain. That helped break down the entire comment system of my lil<br>blog, prompting me to take immediate action…<p>This WordPress account was created by me some time ago because I<br>wanted to test their service. Turns out I'll have to use it from now<br>on… Please update your bookmarks and blogrolls and feeds accordingly.<br>Additionally, the uXuf.blogspot.com address would redirect you to the<br>new place.uXufhttp://www.blogger.com/profile/03011736869854687184noreply@blogger.com0tag:blogger.com,1999:blog-9164411.post-81119893208898622182006-10-06T16:31:00.001+05:002006-10-06T16:31:41.784+05:00Tagged by Maria<span style="font-weight: bold;">I am thinking about...</span><br>ramadan in hot weather and that it'll be the same way for the next 12 years!!<br><br><span style="font-weight: bold;">I said...</span><br>I'll be late tomorrow <br><br><span style="font-weight: bold;">I want to...</span><br>go home, hit the bunk and sleep my heart out<br><br><span style="font-weight: bold;">I wish...</span><br>Pakistan could somehow majically shift to the southern hemisphere <br><br><span style="font-weight: bold;">I miss...</span><br>university! Friends, foes, bullies, begaars, webmasters, cafe, dhaaba...<br><br><span style="font-weight: bold;">I hear...</span><br>the a/c whirring (but there's no chill), Buzz's typing on the hard mac keyboard and Rubab talking to someone on the phone <br><br><span style="font-weight: bold;">I wonder...</span><br>how could they be so dumb!<br><br><span style="font-weight: bold;">I regret...</span><br>not many things in life<br><br><span style="font-weight: bold;">I am... </span><br>a lot different than what I was<br><br><span style="font-weight: bold;">I dance...</span><br>very rarely now, headbanging is more like it these days<br><br><span style="font-weight: bold;">I cry...</span><br>over my misdeeds that I cannot undo <br><br><span style="font-weight: bold;">I am not always...</span><br>myself<br><br><span style="font-weight: bold;">I write...</span><br>on bus ki seats (not really :P)<br><br><span style="font-weight: bold;">I need...</span> <br>paani<br><br><span style="font-weight: bold;">I finish...</span><br>*most* of the things I start<br><br><span style="font-weight: bold;">I tag...<br></span>JonyDada, Raheel and whoever else still alive...<br> uXufhttp://www.blogger.com/profile/03011736869854687184noreply@blogger.com1tag:blogger.com,1999:blog-9164411.post-51396181987943323972006-10-04T03:44:00.001+05:002006-10-04T03:44:50.500+05:00Armstrong finally gets the moon quote rightArmstrong's popular quote:<br> <br>"That's one small step for man, one giant leap for mankind."<br><br>has been the subject of much debate among the "correct" grammarians (or whatever they are called) because he (apparently) missed the "a". According to them the sentence should've read: <br><br>"That's one small step for <span style="font-weight: bold;">a</span> man, one giant leap for mankind."<br><br>and that in its present form, it sounds as "That's one small step for mankind, one giant leap for mankind." But now, thanks to advanced sound processing techniques, an Australian programmer claims he has found the "a" that has eluded researchers (and listeners) for decades. According to him, it's there alright. Seems like the amreeki equipment at the time weren't sharp enough to transmit the whole thing in clarity...! <br><br>Read the whole story <a href="http://news.yahoo.com/s/ap/20061001/ap_on_re_us/moon_quote;_ylt=AjDyR7shXJbgeJxixYpCsPRH2ocA;_ylu=X3oDMTA4dW1uZXIwBHNlYwMyNzQ3">here.</a><br> uXufhttp://www.blogger.com/profile/03011736869854687184noreply@blogger.com0tag:blogger.com,1999:blog-9164411.post-53326627650373098872006-09-29T15:15:00.001+05:002006-09-29T15:15:08.054+05:00PlethoraI've been meaning to blog lately, but the problem is exactly that, I don't know what to blog...<br><br>I was disconnected for a few hours from the outside world as, again, the curse of the red cellphone descended upon me. Though I must admit, that it was a lot different this time. There were no Prosmetics, no kids in cool gear, nor any motorcycle wala, neither any handguns... <br><br>Just a plain old mini-bus and lots of people stuffed in it, and I was one of them.<br><br>Though I was the chosen one, to lost my phone yet again...<br><br>With this phone goes my companion in long and electricity-less nights, the FM radio. The GPRS, with all the games and ring tones I had downloaded and the hours that I have billed on to Warid people, all go down the drain. <br><br>This was the third cell. Maybe I oughta call up the Guinness Records people now...<br> uXufhttp://www.blogger.com/profile/03011736869854687184noreply@blogger.com0tag:blogger.com,1999:blog-9164411.post-53237386917661504162006-09-06T18:04:00.001+05:002006-09-06T18:04:22.729+05:00Why Materazzi earned Zidane's headbutt...Italy's Marco Materazzi finally disclosed what exactly he said to
incur the wrath of Zinedine Zidane during World Cup 2006 Final. During
an interview, he told Gazzetta dello Sport:<p></p><blockquote><p>
"When I held Zidane's shirt, he said: 'If you want, I'll give you the
jersey later.'"</p><p></p><p>"I responded that I preferred his sister, it's true," Materazzi said.</p><p></p><p>
"It wasn't something nice, true. But luckily there have been dozens of
players who have confirmed that a lot worse things are said on the
field."</p><p></p></blockquote><p></p><p>Seems like Materazzi also has Pakistani <i style="font-weight: bold;">leacher</i> tendencies,
always referring to other people's sisters and mothers... Any
self-respecting man would be proud to <strong>execute</strong> that
headbutt!</p><p>Go Zidane!</p>
<p>Source: <a href="http://sports.yahoo.com/sow/news;_ylt=AkkUf21FUx6H66Fu_Pcz77A5nYcB?slug=ap-materazzi-zidane&prov=ap&type=lgns">Yahoo! Sports</a>
</p>uXufhttp://www.blogger.com/profile/03011736869854687184noreply@blogger.com4tag:blogger.com,1999:blog-9164411.post-19437629758872873842006-09-02T10:53:00.001+05:002006-09-02T10:53:30.072+05:00Environmentalists Alert!The people of Karachi who have no semblance of placid natural environment in the city, yet again are being deprived of another natural asset, and nobody is concerned enough to keep a check on this atrocity. Yes, the pond that came into existence under the FTC bridge thanks to the incessant rain, is drying up fast. None of the conservation bodies are interested in this issue, so it becomes our duty to save our city's environment.<br><br>
Just think of it... This pond offers a fantastic view when you take the turn from FTC towards Kala Pul. In addition to this it will also kill a whole generation of mosquitoes, that we have so lovingly bred on puddles and our blood. So I suggest that we get mobilized over atrocity, and work together to SAVE THE POND!!uXufhttp://www.blogger.com/profile/03011736869854687184noreply@blogger.com1tag:blogger.com,1999:blog-9164411.post-29925430713738795962006-08-29T03:43:00.001+05:002006-08-29T03:43:30.822+05:00Blogger BabesIt turns out Blogger beta isn't a wasted effort at all! For one thing, you get the "dog" (looks to me so) replacing the B of the Blogger. I realized only today that using the beta is a privilege accorded only to a few lucky ones (I didnt notice because privileges are so natural for me *snicker*). <br><br>As I said somewhere, it is good for the non-tech people, as it uses those AJAX enabled snippets to arrange layouts according to the user's taste. The general population (who doesn't even have the desire) wouldn't now have to get their hands dirty with HTML and CSS. Adding custom code for statistics is just drag-and-drop, keeping the flow intuitive. <br><br>Close to hell for us techies, 'cause you cannot live if you cannot customize; and that's just what Blogger doesn't let us do at the moment.<br><br>The better thing is that, with the beta release, Blogger marks the shift to the <span style="font-weight: bold;">dynamic</span> web. Wonder why it has taken them so long, all the rest of the services are long established on it.<br><br>By dynamism of the web, I mean that you no longer have to <span style="font-weight: bold;"> publish</span> <span style="font-weight: bold;">your blog </span>every time you make a change in the template. Old blogger used to publish pages of your blog to its server, and serve the appropriate pages whenever a request arrived. With the beta, the pages would be created on the fly, no more publishing. <br><br>All the bitching was due to the fact that I had recently delved into the Blogger codebase, and had come up with really interesting tricks like customizing the individual pages, recent comment box on the sidebar, intuitive layouts; and then *poof*... Blogger beta strips me of any right to modify my template. <br><br>These snippets are available if any of the old Blogger people (or the beta users who haven't switched to <span style="font-weight: bold;">layouts</span>) want them for their blogs.<br>uXufhttp://www.blogger.com/profile/03011736869854687184noreply@blogger.com3tag:blogger.com,1999:blog-9164411.post-11629547027746570792006-08-27T18:39:00.000+05:002006-08-27T19:11:50.790+05:00The Craze BetaWhat is with everyone coming up with the beta editions of their offerings these days? Starting with Gmail Beta, we get <a href="http://www.live.com/">Windows Live Mail Beta</a>, <a href="http://advision.webevents.yahoo.com/mailbeta/">Yahoo! Mail Beta</a>, <a href="http://www.techcrunch.com/2006/06/07/yahoo-photos-beta-launches-today/">Yahoo! Photos Beta</a>, Flickr Beta, and now, sweet <a href="http://beta.blogger.com/">Blogger goes beta too</a>!<br />
<br />
For many services, going beta just means getting AJAX-ified, with little or no improvement in features (Windows Live Mail leads the contest), only getting a face-lift and incorporating oh-those-cool-functions on the page that have nothing whatsoever to do with cutting the round trip time...!<br />
<br />
With a sense of loyalty to the technology and the tech community (not to mention the <span style="font-style: italic; font-weight: bold;">need</span> to be the first in trying things out - <span style="font-style: italic;">izzat ka maamla</span>), I have officially switched to the new Blogger Beta. Switched - 'cause, ummm, beta could be exciting; officially - 'cause Blogger Help says you cannot opt out of the Beta!<br />
<br />
So what does this beta has to offer over the old version? For one, the "privileged ones" now have a separate, red carpeted entrance at <a href="http://beta.blogger.com/">http://beta.blogger.com</a>. Ordinary mortals should stick to their filthy swamps and keep using the lowly <a href="http://www.blogger.com/">Blogger home page</a> to log in.<br />
<br />
The Blogger people have added support for tags - or "labels" as they call them. <span style="font-style: italic;">Der ayed durust ayed </span>is the only thing that comes to mind.<br />
<br />
And there is this supposedly cool Layout feature, that help you manage the "template" of your blog. Beware, the "template" word is hushed now, if you're cool, you'll have a layout.<br />
<br />
So the layouts help users "drag and drop" widgets, or little snippets (previous posts, profile, description etc) on the page. Intuitive it is, but couldn't achieve its full potential until the <span style="font-weight: bold;">"Edit HTML"</span> option starts working. Gives us "power users" that creepy feeling of helplessness!<br />
<br />
That means my little blog page has some AJAX elements in it. How I have been dying to have a little Ajax, that would keep my dishes clean... Who said God doesn't listen?!<br />
<br />
Oh, and by the way, you'll have to comment by choosing the "Other" or "Anonymous" option on the comments page, your logged in nick wouldn't work here. Of course, what did you think? Its Beta!<br />
<br />
Besides that, all the functionality is unchanged. They have tried to spruce up the Dashboard a little, with cramming the various blog-specific options, and the Blogger Buzz posts. Heck, they even forgot to fix the bug that occurs in the Rich Text Editor that it doesnt convert line breaks to hard line breaks :\ So it'd be better to stick to posting via e-mail!<br />
<br />
Buss ooper say make-up kiya hai, under the hood its all the same!<br />
<br />
Returning to the Craze Beta, I forgot to tell you: Flickr has gone a step ahead, its now <a href="http://www.flickr.com/">Flickr Gamma</a>!<br />
<br />
And that gives an excuse for procrastinating office work too. Whenever somebody wants to take you to task, just claim that you've gone beta!<br />uXufhttp://www.blogger.com/profile/03011736869854687184noreply@blogger.com4tag:blogger.com,1999:blog-9164411.post-1156299686485710022006-08-23T07:11:00.000+05:002006-08-23T07:21:26.533+05:00Sm**ing the night away...<p>Meeting with an important client in the morning, and I have just smoked the night away...</p>
<p align="center">
<img alt="Dam Maro Dam.. Mitt jaye gham!" src="http://i2.photobucket.com/albums/y25/fuxuf/cam2l.jpg" border="0" /></p>
<p>
Rings and smoke and despair, acting as a warm blanket over me, taking me in their arms, cajoling me, killing me. Must get around it somehow, the day is already doomed.</p>uXufhttp://www.blogger.com/profile/03011736869854687184noreply@blogger.com2tag:blogger.com,1999:blog-9164411.post-1155975735816943212006-08-19T13:22:00.000+05:002006-08-19T13:22:15.950+05:00Blogger RedsThere seems to be (yet again?) a problem with my Blogger template. It somehow magically decided to just fly away, leaving me with a bunch of useless code. The backup of my customized template was in my puked up PC, which refuses to connect to the LAN. <br><br>So I have uploaded a temporary template, a very stripped down version. But hey, it would load faster, isnt it?<br><br>Bear with it for a few days. I'll bring up a rocking new template!<br> uXufhttp://www.blogger.com/profile/03011736869854687184noreply@blogger.com4tag:blogger.com,1999:blog-9164411.post-1155122467322516952006-08-09T16:21:00.000+05:002006-08-09T16:21:07.506+05:00Sending mail with System.Web.Mail (.Net 1.1)If you thought that it was a serious shortcoming that .Net framework 1.1 wasn't able to send email through SMTP servers that used authentication, you are in grave ignorance. On the surface of it, yes, you cannot send an email with the standard System.Web.Mail.MailMessage class; but you can of course play tricks on the Exchange server (yeah, that's what I get out of it that this things works only on an Exchange server) to make it authenticate you.<br /><br />
There is a namespace called <strong>http://schemas.microsoft.com/cdo/configuration</strong> that does those funny (and highly interesting) tricks. First we would check how to use a simple SMTP server (no authentication), and then we will use authentication to send a message.<br /><br />
<span style="font-family:courier new,monospace;">//using System.Web;<br />
//using System.Web.Mail;<br />
<br />
//The simple SMTP Server<br />
MailMessage message = new MailMessage();<br />
message.From = "src@someone.com";<br />
message.To = "dest@someother.com";<br />
message.BodyFormat = MailFormat.Html;<br />
message.Subject = "This is a spooky mail!";<br />
message.Body = "Heheh, just kidding!";<br />
<br />
SmtpMail.SmtpServer = "your.server.address"<br />
SmtpMail.Send(message);<br />
<br />
</span>Now lets check out a server that uses authentication. Microsoft provides the <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cdosys/html/37be0471-06bd-489d-8bf2-5c22bb7ce17c.asp"> CDOSYS</a> object to achieve just that. You wouldn't think they were so dumb that they didnt incorporate some lousy authentication mechanism! Add the following lines before the <span style="font-family:courier new,monospace;"> SmtpMail</span> lines.<br /><span style="font-family:courier new,monospace;">
<br />
message.Fields[<br />"http://schemas.microsoft.com/cdo/configuration/smtpserver"
<br />] = "your.server.address";<br />
message.Fields[<br />"http://schemas.microsoft.com/cdo/configuration/smtpserverport"] = 25;<br />
message.Fields[<br />"http://schemas.microsoft.com/cdo/configuration/sendusing"] = 2;<br />
message.Fields[<br />"http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"] = 1;<br />
<br />
//Most of the times the @domain is necessary with the username<br />
message.Fields["http://schemas.microsoft.com/cdo/configuration/sendusername"] = "username@domain.com";<br />
message.Fields[<br />"http://schemas.microsoft.com/cdo/configuration/sendpassword"] = "urpassword";<br />
<br />
//If only the server uses SSL, in this case, the smtpserverport field would be different too<br />
message.Fields["http://schemas.microsoft.com/cdo/configuration/smtpusessl"] = true;<br />
<br />
<br />
</span>And that would do just fine. There you go, I just saved your time and money!
<br /><br />
[P.S. To those whom these lines look like Greek, I must say that this post appears as a record!]<br />uXufhttp://www.blogger.com/profile/03011736869854687184noreply@blogger.com3tag:blogger.com,1999:blog-9164411.post-1153608625784113402006-07-23T03:50:00.000+05:002006-07-23T03:50:25.900+05:00The dayIt inches near, slowly but confidently, until it's looming right on our faces. <br><br>I know I should be happy, <span style="font-style: italic; font-weight: bold;">*must*</span> be happy, but I dont know. Our wishes are about to be granted, we are finally going to achieve what we're striving for the last three years, but I don't know. There's a big smile plastered across my face, but I don't know. People think I am the luckiest man on earth, but I don't know. <br><br>I wouldnt know it until I learn to overcome my shortcomings. Isnt the first step in problem-solving the identification of the problem? I have taken the first step, I need help through the rest. I dont want to feel I am trying for everything without any rewards. I dont want to be left alone. <br><br>I was an introvert, maybe somewhere deep inside I still have the tendencies, but I am trying to come out of it. I cannot be at gregarious the very next moment, it should be a gradual process.<br><br>I feel miserable, but I am shedding my skin. I am changing, and I want people to appreciate. <br><br>I accept my mistakes, and of those who are related to me. In no way I'd do anything to hurt anyone, nor I'd indirectly encourage any such activity. People have the tendency to misunderstand situations, and things do not always go exactly by our wishes. <br><br>Still, I love you, and I dont want you to feel alone.<br><br>So girl, welcome, officially, to my life. We are an irresistable team, and we will always be. Thanks for making my life technicolored!<br> uXufhttp://www.blogger.com/profile/03011736869854687184noreply@blogger.com12tag:blogger.com,1999:blog-9164411.post-1151900845433493132006-07-03T09:27:00.000+05:002006-07-03T09:27:25.516+05:00It'll just take some time!On my player and my lips these days:<br><br><span style="font-weight: bold;">Raghav, Lets work it out</span><br><br>So we had another date another fight<br>you break down, and cry<br>and you swear that its over<br>it seems you pack your bags like every night <br>girl I know inside<br>we can be so much more<br>but..<br>everytime the smallest thing goes wrong you're out the door<br>you dont wanna deal with this pain anymore<br>why dont you understand that <span style="font-weight: bold;"> some things wont come so easy in life</span><br>work with me girl, <span style="font-weight: bold;">it'll just take some time!</span><br><br>I'm not letting go<br>yeah girl thats for sure<br>wont catch me walking out<br>so okay, lets work it out! <br><br>at every single point you turn around<br>say <span style="font-weight: bold;">I've let you down</span><br>that I <span style="font-weight: bold;">no longer know </span>you<br>how can you say to me that I've lost my way <br>when <span style="font-weight: bold;">you're walking away</span><br><br><span style="font-weight: bold;">Once again</span> here we go through that old procedure, <br>you scream that <span style="font-weight: bold;">it's over between us</span> <br>but I don't believe ya, (nah) <br>what you want an argument? well I aint speakin' <br><span style="font-weight: bold;">we come too far now, 'n i aint leaving </span> <br><span style="font-weight: bold;">and if we got a problem let's get on top (of it) </span><br style="font-weight: bold;"><span style="font-weight: bold;">we aint gotta (split), we can conquer (it) </span><br style="font-weight: bold;">but we gotta <span style="font-weight: bold;">quit over reacting </span><br>imagine <span style="font-weight: bold;">just last night</span> we're romancing <br>false passion now we be clashing <br>i <span style="font-weight: bold;">dunno what's happened</span>, you go on a tantrum <br>as a man <span style="font-weight: bold;">I'm</span> <span style="font-weight: bold;">making the first move</span>, <br>u know i never do <span style="font-weight: bold;">nuthin to blatantly hurt you</span>, <br><span style="font-weight: bold;">we got a situation</span> to work through <br>but <span style="font-weight: bold;">patience</span> is a virtue, well baby <span style="font-weight: bold;">it takes two</span>, <br>so.. <br><br><span style="font-weight: bold;">I'm not letting go</span><br style="font-weight: bold;"> <span style="font-weight: bold;"> yeah girl thats for sure</span><br style="font-weight: bold;"><span style="font-weight: bold;"> wont catch me walking out</span><br style="font-weight: bold;"><span style="font-weight: bold;"> so okay, lets work it out!</span><br style="font-weight: bold;"><br><br>.... uXufhttp://www.blogger.com/profile/03011736869854687184noreply@blogger.com5tag:blogger.com,1999:blog-9164411.post-1151671702733224212006-06-30T17:48:00.000+05:002006-06-30T17:48:22.850+05:00ArmageddonYes, it will be armageddon tomorrow. The final battle between truth and falsehood, the good and the bad, the bad and the ugly, the ugly and the horrifying... Uhh whatever!<br><br>Tomorrow is the last paper of my last finals. The course was called Operations Research, something that I hated with a vengeance. Well it isnt only with OR that I have a problem, but with all maths-related courses. No matter what amount of time and effort I put into practice, the final exam NEVER went well. Woh to ALLAH ka shukar hai ke I havent flunked in any of them, managed to save my face (beizzati kharab hotay hotay reh gayee bus), and my grades. <br><br>But kismat plays amazing games with our lives. Now it will be a final showdown tomorrow, my chance to have a last laugh facing my nemesis. Pray to God I be successful in my endeavour. This David should slay the Goliath tommorrow! <br><br>Wish me luck!<br>uXufhttp://www.blogger.com/profile/03011736869854687184noreply@blogger.com3tag:blogger.com,1999:blog-9164411.post-1150844258392026172006-06-21T03:19:00.000+05:002006-06-21T03:59:21.436+05:00Worldcup funny/ridiculous jerseys award!I have been busy with my exams, and of course, the world cup. Though I am not getting enough time to follow all the matches, I usually manage to catch some of the interesting ones.<br/>
The World cup is in full swing. It is an honour for any player to wear his national colours on a world cup pitch, but hey, what were the designers of the jerseys thinking?<br/>
Here are my favourite funny/ridiculous national jerseys of teams that we see in action:<br/>
<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/165/656/1600/TRI-Home.jpg"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://photos1.blogger.com/blogger/165/656/320/TRI-Home.jpg" alt="" border="0" /></a><br/>
On 7th place is the 'design' of the world cup. I seriously dont have an idea of who ever came up with this design, a white looping out of the neck and burying itself somewhere in the armpits...<br/>
<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/165/656/1600/ITA-Away.jpg"><img style="margin: 0pt 10px 10px 0pt; float: right; cursor: pointer;" src="http://photos1.blogger.com/blogger/165/656/320/ITA-Away.jpg" alt="" border="0" /></a><br/>
Next at 6th place is the Italian Away jersey. I admit it looks cool on the mannequin, but in action, the V of the neck is a little too-low, drooping like a well-worn V-neck sweater!<br/>
<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/165/656/1600/PAR-Home.jpg"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://photos1.blogger.com/blogger/165/656/320/PAR-Home.jpg" alt="" border="0" /></a><br/>
Whoever thought of draping Paraguay in their national colours, obviously was sleep-deprived. The jersey looks like a sleeping gown! Well-deserved for 5th place!
<br/>
<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/165/656/1600/NED-Away.jpg"><img style="margin: 0pt 10px 10px 0pt; float: right; cursor: pointer;" src="http://photos1.blogger.com/blogger/165/656/320/NED-Away.jpg" alt="" border="0" /></a><br/>
At number 4 is the Netherlands with their away shirts. I must say, retro is definitely not in. Seems to me they lifted the design straight out of a Boris Becker tee.<br/>
<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/165/656/1600/MEX-Home.jpg"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://photos1.blogger.com/blogger/165/656/320/MEX-Home.jpg" alt="" border="0" /></a><br/>
There was stiff competition for the last three places, but their are shirts more ridiculous than the ill-fitting Mexican shirts. How on earth would people feel wearing THAT shirt? The designers obviously forgot testing how the 'thing' would look on their players.<br/>
<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/165/656/1600/FRA-Home.jpg"><img style="margin: 0pt 10px 10px 0pt; float: right; cursor: pointer;" src="http://photos1.blogger.com/blogger/165/656/320/FRA-Away.jpg" alt="" border="0" /></a><br/>
Giving a pretty hard time to the judges was the France Away jersey at No. 2. Though the base design of this jersey is pretty neat, the bold spectrum that runs on the chest makes the jersey looks like an ill-designed Flash presentation. Is it necessary to get so different as to make a mockery of yourself?<br/>
And the most funny/ridiculous World Cup jersey award goes to.....<br/>
<br/>
ANGOLA!
<br/>
<div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/165/656/1600/ANG-Home.jpg"><img style="margin: 0pt 10px 10px 0pt; cursor: pointer;" src="http://photos1.blogger.com/blogger/165/656/320/ANG-Home.jpg" alt="" border="0" /></a><br/>
</div>
<br/>
The Home jersey bears the colours of the flag of Angola, with black representing the African nations, the red depicting the blood of the Africans that died fighting for their homelands, and the yellow stands for something in their flag. All is well, but who asked you to keep the base colour RED?<br/>
<br/><br/>
So that was the World Cup's most funny/ridiculous jerseys awards, tune in again for another set of awards soon!uXufhttp://www.blogger.com/profile/03011736869854687184noreply@blogger.com2tag:blogger.com,1999:blog-9164411.post-1150675976499554772006-06-19T05:12:00.000+05:002006-06-19T05:12:56.650+05:00Errm...Though I didnt comment, and never said anything even after you reminding me so many times, but since you know I was tangofying you the whole time means...<br><br><span style="font-weight: bold;">You were looking great!<br> <br></span>Thanks for yet another great cake :)<span style="font-weight: bold;"><br></span> uXufhttp://www.blogger.com/profile/03011736869854687184noreply@blogger.com0tag:blogger.com,1999:blog-9164411.post-1150146631381952732006-06-13T01:52:00.000+05:002006-06-13T02:15:25.343+05:00The Cake FactoryCheck out the new Cake Factory...
<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/165/656/1600/anums%20cake.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/165/656/320/anums%20cake.jpg" alt="" border="0" /></a>
<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/165/656/1600/anum%20usman%20cake.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/165/656/320/anum%20usman%20cake.jpg" alt="" border="0" /></a>
<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/165/656/1600/ucs%20cake.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/165/656/320/ucs%20cake1.jpg" alt="" border="0" /></a>
<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/165/656/1600/usman%27s%20bday%20cake.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://photos1.blogger.com/blogger/165/656/320/usman%27s%20bday%20cake1.jpg" alt="" border="0" /></a>
Konsa pasand aya? Do I want to place an order?
Oh I just might, I want to order.. umm... the cake maker! ;)
Thaaaaaaaaaaaaaaaaaaanks for everything :DuXufhttp://www.blogger.com/profile/03011736869854687184noreply@blogger.com10tag:blogger.com,1999:blog-9164411.post-1148862084528839812006-05-29T00:00:00.000+05:002006-05-29T05:29:17.740+05:00Birthday BoyIndebted to all my friends and loved ones for making this birthday a really <span style="font-weight: bold;">memorable</span> one :) A large part of the day went seeing me loll around but then, what the heck? It was a good day and it always is!<br><br>
Thanks abba for the excellent dinner<br>
Thanks cb for the gelatos<br>
Thanks to my people for filling a void, oh that was a cellphone :P<br>
How can I forget my friends, I am lucky to have you people around me :)
<ul><li>- one has promised to <span style="font-weight: bold;">bake a cake </span>for me</li><li>- another wouldnt bake one for me, cuz she doesnt know how to <span style="font-weight: bold;">'cook'</span>, she put up a <a href="http://www.pkblogs.com/aperine/2006/05/happy-burpday-uxuf.html"> picture of the cake</a> for me though</li><li>- yet another one has promised to buy me a Mclaren when she starts earning enough</li><li>- and the last one checks me up if my nose is running :P</li></ul><br><br>And then thanks to the rest who wished me luck, and made my day!<br><br>
<span style="font-style: italic;">PS: There's still time, if you didnt know it was my birthday, you can still wish me...</span>uXufhttp://www.blogger.com/profile/03011736869854687184noreply@blogger.com5tag:blogger.com,1999:blog-9164411.post-1148800456977749122006-05-28T12:05:00.000+05:002006-05-28T12:14:17.033+05:00Happy Birthday :)YEEGA DEEGA DEEGA HEEGA
DEEGA HOO DEEBA LEEGA
HEEGA PEEGA DEEBA HOO
JINGA LINGA HINGA PINGA
BINGA PINGA BUU
IT'S UR BIRTHDAY N
I'M CUMING TO U .... :)uXufhttp://www.blogger.com/profile/03011736869854687184noreply@blogger.com2