Passing data to jQuery events with event.data and custom $.Event object
Whenever handling an event in jQuery, be it a UI event or a programmatic event, it is very often required to pass some piece of data to it. It is common for novice developers to pull that data directly from globally scoped objects - variables or global DOM selectors - which is not the best practice, and with more sophisticated dynamic UIs it easily gets out of hand and becomes impossible to maintain in the longer run.
To avoid such issues, jQuery provides two easy mechanisms for passing data to event handlers. More after the jump.
LINQ foreach iteration variable capturing and how it’s fixed in Visual Studio 11
A while a go, the C# community got surprised by another GOTCHA, discovering that using a foreach iteration variable inside a LINQ query, may not always yield the expected results. The variable gets captured by the foreach loop and, due to the evil work of closure, it remains scoped outside of the LINQ query itself living its own life so to speak. This has now been corrected in the Visual Studio 11 Beta.
WordPress installation hangs on second step
Even though WordPress brags a lot about it’s famous 5 min setup, I noticed that actually a lot of people on the web run into a problem with WordPress installation hanging on the 2nd step (renders blank page instead). This is especially common for localhost setups, where usually the memory resources and CPU cycles would be more of an headache than on live sites.
Solution after the jump.
About

Hi! I'm Filip W., a cloud architect from Zürich 🇨🇭. I like Toronto Maple Leafs 🇨🇦, Rancid and quantum computing. Oh, and I love the Lowlands 🏴.
You can find me on Github and on Mastodon.

Recent Posts
Categories
- apache-cordova (1)
- asp.net-5 (17)
- asp.net-core (44)
- asp.net-mvc (35)
- asp.net-mvc-6 (7)
- asp.net-vnext (6)
- asp.net-web-api (96)
- astronomy (1)
- azure (9)
- azure-service-bus (1)
- benchmark-dotnet (1)
- bing-maps (1)
- blazor (1)
- c-plus (2)
- c-sharp (152)
- csharp-10 (2)
- dnx (3)
- dotnet-cli (2)
- dotnet-script (10)
- duende (1)
- editorconfig (1)
- entity-framework (2)
- espn-api (2)
- events (1)
- fsharp (1)
- git (1)
- glimpse (1)
- html5 (4)
- identity-server (2)
- iis (2)
- il (1)
- intro-to-qc (19)
- javascript (9)
- jquery (4)
- jquery-mobile-metro (1)
- katana (2)
- kindle (1)
- knockout.js (8)
- last.fm-api (2)
- linq (1)
- mac (2)
- mathematica (1)
- msbuild (3)
- mvc-core (3)
- nancy (2)
- native (1)
- net (140)
- net-5 (3)
- net-6 (5)
- net-7 (6)
- net-core (49)
- net-sdk (2)
- ninject (2)
- odata (4)
- oidc (1)
- omnisharp (13)
- osx (2)
- owin (5)
- php (1)
- q-sharp (29)
- qir (1)
- quantum-computing (30)
- roslyn (30)
- scriptcs (11)
- scripting (9)
- security (4)
- servicestack (2)
- signalr (7)
- swift (2)
- testing (5)
- twitter-boostrap (1)
- typescript (1)
- visual-studio (4)
- visual-studio-code (11)
- wasi (2)
- wasm (2)
- windows-phone-7 (1)
- wordpress (1)
- wpf (2)