Add a custom search engine to your site using PHP and MySQL

Search is an integral of all websites. Most of the current WordPress an other sites use a built-in search capability or rely on Google custom search. However, many a times you will want to add your own search engine which you can yourself control. This can be particularity useful if you have a small intranet. In this post we will see how to integrate a small PHP search engine into any website to add custom search capabilities.
(more…)

Read More

Display line and area charts in PHP and MySQL

Most data in any web application is usually sourced from a database. Usually some data transformation is required before we can visualize the required data. Most programmers however wanting to display visualizations or charts shy away from the task as there are a number of intermediate steps required to display the visualization. Morris charts however makes the task easier. We only need to directly pass the MySQL queried rows to the Morris charts javascript and we are done. Morris Charts is one of my favorite tools to display dashboard visualization on the web.
(more…)

Read More

SQL like query on CSV and other tabular data

CSV files are ubiquitous in the programming world and most data interchange is done using the CSV format. One problem however is that you cannot quickly check for certain rows depending on a particular field criteria. As an example, say you need to find all the rows from a CSV file that has a particular value in a field. The most probable path would be to import the CSV in a spreadsheet and then process it to find the particular information.

In this post we will look into a command-line tool that allows you to query CSV data with SQL like syntax. q – Text as Data is a command line tool that allows direct execution of SQL-like queries on CSVs/TSVs (and any other tabular text files). You can look at q as a meta-tool which provides access to all the data-related tools that SQL provides (e.g. expressions, ordering, grouping, aggregation etc.), but on tabular data files.
(more…)

Read More

3 tools to increase your web design productivity

Gone are the days when designing a site entailed starting from scratch with html and css. Now we have tools that take away the grunt work out of designing boilerplate code and other miscellaneous work, and lets you focus on what really matters, the end product. Below are a few good tools that will help you in designing and prototyping web and mobile products, whether working as a team or as a lone ranger.
(more…)

Read More

Using a mobile accelerometer to enhance web app UI

A accelerometer is one of the important sensors in mobiles. This sensor along with a gyroscope is essentially used by most mobiles games to detect motion in 3 dimensions whenever a mobile is moved or shaken. Although common with mobiles applications, web applications seldom use the features provided by these sensors. With some ingenuity we can use these sensors to enhance the user experience of a web app on a mobile device without much effort.
(more…)

Read More