background preloader

Web

Facebook Twitter

.NET Fiddle. Snippet Repo. Immediately-Invoked Function Expression (IIFE) In case you hadn’t noticed, I’m a bit of a stickler for terminology.

Immediately-Invoked Function Expression (IIFE)

So, after hearing the popular, yet misleading, JavaScript term “self-executing anonymous function” (or self-invoked anonymous function) one too many times, I’ve finally decided to organize my thoughts into an article. In addition to providing some very thorough information about how this pattern actually works, I’ve actually made a recommendation on what we should call it, moving forward.

Also, If you want to skip ahead, you can just check out some actual Immediately-Invoked Function Expressions, but I recommend reading the entire article. Please understand that this article isn’t intended to be an “I’m right, you’re wrong” kind of thing. I’m genuinely interested in helping people understand potentially complex concepts, and feel that using consistent and accurate terminology is one of the easiest things that people can do to facilitate understanding.

So, what’s this all about, anyways? The heart of the matter. Shanselman/Psuedoizer. Auto Resource Translator - Home. Self-Hosting SignalR in a Windows Service. FubuValidation. A better way for new feature introduction and step-by-step users guide. Gephi, an open source graph visualization and manipulation software. Locally publishing a VS2010 ASP.NET web application using MSBuild. Visual Studio 2010 has great new Web Application Project publishing features that allow you to easy publish your web app project with a click of a button.

Locally publishing a VS2010 ASP.NET web application using MSBuild

Behind the scenes the Web.config transformation and package building is done by a massive MSBuild script that’s imported into your project file (found at: C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets). Unfortunately, the script is hugely complicated, messy and undocumented (other then some oft-badly spelled and mostly useless comments in the file).

Gallery of free HTML snippets for Twitter Bootstrap. Storing Passwords Securely. Time and time again you hear about a company having all of their users' passwords, or "password hashes", compromised, and often there's a press response including one or more prominent security researchers demonstrating how 1,000 users had the password "batman", and so on.

Storing Passwords Securely

It's surprising how often this happens considering we've had ways to do password authentication that don't expose users' passwords, or at least makes it significantly harder to crack them, for several decades. Personally, I think it boils down to a fundamental misunderstanding about what cryptographic hash functions are and what they are—or should be—used for, and a failure on the part of security researchers and advocates, myself included, to properly explain and emphasize the differences.

Zeros in JavaScript. Mozilla Developer Network. JavaScript Garden. Although JavaScript deals fine with the syntax of two matching curly braces for blocks, it does not support block scope; hence, all that is left in the language is function scope. function test() { // a scope for(var i = 0; i < 10; i++) { // not a scope // count } console.log(i); // 10} There are also no distinct namespaces in JavaScript, which means that everything gets defined in one globally shared namespace.

JavaScript Garden

Each time a variable is referenced, JavaScript will traverse upwards through all the scopes until it finds it. In the case that it reaches the global scope and still has not found the requested name, it will raise a ReferenceError. The Bane of Global Variables // script Afoo = '42'; // script Bvar foo = '42' The above two scripts do not have the same effect. Again, that is not at all the same effect: not using var can have major implications.

WCF

SOAP. CSS. RESTful. CSS3 Generator - By Eric Hoffman & Peter Funk. jQuery. CSS drop-shadows without images. Drop-shadows are easy enough to create using pseudo-elements.

CSS drop-shadows without images

It’s a nice and robust way to progressively enhance a design. This post is a summary of the technique and some of the possible appearances. Demo: CSS drop-shadows without images Known support: Firefox 3.5+, Chrome 5+, Safari 5+, Opera 10.6+, IE 9+ I’ll be looking mainly at a few details involved in making this effect more robust. After a bit of back-and-forth on Twitter with Simurai, and proposing a couple of additions to Divya’s and Matt’s demos using jsbin, I felt like documenting and explaining the parts that make up this technique.

The basic technique There is no need for extra markup, the effect can be applied to a single element. The pseudo-elements need to be positioned and given explicit or implicit dimensions. The next step is to add a CSS3 box-shadow and apply CSS3 transforms. One of the pseudo-elements then needs to be positioned on the other side of the element and rotated in the opposite direction. Serving favicon.ico in ASP.NET MVC.

Website Themes and Designs

Color Scheme Designer 3. jQuery.