One of the new features in IE9 is the support for the JPEG-XR format, which reportedly has a better compression. Is it something we should dive into ASAP? JPEG-XR The wikipedia article is here. This format is developed and patented (red flag!) by Microsoft (yellow flag! ), it replaces the suggested JPEG-2000 format and is […]
Archive for the 'PEAR' Category
2010 update: Lo, the Web Performance Advent Calendar hath moved Dec 11 This post is part of the 2009 performance advent calendar experiment. Stay tuned for the next articles. After removing all the extra HTTP requests you possibly can from your waterfall, it’s time to make sure that those that are left are as small […]
Just noticed there have been some changes on the PEAR site. Check it out – no nav menu on the left, spacier for the main content… http://pear.php.net/
In today’s busy schedules there’s less and less time to give love to our favorite open source projects. Luckily though, there’s January 1st when you’re supposed to relax (or suffer the consequences of partying on Dec 31st). Anyway, today I found the time to fix two bugs in Text_Highlighter and also include the patch from […]
» Download here This is my first PEAR release and I was actually surprised how easy it is to package and roll out a release. So you have your local copy of the CVS repository that contains the scripts you want to release as part of the package. In order to release, you need package.xml, […]
If you use PEAR::MDB2, you can set a custom debug handler and collect all the queries you execute for debugging and performance tunning purposes, as shown before. But what if you’re using PEAR::DB? Well, since PEAR::DB doesn’t allow you such a functionality out of the box, you can hack it a bit to get similar […]
Through a trackback I found out that Walter Cruz has translated my DB-2-MDB2 article in a language I was led to believe is Brazilian Portuguese. the announcement the article Thanks very much Walter, this is very flattering! Thanks to my buddy Isidoro who enlightened me that the language was Portugeese!
What could possibly be better for a writer’s ego other than being read and being praised? Hmm… So I wanted to have a page that shows the books I’ve written, together with their Amazon sales rank and the average customer rating and number of reviews. It’s really easy. I took one example out of the […]
This is a follow up to a question posted by Sam in my DB-2-MDB2 post. The question was if you can reuse an exisitng database connection you’ve already established and not have MDB2 creating a second connection.
Today I saw a post at digg.com on image resizing with PHP and there was quite a discussion. Let me share the laziest way (that I know of) how to do it – PEAR::Image_Transform is all it takes. Here goes: <?php require_once ‘Image/Transform.php'; $i =& Image_Transform::factory(”); $i->load(‘test.jpg’); $i->fit(100,100); $i->save(‘resized.png’, ‘png’); ?> In addition, the Image_Transform […]
This is a follow-up to Lars’ comment about the PEAR book. In the MDB2 chapter I showed an example how you can create custom debug handlers in MDB2 and then gave a suggestion about a useful application of this functionality for performance tuning. Basically the idea is that your custom debug handler collects all queries […]
So what I’ve been up to recently? Having a bit of a break, I guess. First, I’m not currently writing a book, after the last one for which I completed my chapter back in June. That’s some free time (There is a very exciting book project on the horizon though, we’ll see). Then, I’m not […]
Text_Highlighter is one of my favourite PEAR packages, seems like I’m addicted to highlighting source code. After adding BB code and simple HTML renderers and an ABAP code syntax definition, today I played with adding a JSON renderer. Useful in case you want to get highlighted source code in your new shiny AJAX app. Array […]
In case you’ve missed it – the PEAR book hit the streets! The exact title is “PHP Programming with PEAR” and it’s co-written by Stephan Schmidt, Carsten Lucke, Aaron Wormus and yours truly. Aaron also put up a Wiki for book and PEAR-related updates, it’s at thepearbook.com I tried to put up a list of […]
Just finished and eager to share – I added a new syntax definition to the Text_Highlighter PEAR package (see also here). It’s for highlighting code written in the SAP’s own ABAP programming language. A live demo is available at the hiliteme.com site, just pick ABAP from the drop-down of programming languages. Any feedback is appreciated, […]
Here’s the link to publisher’s page dedicated to the PHP Programming with PEAR. Guess who wrote the chapter for MDB2? It’s an honour to me to be in the company of the other authors, people who have done a lot for the PEAR community: Stephan Schmidt Aaron Wormus Carsten Lucke Here’s what the book is […]
Following from here, I’m proud to announce an update to HiLiteMe.com. With two custom renderers for Text_Highlighter, the service now offers you: – BB code for your source, so you can post beautiful code to bulletin boards and others that use BB code for formatting – simple HTML code – the formatting is using only […]
In case someone is wondering how do I highlight the code I post on this blog … well, the lazy way. I don’t. Some time ago I setup a free service, hiliteme.com to do it for me, then I just copy/paste the generated code. It’s far from the best solution, but it’s definitelly the laziest, […]
PEAR::Auth is a package that allows you to abstract the user authentication from the main part of your application and not worry about it. What is good about the package is that it comes with different “containers” that allows you to authenticate users against different storages, I mean you can store users data in a […]
Here’s a little something I did to make it a bit easier to write API docs in TextPad, it’s a clip library to save some typing when writing comments in the phpDoc format. I submitted it to the TextPad team, so at some point it will probably appear in the downloads section, but meanwhile you […]
I’m currently on a vacation in my native land Bulgaria, the party’s on (and so the soccer World Cup finals) so It wuould be quiet around here for a while. Meanwhile I’ve disabled comments, trackbacks and pingbacks, I appologize, it’s just that I’m receiving a lot of spam and since I don’t have the time […]
Recently I had to move an existing project from using PEAR::DB to PEAR::MDB2 – the new database abstraction layer. I took notes on the parts of the code I needed to change, I hope they can benefit someone who’s doing the same.
How to use GD lib to adjust brightness, contrast, gamma, to create a negative, noisy or grayscale image. And some more… The code provided in the posting is easy to extend with your own experiments.