Teaser…
Check out the Loomiere 2.0 teaser: http://valeriu.palos.ro/836/loomiere-2-0-teaser/
Enjoyed this post?, why not subscribe to the RSS feed!
Check out the Loomiere 2.0 teaser: http://valeriu.palos.ro/836/loomiere-2-0-teaser/
Enjoyed this post?, why not subscribe to the RSS feed!
After struggling for a while I managed to put together a PHP extension for (pseudo-)streaming video files encoded with the all-new H264 codec, based on the wonderful work of these guys , thus giving people the ability to seek into MP4 files by using PHP and any webserver they like (like Apache, NGINX etc.). Anyone who knows anything about this will know what a pain it can be. [Sorry, the demo server is no longer available since I’m currently using it in a separate context to develop an improved version of this package]. (more…)
Enjoyed this post?, why not subscribe to the RSS feed!
Following my first attempt, I optimized the scripts and improved on my times considerably. I’m really happy with the outcome considering it was all done with PHP. My faith in this platform is increasing :). Note that I also used a slower computer (a laptop) this timeand I decided to to my own time measuring to exclude the loading of the prime numbers (if you think this is cheating then you can simply run the scripts using the time command).
Results:
php -f google_th_4b.php Loading primes... done. Solving for inputs 25, 129, 139, 1087, 1199… Found prime number 9256873 in 0.32996106147766 seconds.
php -f google_th_4b.php Loading primes... done. Solving for inputs 7, 17, 41, 541… Found prime number 7830239 in 0.75763010978699 seconds.
Sources:
Enjoyed this post?, why not subscribe to the RSS feed!
Hey there people! After viewing (and being enticed by) Leonardo’s post (and also Peteris’) I decided to take a shot at this problem… using PHP. That’s right, I wanted to see how fast I can make a PHP script solve this darn thing. Because I (also) wanted to make use of the pregenerated list of primes, I made a preparation script first that downloads a specified amount of 1 million prime numbers chunks and inserts them into an SQLite database for easier (and faster) access from PHP (this script is called google_th_4_prepare.php). I only called this script for just 1 million primes since all numbers I tried fit within that, but you can do more if you want (see the defined constants)! (more…)
Enjoyed this post?, why not subscribe to the RSS feed!