News Feed
Jobs Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHPMaster.com:
Data Structures for PHP Devs Heaps
July 23, 2013 @ 11:10:17

PHPMaster.com has posted the third part of their "Data Structures for PHP Devs" series today, this time focusing on heaps. Heaps are a method for organizing a parent/child relationship that makes it easier to work with.

In past couple articles I've introduced you to three basic data structures: stack, queue, and tree. In this article I'll introduce you to another abstract data type that is closely related: heap. Heaps are specialized tree-like data structures which satisfy the heap property - the node value (key) of any parent is always ordered with respect to its child node values across the entire tree.

He starts off by explaining what the different types of heaps are - maxheap, minheap and (a special instance) a Priority Queue. He talks about the operations available to heaps and starts off with a binary maxheap implementation using arrays. He also mentions some of the functionality that the SPL already provides for this sort of thing - SplMaxHeap, SplMinHeap and the SplPriorityQueue.

0 comments voice your opinion now!
data structure heap tutorial series spl priority queue

Link: http://phpmaster.com/data-structures-3

Matthew Weier O'Phinney's Blog:
Taming SplPriorityQueue
January 18, 2011 @ 12:43:54

Matthew Weier O'Phinney has a new post to his blog today looking at one of the tools the Standard PHP Library (SPL) has to offer developers - the SplPriorityQueue (PHP 5.3+)

SplPriorityQueue is a fantastic new feature of PHP 5.3. However, in trying to utilize it in a few projects recently, I've run into some behavior that's (a) non-intuitive, and (b) in some cases at least, undesired. In this post, I'll present my solutions.

He talks about the "first in, first out" nature of queues and how it differs from a stack (including links to some of the other SPL offerings for both). He then moves into the problems he was seeing - that iteration removes values from the heap and the unexpected order of equal values in the queue. To solve the first problem, he creates an "outer iterator" that creates an "innerQueue" that's protected. The solution for the second issue - the random queue order - is a simple one: priority indexes aren't required to be integers. Strings can be substituted to help make things a bit more unique.

0 comments voice your opinion now!
splpriorityqueue heap stack queue spl tutorial iterate priority index


Chance Garcia's Blog:
Zend_log_exception 'bad log priority'
March 02, 2009 @ 10:27:26

Chance Garcia has posted about an exception he's come across several times in using the Zend_Log component of the Zend Framework but hasn't been able to figure out - until now (with the help of part of the Zend Framework manual).

There are a few times I've gotten this particular exception and then look at the trace and can't figure out what's wrong. More often than not, I'll get to the line in the trace and be like, "wtf! there's no priority here. It's a method call not a constant". [...] So to save myself and others some time and aggrevation, I'm going to go into a bit of detail as to why you may be getting this exception.

As it turns out, the Zend_Log exception was caused by the components overloading of the __call function to allow for some custom handling. Chance sees this issues as an example of "flexibility leading to complications that require complex understanding".

1 comment voice your opinion now!
zendlog zendframework component bad priority exception


DevShed:
Choosing an Open-Source Content Management System
December 19, 2008 @ 10:26:55

From the "Braindump" section over on DevShed today there's a new article sharing some helpful hints on picking out that right Open Source content management system that you need for the job.

A Content Management System (CMS) provides a straightforward way to maintain a web site, allowing site owners to include interactive features such as article publishing, file uploads and sharing, forums and blogs with a minimum of coding. And a good CMS will also allow extensive customization to the site's layout and appearance, so it doesn't end up looking like thousands of other sites built on top of the same code base.

The look at a few of the priorities to consider - multi-author support, metadata management, ease of use - as well as technology and business considerations. Systems they look at in their overview include Joomla, Drupal, Mabo and Plone.

1 comment voice your opinion now!
opensource content management system choice priority


DevShed:
Logging in PHP Applications
December 08, 2008 @ 13:52:10

DevShed has posted a new tutorial today looking at one of the more useful tools a developer can add into an application - logging.

If there is no logging mechanism, then if there's a goof-up in a production environment, you have absolutely no idea what went wrong. The only thing which a support developer can do in this case is to reproduce the issue at the developer end, which sometimes work and sometimes don't.

The look at the types of logging (trace logs, audit logs and user logging/history) and create a simple class that allows flexibility for file location, priority and timstamping. Their script contains a writelog method that does all the work (including pushing it through the PEAR logging class).

0 comments voice your opinion now!
log tutorial pear trace audit history priority timestamp location


International PHP Magazine:
Poll - Which One of the Following Should a PHP Programmer Give Priority?
May 23, 2007 @ 11:19:00

The International PHP Magazine is back with the results on their latest poll today that asked developers to vote on which, of their options, a PHP developer should give the most effort towards when creating their applications.

Options included "Magic Methods", "IDE's" and "Database Support" but the number one option that got the most votes by far was "Classes". This left second ("All" at 19.3 percent) and third ("Database Support" at 8.4 percent) place in the dust.

If you're a CodeIgniter user, be sure to get your vote in on this week's poll asking users to vote on which of the feature options they've given is what makes CodeIgniter the best framework out there.

0 comments voice your opinion now!
poll effort priority application class codeigniter vote poll effort priority application class codeigniter vote


International PHP Magazine:
Poll Question Which Is Your Favourite PHP Framework?
May 16, 2007 @ 08:46:00

The International PHP Magazine has posted the results from the latest poll (they conducted over the past week) that asked which of the options given was your favorite framework choice.

Options included CodeIgniter, CakePHP, PHP on TRAX, Propel, Seagull, Solar, the Zend Framework and more. Coming in with the largest percentage of the votes, though was CakePHP with 56.1 percent of the responses. Coming in second (but a ways behind) was CodeIgniter followed by the Zend Framework.

If you didn't get a chance to get your vote in on that poll, you can get in on this week's poll and voice your opinion. This time, they're asking which (of the given options) should a programmer give the more emphasis to when developing their application.

0 comments voice your opinion now!
favorite framework poll question cakephp codeigniter priority favorite framework poll question cakephp codeigniter priority


PHP Magazine:
IPM Poll Question What Features do You Prioritize in a CMS?
July 25, 2006 @ 13:14:07

The International PHP Magazine has finished yet another poll today, this time they asked their site visitors the question "What Features do You Prioritize in a CMS?".

The options included things like "Small footprint, less than 30K" and "Multiple methods for providing news feed" but the number one on the list (as chosen by the readers) was "Simple and powerful administration panel" with "Easy to integrate into an existing web site" pulling in a close second.

It is evident that the majority looks for a simple and powerful administration panel in a CMS as it garnered 36.9% of votes. 35.7% look for a CMS that is easy to integrate into an existing web site. 13.1% want a CMS that is easy to skin. 'Simple and easy to install' polled 8.3% of the votes. 3.6% desire a small footprint less than 30k. The options, 'No requirement for a database' and 'Multiple methods for providing news feed' bagged a dismal 1.2%.

Be sure to check out this week's poll (PHP misconceptions) and cast your vote today!

0 comments voice your opinion now!
poll question features priority content management system poll question features priority content management system



Community Events











Don't see your event here?
Let us know!


hack language facebook hhvm framework application introduction release symfony2 podcast database performance security composer opinion component overview package unittest install

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework