WordPress & jQuery: Fix JavaScript error “$ is not a function”

When using jQuery in WordPress you might be surprised by a $ is not a function JavaScript error. For example, in a default WordPress 3.3.1 installation, the following JavaScript code leads to this error: $(document).ready(function() { console.log($("body")); });$(document).ready(function() { console.log($("body")); }); The reason is, that WordPress by default uses jQuery’s “no conflict mode” to avoid […]

Read more…

IIS 7.5 Application Pools: Understanding default identity “ApplicationPoolIdentity”

In former versions of IIS the default identity for application pools was “NetworkService“. Using this option, the application pool runs under the built-in and low-privileged Windows identity “NETWORKSERVICE“. The disadvantage of this (old default) option is that multiple services using the Windows identity “NETWORKSERVICE” are not isolated from each other, i.e. services could theoretically read, […]

Read more…

ASP.NET MVC 3 & MongoDB: CRUD operations in NoSQL database using FluentMongo

This blog post shows how to use the open-source NoSQL database MongoDB in an ASP.NET MVC 3 web application. The showcase web application uses FluentMongo that adds LINQ-support for the 10gen MongoDB C# driver. Summarized the application demonstrates how to perform the basic CRUD (create, read, update and delete) database operations. Before running the example […]

Read more…

ASP.NET MVC 3: Validate complex Types (Objects & Lists) in Ajax Form using jQuery and JSON on Client Side and Server Side

This blog post shows how to validate models containing complex types such as Objects and Lists in ASP.NET MVC 3. We start with the source code described in one of my previous posts “ASP.NET MVC 3: Using JSON result for jQuery Ajax Forms validation” (you can download the Visual Studio 2010 project here). Summarized this […]

Read more…

Java: Test if String matches wildcard expression

The following Java method tests if a string matches a wildcard expression (supporting ? for exactly one character or * for an arbitrary number of characters): /** * @param text Text to test * @param pattern (Wildcard) pattern to test * @return True if the text matches the wildcard pattern */ public static boolean match(String […]

Read more…