Generic repository interface for entity framework 4

Huy Nguyen has a great write up on implementing a generic repository interface that supports Entity Framework 4. His code is written in C# and today I had to rewrite it in VB.Net. The VB.Net version looks like this Public Interface IRepository Inherits IDisposable Function GetQuery(Of TEntity As Class)As IQueryable(Of TEntity) Function GetAll(Of TEntity As Class)() As IEnumerable(Of TEntity) Function Find(Of TEntity As Class)(predicate As Expression(Of Func(Of TEntity, Boolean))) As IEnumerable(Of TEntity) Function [Single](Of TEntity […] Read more »

Two minute timer feature update

The two minute timer that is available for download from the site has been featured and linked to from a couple of places around the internet. The technology it was built with is a few years old but still works in modern versions of Windows and is downloaded regularly by users around the world! I still use it myself for when I need to overcome some serious procrastination but more and more I am trying […] Read more »

Fixing pingchecker link locating code

I have installed the free pingback manager pingchecker since I wanted to be able to manually check and ping other blogs that I link to. Unfortunately for some reason the plugin doesn’t handle link tags with additional info/attributes like styles or a target. The problem is around line 270, the regexp which is used to find links needs to be updated to look like this: inputcontent.replace(/[^<]*(<a [^>]*href=(?:"|\')([^"\']+)(?:"|\')[^>]+>([^<]+)<\/a>)/g, function () { matches.push(, 1, 4)); }); That […] Read more »

Working fork of iScroll 4 with extended acceleration

The problem that I had introduced in my iScroll 4 code just needed a simple fix. This was the code I had in my local file. speed = m.abs(dist) / time + (addVelocity ? velocity : 0) Speed should always result in a positive number, when velocity was negative then obviously the end result could be negative. In addition the effects were quite strange since sometimes multiple touchmoves would result in the speed being lower […] Read more »

iScroll 4 first fix for acceleration on multiple touchmoves

Chicago Temple Building 50 by orijinal, on Flickr

iScroll 4 is a great library for adding scrolling to mobile Html5 applications. Unfortunately I found that there is something missing in how the scroller works compared to native scrolling. After comparing how one of my HTML5 mobile applications scrolls compared to an equivalent native app I found one major difference that changes the feel of the iScroll scroller – multiple consecutive scrolls on the native app speeds up the scrolling. With iScroll 4 multiple […] Read more »

Knockout js 1.3 external native templates using xui

caseycorcoran and maverix (Andrew Harry) have created a gist for an external template engine using jQuery for Knockout’s new native templating feature in 1.3. I am using Knockout in one of my Phonegap projects but I am trying to avoid jQuery in favor of xui.js which is a much smaller library optimized for mobile phone HTML5 development. I have created a fork of their gist changing the ajax loading from jQuery to the xhr function […] Read more »