Target IE6 and IE7 Browsers without Conditional Comments

Need to target IE browsers? Here is a quick hack that doesn’t require conditional comments (note that your CSS will therefore not pass auto-validation, which is fine if you are aware of why it doesn’t).

The code below will change the background-color of divs depending on what browser the user is viewing the web page under. Since * cascades down to IE7 and below, we use _ after that declaration so that IE6 (and below) has a different background colour from IE7.

div {
    background-color: #999; /* all browsers */
    *background-color: #ccc; /* add a * before the property - IE7 and below */
    _background-color: #000; /* add a _ before the property - IE6 and below */
}
Advertisements

Adding close link to flash messages

The flash provides a way to pass temporary objects between actions. Anything you place in the flash will be exposed to the very next action and then cleared out. This is a great way of doing notices and alerts, such as a create action that sets flash[:notice] = "Successfully created" before redirecting to a display action that can then expose the flash to its template. Actually, that exposure is automatically done. But not closing or removing and that flash message will be there till the view is refreshed or a new action is served. [Read more..]

Transform you XP desktop to look like Vista

Bring innovation into your work without buying a new PC or a system. The best freeware safely installed. So if you want to make your computer get a modern Vista look, this is the perfect solution. The package includes: Yahoo widgets – a lot of small and beautiful assistants. Anything you could only imagine on your desktop – from PC temperature to mini games; Vista Theme – a special theme developed by Microsoft which transforms Windows XP into Windows Vista; Vista Start Menu – modifies not only menu’s skin but also its functionality. Learn how a convenient menu looks like. The items of the package 1.2 may include unspecified updates, enhancements, or bug fixes.

Download

Top 10 Tips For Database Design

The following are some of the tips that can help ensure that databases created that can be easily exported and manipulated with the minimum of difficulties.

  1. Develop A Prototype – Significant time can be saved by creating the structure in a simple desktop database (such as Microsoft Access) before finalising the design in one of the enterprise databases. The developer will be able to recognise simple faults and makes changes more rapidly than would be possible at a later date.
  2. Split database structure into multiple tables – Unlike paper-based structures, databases do not require the storage of all fields in a single table. For large databases it is useful to split essential information into multiple tables. Before creating a database, ensure that the data has been normalised to avoid duplication.
  3. Use understandable field names – The developer should avoid field names that are not instantly recognisable. Acronyms or internal references will confuse users and future developers who are not completely familiar with the database.
  4. Avoid illegal file names – It is considered good practice to avoid exotic characters in file or field names. Exotic characters would include ampersands, percentages, asterisks, brackets and quotation marks. You should also avoid spaces in field and table names.
  5. Ensure Consistency – Remain consistent with data entry. If including title (Mr, Miss, etc.) include it for all records. Similarly, if you have established that house number and address belong in different fields, always split them.
  6. Avoid blank fields – Blank fields can cause problems when interpreting the data at a later date. Does it mean that you have no information, or you have forgotten to enter the information? If information is unavailable it is better to provide a standard response (e.g. unknown).
  7. Use standard descriptors for date and time – Date and time can be easily confused when exporting database fields in a text file. A date that reads ‘12/04/2003’ can have two meanings, referring to April 12th or December 4th, 2003. To avoid ambiguity always enter and store dates with a four-digit century and times of day using the 24hr clock. The ISO format (yyyy-mm-dd) is useful for absolute clarity, particularly when mixing databases at a later date.
  8. Use currency fields if appropriate – Currency data types are designed for modern decimal currencies and can cause problems when handling old style currency systems, such as Britain’s currency system prior to 1971 that divided currency into pounds, shillings and pence.
  9. Avoid proprietary extensions – Care should be taken when using proprietary extensions, as their use will tie your database to a particular software package. Examples of proprietary extensions include the user interface and application-specific commands.
  10. Avoid the use of field dividers – Commas, quotation marks and semi-colons are all used as methods of separating fields when databases are exported to a plain text file and subsequently re-imported into another database. When entering data into a database you should choose an alternative character that represents these characters.

And DAMN it’s been a long time since I’ve put something here. I’m not forgetting about the site… just the new job has been taking quite a bit of time out of my leisure activities, this website is one of them. I made quick work of the dozens of spams that got through the filter and updated WordPress.

Also, another problem is I have started using Linux. I’ve been running a mix of Linux and XP at home lately to get a feel of the environment and hope to shift entirely to Linux on the day.

Let’s hope that the next post isn’t so far out. In fact, I promise the next thing I write will be sooner rather than later. 😉

Automate and extend Firefox with the Chickenfoot add-on

Tony Patton in his article on Chickenfoot speaks about manipulating the DOM of a webpage through which you can give additional features to a web page.

Chickenfoot is a Firefox add-on that allows you to automate user actions within the browser environment. It also lets you extend the browser interface to provide additional features to a Web page.

Before I delve into how this add-on can make your Web development work easier, I thought I’d take a moment to share the answer to the question I bet you’re asking yourself (I know I was): Why is it called Chickenfoot? Here is the answer from the Chickenfoot site:

“Chickenfoot is a game that you can play with dominoes. Since Chickenfoot does much of its work by manipulating the Document Object Model, or DOM, of a web page, Chickenfoot the Firefox extension is like a toy that lets you play with the DOMinoes of the web.”

Access the full article here

Chickenfoot is available as a free download. When you click the downloaded file, Chickenfoot is installed via the Firefox Add-ons dialog box. After installation, it is available as a sidebar selection (View | Sidebar). After you enable the sidebar, Chickenfoot appears on the left side of the browser adjacent to where pages load.

The top portion of the Chickenfoot sidebar contains a JavaScript editor that allows you to enter JavaScript as you would within a Web page. In addition, you can enter commands from the JavaScript superset that is part of Chickenfoot.

You may enter multiple code windows within the JavaScript editor. There are buttons at the top of the JavaScript editor that you can use to open/save scripts, create new scripts, and execute and stop scripts.

For more information about Chickenfoot scripts, check out the Chickenfoot Script Repository.

best ways to handle a job interview

!– @page { size: 21cm 29.7cm; margin: 2cm } P { margin-bottom: 0.21cm } –>

Given the current economy, maintaining contacts with other companies can be critical. Knowing the right people can help you land a better job, one with more pay or perhaps the chance of advancement. But getting that next job, of course, often involves an interview. Here are some tips to help you excel.

  1. Be on time

Give yourself enough time to reach your destination, especially if you’re unfamiliar with the area. You will have enough stress with respect to the actual interview. Don’t add to it by complicating your travel to there. Consider a dry run prior to interview day, especially if you’re driving. Remember that mapping and navigational services could take you (as they did me) through an empty field or the wrong way on a one-way street.One such site is btis.

Don’t get there too early, either. Doing so makes you look as though you have no other job and could hurt you later during salary negotiations. Plan to arrive between 10 to 20 minutes before your time. If you really do get there on the early side, consider joking with the receptionist or your interviewer about your surprise or “anger” over the lack of traffic. Then get serious and say that all you need is a place to sit down, because you have work you can do while you wait.

  1. Occupy yourself while waiting

Do bring work with you, so you can do it. There’s always another e-mail or memo to write, or a chance to review your to-do list or project plan. You even could start on the thank-you note to your interviewer(s).

Whatever you do, don’t look up every time someone passes by. Doing so makes you look weak and anxious.

  1. Research the company

Don’t worry if people call you a creeper or a stalker because you’re researching the company. My daughters call me that all the time, but I don’t let it stop me. Take time to find out about challenges and problems that company is facing. The simplest method is simply to do a Google search. If the company is publicly traded, you can get additional information from financial sites, such as finance.yahoo.com or money.com.

  1. Tie your answers to the issues the company/ interviewer is facing

Once you have background information of the company and any problems they are facing, try to tie that information to the work you’ve done. If you can come up with solutions based on work you’ve already done, you may make a great impression. You will have shown resourcefulness and initiative in doing research, and then demonstrated the value you can bring to the company.

  1. Be energetic but no desperate

There’s a fine line between being energetic and being desperate. Show that you’re interested in the job, but don’t be so interested that the interviewer thinks that this interview is your only one — even if it is. On the other hand, being “coy” can be a good approach, because if the interviewer likes you, he or she might do more to attract you to that company. However, being too coy might come across as aloofness and turn off the interviewer.

The best approach is to have a restrained enthusiasm. Even better, take your cues from the interviewer. If that person is quiet and reserved, you might want to adopt if you can that demeanor. If he or she is more outgoing, you could consider emulating that manner.

  1. Don’t badmouth current/ former employer

Speaking ill of a former employer, no matter how bad your relationship, could come back to haunt you. Even if the interviewer asks you what you disliked about your former boss, refuse to take the bait. You can speak about things you learned, even if the context is different from what the interviewer might be thinking.

Let’s say your former boss publicly humiliated subordinates, and that his doing so damaged morale. You could say, for example, “I learned a lot from my former boss about how to motivate people.” Did your boss often fail to keep commitments? You could say, “I learned from my boss about the importance of keeping commitments, because breaking them hurts a project and damages one’s reputation.”

  1. Send a thank-you note afterward

After the interview, take the time and send a “real” (not electronic) note to your interviewer. I know it means more time, expense and trouble than an e-mail, but sending a note can make you stand out from any competition you might have. In that note, re-emphasize the points you made, plus any others that might have occurred since that time.

Things you should do to protect yourself on a public computer

Most of us will occasionally have to use a public computer for one reason or another. Maybe it’s an emergency situation (your own computer crashes or you get caught without your laptop when traveling) or perhaps the opportunity is just too convenient to pass up. Whatever your reasons, using public computers will always carry an inherent risk of exposing your personal data. Luckily, there are some things you can do to protect yourself and lessen that risk.

Delete your Browsing History

This should be the first step you take to protect your privacy when Web surfing on a public computer. When you’ve finished browsing, it’s a good idea to delete your cookies, form data, history, and temporary Internet files. In Internet Explorer 7, you can do this all at once under Tools | Delete Browsing History. In older versions of IE, each of these must be deleted separately, under Tools | Internet Options.

In Mozilla Firefox, go to Tools | Options, click the Privacy tab, and select Always Clear My Private Data When I Close Firefox. By default, this erases your browsing history, download history, saved form information, cache, and authenticated sessions. Click the Settings button and select the options to erase your cookies and saved passwords, too.

Don’t save files locally

When you’re using a computer other than your own, even if it’s a trusted friend’s machine, it’s polite to avoid saving files locally if you can help it. This is basically equivalent to not cluttering up another person’s home with your junk. On a public machine, though, this goes beyond politeness and is an important security practice. Many of the files you would normally save locally, such as e-mail attachments, can contain private or sensitive information. An easy way to protect this data is to carry a flash drive and save files there when necessary. It’s also a good idea to attach the flash drive to your key ring so you’ll be less likely to misplace it and create a new security problem.

Don’t save passwords

This should be obvious when using a public computer, but if the option is already turned on, you might forget about it. To make sure passwords are not saved in Internet Explorer 7, go to Tools | Internet Options | Content. In the AutoComplete panel, click the Settings button and verify that the Prompt Me To Save Passwords check box is deselected. None of the other AutoComplete features needs to be enabled either, so deselect them as well. In Firefox, choose Tools | Options | Security and deselect Remember Passwords For Sites.

Delete temporary files

Temporary files (often abbreviated to “temp files”), as opposed to temporary Internet files, are created when you use programs other than a Web browser. For instance, when you create a Word document, in addition to the actual document file you save, Word creates a temporary file to store information so memory can be freed for other purposes and to prevent data loss in the file-saving process.

These files are usually supposed to be deleted automatically when the program is closed or during a system reboot, but unfortunately they often aren’t. To find these files, do a search on all local drives (including subfolders, hidden, and system files) for *.tmp,*.chk,~*.* This will bring up all files beginning with a tilde or with the extensions .tmp and .chk, which are the most common temp files. Once the search is complete, highlight all and Shift + Delete to remove them. (If you don’t hold down Shift, they’ll usually be sent to the Recycle Bin, which you would then have to empty.)

Clear the pagefile

The pagefile is the location on the hard disk that serves as virtual memory in Windows. Its purpose is to swap out data from RAM so that programs can operate as if they have more RAM available than you actually have installed in the computer. Anything that can be stored in memory could also be stored in the pagefile. To have this automatically cleared on shutdown, you need to use Local Security Policy.

To access Local Security Policy, open Control Panel, double-click on Administrative Tools, and double-click on Local Security Policy. Then, click Security Options in the right-hand pane and scroll down to Shutdown: Clear Virtual Memory Pagefile. Double-click that item and make sure it’s enabled.

Note: On many public machines you won’t have the rights to get to Local Security Policy, and while this task can also be accomplished from the registry, on these machines you likely won’t be able to use regedit either. In this case, you can delete the page file manually. First you’ll have to change the settings in Windows Explorer. Click View | Folder Options and the View tab, then scroll down and click Show Hidden Files And Folders. Deselect the Hide Protected Operating System Files check box. Now, find the file named pagefile.sys. It is usually (but not always) on the C: drive. Delete it; a new one will be created when the system reboots.

Reboot

When you’re finished using the public computer, the final thing you should do is a hard reboot. This will not only clear the pagefile, if you’ve enabled that option, but it will also clear out everything you did from the physical memory (RAM).

Boot from another device

This is a fairly advanced option, and one that is often overlooked. If you boot from either your own USB drive or from a CD, many of the problems mentioned above can be avoided. Today, many Linux distributions have the option of running completely in memory after booting from a CD. If a public computer has had its BIOS options left at default (which happens more often than you would think), this could be an option. If you are able to do this and remember not to save any other files to the local hard drive, everything will be gone when you reboot.

Pay attention to your surroundings and use common sense

Finally, you need to remember to pay attention to things outside of the actual computer that could be a risk. Be aware of strangers around you (potential shoulder surfers) and remember that a public computer is just that — public. Don’t view any truly sensitive documents you couldn’t bear for others to see. Remember the security camera over your shoulder. Cover your hands from view when entering any login information to prevent any casual spying.

Most important, remember that there is nothing you can do to make a public computer completely secure. A truly malicious owner or user could install a hardware keystroke logger that would be impossible to detect without actually opening the case and inspecting it. With that less-than-comforting thought, use common sense and use public computers only for nonsensitive tasks.

References:

TechRepublic