PhpRiot
News Archive
PhpRiot Newsletter
Your Email Address:

More information
Displaying news posts 3001 to 3020 of 6889

Kevin Schroeder's Blog: The Curve of Talent

Kevin Schroeder's Blog: The Curve of Talent
Kevin Schroeder has posted about an idea he recently came across (in this article) called the "Curve of Talent". Kevin's post expands on the idea and makes it a bit more relevant to the "how can I be a better developer" question asked quite often.I get asked, quite frequently, about how people can be better programmers. Why they're asking me, I have no idea. But what I usually tell them is to be curious and be creative. Waste time. Now, I don't mean "wasting time" by playing Quake (one of the best...

Linear Regression in PHP

Linear Regression in PHP
I've had a couple of emails recently about the excellent Stanford Machine Learning and AI online classes, so I thought I'd put up the odd post or two on some of the techniques they cover, and what they might look like in PHP.The second lecture of the ML class jumps into a simple, but often powerful, technique: linear regression - or fitting a line to data (don't worry if you haven't watched it, this post hopefully makes sense on it's own). There are a lot of problems that fall under predicting these...

Till Klampaeckel's Blog: Iterating over a table (with Zend_Db_Table and Zend_Paginator)

Till Klampaeckel's Blog: Iterating over a table (with Zend_Db_Table and Zend_Paginator)
Till Klampaeckel has a new post today looking at a solution for a common need - paginating through results as pulled from a database. With the help of the Zend_Db_Table and Zend_Paginator components of the Zend Framework it's a simple matter of passing the results into the Paginator and asking for a certain page.So frequently, I need to run small data migrations or transformations. Especially on the way to Doctrine, there's a lot to clean-up in a database which has been used and evolved over five years...

PHPBuilder.com: PHPBuilder.com Founder Passes Away, Leaves Indelible Legacy in FLOSS Development

PHPBuilder.com: PHPBuilder.com Founder Passes Away, Leaves Indelible Legacy in FLOSS Development
Sad news today from PHPBuilder.com - Tim Perdue, the founder of the PHPBuilder.com site and contributor to the SourceForge project as one of the original developers has passed away at 37.The PHPBuilder staff was saddened to learn that the founder of our site, Tim Perdue, passed away on September 16, 2011, after a battle with cancer. At only 37 years of age, Tim's passing came much too soon, but his contributions to the PHP and open source communities assure him a lasting legacy.Related posts include this...

Zend Framework 2.0: Dependency Injection (Part 2)

Zend Framework 2.0: Dependency Injection (Part 2)
Image via Wikipedia In Part 1 of this miniseries, I expounded (it's better than exploding) about Dependency Injection (DI) and Dependency Injection Containers (DICs). To summarise, DI is an obvious and ubiquitous design pattern used daily by most programmers to allow objects accept their dependencies from an external agent (e.g. a unit test which needs to inject mock objects). In an application, the ideal external agent is some container that can assemble objects on demand and create the necessary object...

ZendCasts.com: PHAR Out Autoloading

ZendCasts.com: PHAR Out Autoloading
On the ZendCasts.com site there's a new screencast posted looking at autoloading in phar, the packaging tool built into PHP. This is a continuation of the series started here.Building on the foundation from the previous screencast, he shows how to enhance it and allow it to autoload based on an autoloader defined in a "stub.php" file.You can grab the complete source for this screencast over on github.

Uh, uha who caused that error? MySQL ?!

Uh, uha who caused that error? MySQL ?!
Support nightmare: a customer reports a random PHP MySQL error. As a support expert you have the strong feeling that it is down to some suspicious SQL sequence. How to proof? 25 lines of PECL/mysqlnd_uh swiss-army knife magica prepend.php class __mysqlnd_logger extends MysqlndUhConnection { private $protocol; public function query($conn, $query) { $ret = parent::query($conn, $query); if ($errno = $this-getErrorNumber($conn)) { $this-protocol[] = array("query" = $query, "error" = sprintf("[%d]...

Script-Tutorials.com: Autocomplete with PHP, jQuery, MySQL and XML

Script-Tutorials.com: Autocomplete with PHP, jQuery, MySQL and XML
In this new tutorial from Script-Tutorials.com they show you how to combine PHP, jQuery, MySQL and XML to create an auto-complete box with drop-down suggestions.Today I have new article for PHP. I will tell you about implementation autocomplete for your sites. Data can be located in different sources - directly in the JS code, in the database, and even in the XML file.All of the code and markup you'll need is included - the HTML for the page containing the field, CSS to style it, the Javascript (jQuery)...

Community News: Latest Releases from PHPClasses.org

Community News: Latest Releases from PHPClasses.org
Indexer Inkblot Auth Cpanel Cron Job Connector Check Email Easy Mysql Cache My Pagination cookie crypt, decrypt Cookie crypt and decrypt curla JS Protector World Time Class for PHP 5

PHPNW11 - How To Dig Your Own Grave

PHPNW11 - How To Dig Your Own Grave
The PHP North West User Group ran it's 4th (and largest yet!) PHP conference - PHPNW11 in Manchester last weekend. This year's conference line-up was particularly strong, both with the quality of speaker and the quality of topics, but there was one talk in particular that topped them all. It all began with Rowan's laptop a So Rowan had this laptop a but no matter how hard he stared at it, it just wasn't going to work with the projector at the conference a a so his friends rallied round and swaped his...

Community News: Pusher Challenge (Make Your App Realtime)

Community News: Pusher Challenge (Make Your App Realtime)
The folks over at Pusher (the real-time push notification service) have announced a contest they're holding for developers (not just PHP either) to enter for a shot at a MacBook Air and a ticket to the Keeping it Realtime Conference - the "Pusher Challenge".We believe you can massively improve the user experience and engagement of your existing applications by making them realtime. Pusher lets you do that quickly and simply with our hosted API. In the Pusher challenge, we want to see the innovative ways...

Iterating over a table (with Zend_Db_Table and Zend_Paginator)

Iterating over a table (with Zend_Db_Table and Zend_Paginator)
So frequently, I need to run small data migrations or transformations. Especially on the way to Doctrine, there's a lot to clean-up in a database which has been used and evolved over five years or so. The other day, I wanted to run some transformations on the data located a history column in a pretty simple table - here's what it looks like: mysql SHOW FIELDS FROM data; +-------------+------------------+------+-----+---------------------+----------------+ | Field | Type | Null | Key | Default | Extra |...

Carson McDonald's Blog: Google OAuth for Installed Apps PHP Example

Carson McDonald's Blog: Google OAuth for Installed Apps PHP Example
Carson McDonald has posted an example of how to use the Google OAuth for Installed Apps tool to authenticate users.I have been working on a long needed update to the Google analytics dashboard plugin for WordPress and one of the items I had on my TODO list was using Google's OAuth login instead of the old ClientLogin. Setting OAuth up for a WordPress plugin is complicated because it isn't a hosted application and as such I can't register it to get OAuth keys. That is where a special way of doing OAuth...

Gonzalo Ayuso's Blog: Display errors on screen even with display errors = off with PHP

Gonzalo Ayuso's Blog: Display errors on screen even with display errors = off with PHP
Gonzalo Ayuso has posted a handy tip to his blog today about showing errors even with "display_errors" being off in your application (could be helpful in debugging those difficult problems).Shared hosting are cheap, but normally they don't allow us the use some kind of features. For example we cannot see the error log. That's a problem when we need to see what happens within our application. Normally I work with my own servers, and I have got full access to error logs. But if we cannot see the error log...

Hartmut Holzgraefe's Blog: PHPReboot Braindump

Hartmut Holzgraefe's Blog: PHPReboot Braindump
In this new post to his blog Hartmut Holzgraefe looks at a new effort that wants to be "the next PHP" while still being PHP. Confused? Take a look at PHPReboot.PHP.reboot is a reboot of PHP, each Hollywood movie has its own reboot, why not doing the same for one of the most popular programming language. The aim is to keep the philosophy of PHP but adapt it to be more in sync with the Web of 2010.Hartmut's post is a "braindump" of some of his thoughts about the project including responses to some of its...

php|architect: PHP is not a Swiss Army Knife, quit calling it that.

php|architect: PHP is not a Swiss Army Knife, quit calling it that.
New on the php|architect site today, there's a post from Cal Evans with his opinion of the PHP language - "it's not a Swiss Army Knife, quit calling it that."I've heard a lot of people compare PHP to a Swiss Army Knife. You know the ones, 5 blades, a corkscrew, a saw...and the obligatory toothpick that you will lose so you might as well take it out now and just throw it away. Why anyone would consider PHP to be like this is beyond me. [...] A Swiss Army Knife undergoes a lot of design work before it is...

PHPMaster.com: Array Handling Functions

PHPMaster.com: Array Handling Functions
On PHPMaster.com today there's a new tutorial introducing you to the array handling features in PHP - sorting, slicing and more. In my previous article on PHP arrays I suggested a number of things that are tables and therefore can also be expressed as arrays. In this article I'll use a pack of playing cards to explore some of the built-in array functions most often needed by PHP programmers. To highlight some of the array-handling functions PHP offers, I'll be using some components of Buraco - a game...

Background color for inline text

Background color for inline text
In searching for a solution to a CSS problem I had I stumbled over anotherAinteresting problem, similar to mine. Most people seemed to agree that it was impossible to do in pure CSS. The effect those people were afterAis commonly used in magazines where text with a background color is putAover an image. A simple effect hard to achieve. One solution was to surround each line of text using styled span elements. AnotherAsolution usedAaa teeny weeny jquerya to solve the problem. I'm sure it's a solid...

Community News: Latest PECL Releases for 10.11.2011

Community News: Latest PECL Releases for 10.11.2011
Latest PECL Releases: varnish 0.9.2 yaf 2.1.3 timezonedb 2011.12

Uh, uha extending mysqlnd: monitoring and statement redirection

Uh, uha extending mysqlnd: monitoring and statement redirection
Uh, uha about a year ago Mayflower OpenSource Labs released the mysqlnd user handler plugin (PECL/mysqlnd_uh). The extension lets you extend and replace mysqlnd internal function calls with PHP. Uh, uha internal mysqlnd exported to user space? Who cares as long as it does the trick?! Let me ...

Latest PHP Tweets