[How-To] Flush DNS Cache

If you are a developer who often has to test same application deployed on different servers, the various options you have are

1.) Modify your HOSTS file to point to a new IP. You can learn more about modifying HOSTS file by reading previous posts on HOSTS file ( Microsoft Windows: More fun with the HOSTS file and Block Websites of your choice without any Software)

2.) Modify the DNS Entry of your Website. This is useful if you have testers who are not technically savvy doing the testing. In such a scenario all you need to do is modify the DNS entry and the new IP is reflected as soon as the change happens.

However, if you are having issues with the DNS IP Resolution and if even after a change on your DNS Server, the new IP is not getting reflected, its time to Flush the DNS Cache. 

DNS Resolution of My Website is Cached? How can i Clear this Cache?

Follow the Steps below

1.) In your windows machine, open the command window by going through Start –>Run and type Cmd.

Initiate the command window

Image: Initiate the command window

2.) At the Command Prompt, type ipconfig /flushdns as shown below in the figure.

Flush out DNS Cache

Image: Flush out DNS Cache

3.) Your DNS Cache is now flushed. What this means is, that your computer will now make a new request to your DNS Server for getting the IP Address. 

The above listed trick lets you flush the DNS Cache from the local resolver of your computer. However, the DNS Entry might still be cached at the DNS Server. 

How Can i Stop the Local DNS Resolver from Caching at All?

Yes. If you make frequent changes to your IP Address and would like to keep the DNS Cache Resolver away from Caching the entries, you can stop the service by typing net stop dnscache at the command prompt.

In order to start the service again, type net start dnscache.

Starting and Stopping the DNS Local Resolver Caching.

Image: Starting and Stopping the DNS Local Resolver Caching.

You can even tweak Windows Registry to modify the DNS Caching behaviour

You can modify the behavior of the Microsoft Windows DNS caching algorithm by setting two registry entries in the

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters registry key.

The MaxCacheTtl represents the maximum time that the results of a DNS lookup will be cached. The default value is 86,400 seconds. If you set this value to 1, DNS entries will only be cashed for a single second. MaxCacheTtl needs to be a new DWORD.

MaxNegativeCacheTtl represents the maximim time that the results of a failed DNS lookup will be cached. The default value is 900 seconds. If you set this value to 0, failed DNS lookups will not be cached. MaxNegativeCacheTtl needs to be a new DWORD.

How Do I Flush DNS Cache in Linux?

In Linux, DNS Cache is managed by a service called nscd. To restart the nscd daemon, use the command `/etc/init.d/nscd restart`.

 

You can follow me on Twitter at http://twitter.com/vaibhav1981

Do stay tuned to Technofriends for more, one of the best ways of doing so is by subscribing to our feeds. You can subscribe to Technofriends feed by clicking here.


JCrop gives you Powerful image cropping feature using JQuery

If you are someone who is looking for Image cropping functionality in your web application, try considering JCrop. Jcrop is the quick and easy way to add image cropping functionality to your web application. It combines the ease-of-use of a typical jQuery plugin with a powerful cross-platform DHTML cropping engine that is faithful to familiar desktop graphics applications. Best of all, JCrop also features clean, well-organized code that works well across most modern web browsers.

JCrop

JCrop

JCrop Feature Overview

  • Attaches unobtrusively to any image
  • Supports aspect ratio locking
  • Supports minSize/maxSize setting
  • Callbacks for selection done, or while moving
  • Keyboard support for nudging selection
  • API features to create interactivity, including animation
  • Support for CSS styling

Cross-platform Compatibility

  • Firefox 3
  • Safari 3
  • Opera 9.5
  • Google Chrome 0.2.x
  • Internet Explorer 6+

Download JCrop from here.

How Do I Get Started with JQuery?

Its simple. All you need to do is download JQuery from here. Place the relevant libraries on your webserver so that you can request them from your application. Also, importantly, ensure that you have  jQuery installed and included.

In the page <head> you’ll need to load the requisite files. That includes:

  • jQuery library
  • Jcrop Javascript
  • Jcrop CSS stylesheet

It should look something like this:

<script src="js/jquery.pack.js"></script>
<script src="js/jquery.Jcrop.pack.js"></script>
<link rel="stylesheet" href="css/jquery.Jcrop.css" type="text/css" />

Please note: These are only example paths, you probably will need to adjust them when you actually use them, to match the location of the files on your server. Jcrop will not function properly if you don’t.

Invocation

Let’s suppose we have this image our markup:

<img src="flowers.jpg" id="cropbox" />

To convert this into a Jcrop widget, insert the following script:

<script language="Javascript">
    jQuery(function() {
        jQuery('#cropbox').Jcrop();
    });
</script>

Jcrop’s default behavior is activated. Since there are no event handlers attached, it won’t do anything cool, but you can see how easy it is to implement Jcrop into your page.

You can follow me on Twitter at http://twitter.com/vaibhav1981

Do stay tuned to Technofriends for more, one of the best ways of doing so is by subscribing to our feeds. You can subscribe to Technofriends feed by clicking here.

[How-To] Add Custom Watermark to your images with PicMarkr.

You already know about the various services from where you can get Free images for your Blog. However, if you are someone who wants to watermark his images for various reasons; PickMarkr is the service to go for.

PicMarkr is a free to use service which can be used to apply Watermark your images and download them for usage for free.

PicMarkr

PicMarkr

In order to watermark your images, follow the steps below

 

Steps for Watermarking Images

Steps for Watermarking Images

1.) Upload Photos you wish to Watermark.

2.) Choose the Watermark to be applied. You can choose from Text, Image or Tiled options.

3.) Get your Watermarked images. 

What are some interesting features about PicMarkr?

  • You can either upload your pictures or grab them from your Flickr account.
  • Apply Watermark and process multiple images in batches.
  • The best of all, you dont need to install or download anything. All you need to do is select your images, watermark option and apply the watermark for processing.

All in all, PickMarkr is a great service with ease of use, which lets you WaterMark your images for free. Do give PicMarkr a try.

You can follow me on Twitter at http://twitter.com/vaibhav1981

Do stay tuned to Technofriends for more, one of the best ways of doing so is by subscribing to our feeds. You can subscribe to Technofriends feed by clicking here.

[How-To] Use Google as a Currency Convertor

If you are someone who wants to know the current exchange rate for your preferred currencies, Google is the way to go. 

Google’s Currency Convertor gives you Foreign currency rates provided by Citibank N.A. and displayed under license. However, its in your best interest to verify the currency conversion rate before making any transaction as the rates might vary. 

In order to use Google to use as a Currency Convertor, follow the steps below

1.) Point your browser to Google

2.) Type in the following to get the exchange rate of one British Pound to Indian Rupee. You can replace GBP and INR with currency codes of your choice.

         1 GBP to INR 

Google Currency Convertor

Google Currency Convertor

Another interesting website to check the latest currency exchange rates is XE. Check out XE at http://www.xe.com

If you are looking out for more Google hacks, check out posts on Google Hacks.

You can follow me on Twitter at http://twitter.com/vaibhav1981

Do stay tuned to Technofriends for more, one of the best ways of doing so is by subscribing to our feeds. You can subscribe to Technofriends feed by clicking here.

[How-To] Make your USB Disks Perform Faster

This simple hack is particularly useful if you leave your USB Hard Disk permanently connected to your laptop or PC. If you are sure that the USB drive will always be connected, it can be configured to perform faster. 

Follow the steps below to configure your USB Drive to perform faster. 

1.) In Control Panel, click on System. Under System dialog, click on Hardware and then Device Manager. 

2.) Under Device Manager, expand the Disk Drives section. 

Optimizing USB Disks for Performance

Optimizing USB Disks for Performance

3.) Select your Drive and right click to open Properties.

Performance Tuning your USB Drive

Performance Tuning your USB Drive

4.) Under Policies, select Optimize for Performance. Click OK.

That is it. You are done. For a USB drie, when you enable Optimize for Performance, it is enabled for write caching which in turn leads to beter speed and therefore better performance.

You can also follow me on Twitter at http://twitter.com/vaibhav1981

Do stay tuned to Technofriends for more, one of the best ways of doing so is by subscribing to our feeds. You can subscribe to Technofriends feed by clicking here.

[How-To] Add Contact from an Email in Outlook

Often many people email me asking for simple stuff. This post is motivated from one such email. Usually people follow a cumbersome process to add contacts to their outlook contact list, instead they can just follow a simple process and them to their list while being at their inbox. This post describes that simple process.

If you are looking at adding a contact from an email into your Outlook Contacts, follow the steps below.

1.) Open the email message in Outlook from which you wish to add the contact in your Outlook Contacts.

2.) Once the email message is open, right click on the name of the contact you wish to add to your Outlook Contacts.

3.) Select Add to Outlook Contacts.

 

Add contacts in your Outlook Contacts from an Email.

Add contacts in your Outlook Contacts from an Email.

4.) Fill out necessary details. Save and Close.

You can also follow me on Twitter at http://twitter.com/vaibhav1981

Do stay tuned to Technofriends for more, one of the best ways of doing so is by subscribing to our feeds. You can subscribe to Technofriends feed by clicking here.

Cheers

Vaibhav

[How-To] Schedule Email Delivery of your Google Analytics Traffic Report

Google Analytics is a very powerful analytics tool for analyzing various traffic related information for your website.

Google Analytics also provides Email delivery of your traffic report. In order to setup an email delivery of your traffic report, follow the steps mentioned below.

1.) Login to your Google Analytics account.

2.) Once logged in, go to the dashboard for your particular website. 

Configuring Google Analytics Email delivery of reports.

Configuring Google Analytics Email delivery of reports.

3.) Click on the link which says “Dashboard”. Refer to the image above.

4.) You now have two options, either to send the report now itself, or to Schedule it for future deliveries.

5.) In this post we will concentrate on Scheduling Email delivery. For this, click on the tab “Schedule”.

6.) Enter key information like mail id’s to which you wish to send this report, Subject, Small description, Format ( choose pdf, preferrably) and time interval. I have the interval set to Weekly. 

 

Enter all the relevant information for scheduling Email delivery.

Enter all the relevant information for scheduling Email delivery.

7.) Click on Schedule once you are done with filling all the necessary information.

Now your Email Schedule is created. Based on the chosen time interval for delivery you will be receive Email delivery of the reports.

You can also follow me on Twitter at http://twitter.com/vaibhav1981

Do stay tuned to Technofriends for more, one of the best ways of doing so is by subscribing to our feeds. You can subscribe to Technofriends feed by clicking here.

Cheers

Vaibhav