… Read more
In the wake of complaints about rampant misinformation affecting the presidential election, Alphabet, Inc. (GOOGL) subsidiary Google announced on Monday that it is working on an update that will restrict ad-selling software from appearing on fake news sites.
FireFox experiences a race condition between the loading of code in scripts and receiving socket.io events if a socket establishes a connection concurrently with the loading of scripts. If a socket.io client in FireFox connects to the socket.io server in a script, but there are socket event handlers yet to be loaded (or general JS yet to be loaded), even… Read more
The documentation on socket.io’s page and its GitHub page are inconsistent (namely due to the latter being out of date, but contains information not covered by the former). A problem arises when using global authorization middleware on the server, having a client trying to connect to a custom namespace, and having the server deny access to the conne… Read more
Discover how playing the lottery is nearly the equivalent of a 50% tax on your after-tax disposable income. See how much you lose on average when you dream of winning big!
* * *
Wikipedia’s page for Standard Deviation presents a formula for rapidly calculating the standard deviation of a growing set of numbers:
 Qk = Qk-1 + (xk – Ak-1)(xk – Ak) where xk is the kth element in the set and Ak is the mean of the first kth numbers.
The standard deviation squared of the first n numbers of a set is Qn / n.
From this, it is easy … Read more
[Update: MSN has removed Backgammon from its games. Probably because of the rampant cheating. For a more fair place to play Backgammon that minimizes the chance of cheating (particularly because of the availability of instant replays) try https://www.gameslush.com/backgammon]
Figured I’d compile this list after seeing several cheaters that … Read more
Spent a whole day figuring out this one. Yet another reason why Internet Explorer is the bane of web development. Found a plethora of suggested solutions on the net, and even an old bug logged for PHP in 2001, but the reason behind the bug is still a mystery.
As the title states, if you use setcookie() with $expire set and $domain not set, then IE may simply let th… Read more
(tl;dr: You can play against an AI computer user I designed for an online Big 2 game here. The bots are capable of calulcating the expectation for its score for every possible line of play very quickly, resulting in a rather worthy opponent for even the most seasoned Big 2 players).
The dynamics in Big 2 make programming AI for it an interesting problem. The … Read more
“Background image must be the same dimensions as the canvas.”
In case you are looking for a workaround for Processing.js background function that forces you to scale your background image, try this trick to make your browser do the scaling for you.
Set the CSS background for the canvas element to your image, and use “cover” or R… Read more
Facebook’s example code in its documentation would not go well with AJAX served pages. In particular, the login button does not get “converted” on subsequent attempts because the JS code required by Facebook is also loaded asynchronously. Their script is loaded into your document tree, and calls the FB.init function only that one tim… Read more