News Feed
Jobs Feed
Sections



Recent Jobs

News Archive
feed this:

SitePoint.com:
How to Create Your Own Random Number Generator in PHP
February 09, 2012 @ 10:03:35

On SitePoint.com today there's a new tutorial showing how to create a random number generator in PHP (with the help of methods like mt_rand and mt_srand).

Computers cannot generate random numbers. A machine which works in ones and zeros is unable to magically invent its own stream of random data. However, computers can implement mathematical algorithms which produce pseudo-random numbers. They look like random numbers. They feel like random distributions. But they're fake; the same sequence of digits is generated if you run the algorithm twice.

Included in the post is code showing how to use the random functions and how to create a class (Random) that provides a few methods to help make generation easier - "seed" and "num". It first calls "seed" with a number to start the random generator off with and then "num" in a loop to pull out random values based on that.

0 comments voice your opinion now!
random number generator tutorial introduction mtrand



Symfony Blog:
Symfony2 Getting Easier - Interactive Generators
June 22, 2011 @ 10:09:39

On the Symfony blog they've posted the latest in their "Getting Easier" series looking at some of the things being done for the framework to help make it more appealing for those just coming in. In this new article they look at the new interactive generators that help you create the code you'll need to set up your bundles without a lot of manual effort.

symfony1 has generators for all those things, but until now, Symfony2 was not very good at generating code. Well, that's "fixed" now, thanks to the new GeneratorBundle. The bundle is included by default in Symfony SE (as of 2.0.0 RC1 which will be released on June 24th) and it knows how to generate bundles, forms, Doctrine entities, and simple CRUD controllers to get you started even faster.

A screencast is included in the post showing the process of running the new tool and generate all of the configurations you'll need for a bundle, a Doctrine2 entity, database creation and the CRUD interfaces for a Doctrine entity. You can grab the code for this new bundle from the Sensio github account.

0 comments voice your opinion now!
symfony2 framework interactive generator screencast example


Victor Farazdagi's Blog:
New Project Phrozn - static site generator in PHP
April 15, 2011 @ 11:02:03

On his blog today Victor Farazdagi introduces a new tool he's developed to help make the creation of static sites even easier - Phrozn, a static site generator that takes content and wraps it in a site's template and structure and outputs it for easy integration.

Given the scale of how client-side technologies (such as JavaScript) evolved, most of dynamic functionality can be implemented using client-side scripts + remote web-services (e.g. Disqus for comments). More than often we a going down that road even on our completely dynamic sites - it makes things more simple.

He gives the example of being able to write the content in VIM and run a single application - Phrozn - and generate the new page to add to the site. He sees it as a good alternative to something like WordPress where most people only use 1% of the functionality it offers. You can find out more about the project by looking into its documentation or you can just dive into the code by grabbing it from github. As a side note, several other tools, like Jekyll are "blog aware" and can be used similarly.

0 comments voice your opinion now!
static site generator phrozn blog project github documentation


LogicPool.com:
List of PHP and MySQL Code Generators
October 27, 2010 @ 11:48:04

On the LogicPool site there's a new post with a list of PHP+MySQL code generators you can use if there's not a specific framework involved in your application (most of those come with code generation tools already).

Some of these tools can rapidly build a fully functional application, but there's more to most useful applications than simply displaying a list of fields for users to fill out and viewing the results from an admin only accessible area. Most applications will need tweaks that can be small to large depending on the requirements. Keep that in mind when looking at these products as the amount of effort required to tweak the code produced by these tools.

Tools on their list (some free, some paid services) include:

1 comment voice your opinion now!
code generator mysql paid free service tool


Erik's Blog:
PHP implementation of an LALR1 parser generator
January 19, 2010 @ 13:03:57

Erik has posted about a new parser he's created, one based on the LALR parser method, that can be downloaded here [zip].

Parser tables, along with a lexer table, are the core constituents of any compiler's front end. This LALR parser generator is heavily based on my custom Php version of the map/reduce programming technique (functional programming). I will elaborate in future posts, on why I used a map/reduce basis to implement the parser generator.

Parsers organize a set of tokens based on the rules of a formal language the parser is given. Several of the grammar text files are included in the download so you can test it out for yourself. For more on the topic check out these two posts.

0 comments voice your opinion now!
lalr1 parser generator grammar


php|architect:
CodeWorks DreamSchedule Generator
July 21, 2009 @ 09:05:30

If you're planning on attending any of the stops on this year's CodeWorks 2009 conference, you should check out this fun tool you can use to narrow down your choices from the thirty or so talks to something a bit more manageable:

Conferences are always busy-there are people to meet, new subjects to learn, gadgets to envy, and so on. Among all the fun stuff, it's difficult to keep track of exactly what you want to attend. [...] Fear not! Our development team has come to your rescue with a new tool exclusive to CodeWorks 09: the DreamSchedule Generator, which you can use to create your very own customized CodeWorks schedule.

The tool lets you pick the city of your choice and select each of the talks, one in each time slot, you want to attend. Name the schedule and you'll get a custom URL you can use to refer back to which sessions you wanted to attend. You can also send it out via Twitter if you'd like others to know where you'll be.

0 comments voice your opinion now!
schedule generator dreamschedule cw09


FlexandAir.com:
CRUDdy Buddy - Zend_Amf Code Generator
November 04, 2008 @ 12:54:55

The Flex and Air blog has posted about a tool that can be used to jump-start your Zend_Amf powered application - CRUDdy Buddy.

CRUDdy Buddy is an AIR application I created to generate the code necessary to get started on a Zend_Amf project. It creates all of the PHP necessary, along with ActionScript classes and <mx:RemoteObject> tags you can paste into your Flex or AIR application.

They have a video on Vimeo showing it in action. You'll need the Adobe AIR runtime to be able to use it, but that's a simple and quick install. There are versions for both Mac (using Mac-specific fonts) and Windows/Linux (using Arial). You can download a PDF of the documentation here.

0 comments voice your opinion now!
cruddybuddy air zendamf generator adobe application


Skaldrom's Blog:
Want to create your own progranning language? Lexer & Parser in PHP!
November 02, 2007 @ 11:12:00

Skaldrom passed along a link to an article he's written up to show how to use one of the more powerful PEAR packages in a simple "Hello World" kind of script - the PHP_LexerGenerator and PHP_ParserGenerator packages.

Who doesn't dream about it: Your own programming language, because the syntax and the word are expression! A step continue to go to ascend and from the programming language user to the language creator! This is now possible in PHP, but unfortunately only with minimum documentation.

He provides an example of the Lexer/Generator in action - handling a simple mathematical operation. The execution code is first with the Lexer definition file and the code for the parser following. Lastly, he has included the code to make things work - passing the test string into his custom Lexer which is passed off to the Parser and a value returned.

0 comments voice your opinion now!
lexter parser pear package generator example lexter parser pear package generator example


DevShed:
Developing a Captcha Application with an Image Generator Class with PHP 5
October 03, 2007 @ 12:58:00

DevShed has posted the next (and last) part of their series on image generation with PHP, creating a class to handle most of the work for you and implement the graphics functionality (GD) PHP has built in. This time, they take things a step further and use the class they've created so far to make CAPTCHA images for a site.

In this last article of the series I'm going to show you how to couple this class with a simple randomizer mechanism to implement a basic yet effective application that will be capable of outputting on the browser different random strings, which will be previously embedded into a predefined image stream.

They start with their previous version of the class and work off of it, extending its functionality to add a multi-call ability and to hook into a RandomGenerator class to create the string.

0 comments voice your opinion now!
php5 tutorial image generator captcha random string php5 tutorial image generator captcha random string


DevShed:
Building an Image Generator Class with PHP 5
October 01, 2007 @ 12:57:00

In a new tutorial today from DevShed, they introduce you to one of the more powerful bits of PHP functionality - the graphics manipulation functions - and how to use them to create an image generator class in PHP5.

In simple terms, over the course of this brand new PHP series, which will be comprised of three friendly tutorials, I'll walk you through the development of an easy-to-follow PHP class that will have the ability to build dynamic text strings, which will be outputted straight to the browser in the form of image streams.

This part part of the series lays the foundation, creating the basic structure of the class and the buildImageStream and displayImage methods. This is then used in a sample use - creating images, white text on a black background.

0 comments voice your opinion now!
tutorial gd image manipulation generator class php5 tutorial gd image manipulation generator class php5



Community Events





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


release unittest application development series custom podcast manifesto symfony2 interview language test api opinion conference introduction phpunit community framework package

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