Wednesday, November 29, 2006

Your Custom Search Engine

It's easy to build a CSE -- no Ph.D. in computer science required. Here's how it works:
  1. Visit http://www.google.com/coop/cse/ and select the websites you'd like to include in your search index.
  2. Then choose to restrict search results to include only those pages and sites, or you can give those pages and sites higher priority and ranking within the larger Google index when people search on your search engine.
  3. From the CSE site, you can generate the code to place on your site and make the search engine, through an IFRAME, look and feel like your own. If you choose, you can easily link to your current AdSense account so you have a centralized place to manage your Google AdSense relationships.
  4. Last but certainly not least, you can invite members of your community to contribute to your search engine index, in real time. Simply enter email addresses of people you'd like to contribute and an invitation along with Google Marker will be sent to your invitees.

You can check out a few more CSEs in action by visiting our featured examples page. You'll see some created by industry experts, bloggers, educators and techies. We're continuing to add customization and advanced features to the CSE too. We hope you'll try it out and let us know what you think.

Get more information

Can't find what you're looking for? Try Google Search!
Google
 
Web eshwar123.blogspot.com

Monday, November 27, 2006

Working with .htaccess files

.htaccess files provides us with ways to make configuration changes on a per-directory basis. This file works well in Apache Web Server and on Linux/Unix. Also, it works on Windows based system with Apache Web server.

There are several things that developers, site owners and webmasters can do by using .htaccess file. Let’s look at some of them:

  • Prevent directory browsing
  • Redirect visitors from one page or directory to another
  • Password protection for directories
  • Change the default index page of a directory
  • Prevent hot-linking of images from your website

Since .htaccess file allows us to make changes on a per-directory basis, the following are valid places to put the .htaccess file in:

/.htaccess [placing in root folder of the site]
/content/.htaccess [placing in content folder]
/content/html/images/.htaccess [in the images folder]

:idea: Any command that you place in .htaccess file will affect it’s current directory where it is placed and also it’s sub-directories. You may put a .htaccess file in the root folder such that it will affect the whole site.

:idea: Make a backup of your .htaccess file [if you have any] before you attempt any of the settings mentioned in this article. I must not be held responsible for any consequences that arises due to editing your .htaccess file. ;)

Working with .htaccess files

For creating and editing purpose, a normal text editor such as notepad will do. Alternatively, you can download a free copy of PSPad for easy editing. To be able to see files in your FTP software, you must enable settings in your FTP client to see hidden files on the remote server [applicable to your system as well]. When done editing, you can save the file with double quotes in windows. [Save file as “.htaccess”]. This will save the file as .htaccess and will not prompt you for a file name as such. I think you have quite understood these instructions. Let’s move on to some common examples and usages of .htaccess file.

Allow/Deny Directory browsing

With directory browsing on, people when open a URL from your site with no index page or no pages at all, will see all it’s files and folders. To prevent such directory viewing, just place the following line in your .htaccess file.

IndexIgnore */*

Many hosting companies, by default deny directory browsing and having said that, just in case you need to enable directory browsing, place the following line in your .htaccess file.

Options +Indexes

Redirect visitors from one page or directory to another

It’s quite simple. Look at the example lines below and place similar lines in your .htaccess file of the root folder and it will do the rest. [Remember to use permanent keyword in the line to tell the search engines that the old link has moved to the new link]
Syntax: Redirect permanent [old directory or file name][space][new directory or file name]

Redirect permanent /olddirectory /newdirectory
Redirect permanent /olddirectory /somedirectory/newdirectory
Redirect permanent /oldhtmlfile.htm /newhtmlfile.htm
Redirect permanent /oldhtmlfile.htm http://your-domain.com/newhtmlfile.htm

All the above lines are valid. Just remember to replace the file/directory names with actual ones.

Change the default index page of a directory or site

Almost every hosting company will have index.htm, index.html, index.php, index.asp, default.asp, default.html as the default index page names in their web server settings. So, in case your site or directory does not has a file name which matches a name from the list above, chances are that your visitors will either see a list of all the files and folders [through directory browsing] or will not see anything at all. To change the default index page’s name for a directory or the site, place the following line in the .htaccess file of the root folder or the particular directory for which you want to change the index page’s name.

DirectoryIndex homepage.htm
DirectoryIndex somepage.htm

To have more names, put a space between file names and it will take into considerations all those file names as possible index page names. Which means, if it finds a filename matching a list of names you supplied [in the given order] in .htaccess, then it will open that page as the index page for the directory. The below line, with multiple names, is also a valid usage:

DirectoryIndex homapage.html somepage.html myindexpage.html anything.html

:idea: Remember, each entry must be in one line only.

Prevening hot-linking of images from your website

If your website contains images which people from other websites are linking to and you get charged for the extra bandwidth, then placing the following lines will prevent any such image hot-linking. Most of the hosting companies provide this feature in their control panel itself, such as CPanel. This trick requires mod_rewrite engine to be on in Apache on your web server.

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?your-domain.com/.*$ [NC]
RewriteRule .(gif|jpg)$ - [F]

In the above code, replace [your-domain] with your actual domain name [without www]

Prevent access to your .htaccess file

This article would have remained incomplete without mentioning this trick. ;) To prevent visitors from viewing your .htaccess file, place the following lines in your file.

<Files .htaccess>
order allow,deny
deny from all
</Files>

More information and detailed documentation, visit Apache website.

Get more information

Can't find what you're looking for? Try Google Search!
Google
 
Web eshwar123.blogspot.com

Free online virus scanners which run inside web browser

he computer security market is flooded with antivirus software that work but don't come cheap.

While viruses remain a threat to our precious data, you need not necessarily invest in expensive antivirus scanners - there are plenty of free options available that may give even some commercial vendors a run for their money.

We look at some of the best software available today for keeping your computer free of viruses and other malware. Later we help you decide the one most suitable for you.

Free Online Virus Scanners [run inside the web browser to scan your hard drive]

Trend Micro HouseCall - An online virus scanner that's absolutely free and scans your PC hard drive for any sort of viruses or even spyware. HouseCall allows you to remove detected infections. Works with Firefox and IE. Requires Java.

McAfee Freescan - This free virus scanner from McAfee is based on the McAfee VirusScan engine. Should viruses be found, FreeScan prepares a list of infected files and links to information about the viruses on your computer. It also gives you an option to clean your system. Requires IE with ActiveX.

Windows Live OneCare Scanner - A free antivirus online scanner from Microsoft that cleans your system from viruses and also recommends ways to improve the overall performance. Part of Windows Onecare.

Symantec Internet Security - An online virus scanner from the developers of Norton Antivirus 2007 can detect most virus threat but there is no option to delete the virus infected file or repair it. Does not examine compressed files. Requires IE with ActiveX.

BitDefender Online Scanner - Their Free Online Virus Scanner version 8 scans your system's memory, all files, folders and drives' boot sectors - the default options automatically cleans the infected files. Requires IE with ActiveX.

Free Anti Virus Software for Windows [Requires Installation]

Avast! Home Edition - One of the most popular antivirus software, can also be run from Explorer context menu. You can either scan the entire hard drive or selected folders. Ships with an Antivirus screen-saver.

AOL Active Virus - a free virus scanner from AOL based on Kaspersky Antivirus that doesn't require an AOL account to download the software. The software can be configure to check only new and modified files thereby reducing the memory requirements. Also support scanning of incoming and outgoing email messages.

ClamWin Virus Scanner - An opensource antivirus software that is great for running routine antivirus checks on your PC. You need to manually scan a file in order to detect a virus or spyware.

AVG 7.5 Free Antivirus - One of most popular free virus scanning software is AVG 7.5 Free Edition (read comments). Initially, there was confusion whether AVG 7.5 would be free like AVG 7.1 but the good news is that AVG 7.5 Free edition is already available for non-commercial, single home computer use.

Conclusion: Which one should I choose ?

Unlike Desktop antivirus software, online virus scanners do not proactively protect your PC against new virus infections.

But if viruses have already entered your hard drive and taken control of your existing desktop scanner program, any of the above listed online virus-scanning services can save your day.

If you are a fairly experienced web user who doesn't need an antivirus software to run in the background 24 hours, scan you drive at regular intervals using HouseCall. Others may install the AOL antivirus software which uses the Kaspersky virus definitions database.

Get more information

Can't find what you're looking for? Try Google Search!
Google
 
Web eshwar123.blogspot.com

Thursday, November 23, 2006

MVC Architecture in simple words

About MVC

The model-view-controller (MVC) architecture provides a set of design patterns that help you separate the areas of concern involved in building and running a GUI-based application. The model encapsulates the business logic and persistence code for the application. The model should be as view-technology-agnostic as possible. For example, the same model should be usable with a Swing application, a Struts application, or a JSF application. The view should display model objects and contain presentation logic only. There should be no business logic or controller logic in the view. The controller (along with its attending logic) acts as the mediator between the view and the model. The controller talks to the model and delivers model objects to the view to display. In an MVC architecture the controller always selects the next view.

Can't find what you're looking for? Try Google Search!
Google
 
Web eshwar123.blogspot.com

Tuesday, November 21, 2006

Use websearch or blogsearch engine

Well, there are least five differences between Websearch and Blog search engines listed below:

1: A web search engine indexes Blogs, Webpages, Forums, PDFs and even Microsoft Office Documents. Blog Search Engines index only sites that syndicate content as a feed in either RSS or Atom formats.

2. Blog Search Engine bots will index your website as soon as you ping them (or notify them about new content on your blog). Search engines spiders are much more lazy (unless you are a PR8 or PR9 website) Infact, it's not even guaranteed that a search engine would index your site.

3. Since XML feeds supply data in a more structured format to the blog search engine, you can sort blog search results either by date or relevance. In normal web search engines, results are sorted by page relevance since their bots do not know the exact date when the article was written or published on the web.

4. Web Search engines index all parts of your webpage including reader comments, text in the sidebars, etc. On the other hand, most blog search engines index just the text of the blog post that was supplied to them inside the RSS feed. They won't index other elements of the webpage like Archive links, Blogroll, etc.

5. Blog Search engines let you restrict the search to a particular author, something not possible with Web Search.

Summary: Use a blog search engine when you need information about an event that happened just seconds ago like someone smashed his PS3 on the road.

In all other cases, you may prefer using a web search engine.

Get more information

Can't find what you're looking for? Try Google Search!
Google
 
Web eshwar123.blogspot.com

Wednesday, November 15, 2006

Tips on IE6 and IE7

With the release of Internet Explorer 7 the rendering engine of the most widely used browser has changed. Some of our customers reported display issues with our controls. Some of them were bugs in our controls (both in the internal rendering implementation and skins) other were problems with custom defined skins or page layout. In 5 cases out of 10 the problem was due to one of the following reasons:

  1. IE7 no longer accepts CSS attributes starting with underscore. Using underscores was a widely used CSS hack to circumvent rendering issues in IE6. Here is a quick example to illustrate the underscore hack:

    The following CSS rule would be applied in IE6 (the background would be red) but wont be applied in IE7 (background stays white):

    <style>
    .myDiv
    {
    _background-color: red;
    }
    </style>

    <div class=myDiv>Test Content</div>
  2. Width and height are now interpreted according the W3C specification they fix the size of an element and it cannot grow. In IE6 width and height were treated as min-widh and min-height from the W3C specification. In IE6 an element whose width and height properties are set would stretch to accommodate its content (provided the content exceeds the specified dimensions).

You can find here a KB article with more detailed info and screenshots.

Get more information

Can't find what you're looking for? Try Google Search!
Google
 
Web eshwar123.blogspot.com

Tuesday, November 14, 2006

ICEFaces powerful AJaX JSF extension framework

ICEfaces is a profoundly powerful extension framework for JavaServer Faces which provides excellent Ajax integration with no heavy lifting. Implemented as a JSF RenderKit, you can get started with ICEfaces in your JSF apps quickly and easily. That is the beauty of standards-based development, isn't it?

In addition to releasing as open source, ICEsoft has also created ICEfaces.org, a new community site to focus on ICEfaces development. You can download the full ICEfaces package, check out their demos and component showcase, and participate in support forums for the tools.


ICEFaces powerful AJaX JSF extension framework

 

 

 


This is a big day for JSF. I know all eyes are on Sun because of yesterday's news about GPL Java, but trust me that this is also important news which you don't want to overlook. ICEsoft and ICEfaces are very cool, and as open source ICEfaces is more attractive than ever.

Get more information

Can't find what you're looking for? Try Google Search!
Google
 
Web eshwar123.blogspot.com