A Web Development Blog Focused on Code and Technology
Archive for June, 2010
By Karthik Viswanathan on Friday, June 25th, 2010 | 1 Comment »
The folks at DZone provide a great way for developers to share links in one, concentrated area. URLs which rank highly in their system (those that receive many “up” votes) often get quite a bit of traffic. As a result, many developers use the DZone button to provide their visitors a way to rate articles directly from their own website.
Today we’re introducing a new type of post at Lateral Code: the simple snippet. These articles are meant to provide you with concise, meaningful snippets of code for use on your website. To kickoff off the simple snippet, we begin with an important topic for any site: backups.
Have you ever lost important files? If you have, you know the importance of keeping backups.
Backups could mean the difference between life and death for your site. It’s vital to constantly generate backups and even store them on a remote machine in order to ensure full protection. All it takes is a determined attacker to possibly corrupt all of your files. As a result, this simple snippet is focused on getting you started with the backup process.
Colors are a vital part of web design. They can easily make or break a design. Often times, designers are interested in modifying colors by mixing, fading, or brightening them. This will be the basis for today’s article.
We’re going to go through the process of creating a simple color manager with object-oriented PHP. Rather than focusing on multiple forms of modification, our color manager will perform one basic function: fading. Given a base color (hexadecimal) and a fade percentage, we will calculate a new, faded color.
When working with databases, it is sometimes necessary to store an array in a MySQL field. Unfortunately, there is no way to directly pass in an array as a parameter. As a result, storing these data structures is a bit more complex, but by no means hard or impossible.