From Freephile Wiki
Revision as of 09:53, 29 December 2018 by (talk) (This changes nothing)

Jump to navigation Jump to search

Prime Real Estate[edit | edit source]

This demo page from the Web Hypertext Application Technology Working Group shows prime numbers. What I found interesting is that initially, it takes a few moments to find prime numbers; meaning that they are "far apart" as you examine every number up to say 1,000,000. But suddenly the demo application is spitting out prime numbers faster than you can read. So, apparently there are a lot of prime numbers once you get into the larger numbers. But this isn't actually true. If you look at the distribution of primes, there are "more" smaller primes than larger primes (X < 200) [1]. Hmm.

  <title>Worker example: One-core computation</title>
  <p>The highest prime number discovered so far is: <output id="result"></output></p>
   var worker = new Worker('worker.js');
   worker.onmessage = function (event) {
     document.getElementById('result').textContent =;

Concurrency[edit | edit source]

Aside from that, this demo illustrates how HTML5 brings multi-threaded execution or concurrency to your web application.

With "workers" you can perform a computationally expensive task without interrupting the user interface.

Word of the Day[edit | edit source]

- Characterized by, or having great physical beauty and appeal.

References[edit source]