Division by zero is simple, isn’t it ?

April 4th, 2010 5 comments

I’m sure you all know that according to the rules of elementary arithmetic division by zero is not allowed*. Also, I’m pretty sure you are familiar with the “Attempted to divide by zero” exception and some of you even write a specific catch in try…catch blocks to catch the DivideByZeroException to be able to handle it according to your application needs.

Read more…

VN:F [1.9.22_1171]
Rating: 5.0/5 (5 votes cast)

jTemplates – jQuery Template Engine

October 4th, 2009 7 comments

About a year ago i had to architucture some web application with a very rich client side UI.

ASP.NET was an easy choise for a server side code, but what about client side ?
The heavy viewstate, endless event handlers and infinity number of server side requests just to make the GUI  friendly – well, it just didn’t sound as a proper way to do it.

Read more…

VN:F [1.9.22_1171]
Rating: 4.9/5 (13 votes cast)

C# Set method timeout using Generics

July 15th, 2009 25 comments

I’m pretty sure all of you know the WebRequest and it’s derived class HttpWebRequest.
And what a marvelous property both of them have – the TimeOut.

Read more…

VN:F [1.9.22_1171]
Rating: 4.6/5 (20 votes cast)

Script as blocking element and dynamic script loading using document.write

July 15th, 2009 1 comment

We all know that script is blocking element, meaning no content will be rendered untill script block is parsed and executed or downloaded then parsed and then executed in case of externale script.

And we were told endless times that the best practice is to load scripts at the end of web page. It’s true.

We also have document.ready events thanks to numerous javascript frameworks that gives us opportunity to perform most of our JS actions when document is ready to be manipulated. But there are cases when you do need JS blocking features.
Read more…

VN:F [1.9.22_1171]
Rating: 5.0/5 (3 votes cast)

C# Parsing HTML with HtmlAgilityPack

July 13th, 2009 16 comments

Let’s say you have to parse some HTML, find all images or some other DOM elements make some changes/optimizations and save the result. What can you do ?

Well, i needed something like that a few days ago and after Googling for couple of hours I ran across this this great library called HtmlAgilityPack.

Read more…

VN:F [1.9.22_1171]
Rating: 4.6/5 (16 votes cast)
Categories: ASP.NET, C#, HTML, Programming

Google in your house

July 13th, 2009 3 comments

I just can’t help it and must post this one… It’s hilarious !!!

Episode 1 :

Two more episodes.. Read more…

VN:F [1.9.22_1171]
Rating: 4.7/5 (25 votes cast)
Categories: Humor

Javascript boolean interpretation

July 13th, 2009 3 comments

I have two simple questions for you about boolean values in Javascript.
When will browser show alert message:

        if (a-b) alert("it's true!");

And another one
Read more…

VN:F [1.9.22_1171]
Rating: 5.0/5 (5 votes cast)

Javascript pseudo protocol (is EVIL)

July 12th, 2009 2 comments

This post is somehow related to my previous post about javascript function context.  Recently I helped one of my friends to debug a very funny problem. He told me that his inline event handler doen’t work, because he could not pass this object to his function.
You probably wonder what did I find? :-)
Read more…

VN:F [1.9.22_1171]
Rating: 4.6/5 (5 votes cast)

C# LINQ Teaser

July 12th, 2009 5 comments

Another great interview question.

Will the following code compile and if yes what will be the result of it ?
Read more…

VN:F [1.9.22_1171]
Rating: 4.8/5 (9 votes cast)

Javascript function context, “apply” method and lost “this” object

July 12th, 2009 3 comments

How many times you had problem or were asked about what happened to this object in your function? Or why this is not an object you expect it to be? Probably these times you have to remind yourself or your fellow programmer about function context.
First of all I have to ask you all a pretty lame question. If you write function in JS block right inside your HTML, what this keyword will refer to?

<script type="text/javascript">
		function testThis(){
		  //who is "this"

And now to the real example.
Read more…

VN:F [1.9.22_1171]
Rating: 4.9/5 (8 votes cast)
Categories: JavaScript, Tips & Tricks
SEO Powered by Platinum SEO from Techblissonline
watch free movies