Archive

Archive for the ‘Programming’ Category

jTemplates – jQuery Template Engine

October 4th, 2009 Xander 6 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.7.7_1013]
Rating: 4.9/5 (10 votes cast)

C# Set method timeout using Generics

July 15th, 2009 Xander 18 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.7.7_1013]
Rating: 4.7/5 (15 votes cast)

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

July 15th, 2009 Maxim No comments

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.7.7_1013]
Rating: 5.0/5 (2 votes cast)

C# Parsing HTML with HtmlAgilityPack

July 13th, 2009 Xander 6 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.7.7_1013]
Rating: 4.5/5 (8 votes cast)

C# LINQ Teaser

July 12th, 2009 Xander 4 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.7.7_1013]
Rating: 4.8/5 (9 votes cast)

C# Byte Iteration Question

July 10th, 2009 Xander 11 comments

This one is a great c# interview question – short and simple, but tricky.

Read more…

VN:F [1.7.7_1013]
Rating: 4.3/5 (4 votes cast)

C# Image Processing with AForge.NET Framework

July 10th, 2009 Xander 3 comments

A couple of days ago i found a great framework called AForge.NET.

AForge.NET is a C# framework designed for developers and researchers in the fields of Computer Vision and Artificial Intelligence – image processing, neural networks, genetic algorithms, machine learning, robotics, etc.

Read more…

VN:F [1.7.7_1013]
Rating: 4.3/5 (4 votes cast)

C# Rectangle Packing

July 9th, 2009 Xander 2 comments

Sometimes, you’re faced with the problem to cramp as many smaller textures as possible onto a larger texture. Typical cases are lightmaps, which are very small textures with dimensions that usually are not powers of two, or bitmap fonts where you want to try and fit the entire ascii character set onto a texture without wasting much space.

What you need then, is a rectangle packer, an algorithm that arranges as many smaller rectangles on a larger rectangle as can possibly fit.

Read more…

VN:F [1.7.7_1013]
Rating: 4.2/5 (5 votes cast)

SpeedTrace – .NET Profiler and Tracer

July 9th, 2009 Xander No comments

It is very important to be able to dynamically control the behavior of .NET applications and to keep track of some of the aspects of the application (i.e. how the application is performing, what errors are produced during runtime, how the application performs at peak times, how to dynamically alter the behavior of the application, etc).

Read more…

VN:F [1.7.7_1013]
Rating: 4.3/5 (3 votes cast)

C# The “double” trouble

July 7th, 2009 Xander No comments

This is a very simple question with a not so simple answer…

Forget for a second about .NET.
If someone asks you how much is 1.000025 – 0.000025 your answer will probably be “1″ and correct. An easy question, right ?

Now, let’s go back to .NET and check if our calculations are correct.

Read more…

VN:F [1.7.7_1013]
Rating: 4.2/5 (5 votes cast)
SEO Powered by Platinum SEO from Techblissonline