Microsoft Makes Fun of Itself
Microsoft must really have some nerve to run this ad. Or it was a disgruntled employee trying to get back at his employer. I especially like the “Bulletproof reliability”.

Rants on Php, MySQL, JS, Ajax, Web Standards and anything else I find interesting
{ Monthly Archives }
Microsoft must really have some nerve to run this ad. Or it was a disgruntled employee trying to get back at his employer. I especially like the “Bulletproof reliability”.

I often have the problem that a client wants their customers to login on a secure site. The following .htaccess files are a simple way of accomplishing this by redirecting the the sercure version.
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
If that doesn’t work, try this:
RewriteEngine On
RewriteCond %{SERVER_PORT} !443
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R]
c++; /* this makes c bigger but returns the old value */ -- Unknown
There are many dollar sign functions out there, especially in the Javascript packages such as Prototype or MooFX. Peter-Paul Koch over at Quirksmode offers a cross-browser version of document.getElementById. Let’s combine all the goodness from each of these to make a souped-up $() dollar sign function that works in most browsers, and is not dependant on the DOM implementation of just one. It’s actually 2 functions, the $() and then a helper function.
function $() {
var elements = new Array();
for (var i = 0; i < arguments.length; i++) {
var element = arguments[i];
if (typeof element == 'string')
element = getElementByIdCompat(element);
if (arguments.length == 1)
return element;
elements.push(element);
}
return elements;
}
function getElementByIdCompat(name) {
if (document.getElementById) {
return document.getElementById(name);
} else if (document.all) {
return document.all[name];
} else if (document.layers) {
var theobj = {};
theobj = document.layers[name];
theobj.style = document.layers[name];
return theobj;
}
}