Jeśli jesteś właścicielem tej strony, możesz wyłączyć reklamę poniżej zmieniając pakiet na PRO lub VIP w panelu naszego hostingu już od 4zł!

Archive for Czerwiec, 2013

PHPMaster.com: Running Monte Carlo Simulations in PHP

PHPMaster.com: Running Monte Carlo Simulations in PHP

On PHPMaster.com there’s a new tutorial by J Armando Jeronymo that shows how you can run Monte Carlo simulations in PHP (more on that simulation type here).

One of the exciting things in the 1980′s was programming simulations to solve complex analytical problems, and one of the most useful techniques employed was running Monte Carlo simulations. The approach repeatedly runs a simulation many times over to calculate the most likely outcome. Although PHP isn’t known as a scientific or research programming language, Monte Carlo simulations can easily be written in a PHP web app. In this article, I’ll show you how.

He walks you through the whole problem he tries to solve with the simulation – a multi-step trip that involved different roads, situations and possible stops along the way. He breaks it out into the various stages (labeled with letters) and shows how you might render this as a “MyTrip” class with distances in “travel minutes”. Following along with the Monte Carlo randomness, though, he shows how to inject a bit of randomness into the mix accounting for some of the trouble he had along the way.

Link: http://phpmaster.com/running-monte-carlo-simulations-in-php
Source: http://www.phpdeveloper.org/news/19785

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

PHPMaster.com: Running Monte Carlo Simulations in PHP

PHPMaster.com: Running Monte Carlo Simulations in PHP

On PHPMaster.com there’s a new tutorial by J Armando Jeronymo that shows how you can run Monte Carlo simulations in PHP (more on that simulation type here).

One of the exciting things in the 1980′s was programming simulations to solve complex analytical problems, and one of the most useful techniques employed was running Monte Carlo simulations. The approach repeatedly runs a simulation many times over to calculate the most likely outcome. Although PHP isn’t known as a scientific or research programming language, Monte Carlo simulations can easily be written in a PHP web app. In this article, I’ll show you how.

He walks you through the whole problem he tries to solve with the simulation – a multi-step trip that involved different roads, situations and possible stops along the way. He breaks it out into the various stages (labeled with letters) and shows how you might render this as a “MyTrip” class with distances in “travel minutes”. Following along with the Monte Carlo randomness, though, he shows how to inject a bit of randomness into the mix accounting for some of the trouble he had along the way.

Link: http://phpmaster.com/running-monte-carlo-simulations-in-php
Source: http://www.phpdeveloper.org/news/19785

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Amazon Web Services PHP Blog: Syncing Data with Amazon S3

Amazon Web Services PHP Blog: Syncing Data with Amazon S3

On the Amazon AWS blog there’s a recent post showing you how to sync data with S3 and handle multiple files quickly and easily.

Have you ever needed to upload an entire directory of files to Amazon S3 or download an Amazon S3 bucket to a local directory? With a recent release of the AWS SDK for PHP, this is now not only possible, but really simple.

He includes example code for doing it both ways – upload and download syncing – as well as some options you can use to customize the connection. You can define things like ACL settings, the number of concurrent connections and if you want the debug options turned off or on.

Link: http://blogs.aws.amazon.com/php/post/Tx2W9JAA7RXVOXA/Syncing-Data-with-Amazon-S3
Source: http://www.phpdeveloper.org/news/19784

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

NetTuts.com: Diving Into Symfony 2

NetTuts.com: Diving Into Symfony 2

On NetTuts.com there’s a recent tutorial posted that helps you “dive into Symfony2” and gives you an introduction to the framework including some code samples of a basic MVC structure.

Frameworks are hot topics in the web-industry and have been for some time. In this vast sea of flavors is Symfony – an extensive PHP framework that follows the ever popular MVC paradigm. Its learning curve is probably a little steeper than its fellow competitors, like CodeIgniter. Don’t worry, once it grows on you, you’ll feel more powerful than ever and you’ll be able to develop fantastic applications.

They walk you through a few different things including the overall flow of a Symfony2 application and getting it installed (and where its files live). They show you how to use the console commands to generate parts of an application and creating controllers/routes/output via Twig as well.

Link: http://net.tutsplus.com/tutorials/php/diving-into-symfony-2-2
Source: http://www.phpdeveloper.org/news/19783

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

PHP Town Hall Podcast: Episode 8 – Use Your Time Machine to Go to PeersConf Yesterday

PHP Town Hall Podcast: Episode 8 – Use Your Time Machine to Go to PeersConf Yesterday

The PHP Town Hall podcast has posted their latest episode – Episode #8, “Use Your Time Machine to Go to PeersConf Yesterday”

In this episode Ben and Phil talk to the super-talented conference organiser Jessica D’Amico, joined by avid conference goer and PHP rockstar Matt Frost. We all gab a bunch about conferences in general, specifically LaraCon, PeersConf and php|tek. We fucked up and didn’t get this episode out soon enough to actually get her any sales for her latest conferences PeersConf (Phil is at PeersConf right now), but you should definitely follow Jess to see what conferences she puts on in the future, they’re always great.

You can listen to this episode either through the in-page player or by downloading the mp3. You can also subscribe to their feed to get this and other new episodes as they’re released.

Link: http://phptownhall.com/blog/2013/06/27/episode-8-use-your-time-machine-to-go-to-peersconf-yesterday
Source: http://www.phpdeveloper.org/news/19782

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Community News: Packagist Latest Releases for 06.28.2013

Community News: Packagist Latest Releases for 06.28.2013Recent releases from the Packagist:

Source: http://www.phpdeveloper.org/news/19781

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Community News: Packagist Latest Releases for 06.28.2013

Community News: Packagist Latest Releases for 06.28.2013Recent releases from the Packagist:

Source: http://www.phpdeveloper.org/news/19781

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Site News: Popular Posts for the Week of 06.28.2013

Site News: Popular Posts for the Week of 06.28.2013Popular posts from PHPDeveloper.org for the past week:

Source: http://www.phpdeveloper.org/news/19780

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Simon Champion: PHP Upgrade Broke My Data Importer

Simon Champion: PHP Upgrade Broke My Data Importer

In his latest post Simon Champion recounts some of the issues he had when upgrading to PHP 5.4, what’s usually a smooth transition from PHP 5.3. His specific problem came in a difference between the previous mysql_query call and the more-correct PDO usage.

Our office is in the thoes of a large-scale upgrade of the servers in our data center. The new version of Debian (version 7, or “Wheezy”) has been officially released, having been in beta for the last few millenia, and our Ops team are slowly installing it across all our servers. This is great news, as it means we get to upgrade to PHP 5.4. Woohoo! New shininess. [...] We were ready. The upgrade should have been a breeze. But it wasn’t.

He talks about his process of digging through the code trying to figure out why a call to import a CSV file into MySQL was failing. Their Data Importer component started failing with an error from MySQL about the “LOAD INFILE” not being allowed for use. He shares a “work around” that’s not ideal (using exec) that manually imports the file into the database. He does point out that it could be something Debian-specific as they don’t upgrade the version, just apply security patches retroactively.

We’re making an effort to stick to modern PHP coding standards, so we’re using PDO throughout, which makes is all the more galling. [...] Given that we do have a work-around now and everything is back up and running, I’m going to have to let this one drop; I don’t have the time to try chasing it any more. But I hope this blog post will prove useful to anyone else having the same issue.

Link: http://spudley.com/blog/php-upgrade-broke-my-data-importer
Source: http://www.phpdeveloper.org/news/19779

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

NuoDB.com: Using NuoDB from the PHP Zend Framework

NuoDB.com: Using NuoDB from the PHP Zend Framework

On the NuoDB site there’s a recent post showing how to use this cloud-based database solution from inside Zend Framework applications.

The Zend Framework is an object oriented PHP framework that can be used to construct interactive web applications. NuoDB supports both Zend Framework version 1 and version 2 . In this TechBlog article, I will show you how to use NuoDB with both Zend Framework v1 and v2. I will use the example applications that are provided in the Zend Framework documentation and show you how to make them work with NuoDB.

They briefly walk you through the install and configuration of Apache and NuoDB you’ll need to get things up and running. Sample code is included showing you how to install the NuoDB PDO driver, pull down their github repo with the needed files (for both ZF1 and ZF2) and implementing in each version’s quickstart application.

Link: http://www.nuodb.com/techblog/2013/06/20/using-nuodb-from-the-php-zend-framework
Source: http://www.phpdeveloper.org/news/19778

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>