This script displays a 2D array inside a textview. All elements on the same row and coloumn are underlined and colred blue.
//Definition of widgets
$scrolled_win = new GtkScrolledWindow();
$textview = new GtkTextview();
$buffer = new GtkTextBuffer();
$win = new GtkWindow();
$textview-modify_font(new PangoFontDescription('Courier New 14'));
$win-connect_simple('destroy', array('Gtk', 'main_quit'));
Improving on his last post about creating a bytecode compiler in PHP, the Sankuru blog has a new post in the series looking at extending the basic compiler to add support for if/while and do while logic.In order to obtain a turing-complete programming language, that is, a language in which we can implement and execute any arbitrary algorithm, that is, that other turing-complete machines can execute too, we now need to add a way of (conditionally) branching, that is, the IF statement, and at least one way...
Kevin Schroeder has come back around and has posted a new tutorial to his blog showing how to connect PDT to the Zend Developer Cloud (the "PHP Development Tools" extension for the Eclipse IDE).A couple of weeks ago I wrote a series of blog posts on how to connect to the Zend Developer cloud with various IDEs. Except one that I missed... PDT. The deployment plugin is already installed in PDT 3 and so you already will have the ability to push to the DevCloud instance.The process is pretty simple thanks to...
On Reddit today there's a rather large discussion going on about the recently posted manifesto from Ed Finkler about building simple, manageable tools rather than using "kitchen sink" frameworks for your applications.As of the time of this post there's about sixty-five comments posted to the thread with widely ranging opinions:
"How is [lots of separate libraries scattered around] better than simply using a framework?"
"This is part of the reason for the PSR0 reference for auto loaders [...] Part of the...
Fabien Potencier has written up a new post on his blog talking about creating your own framework layered on top of the Symfony2 framework's component system (yes, a framework from a framework).Symfony2 is a reusable set of standalone, decoupled, and cohesive PHP components that solve common web development problems. Instead of using these low-level components, you can use the ready-to-be-used Symfony2 full-stack web framework, which is based on these components... or you can create your very own...
Build Simple OO MVC
Prepare Statements DB Connection
Login page Authentication
Together with my friends and partners from thePHP.cc, Arne Blankerts and Stefan Priebsch, I will be giving an "Advanced PHP Development" training in MontrAŠal in March.With all PHP topics, nothing counts more than their practical application. This is why thePHP.cc once again offers a highly interactive and practical training right before the ConFoo conference. Based on their own specific needs and questions, the attendees decide on the topics that are covered. They experience the development of new code...
Symfony2 is a reusable set of standalone, decoupled, and cohesive PHP
components that solve common web development problems.
Instead of using these low-level components, you can use the ready-to-be-used
Symfony2 full-stack web framework, which is based on these components... or
you can create your very own framework. This series is about the latter.
If you just want to use the Symfony2 full-stack framework, you'd better
read its official documentation instead.
Why would you like to create your own...
On NetTuts.com there's a recent post from Nikko Bautista about creating an API-centric application and how it can help you make a more flexible, accessible application overall. Code is included to make a simple TODO list application based on this idea.Planning to start working on a new web application? In this tutorial, we'll discuss how to create an API-centric web application, and explain why this is essential in today's multi-platform world. [...] An API-Centric Web Application is a web application...
As mentioned by the PHPNW twitter account, the videos for almost all of the sessions in this year's PHP North West conference have been posted.Sessions so far include:
Ian Barber's keynote How to Stand on the Shoulders of Giants
Sebastian Bergmann's PHP Tester's Toolbox
Scott MacVicar's Scaling Your Development Team
Alistair Stead's Varnish your PHP application, make it fly!
Jacopo Romei's Many To Many - No Man Is An Island
Volker Dusch's Stop Wasting Time By Applying Clean Code Principles
You can find...
New from the XPertDeveloper.com blog there's a tutorial showing how to use the Facebook graph API to get page details via a simple cURL request (cURL PHP support required for the example).Here is the technique to get the detail of the Facebook page with Graph API and PHP. This is the very easy method to get the Facebook page detail. So Let's see how to get this done. With this method you can get details of any Facebook page [inluding] name, picture, link, website, products, description and if the user...
Ed Finkler has put together what he calls the MicroPHP Manifesto, a call to arms for the PHP community to get "back to the basics" and focus more on things like good well-crafted code rather than extending out into "complex, verbose solutions."The approach I've been taking lately is to start with as lightweight a foundation as possible, in the form of a "microframework." [...] For additional functionality, I pull in lightweight libraries that help me accomplish only the tasks I need. Clarity and brevity...
Phil Sturgeon has a new post to his blog about what he sees 2012 as being for the PHP community - the year of cloud hosting with all of the platform-as-a-service companies that have started up over the last year.Cloud hosting is nothing new. Seeing as "cloud" is such a loosely used term some will consider their VPS solutions on Slicehost or Rackspace to be "cloud hosting". That is partially true, but this article covers how PHP is getting some serious attention in the PaaS (Platform as a Service) field....
In a quick new post to his blog, Rob Allen has shared a snippet for the Sublime Text 2 editor to make creating getters and setters for your class simpler (dynamically too).As with a lot of editors, Sublime Text supports snippets which are essentially text expansions of a short phrase into more text. I needed to create a few getXxx() and setXxx() methods for some properties of a class and decided that the easiest way to do this would be with a snippet.Included in the post is the code you'll need to put...
On PHPMaster.com today there's a new article introducing you to the Command design pattern and looking to help you understand its use a bit better.The majority of [cell phone] users have opted to receive an email, but a significant number are now opting to receive the notifications via SMS. Here's the problem: How do you send a message via two different channels to both groups of users? The logical approach would be to split the users into 2 groups, email recipients and SMS recipients, which would...
Latest PECL Releases:
The standard line about the history of Punk is that it was a reaction to the excesses of modern rock, particularly progressive rock of the time. The reality is undoubtedly more complex, but I suspect there is some truth to that. Rock n roll did seem to be the realm of Golden Gods in the late 60s and 70s, inaccessible to average folk. The contrast between bands like Rush and Black Flag -- both supposedly playing aorocka -- was extreme.
For fun, let's take a look at Rush drummer Neil Peart's drum...
During my last job, I occasionally was invited to interview candidates for the web development team. Usually I'd receive a copy of their resume a few days beforehand with the instructions to review it, and I'd take a few minutes to read their resume and usually pop them into Google to take a look at [...]
Hasin Haydertalks about "getting comfy with PHPStorm" a relatively recent addition to the IDE ranks for PHP.I am a big time fan of Netbeans and I left it a few days after it's release of 6.7. It was so good, heavenly, yummy but I had to leave this old pal because of it's extreme hunger to the available resources. [...] I left Netbeans and started using PhpStorm. I have a company license and I am glad that I made this move. I am not going to preach PhpStorm in rest of this article, but what I will do is...