I wrote an article how queues can speed up your application and make your users happier.
Queues are everywhere. When you delete a photo on your iPhone, it goes to the Bin and will be deleted from there after 30 days. That is a queue. Without it you will not be able to recover a picture removed by mistake.
Several years ago I created PHP class Quick_CSV_Import to import CSV files to a database table very quickly (LOAD DATA INFILE statement). I found that the class became quite popular in India due to feedback received :]
Now I want to share a little application on the basis of that class.
“Quick CSV Import with Mapping” is a PHP example application that imports CSV file to a database table with visual mapping of CSV columns to table columns.
Of course, you can get a copy of the application source – just go to the SVN repository.
Don’t forget to send me your feedback and donations ;]
P.S. If you are having problems with going to step 2 while using the app, try the following:
Open Quick_CSV_import.class and find “LOAD DATA INFILE“
change it to “LOAD DATA LOCAL INFILE“
It’s connected with permissions at your Linux server. Thanks to Noel for the solution.
Once upon a time I took a look at my Google Analytics account and found out that phpclasses.org is 5th source medium for two my blogs (this one and my russian blog).
I have 8 classes submitted. Calculation shows that 7% of my blogs visitors are my classes downloaders and viewers for all the time my classes and blogs exist, and 11% – for last week.
Take into account, that
I get these people to me without any move – I have just placed the links once.
in-bound links improve Google PageRank
count of links is limited only by your imagination ;]
To check that all my classes have all needed links in “Related links” section, I wrote a PHP script that adds a link if it’s not present on your class page. It was written fast so there not so much error checks; to use it, just
type your login/pass,
list IDs of your classes and
define the list of links to be placed in “Related links” section of every class page.
Script supports more than one login/pass pair. If such link is already present, it will be skipped. CURL is required for your PHP server.
Another my class has become a winner of PHP Classes Innovation Award – it’s the implementation of Binary Search algorithm. Yes, it’s the algorithm we all know from university – it’s strange for me, that it was considered as innovative.
I wrote this class as a test task while an interview for a new job. Results were so impressive for me, that I decided to share this piece of code: it finds result in 10Gb file for less than 5 seconds! File must contain key/value pairs (separator can be defined, by default it’s equal sign), and these pairs are sorted by keys. You define what key to search and get correspondent value very quickly.
If you search “Sandy”, you’ll get result “8”. Very quick :]
As a prize I selected an Apress book called “From Program to Product” – though I found it in PDF, it seems to be quite insightfull for me: we, developers, always think about code, and never about how to sell it. I have several product ideas, so I hope the book would help me to succeed.
P.S. Fun is that a few people emailed me to say how nice my new PHP Classes avatar is :] Thanks to Anton Dovgal for such a great picture of sad me.