I went for an Interview and there interviewer asked me few questions. I disagreed on two questions and their answers. According to interviewer, it is must to use parenthesis while initializing class( new className()), but I said if it requires parameters then it is essential otherwise it is not. After… (Continue)
WordPress is having magic hidden behind it. Few magics are related to <script> and <style> tags. Today I have tried both style and script tag. I was aware of problem in style or script but did not remember where it is.
When I have entered <style> tag with some styles… (Continue)
I was looking for getting all words in uppercase in HTML text using Regex. After solving through Googling and trial and error, I thought to extend the code to return all lowercase words too.
It is a flexible regex code because it is written in three parts. For stripping HTML,… (Continue)
Here is a quick post. It is a product created from a play with YQL (Yahoo Query Language). YQL is very powerful in scrapping HTML from any page on web. Yahoo YQL and Yahoo Pipes are very powerful tool. Yahoo pipes is very good for merging Feed.
This YQL play… (Continue)
Before going into the details syntax of using Callbacks in PHP, we need a use case where we can use callbacks. Many PHP build-in functions uses callback function and then we need to just pass our callbacks. WordPress also accepts callback at many places.
Here the example presented gives us… (Continue)
PHP 5 has many XML extensions. Each one has its own advantages and disadvantages. Which one to select for our task. Suppose you know some XML techniques and can dive into the XML extension whichever is suitable then you first need to know all the available extensions.
I tried to… (Continue)
Google has announced new API for Custom Search. It is currently in Labs. It is always confusing for me to what API is for what use. Google has lots of search API for different usage. Google already has this API for Custom Search.
[This code has been committed to GitHub.]… (Continue)
This is another post regarding design patterns. This time it is observer design pattern which is helpful in developing system having plugin facility and subscription based services. I will present example in PHP for Observer design pattern which is taken from Aaron Saray’s Professional PHP Design Patterns book on design… (Continue)
I was using 1.3.2 version of jQuery on this blog using Google CDN URL: http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js?ver=1.3.2. First this is not very good URL in the sense that few proxy is not good in caching the URLs with parameter. One example is squid. I am not sure about the current version of… (Continue)