Products and Services
Find the right tools for your business. Select the right components and build the perfect web site.
Poor vertical align still gets a bad rap. While it probably wouldn't top the list of least used CSS properties (clip may have earned that title), it certainly should get an honorable mention as one of the most avoided and least understood.
I think this is because most coders would expect vertical-align to align an element vertically in its container. Instead it vertically aligns an element in relation to the line-height. For example, #div {vertical-align: middle; } would give us:
I feel like I should have known this but I didn't.
I co-worker gave me the files for a cms to install on my local server recently. I opened the directory with the database files expecting to find a nice fat .sql file but instead found an array or .frm, .MYI and .MYD files.
I recall seeing these before but I had alternatives and never dealt with it. This time I just asked.
When we work as a freelance developer, either alone of with a multidisciplinary team, we can often find ourselves alone in our craft. It is easy to become isolated from the larger community of like developers, be they designers, web programmers, site owners, etc. Fortunately it can be just as easy to keep yourself a part of a community.
When adding in or subtracting seconds, such as when dealing with the number of seconds since epoch, I find it much more readable and useful to multiply the number of seconds in a minute by the number of minutes in an hour by the number of hours in a day and so on until I get the period of time I need.
The twin functions htmlentities() and htmlspecialchars() both do the same basic job. You use them when you are displaying data, especially user input data, to:
Try dropping a series of closing div or table tags in the middle of your page and you will see your layout break in creatively horrifying new ways.
I recently needed to pass a URL in the get string as I redirected a form submission to an external server. The URL had parameters which clearly would have conflicted with the string and would have been perceived as additional parameters of the original string.
http://www.yoursite.com
/page.asp?redirecturl=www.mysite.com
/optin.php?thankyou=1
I was recently presented with the need to select only values that are unique. Shortly after finishing I came across someone asking how to pick off unique entries using SQL. The task is complicated when you consider it in terms of logic but SQL provides the tools to make it surprisingly simple.
SELECT `column`
FROM `table`
GROUP BY `column`
HAVING (
COUNT( `column`) =1
)
Let's say you were using the test data below:
A partner of mine recently sent me an email intended for a client of his from his side business. I avoided looking at the details once I suspected it was a mistake but it was a lengthy conversation thread several emails long full of conversation about business deals and pricing. This of course got me thinking about how secure we should really feel about email.
One of the more useful tools in SQL especially for drawing up reports but by no means limited to this purpose, is the use of sub-queries and [NOT] EXISTS.
I commonly find IF NOT EXISTS used for INSERT statements to avoid overwriting existing data but this type of statement and use is very different.
You can determine if a value never occurs in a record set or you can very quickly and simply find out of a value does indeed occur.
To find if there are orphan products not assigned to a category:
The relationship you have with your client or your developer determines to a large extent the quality of the resulting project.
I am convinced of this.
I have seen many projects developed where the relationship was minimal and the feedback and input from both parties was empty or unidirectional and the results were always lackluster. Whenever the relationship was vibrant and based on mutual respect or even admiration, then the results were not only beyond what either party had produced int he past, but also rewarding.