Blogmarks pour le 05/06/2008

5 juin 2008 par Olivier Mansour

in_array is quite slow

So, we had a cron job hanging for hours. No idea why. So, I started debugging. It all came down to a call to in_array().

(categories: )

Give Your Site A Boost With Memcache

(categories: )

Design Stencils - Yahoo! Design Pattern Library

Yahoo! Design Stencil Kit version 1.0 is available for OmniGraffle, Visio (XML), Adobe Illustrator (PDF and SVG), and Adobe Photoshop (PNG), and covers the following topics:
* Ad Units
* Calendars
* Carousels
* Charts and Tables
* UI Controls
* Form Elements
* Grids
* Menus and Buttons
* Mobile - General
* Mobile - iPhone
* Navigation and Pagination
* OS Elements
* Placeholder Text
* Screen Resolutions
* Tabs
* Windows and Containers

(categories: )

PEAR :: Package :: System_Daemon

System_Daemon is a PHP class that allows developers to create their own daemon
applications on Linux systems. The class is focussed entirely on creating
spawning standalone daemons, and for example includes:

1. Methods to generate OS-specific startup-files (init.d) (currently only
Debian/Ubuntu are supported), so that your application gets started on
reboot as well.
2. Methods for logging purposes
3. Simple syntax
4. Support for PEAR’s Log package
5. Can run with or without PEAR (PEAR adds more elegance & functionality)
6. Default signal handlers, but optionally reroute signals to your own
handlers.
7. Log levels comply with PEAR_LOG_ levels but are called SYSTEM_DAEMON_LOG_
for (in)dependency reasons
8. Set options like max RAM usage

Une alternative à http://www.glagla.org/weblog/2007/11/05/programmer-un-demon-en-php/

(categories: )

Official Google Docs Blog: Embed your forms

Since we launched spreadsheet forms in January, one of the top user questions has been "How can I embed my form into a website or blog?" Last night, we added this option. You’ll see this new feature during form creation, when you’re prompted to invite people to fill out your form. Just skip the invitation step and look for "Embed" in the upper right-hand corner of the page. Paste the code provided into your blog or website.

(categories: )

Official Google Docs Blog: Featured video: quick and easy forms

From one of your fellow Docs users, here’s a well-made and thorough video covering every part of creating a spreadsheets form. The step-by-step instructions are a good way to get started making forms, and they also inform anyone who wants to help others in creating and distributing a form — but doesn’t want to provide tech support while the others figure it out :)

(categories: )

The PHP Benchmark

PHPBench.com was constructed as a way to open people’s eyes to the fact that not every PHP code snippet will run at the same speed. You may be surprised at the results that this page generates, but that is ok. This page was also created so that you would be able to find discovery in these statistics and then maybe re-run these tests in your own server environment to play around with this idea yourself, by using the code examples (these code examples are automatically generated and as the code in my .php files change, so do they)

(categories: )

i should be coding :: unit tests and code coverage with phpt

My initial experiences with unit testing and PHP were with PHPUnit. While it’s a great tool and I have to give kudos to Sebastian for contributing so much to its development, I’ve come to appreciate the simplicity of PHPT tests. Recently, I wrote some for a project and realized that I wasn’t aware of how to generate code coverage reports. Many thanks to the very helpful patrons in the #pear channel on EFNet for helping me to get this working.

(categories: )

blogmarks.net

Pour soutenir ce site, n'hésitez pas à cliquer sur un de ces liens :

  1. Par tight le 6 juin 2008 | Répondre

    Attention, il faut mettre un bémol sur le post “in_array is quite slow” : les 2 codes ne font pas la même chose… (voir dans les commentaires)
    in_array($val, $tbl) teste si la valeur $val est dans $tbl
    isset($tbl[$key]) teste si $key est une clef de $tbl

Commentaires

RSS des commentaires pour ce post