Cross-site request forgery attacks are among the most common vulnerabilities against websites, listed as number 8 on OWASP’s 2013 Top 10 list.
Cross-site request forgery attacks are among the most common vulnerabilities against websites, listed as number 8 on OWASP’s 2013 Top 10 list.
I’m a bit late for Pi Day, but Programming Praxis had a neat problem on Friday that I wanted to check out:
Suppose we have a floor made of parallel strips of wood, each the same width, and we drop a needle onto the floor. What is the probability that the needle will lie across a line between two strips?
Yesterday’s post from Programming Praxis asks us to solve a problem known as the Dutch National Flag problem (attributed to Edsgar Dijkstra): sort an array of red, white and blue symbols so that all reds come together, followed by all whites, followed finally by all blues.
In yesterday’s post, I talked about three different ways to write expressions: prefix, infix, and postfix expressions. I also promised to write up a web-based example that would show the guts of each algorithm in action. Well, here it is!
Use the three buttons at the top to switch between the different machines. Enter an expression in the box and click run to evaluate it. The only things that are supported at the moment are numbers (integers or floating point) and the operators +, -, *, and /, although the code is extensible enough that adding more shouldn’t be an issue.
Today we’re going to be playing with an HTML5 canvas again (previously we made line art and bugs). This time, the goal is to make a tool where you can explore elementary cellular automaton.
Probability can be a bit counter-intuitive at times. Take for example, the birthday problem / paradox: how many people do you need in a room to have a 50/50 chance that two share the same birthday?
In the spirit of yesterday’s post about HTML5’s canvas, I’ve got another post. This time, it’s a little buggy. 😄
Let’s play with HTML5 canvas elements!
Basically, I want to draw some simple line diagrams. Go from top to bottom on one side while going from right to left along the top or bottom. It sounds complicated, but perhaps it’s easier to explain with a drawing:
A couple of months ago, I posted a simple simulation of a loaded dice game posted by Lifehacker (originally from DataGenetics). Today I wanted to take a chance to give everyone a chance to actually play the game.
So everyone would love to win the lottery right? Just think of what you could do if you had even $1 million dollars to spend. You could buy a dozen tacos a day at Taco Bell for the rest of your life. And your children’s lives. And their children’s lives. 228 years to be more precise. Or you could pay to send the entire family from Cheaper by the Dozen to the average state university–even if they each took an additional two years to graduate. And that’s just for $1 million. Payouts are usually much higher than that…
So what’s the catch?
(If you came here just for the Powerball simulation, it’s down at the bottom of the page. Click here to go straight there.)