You are here

Techie Things - Artur Herczeg

Subscribe to Techie Things - Artur Herczeg feed Techie things
Updated: 2 weeks 2 days ago

jQuery div vs native doc fragment

Thu, 01/19/2012 - 02:24
I assumed creating a div with jQuery takes more time compared to native document fragment creation. Surprise, I was wrong. I’ve created a test page on JSPerf at http://jsperf.com/jquery-vs-documentfragment. Simply put, the speed depends on the browser. Verdict: Use document fragment in all...
Categories: News

Less CSS and IIS 7

Mon, 11/14/2011 - 06:11
In case you are using Less CSS to generate CSS markups, IIS won’t find your .less files by default. You will get a 404 Not Found error. The problem is the missing MIME type. The solution is simple, just register the MIME type for .less in web.config: <system.webServer> <staticContent...
Categories: News

ASP.NET MVC Internals 3: Controller structure

Mon, 09/19/2011 - 02:22
Controllers implement the IController interface: public interface IController ...
Categories: News

ASP.NET MVC Internals 2: Controller

Sat, 09/17/2011 - 13:13
The MvcHandler class processes an HTTP request. The routing framework calls its ProcessRequest() function in case of an incoming request matching an MVC route. public class MvcHandler : IHttpHandler, IRequiresSessionState ...
Categories: News

ASP.NET MVC - Internals 1

Thu, 09/15/2011 - 03:18
The topic of this article is the ASP.NET MVC bootstrapping process. Everything starts in Global.asax: public class MvcApplication : System.Web.HttpApplication...
Categories: News

jQuery and DOM dimension measurement

Sun, 12/12/2010 - 11:34
I had to rewrite a code that used standard DOM functions (like offsetWidth) to jQuery functions (like outerWidth). This is a simple document visually summarizing the differences. Link: jQuery HMTL with height cheat sheet (DOCX) Link: jQuery HMTL with height cheat sheet (PDF)
Categories: News

WaitableTimer in C++

Mon, 11/22/2010 - 14:54
This is an example code for calling a waitable timer. This is a good way to wait for a timer event without using CPU (thread blocks). There is a small trick in the code. It’s hard to create a FILETIME properly so I create a SYSTEMTIME (and set it according to my needs), convert it to FILETIME,...
Categories: News

Perforce file exclusion

Sat, 11/06/2010 - 06:03
There are file types and folders I don’t want to see in a source control repository. These are user-specific settings, temporary folders and binaries. There is a simple client-side way to exclude these files and folders. Just add the following lines to your workspace definition: ...
Categories: News

CV Tag Cloud

Sat, 11/06/2010 - 05:52
The tag cloud of my CV. Can be viewed in full size: http://www.wordle.net/show/wrdl/2686570/CV
Categories: News

Simple Map Reduce Example in C#

Sun, 10/31/2010 - 09:27
This is an example of map-reduce implementation for IEnumerable. This code is not optimized. I think we shouldn’t create separate Task for each enumerated item. Probably partitioning the enumeration and dealing with bigger chunks of data would be much more efficient. Browse source code: Google...
Categories: News

CAL and AutoMapper

Wed, 05/19/2010 - 11:28
I’m using Composite Application Library (CAL) in a project. I decided to use AutoMapper as well. I put AutoMapper’s Mapper.CreateMap<source, dest>() calls into one of the Bootstrapper.cs methods. I got an InvalidOperationException in the ModuleCatalog’s InnerLoad() function. Reason ...
Categories: News

F#: Piping and Composition

Fri, 05/14/2010 - 16:31
Piping and compositions are very expressive tools in F#. It significantly improves code readability. Let’s have the following functions: > let square x = x*x;; val square : int -> int > let negate x = -x;; val negate : int –> int Function square returns the...
Categories: News

Database Comparison

Tue, 05/04/2010 - 14:09
I' am very interested in open source database comparisons. I found two interesting blog posts: Sukhvinder Singh wrote about the comparison of H2, HSQLDB, DERBY, PostgreSQL, MySQL. Thirdstage wrote about the comparison of about HSQLDB, H2, SQLite Link: H2, HSQLDB, DERBY, PostgreSQL, MySQL...
Categories: News

Get WPF DataGrid row and cell

Sun, 05/02/2010 - 04:54
.csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharp...
Categories: News

Mixed mode assemblies on .NET 4.0

Sat, 04/17/2010 - 09:31
Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information. I got this message when I tried to start a project migrated from .NET 3.5 to .NET 4.0. I case of migration, migration wizard inserts...
Categories: News

NHibernate session management

Sat, 04/17/2010 - 07:43
When you start working with NHibernate, you will see code examples like this one: int userID = 1234;...
Categories: News

NHibernate and SQLite in-memory database

Sat, 04/17/2010 - 07:41
I’m implementing and in-memory database-based unit test framework for an application. I hope it speeds up unit tests. Unfortunately I have to redesign my entity repositories to support in-memory behavior. As far as I can learn from SUT behavior, SQLite will create a brand new database when...
Categories: News

CodePlex TFS from VS2010

Sat, 04/17/2010 - 06:03
Visual Studio 2010 Professional has a built-in Team Foundation Server (TFS) client. There are some user interface changes on the Add Team Foundation Server screen. When you are connecting to the CodePlex TFS, you need to specify the following information: Name or URL of TFS: tfs<number>...
Categories: News

Refresh WPF DataGrid

Sun, 01/24/2010 - 12:57
I am using WPF DataGrid for displaying a list of items. I had to modify an item, but the item had no INotifyPropertyChanged event on that property (it was a collection). So my first idea was: Update the list behind ItemsSource Set ItemsSource property to null to force unbinding Set...
Categories: News

DispatcherPriority

Mon, 01/18/2010 - 08:36
I had a very tough problem today. The following code did not work correctly: var books = _bookRepository.All;...
Categories: News