20 Places to Educate Yourself Online for Free

It seems like these days you can learn just about anything online for free, but of course some of that information is better than others. The good news is there are plenty of reputable places to educate yourself online for free, and here’s a TechProceed.com's compiled list of 20 of them to get you started.

1. Coursera

The coolest thing about Internet learning is that you can take college courses which in the past were only available to people who forked over immense sums of money to attend elite colleges. Coursera brings a bunch of those classes together into one site, offering nearly 400 courses ranging from Introduction to Guitar from Berklee College of Music to Constitutional Law from Yale.
Courses typically include videos and certain coursework (such as online quizzes) that must be completed in a certain amount of time, as these courses are monitored by a professor. Stop by regularly to see what’s new, or search for topics that interest you can put them on a watch list so you’ll be notified when a new class begins.

2. Khan Academy

Home to more than 3,000 videos on subjects ranging from SAT prep to cosmology, art history to calculus, Khan Academy is a great place to learn. Detailed courses are broken into smaller sections of text or videos for ease of learning that fits into your schedule, and all are self-paced so you can spend as much or as little time with the subject as you like.
You can also leave comments or ask questions if you want more information or if something isn’t clear in the lessons.

3. OpenCourseWare

The OpenCourseWare Consortium is a worldwide effort to make college and university level course materials accessible for free on the Internet. Search for a specific topic that interests you, or search by language (20 are available) or the source of the coursework.
There are more than 5,000 classes in English alone, covering everything from statistical thermodynamics (Middle East Technical University) to Epidemics in South African History (University of Cape Town) and Creole Language and Culture (University of Notre Dame).

4. ALISON

A global-learning resource with courses in English, French and German, ALISONcovers everything from SAT prep to health and safety courses required in Ireland. There are lessons on everything from study skills to American copyright law, currency exchange to nonprofit fundraising, and general accounting to negotiating when buying a house.
Completion of a course grants you “certification,” which is a British designation, but it’s still kind of fun.

5. MIT Open Courseware

If you always wanted to attend a big-name school like the Massachusetts Institute of Technology, now you can do the next best thing by taking many of its courses for free from your home on your own time. The MIT Open Courseware site posts course materials from a wide variety of classes you can search by department.
Choosing a course will show you when it was originally taught and by whom, and will give you access to the syllabus, course calendar, readings, assignments and study materials. You can download the course materials and work through the course at your own pace.

6. Academic Earth

If you’d like a broader collection of courses than MIT provides, Academic Earthis a great place to look. This free course aggregator has a stunning collection of courses from around 50 universities across the globe. You can search by source or general subject.
Don’t miss the curated playlists on topics such as natural laws, the nature of evil and the economic crisis. The video electives—with subjects like how to take a punch and why World War II made us fat—are lots of fun, too.

7. Open Learning Institute

The Open Learning Institute from Carnegie Mellon University allows access to a handful of course materials so you can learn at your own pace from the same kind of materials and self-guided assessments that would be used in a classroom. Their offerings are limited, but there’s a lot of detail in the coursework. Instructor-led courses are also sometimes available.

8. Open Culture

This site isn’t very pretty, but Open Culture does boast a collection of more than 700 downloadable courses, including college-level, certificate-bearing classes, language lessons, educational materials for K-12 and more.
There are also just some interesting links that aren’t to courses but you’ll still learn something from, such as this post on a reading list suggested by Ernest Hemingway.

9. Open Education Database

The well-designed Open Education Database claims more than 10,000 courses from universities from around the world. Search by topic and you’ll see the number of full courses, as well as which courses have audio lessons, video lessons or mixed media, so you can learn in whatever way you like.
You can also use this site to learn about online and offline schools, should you choose to continue your education in a more formal way.

10. iTunes U

Many of these same online courses can be accessed away from your computer with the help of iTunes U, a free app that can be downloaded to you iPad, iPhone or iPod Touch. It says that it includes 500,000 different courses, with material ranging from elementary school to college-level.
There’s also educational material here from respected institutions like the New York Public Library and MoMA. You can also add notes to the videos, share with friends and keep your course materials in iBooks so you have everything you need to learn wherever you are.

11. TED

The TED talks are a legendary source of information on all sorts of topics, and any discussion of how to educate yourself for free online needs to include them. There are now thousands of videos on all sorts of topics available on the site.
If you’re a fan of whimsy you can also get the site to suggest a fascinating, beautiful or informative video for you, among other tags. This may not be formal education but it certainly can be life-changing.

12. 99U

Love videos by experts on all sorts of topics? After you visit TED, check out99U, which is another great source of educational videos on all sorts of topics. It has a strong focus on the subject of creativity, business development and innovation, so it’s sure to be of interest if you’re an entrepreneur or in a creative line of work.

13. Ignite

If you want to learn something new and you’re really pressed for time, check out Ignite videos. The purpose of this series of speaking events is to have each person share something innovative or inspiring in just five minutes. Sounds silly, but you can get a big dose of greatness in a short amount of time.

14. Wikiversity

If you prefer your learning to be text-based, check out Wikiversity. As you might imagine, this site is part of the Wikimedia Foundation and includes detailed pages on a variety of subjects. It includes information of value to learners from preschool to college and beyond, and like other wiki projects is open-source and collaborative.
This is a good site or browsing, and the “random” button is a lot of fun

How to Find Out Which Windows Process is Using a File

Ever try to delete, move, or rename a file only to get a Windows system warning with something like one of these messages?
  • "Cannot delete file: Access is denied"
  • "There has been a sharing violation"
  • "The source or destination file may be in use"
  • "The file is in use by another program or user".
  • "Make sure the disk is not full or write-protected and that the file is not currently in use"

One of the best ways to handle locked files or folders is to use the free Microsoft program Process Explorer. Here is how to use it to find out what program, DLL, or handle is using a file or folder. You will need to run as administrator.



How to find out what program is using a file


In Windows 7 or 8, the system message may tell you what program is using the file. If it doesn’t or if you are using Windows XP, there is a simple way to find the program:
  1. Open Process Explorer, running as administrator.
  2. On the toolbar, find the gunsight icon on the right (shown highlighted in the figure shown below).
  3. Drag the icon and drop it on the open file or folder that is locked.
  4. The executable that is using the file will be highlighted in the Process Explorer main display list.



How to find out which handle or DLL is using a file

  1. Open Process Explorer, running as administrator.
  2. Enter the keyboard shortcut Ctrl+F. Altenatively, click the “Find” menu and select “Find a Handle or DLL”.
  3. A search dialog box will open.
  4. Type in the name of the locked file or other file of interest. Partial names are usually sufficient.
  5. Click the button “Search”,
  6. A list will be generated. There may be a number of entries.
  7. An individual handle in the list can be killed by selecting it and pressing the delete key. However, care is necessary when deleting handles, as instabilities may occur. Often, just rebooting will free a locked file.

How to Stop Google from Keeping a Record of Every Search You Make

Do you use Gmail, the Chrome browser, or other Google service? Then Google may be keeping a record of every search query you make. That’s right; if you have a Google account, Google may know everything you ever looked for on the web. That is, unless you turn off Google’s collecting of all your searches and clean out the web history they’ve kept. Here’s how.

Turn off Google Web History
  1. Go to the web page https://history.google.com
  2. Sign in to your Google account if you aren’t already signed in.
  3. Click the gear icon in the upper right corner (example shown in figure on the right).
  4. Choose “Settings”’
  5. The page that opens contains the section shown in the figure below.
  6. Click the button “Turn off” to stop Google collecting the data. If you change your mind, you can always turn Web History back on.

Delete items in Google Web History

  1. Previously collected data will still be there. To remove it, click the link contained in the word “delete” in the sentence, “You can also delete all past Google search activity or remove particular items from your recent activity.” The link is hard to see and I have highlighted it in yellow in the figure. 
  2. You will get a dialog box asking if you want to delete all items
  3. Click the button “Delete All”
  4. You can also delete only selected items by using the link contained in the phrase “recent activity” as indicated in the figure


What does Google do with this data? Why, they sell the information to advertisers, of course. Or maybe, they also give it to the government. Who knows?

Android/iPhone tip: How to wipe all your saved web passwords

Sure, it’s handy that your smartphone can remember and fill in usernames and passwords for your various web accounts. But it also means anyone else with access to your handset can log in to your most sensitive accounts, too.

Indeed, the more often you tap “yes” when your iPhone or Android phone asks “Would you like to save this password?”, the more saved passwords you have sitting in your pocket—and that could lead to big trouble if your precious smartphone ever lands in the wrong hands.

A good rule of thumb is to select “Never for this site” or “Not now” when your phone offers to save passwords for your most important accounts, such as your online banking site.

But what if you’ve already saved passwords for more sites than you can count?

In that case, you might consider starting fresh by wiping all the web passwords from your iPhone or Android phone’s memory.

You might want to think twice before saving passwords for sensitive online accounts on your iPhone.
For Android phones:
  • Open the Browser application, tap the Menu button, select Settings, then tap “Privacy & security.”
  • Scroll down to the Passwords section and tap “Clear passwords.” You’ll get one last chance to change your mind; if you’re ready to go ahead, tap the “OK” button.
  • If you want your phone to stop asking to save web passwords, clear the check from the “Remember passwords” checkbox.
  • For iPhone:
  • Tap Settings from the home screen, then tap Safari.
  • Next, tap AutoFill, then tap the “Clear All” button under the “Names & Passwords” setting.
  • To keep your iPhone from saving any more passwords, flip the “Names & Passwords” switch to “Off.”

What to Do with a Hung or Unresponsive Windows 7 Program

Sooner or later it happens to all of us – a Windows program gets hung up and just sits there frozen. You can open Task Manager (Ctrl+Shift+Esc) and try to close the hung program or use the command line to kill it. But sometimes you might want to see if you can find out why the program got hung up in the first place or you may want to try to unfreeze it. In that case, Windows 7 has just the system tool you need.

It’s called Resource Monitor and has many features. One of them is a way to troubleshoot programs that don’t respond. Here is how it works:

  • Open Resource Monitor by entering “resmon” in the Start-Search bar. Alternatively, open Task Manager( keyboard shortcut Ctrl+Shift+Esc), and click on the "Performance" tab and then the button "Resource Monitor". 
  • An example of the window that opens is shown in this figure. In the CPU section of the "Overview" tab, right-click the executable file of the hung application. The listing of the hung application will be colored red. 



  • The context menu that opens is shown on the right. You can close the hung process from this menu or you can choose the entry “Analyze Wait Chain…” to see what other processes may be interacting with the hung program. If you know that an entry in the wait chain is not crucial you can try ending that process to see if it frees up the hung program. However, take care not to end a process that is vital to system operation. Ending a process here is not permanent, however, and rebooting the computer will normally restart everything.

15 Awesome, Useful Internet Tricks

1. For clumsy fingered folks, if you accidentally close a tab on Google Chrome, press Control+Shift+T and it’ll come back from the dead.
2. If you’re in a particular country that can’t access important content on US websites like Hulu or Netflix, Firefox and Google Chrome offer a free extension called Media Hint that can have you watching Orange is the New Black and other American exclusives in no time.
3. Control+F or Command+F will allow you to find specific terms on a page. If only life had a version of this for when we lose our keys, phone, dignity, etc.
4. Want to surf the web in private with no recording of your web habits? For Firefox users, press control+shift+p, or for Chrome it’s control+shift+N, and you’ll be browsing off the record. This isn’t just for porn watching purposes as one might think, but for several other benefits such as websites that track your cookies and use ‘em to their advantage (I’m looking at you, hotel & airline companies). This simple incognito window defeats their swindling ways.
5. If you hate YouTube’s (or other website’s) ads before the start of your videos, Adblock Plus is what you need in your life. It’s basicallylike having Dikembe Mutombo protecting your eyes from any type of advertisement.
6. If you put define: in front of a word and Google it, you’ll get that word’s definition.
7. What you type into the URL bar can be surrounded by www. & .com by pressing control + enter.
8. For more specific search results, try utilizing the AROUND feature. It allows you to find separate phrases, not just mentioned in the same article or page, but inside of a specific amount of words apart. For example, if you wanted to find writings about ‘Kanye West’ and ‘pizza’ within 12 words of each other, your search would look like this:
“Kanye West” AROUND (12) “Pizza”
Having the terms you’re searching in quotation marks, the word AROUND written in ALL CAPS and the number in parenthesis are all necessary for this to work.
9. Another way to improve search accuracy is by taking advantage of the minus sign. E.g. Selena Gomez -Bieber. Boom! – you’ll get all the glorious Selena results without any of Justin’s douchey, mop bucket urinating shenanigans killing your vibe.
10. If you’re too lazy to lift a finger and click on your desired tab, control+tab (or control+shift+tab) will switch you between ‘em. As a lethargic tab hoarder, this is a great way to minimize hand movement while allowing that article from three weeks ago, that you swear you’re going to read, to remain open.
11. Corrupt A File is an enabler that can be a procrastinator’s best (or worst?) friend, allowing them to corrupt a file and make it seem like they did their work on time, but it’s unfortunately malfunctioning.


12. You can find a lot of textbooks on Google if you enter their title, then the desired file type. So an example would look like this: Book Title filetype:PDF


13. Too lazy to get up and grab your glasses? Control + or control – will allow you to adjust text sizes larger or smaller.
14. Need a disposable e-mail to avoid putting yourself at risk for spam? There’s a place called 10 Minute Mail that’s pretty self-explanatory.
15. If you’re going to do online shopping, try leaving your desired purchases in your cart for a while, and eventually you’ll get some type of discount code in an email that gives off desperate ex vibes, borderline begging you to finish the purchase. (This doesn’t ALWAYS work, but it happens enough that it’s worth trying if you don’t need whatever you’re ordering hastily.)

How to Download Whatsapp for PC or Laptop (Windows 7/8 and Mac)


How to use Whatsapp on Computer?



Are you the one who don't have a Smart phone? and still want to use whatsapp?
Want to run android apps and play android games on pc?

We have Solution for all your Questions:-

Then you are at the right place now you can use whats app on your PC for free.whats app helps you to connect with friends family.

Yes its simple you need to install bluestacks offline installer to run whats app on PC.

Install Whatsapp on your PC:

  1. Go here : http://www.bluestacks.com/ and Download bluestacks
  2. Now run the downloaded application.(click here for how to install bluestacks)
  3. Now you have installed Bluestacks Successully.You can skip the below step.
  4. If you are Getting Some Error as below while installing
  5. Error: "The application failed to initialized properly (0xc0000135) . Click on ok tp terminate the application",then .NET framework is missing on your PC. Go to End of article to get .NET framework Note: Get .NET Framework only if you are getting Error 
  6. Now open the application you can find the screen capture just like below picture
  7. Now Click on Search icon and search for Whatsapp
  8. Now choose the whatsapp messenger form any market .its your wish.
  9. Just click and Download whatsapp after selecting from any app store
  10. You can find downloaded app in My Apps.
  11. Now click on Whatsapp fill the details and start using it.
  12. If you want to uninstall any app just hold the app and click cross button.

If you Still have any problem feel free to comment below.I will help you :) 

How to Move a Blogger Blog to Your Own Domain

I finally moved it from blogspot subdomain to a custom domain. I have been wanting to do this since a long time (ever since this blog started getting some attention) , I somehow couldn't manage to do so because of the fear of losing search traffic.

Google's recent move to redirect blogspot.com to country specific sub domains helped me solidify my decision to the extent of finally moving. I made a lot of other changes as well and have listed as much of them as possible as they might help some of you who are also planning to make the move. I have listed them in the order in which I made them.

1) Registered TechProceed.com.

2) Changed my domain's settings to hide personal information from being displayed in the who is database.

3) Modified my domain's CNAME and A records to correctly point to Google's servers. 

4) Generally, it takes some time for your domain registrar to completely update the settings mentioned above. So, if you immediately point your new domain to your blog, users will see a 404 error. To avoid this, I created a new blogspot blog and modified its settings to point to my new domain.

5) When my domain correctly started loading the temporary blog, I modified this blog's settings to link it to the new domain. Now my new domain was correctly loading my blog. While doing this, I made sure to select redirecting the non www version to the www one.

6) Downloaded my blog's template and opened the downloaded XML file in Wordpad. I then used Wordpad's Find and Replace function to replace each occurrence of tweakandtrick.blogspot.com with www.tweakandtrick.com and uploaded the modified template. This automatically changed all navigational links to use the new domain.

7) Some widgets still had links pointing to the blogspot subdomain. I changed them manually.

8) Went to Google Webmaster Tools, added my new domain and submitted the full sitemap. Normal Blogger feeds show only 20 URLs, so in order to submit all the URLs, I submitted a custom queried feed that includes 500 URLs.

9) Bing also brings considerable amount of traffic to this blog. So, I added the new domain to Bing Webmaster Tools and submitted the same sitemap.

10) Blogspot uses 301 permanent redirects to redirect visitors to new domains. This should have normally allowed Google to immediately index my new blog's URLs but it did not. So, I resubmitted my old blog's complete sitemap in Google Webmaster Tools. As the Blogspot blog had some authority in Google, GWT quickly processed the sitemap and immediately noticed that all those posts had moved to the new domain. This notified Google to index my content under the new domain and after almost 12 hours, my old blogspot URL's started getting replaced by the new ones.
BlogSpot to Domain

11) Notified readers of the move on Facebook and Twitter.

12) After making the move, my search traffic is way lower than normal. This should change and traffic should return to normal once search engines completely transfer my Blogspot subdomain's trust and authority to this new one.

Some other changes I made

1) Used Feedburner's MyBrand feature to transfer my FeedBurner feed to my own sub-domain.

2) Modified my social profiles to link to my new domain.

3) Earlier, my about page and categories on this blog were simple posts that included dates in the URL. This made them look ugly, so I shifted these to independent Pages and canonicalized the old pages to new ones.

Some Noticeable Benefits


It is too early to say this but ever since I moved to my own domain, the subscription rate has gone up considerably. It has also increased the percentage of users who are completing the subscription process. 

[How to] Manage your Android's memory and applications


 
Internal memory storage, it's the spot on your Android device that is reserved for data. Once you install an application, take a picture or download something, some of this space gets used up. This week in Android for beginners, we will show you how to manage your applications and your memory.

First off, when the manufacturer announces that you have 16 GB of available memory, you actually only have 12 or 13 at your disposal. Why? Simply because your Android also needs space to operate with too.

To check what's taking up room on your smartphone, take a look at the storage tab in your settings. The important information to take a look at is here: Device Memory.
On the right side, you can see how much space where all of your space is going. There's still time to do some spring cleaning. 

How to recover memory

Everything takes place in the settings. More specifically, the action happens under the applications tab. Depending on your device, its either called application manager or simply, applications.

Once you've made it this far, it's a matter of common sense. The cache is a kind of library, in which the applications will store data that they'll retrieve later.
The application page

To help you, here is a guide on how to use an application page.

Uninstall

There's not too much to explain, it basically removes the app. Don’t do this if you still plan on using the app, obviously.By clicking on the individual app, it will bring you to its main information. 

Move to SD card

This option will allow you to move entire applications to the SD card stored inside of your device. This might get a little complicated, but that's something we will tackle in the near future.

Clear Data

This will clear up all of the data related to an application. If you erase the files for an app like Facebook, you'll have to re-enter the passwords again. This is something to use with precaution. For example, saved games will probably also get erased.

Empty the cache

This is also a domain that requires common sense. In fact, what we are about to do is delete the cache for certain apps that are taking up a lot of room. The cache, like mentioned before, is a type of library where your apps store their files to retrieve later on. It can be emptied from time to time.

Emptying the cache will allow you to deblock an application that doesn't work anymore, like Google Play after its failed update.

In conclusion, you can uninstall apps, empty the cache and completely erase the data for an entire application. This will help your Android device run smoother and free up some space for new downloads.

iOS 7: Here is what's new

 OS 7 has revealed a completely redesigned version of Apple's mobile operating system. Redesigned from the ground-up, iOS 7 boasts some pretty big changes for the way iOS devices will look, including both iPhones and iPads. A new UI design is at the forefront of the new iOS 7. 

iOS 7 boasts some major changes to the operating system all the way from the ground up. Including a complete redesign of the UI, Apple has announced that they've concentrated on ten core points in the latest update. 

Control Center: Apple has enabled an option for users to swipe up and access a bunch of quick settings. This will allow users to quickly turn on and off some popular settings without having to navigate around the device. Airplane mode, Wi-Fi, Brightness, and more are all available from the redesigned control center and will also be available from the lock screen.

Multitasking: All apps will now have access to multitasking controls. Multitasking will now support intelligent scheduling of resources to apps that require them and also prioritize based on network conditions. This means, if you don't have great reception or not in a Wi-Fi area, the OS won't try to prioritize applications that require that to function. As well, if you receive a push notification, the OS will prioritize that application and make sure it's up to date should you use it right after the notification.

Safari: Redesigned to take up more of your screen, providing more of a full screen look. Includes smartsearch fields and a new interface for your tabs (you are no longer constrained to only 8 open tabs). Safari will also be compatible with the new iCloud keychain that was announced in OS Mavericks. 

Airdrop: You can now share files/photos/etc with people who are around you wirelessly. This will be available for current iOS devices (new iPad, iPhone 5, latest iPod Touch, etc). 

Camera: Live photo filters have been introduced, like the Instragram style, and you can easily swipe between camera modes: video, panoramic, normal, and box view.

Photos: This app has been redesigned and allows for a more seamless way to organize and view your photos, using what Apple refers to as Moments.

Siri: New interface with better search results. It has been updated to have both male and female voices in English, German, and French (with more languages being supported later on). As well, Siri can now control more of your device using voice commands, including turning on and off functions as well as changing settings. 

iOS in the Car: Integration of your iOS device with iOS compatible cars (expected in 2014) so that you can use your cars display system as an extension of your device, dictating messages, using GPS maps, and more.

Appstore: Includes new features, such as being able to search for apps based on age relevancy, so you can search for apps specific for your child or toddler. As well, you can search for apps that are popular based on your location. Finally, no more manually updating. The new appstore will update apps on the fly.

Music: Enable iCloud integration for music and videos, allowing you to use these services on the fly as well as providing a new view/organization method of the way your library layed out. iTunes Radio has been announced, allowing users the experience of popular internet radio apps such as Pandora and Spotify, right within Apple's music app. This service will be free for all users with ads, and ad-free for iTunes Match subscribers. iTunes Radio will be available only in the US to begin with.

Furthermore, Apple also announced a new feature called Activation Lock, which provides another layer of security should you have your iOS device stolen. Once activated, this will prevent thieves from doing anything with the device without your Apple ID (even if they turn off Find my iPhone or wipe the device). 

iOS 7 is available as a beta for developers using an iPhone as of today and with iPads getting the rollout in the coming weeks. It will be available for the general public in the fall of 2013.

What do you think about the redesigned iOS 7?

Batteries: what exactly should we be doing to extend their life?


 

More often than not, our smartphone batteries die long before our devices do.

As more and more smart phones are moving away from having a removable and replaceable battery, I’ve found myself more concerned with how the usage of my phone and my charging habits will affect it in the long term. With my older laptop and cameras, it was never an issue. Battery no longer holding a charge? Buy a replacement and slap it in. 

All I need to do is plug it in, right?

Unfortunately, I was never well versed in proper maintenance and care of battery life until I started noticing a decline in my overall life of my cellphone. From being able to hold a charge for an entire day to having to plug in the phone halfway through the day even with minimal usage, it got me wondering if my charging habits had anything to do with it. 

As with most of my older devices, I was under the assumption that I should always drain the battery, keep the device plugged in to charge, and then rinse and repeat over and over again. Older batteries, such as Nickel Cadium (Ni-Cad) and Nickel Metal Hybride (Ni-MH) batteries required “training” on the battery, charging and discharging to keep them optimal and so, in respect, I thought the same applied universally for new devices currently using Lithion-Ion (Li-ion) batteries. 

Conflicting Reports

And so, I began some research on the internet to see what I could come up with for the care and proper maintenance of li-ion batteries. Soon though, my frustration was solidified in a Popular Mechanics article: “And yet, consumer electronics companies offers no true consensus …. the Internet only deepens the confusion. One article claims that li-ion packs should be drained on a weekly basis; another recommends to drain them once a month; others say they should never be drained.” Amid this quagmire of confusing information and statements, there was however some constants that kept popping up over and over again.
Depending on charging habits, the life cycle of a battery can vary.

Problems and Solutions

One of the most general worrying facts was finding out the damaging properties of completely draining your battery or letting your device run dry as I had previously done. As Wikipedia states: “Deep discharge may short-circuit the cell, in which case recharging would be unsafe. …. This may drain the battery below its shut down voltage; normal chargers are then ineffective.“ Combined with problematic issues arising when temperatures dip below and above certain thresholds (who hasn’t forgotten their phone in their car?) can shorten and damage battery life on your device.

An interesting tib-bit though, is finding out about li-ion safety circuits, internal hardware that is integrated into the battery that helps prevent overcharging, say if you were to leave your device plugged in for overnight. These circuits allows the devices the charge the battery up to 100% before turning themselves "off" and allowing the battery to drain down to a certain percentage before turning back on again. This explains sometimes why you might see the percentage of a battery drop from a full charge to somewhere near 90% of a charge upon unplugging your phone from the charger.

And so, through a bit of wading through conflicting reports about what is best for Li-ion batteries, this is what seems to be the general consensus:
Don’t drain your battery completely on your device and make sure to charge it often. The longer a battery remains drained without being charged, the harder it is to try and recharge it. There are methods to "revive" batteries that are considered dead, but it requires a little knowhow.
Do not worry about over-charging due to built in safe guards in your Li-on battery.
Don’t expose your phone and battery to extreme temperature changes.

While this article has to do with charging and discharging habits for your smart-phone and how it affects your battery, there are other tips and tricks to get more usage out of your battery through apps and usage.

As for now, these are some pretty straight forward guidelines to keep the batteries going on your devices through the entirety of your contract. Keep in mind though, some providers and carriers do offer battery replacements under warranty, so always make sure to check this out with them. 

What's your personal charging habit for your smart-phone?

How to Share Files Between your Mobile Phones and Computers

Your digital data – like files, photos, documents, music, ebooks and videos – is spread across a range of devices including your mobile phone, the tablet and your computer(s).

How do you easily transfer a file from the Android phone to your iPad? Or how do you copy-paste that long snippet of text from the computer to your iPhone? The following guide discusses apps, both web-based and mobile apps, that will help you exchanges files and everything else between your desktop computer and mobile devices easily and quickly.

The popular and most obvious solution for sharing files across devices is email. Send a file to yourself from one device and then download that email attachment on the other device. Alternatively, you may use file storage services like Dropbox, Google Drive or SkyDrive (readcomparison) to transfer files from one device to another via the cloud.

Then there are web-based apps to help you move files between your computers and phones without any software. There’s ge.tt where you can upload files from the browser and download them on any other device. JustBeamIt is another web-based file transfer service where there are no limits as the file content is streamed directly from the source to the destination and not stored on third-party servers.

Google Keep is my favorite service for transferring text snippets from one device to another. You can write, or paste, text inside Keep and it instantly becomes available on all the other devices. Keep is web-based but they also have an Android app. I use Google Keep for transferring URLs from the desktop to mobile browser and also passwords that are too long and complex for typing on the mobile keyboard. Hopper and MoPad are other good web-based alternatives that can again be used for sending links and text snippets across devices.

If you are an Android user, AirDroid is probably the only app you’ll ever need for moving files in and out of your phone. Once you launch AirDroid, you can easily download (and upload) files and folders from the phone to your computer wirelessly via the web browser. The only restriction is that your phone and computer should be part of the same Wi-Fi network.

Mac OS users can consider installing Droid NAS, an app that will make your Android phone /tablet appear in Finder and you can then easily browse or transfer files over Wi-Fi.

SuperBeam is another useful app for transferring files between Android devices. Select one or more files inside any file manager app and choose SuperBeam from the Android sharing menu. It will generate a QR code that you can scan with SuperBeam on your other device and the file transfer will happen automatically. If the two Android devices are not connected to the same Wi-Fi network, SuperBeam will transfer files using Wi-Fi Direct mode.

Unlike Android, Apple does not provide access to the iOS file system except for the media gallery. You can use the excellent Documents app to transfer documents, photos and other files from the computer to your iPad and iPhone over the Wi-Fi network. The Documents app can be mounted as a network drive on your computer and files can be moved across iOS devices via drag-n-drop. The app also has a built-in browser to help you download and store web files including file types that aren’t supported by the default Safari browser.

iOS doesn’t support Bluetooth based file transfer so if you are to transfer photos or videos from the camera roll of your iPhone to an iPad, Dropbox is probably a good choice. For single files, web apps like ge.tt and DropCanvas.com are perfect for the job.

Mobile apps like Bump and Hoccer that let you exchange files between Android and iOS devices, or between your computer and your mobile device, with simple gestures.

In the case of Bump, select a file on your mobile phone, tap the space bar of your computer with the phone and the file will instantly become available in the computer’s browser. For Hoccer, you can place your two phones side by side and drag a picture from one phone to another. If you have never tried these apps before, they’ll simply amaze you.

How to Save Money While Shopping Online in India

Online shopping can be convenient and you often get better discounts than what the local shops in your area have to offer but if you do a little more research, you may end up saving even more. Here are some tips and websites that may help you get the best deals while shopping online in India.






1. Use Comparison Shopping

There are dozens of credible shopping sites in India and it may therefore take time and effort to determine which of them offers the best deal on a particular product. Comparison shopping sites like MySmartPrice.com , ShoppingWish.in and Junglee.com aggregate prices from multiple online retailers (through XML feeds and web scraping) making it easier for you to compare prices.

The big downside is that these shopping engines do not have price data from all the popular retailers (like Flipkart) so the lowest listed price may not always be the lowest one on the Internet.


2. The Hunt for Coupon Codes

Some shopping sites accept coupon codes that you can apply at the checkout screen for some additional discount on your final bill. Google is of little help here as coupon codes are mostly valid for a limited period but there are coupon aggregating sites like CouponDunia.in andCouponRaja.com where you may often find working coupon codes for any particular store.
The coupons are neatly organized by stores and the listings are sorted by their expiry dates. Popular US coupons website RetailMeNot.com too has an India-specific section that aggregates coupons from Domino’s Pizza, eBay.in, Myntra and other popular online shopping sites.


3. Research Online, Shop Offline

Not every local mom-and-pop store may have a website but some of these local stores may have better deals to offer than even the big online retailers. PriceBaba.com aggregates prices offered by the various offline retailers in a city and the site also lists their phone numbers and addresses should you decide to make the purchase from a local shop.

PriceBaba’s product catalog is however limited to mobile phones and tablets and they are primarily covering retailers in the Mumbai-Pune and Delhi-NCR region.


4. Earn Cash back on Purchases

Coupon codes aren’t the only way to save money on your online purchases. Sites likeCashKaro.com and Pennyful.in offer cashbacks on your regular purchases as long you visit the retailer’s site through the special links listed on these cashback websites.

It works something like this. You create an account at CashKaro and it will provide you links to various retailer sites where cash back offers are available. You visit the shopping site through these special links, make the purchase as normal and the cashback amount will be paid to you once a threshold is reached.


5. Watch the Specials on Social Web

Most online shopping brands in India are active on Twitter and Facebook and some of them do regularly post offers and deals on these channels. It may thus be a good idea to like /follow you favorite retails on the social web.

Also, shopping sites like eBay.in, Infibeam.com, Myntra.com, Jabong.com, HomeShop18 and others have dedicated pages where they list ongoing offers – you may want to put these pages in your bookmarks as well.


6. Try a Different Browser

News reports in the WSJ and USA Today suggest that certain shopping sites, especially those in the travel category, may alter prices based on your geo-location and even your previous browsing history (cookies). I am not sure if Indian shopping sites use “dynamic pricing” but the incognito (or private) mode in your browser will prevent the site from connecting the dots and they’ll treat you as a new customer.

What is PRISM, and what the NSA spying scandal means for you

Perhaps while you’ve been outraged at the Xbox One’s newly revealed always-on and used games policies, you missed out on the news that the National Security Agency has been spying on everyone and everything since 2007. Surprise! Dubbed PRISM, the spy-on-everything program is a collaboration between the NSA, FBI, and just about every major tech company you love, hate, or love to hate.

The original program’s ambition was to monitor and collect data from foreign sources that might pass through United States networks for one reason or another — not the worst-sounding goal. However, as leaked reports regarding the program revealed, the agency had access to just about any service the consumer public would use in these modern times. The program has access to a wide array of information from Apple, Microsoft, Google, Facebook, Yahoo, YouTube, Skype, AOL, and PalTalk (which is a video chat room service). The information includes everything you do on a daily basis, from sending emails and participating in chats, to monitoring stored videos and images, to your social networking information and basic electronic activity, such as a logging into and out of a network.




The NSA getting access to these companies’ servers isn’t entirely convoluted or complex. According to the reports, Apple, for example, will be hit with orders from the Director of National Intelligence which demands access to its servers. Apple will comply, and the data from the servers goes through the FBI, which then hands the culled information over to the NSA.

The only thing thing standing between the NSA and going through all of your information, is that an NSA agent has to be 51% sure you’re foreign.

If you’re a reasonably seasoned user of modern technology, then there’s likely always a little voice in the back of your head that reminds you not to do sketchy things online, because someone, somewhere can see what you did. We’re so used to hearing that, for example, Facebook has access to everything on our computer if it wants, or if you uploaded a photo online a decade ago and quickly removed it, someone can still find it. So, we just kind of shrug and not think about it, and assume that Facebook — or the NSA in this case — has better things to do than read the GChat conversations we’ve had with coworkers regarding who’s cute in the office.

If you don’t want to shrug and ignore PRISM, but also don’t want to have it suck up all of your time because you have better things to do than worry about a government program you likely can’t do much about, the Electronic Frontier Foundation made a very handy timeline just for you. The timeline doesn’t just cover PRISM, but is a timeline for domestic spying, dating as far back as 1791 when the Bill of Rights went into effect. The timeline quickly jumps to the time of the internet from there, because domestic spying — along with just about everything else — was made much easier with the advent of the internet.

The EFF’s timeline is well-organized, and does allow the option for you to miss an entire day of work reading up on the NSA if you choose to click all of the related links. If not, you can get caught up on domestic spying rather easily, and go back to posting both your sensitive and superfluous information on the internet for the government to see.

How to Install a Second Operating System Onto an External Hard Drive From an .Iso File

While many PC users stick with the operating system that comes with their PC, others enjoy dabbling in other operating systems. If you want to use two operating systems on the same computer, you have a couple of options. The first is to simply create another partition on the hard drive, while the other is to use an external hard drive. The latter is the easier option and requires only that you change the correct settings to install the second operating system on your external hard drive. 

Things you will need
  • Blank CD-R or DVD-R
  • Program to burn the .iso file

Instructions


1. Check to make sure that your particular operating system can be run on an external hard drive and supports dual-booting so you can safely run two operating systems on your computer. Certain operating systems, such as Windows, cannot be easily installed on external hard drives. However, you can easily install operating systems such as Ubuntu and various other derivatives of Linux on an external hard drive.

2. Burn the .iso operating system file to a bootable CD-R or DVD-R. You may use programs such as ImgBurn, CDBurnerXP or Nero, among others, to do the job.

3. Plug your external hard drive into the USB port on your computer.

4. Insert your burned CD-R or DVD-R into the CD-Rom drive. Restart your computer.

5. Press any key to boot from the CD or DVD.

6. Follow the on-screen prompts to begin the installation. When it comes to choosing where to install the operating system, select your external hard drive and not the primary drive or partition. This ensures that you do not overwrite your first operating system. Click "Next" to proceed.

7. Follow the remaining on-screen prompts to complete the installation process. This varies from operating system to operating system, so consult your manual when necessary.

8. Restart the computer after installing the second operating system. Press "F1" or "F2" to enter the BIOS. Make sure that your external hard drive is given top boot priority, so that you can boot into the second operating system. Exit and save the changes.

9. Boot into your second operating system. As long as you are able to boot into your second operating system with no problems, then you've done everything correctly in installing the second operating system on an external hard drive.

Let me know the queries at Snehal [at] TechProceed [dot] com  :-)

                                Some Programmers' Jokes


                                “There are 10 kinds of people in the world: Those that know binary & those that don’t”

                                * * * 

                                Two bytes meet. The first byte asks, “Are you ill?”
                                The second byte replies, “No, just feeling a bit off.”

                                * * * 

                                Software is like sex: It’s better when it’s free.

                                * * * 

                                Q: how many programmers does it take to change a light bulb?
                                A: none, that’s a hardware problem

                                * * * 

                                “Knock, knock.”
                                “Who’s there?”
                                very long pause….
                                “Java.”

                                * * * 

                                A physicist, an engineer and a programmer were in a car driving over a steep alpine pass when the brakes failed. The car was getting faster and faster, they were struggling to get round the corners and once or twice only the feeble crash barrier saved them from crashing down the side of the mountain. They were sure they were all going to die, when suddenly they spotted an escape lane. They pulled into the escape lane, and came safely to a halt.
                                The physicist said “We need to model the friction in the brake pads and the resultant temperature rise, see if we can work out why they failed”.
                                The engineer said “I think I’ve got a few spanners in the back. I’ll take a look and see if I can work out what’s wrong”.
                                The programmer said “Why don’t we get going again and see if it’s reproducible?”

                                * * * 

                                Q: “Whats the object-oriented way to become wealthy?”
                                A: Inheritance

                                * * * 

                                A SQL query goes into a bar, walks up to two tables and asks, “Can I join you?”

                                * * * 

                                A man flying in a hot air balloon suddenly realizes he’s lost. He reduces height and spots a man down below. He lowers the balloon further and shouts to get directions, “Excuse me, can you tell me where I am?”
                                The man below says: “Yes. You’re in a hot air balloon, hovering 30 feet above this field.”
                                “You must work in Information Technology,” says the balloonist.
                                “I do” replies the man. “How did you know?”
                                “Well,” says the balloonist, “everything you have told me is technically correct, but It’s of no use to anyone.”
                                The man below replies, “You must work in management.”
                                “I do,” replies the balloonist, “But how’d you know?”*
                                “Well”, says the man, “you don’t know where you are or where you’re going, but you expect me to be able to help. You’re in the same position you were before we met, but now it’s my fault.”

                                * * * 

                                Programming in C is like fast dancing on a newly-waxed dance floor by people carrying razors.

                                * * * 

                                Program, noun: A magic spell cast upon a computer to enable it to turn input into error messages.

                                * * * 

                                If Java is the answer, it must have been a really verbose question.

                                * * * 

                                Software developers like to solve problems. If there are no problems handily available, they will create their own problems.

                                * * * 

                                To understand what recursion is, you must first understand recursion.

                                * * * 

                                Unix is user friendly. It’s just very particular about who its friends are.

                                * * * 

                                20 very useful Java code snippets for Java Developers

                                Following are few very useful Java code snippets for Java developers. Few of them are written by me and few are taken from other code reference. Feel free to comment about the code and also add your code snippet.

                                  

                                1. Converting Strings to int and int to String

                                String a = String.valueOf(2);   //integer to numeric string
                                int i = Integer.parseInt(a); //numeric string to an int

                                2. Append text to file in Java

                                Updated: Thanks Simone for pointing to exception. I have changed the code.
                                BufferedWriter out = null;
                                try {
                                    out = new BufferedWriter(new FileWriter(”filename”, true));
                                    out.write(”aString”);
                                } catch (IOException e) {
                                    // error processing code
                                } finally {
                                    if (out != null) {
                                        out.close();
                                    }
                                }

                                3. Get name of current method in Java

                                String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();

                                4. Convert String to Date in Java

                                java.util.Date = java.text.DateFormat.getDateInstance().parse(date String);
                                or
                                SimpleDateFormat format = new SimpleDateFormat( "dd.MM.yyyy" );
                                Date date = format.parse( myString );

                                5. Connecting to Oracle using Java JDBC

                                public class OracleJdbcTest
                                {
                                    String driverClass = "oracle.jdbc.driver.OracleDriver";
                                 
                                    Connection con;
                                     
                                    public void init(FileInputStream fs) throws ClassNotFoundException, SQLException, FileNotFoundException, IOException
                                    {
                                        Properties props = new Properties();
                                        props.load(fs);
                                        String url = props.getProperty("db.url");
                                        String userName = props.getProperty("db.user");
                                        String password = props.getProperty("db.password");
                                        Class.forName(driverClass);
                                 
                                        con=DriverManager.getConnection(url, userName, password);
                                    }
                                     
                                    public void fetch() throws SQLException, IOException
                                    {
                                        PreparedStatement ps = con.prepareStatement("select SYSDATE from dual");
                                        ResultSet rs = ps.executeQuery();
                                         
                                        while (rs.next())
                                        {
                                            // do the thing you do
                                        }
                                        rs.close();
                                        ps.close();
                                    }
                                 
                                    public static void main(String[] args)
                                    {
                                        OracleJdbcTest test = new OracleJdbcTest();
                                        test.init();
                                        test.fetch();
                                    }
                                }

                                6. Convert Java util.Date to sql.Date


                                This snippet shows how to convert a java util Date into a sql Date for use in databases.

                                java.util.Date utilDate = new java.util.Date();
                                java.sql.Date sqlDate = new java.sql.Date(utilDate.getTime());

                                7. Java Fast File Copy using NIO

                                public static void fileCopy( File in, File out )
                                            throws IOException
                                    {
                                        FileChannel inChannel = new FileInputStream( in ).getChannel();
                                        FileChannel outChannel = new FileOutputStream( out ).getChannel();
                                        try
                                        {
                                //          inChannel.transferTo(0, inChannel.size(), outChannel);      // original -- apparently has trouble copying large files on Windows
                                 
                                            // magic number for Windows, 64Mb - 32Kb)
                                            int maxCount = (64 * 1024 * 1024) - (32 * 1024);
                                            long size = inChannel.size();
                                            long position = 0;
                                            while ( position < size )
                                            {
                                               position += inChannel.transferTo( position, maxCount, outChannel );
                                            }
                                        }
                                        finally
                                        {
                                            if ( inChannel != null )
                                            {
                                               inChannel.close();
                                            }
                                            if ( outChannel != null )
                                            {
                                                outChannel.close();
                                            }
                                        }
                                    }

                                8. Create Thumbnail of an image in Java

                                private void createThumbnail(String filename, int thumbWidth, int thumbHeight, int quality, String outFilename)
                                        throws InterruptedException, FileNotFoundException, IOException
                                    {
                                        // load image from filename
                                        Image image = Toolkit.getDefaultToolkit().getImage(filename);
                                        MediaTracker mediaTracker = new MediaTracker(new Container());
                                        mediaTracker.addImage(image, 0);
                                        mediaTracker.waitForID(0);
                                        // use this to test for errors at this point: System.out.println(mediaTracker.isErrorAny());
                                         
                                        // determine thumbnail size from WIDTH and HEIGHT
                                        double thumbRatio = (double)thumbWidth / (double)thumbHeight;
                                        int imageWidth = image.getWidth(null);
                                        int imageHeight = image.getHeight(null);
                                        double imageRatio = (double)imageWidth / (double)imageHeight;
                                        if (thumbRatio < imageRatio) {
                                            thumbHeight = (int)(thumbWidth / imageRatio);
                                        } else {
                                            thumbWidth = (int)(thumbHeight * imageRatio);
                                        }
                                         
                                        // draw original image to thumbnail image object and
                                        // scale it to the new size on-the-fly
                                        BufferedImage thumbImage = new BufferedImage(thumbWidth, thumbHeight, BufferedImage.TYPE_INT_RGB);
                                        Graphics2D graphics2D = thumbImage.createGraphics();
                                        graphics2D.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
                                        graphics2D.drawImage(image, 0, 0, thumbWidth, thumbHeight, null);
                                         
                                        // save thumbnail image to outFilename
                                        BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(outFilename));
                                        JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
                                        JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(thumbImage);
                                        quality = Math.max(0, Math.min(quality, 100));
                                        param.setQuality((float)quality / 100.0f, false);
                                        encoder.setJPEGEncodeParam(param);
                                        encoder.encode(thumbImage);
                                        out.close();
                                    }

                                9. Creating JSON data in Java

                                Read this article for more details.
                                Download JAR file json-rpc-1.0.jar (75 kb)

                                import org.json.JSONObject;
                                ...
                                ...
                                JSONObject json = new JSONObject();
                                json.put("city", "Mumbai");
                                json.put("country", "India");
                                ...
                                String output = json.toString();
                                ...

                                10. PDF Generation in Java using iText JAR

                                Read this article for more details.
                                import java.io.File;
                                import java.io.FileOutputStream;
                                import java.io.OutputStream;
                                import java.util.Date;
                                 
                                import com.lowagie.text.Document;
                                import com.lowagie.text.Paragraph;
                                import com.lowagie.text.pdf.PdfWriter;
                                 
                                public class GeneratePDF {
                                 
                                    public static void main(String[] args) {
                                        try {
                                            OutputStream file = new FileOutputStream(new File("C:\\Test.pdf"));
                                 
                                            Document document = new Document();
                                            PdfWriter.getInstance(document, file);
                                            document.open();
                                            document.add(new Paragraph("Hello Kiran"));
                                            document.add(new Paragraph(new Date().toString()));
                                 
                                            document.close();
                                            file.close();
                                 
                                        } catch (Exception e) {
                                 
                                            e.printStackTrace();
                                        }
                                    }
                                }

                                11. HTTP Proxy setting in Java

                                Read this article for more details.
                                System.getProperties().put("http.proxyHost", "someProxyURL");
                                System.getProperties().put("http.proxyPort", "someProxyPort");
                                System.getProperties().put("http.proxyUser", "someUserName");
                                System.getProperties().put("http.proxyPassword", "somePassword");

                                12. Java Singleton example

                                Read this article for more details.
                                Update: Thanks Markus for the comment. I have updated the code and changed it to more robust implementation.

                                public class SimpleSingleton {
                                    private static SimpleSingleton singleInstance =  new SimpleSingleton();
                                 
                                    //Marking default constructor private
                                    //to avoid direct instantiation.
                                    private SimpleSingleton() {
                                    }
                                 
                                    //Get instance for class SimpleSingleton
                                    public static SimpleSingleton getInstance() {
                                 
                                        return singleInstance;
                                    }
                                }
                                One more implementation of Singleton class. Thanks to Ralph and Lukasz Zielinski for pointing this out.
                                public enum SimpleSingleton {
                                    INSTANCE;
                                    public void doSomething() {
                                    }
                                }
                                 
                                //Call the method from Singleton:
                                SimpleSingleton.INSTANCE.doSomething();

                                13. Capture screen shots in Java

                                Read this article for more details.
                                import java.awt.Dimension;
                                import java.awt.Rectangle;
                                import java.awt.Robot;
                                import java.awt.Toolkit;
                                import java.awt.image.BufferedImage;
                                import javax.imageio.ImageIO;
                                import java.io.File;
                                 
                                ...
                                 
                                public void captureScreen(String fileName) throws Exception {
                                 
                                   Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
                                   Rectangle screenRectangle = new Rectangle(screenSize);
                                   Robot robot = new Robot();
                                   BufferedImage image = robot.createScreenCapture(screenRectangle);
                                   ImageIO.write(image, "png", new File(fileName));
                                 
                                }
                                ...

                                14. Files-Directory listing in Java

                                File dir = new File("directoryName");
                                  String[] children = dir.list();
                                  if (children == null) {
                                      // Either dir does not exist or is not a directory
                                  } else {
                                      for (int i=0; i < children.length; i++) {
                                          // Get filename of file or directory
                                          String filename = children[i];
                                      }
                                  }
                                 
                                  // It is also possible to filter the list of returned files.
                                  // This example does not return any files that start with `.'.
                                  FilenameFilter filter = new FilenameFilter() {
                                      public boolean accept(File dir, String name) {
                                          return !name.startsWith(".");
                                      }
                                  };
                                  children = dir.list(filter);
                                 
                                  // The list of files can also be retrieved as File objects
                                  File[] files = dir.listFiles();
                                 
                                  // This filter only returns directories
                                  FileFilter fileFilter = new FileFilter() {
                                      public boolean accept(File file) {
                                          return file.isDirectory();
                                      }
                                  };
                                  files = dir.listFiles(fileFilter);

                                15. Creating ZIP and JAR Files in Java

                                import java.util.zip.*;
                                import java.io.*;
                                 
                                public class ZipIt {
                                    public static void main(String args[]) throws IOException {
                                        if (args.length < 2) {
                                            System.err.println("usage: java ZipIt Zip.zip file1 file2 file3");
                                            System.exit(-1);
                                        }
                                        File zipFile = new File(args[0]);
                                        if (zipFile.exists()) {
                                            System.err.println("Zip file already exists, please try another");
                                            System.exit(-2);
                                        }
                                        FileOutputStream fos = new FileOutputStream(zipFile);
                                        ZipOutputStream zos = new ZipOutputStream(fos);
                                        int bytesRead;
                                        byte[] buffer = new byte[1024];
                                        CRC32 crc = new CRC32();
                                        for (int i=1, n=args.length; i < n; i++) {
                                            String name = args[i];
                                            File file = new File(name);
                                            if (!file.exists()) {
                                                System.err.println("Skipping: " + name);
                                                continue;
                                            }
                                            BufferedInputStream bis = new BufferedInputStream(
                                                new FileInputStream(file));
                                            crc.reset();
                                            while ((bytesRead = bis.read(buffer)) != -1) {
                                                crc.update(buffer, 0, bytesRead);
                                            }
                                            bis.close();
                                            // Reset to beginning of input stream
                                            bis = new BufferedInputStream(
                                                new FileInputStream(file));
                                            ZipEntry entry = new ZipEntry(name);
                                            entry.setMethod(ZipEntry.STORED);
                                            entry.setCompressedSize(file.length());
                                            entry.setSize(file.length());
                                            entry.setCrc(crc.getValue());
                                            zos.putNextEntry(entry);
                                            while ((bytesRead = bis.read(buffer)) != -1) {
                                                zos.write(buffer, 0, bytesRead);
                                            }
                                            bis.close();
                                        }
                                        zos.close();
                                    }
                                }

                                16. Parsing / Reading XML file in Java

                                Sample XML file.
                                xml version="1.0"?>
                                <students>
                                    <student>
                                        <name>John</name>
                                        <grade>B</grade>
                                        <age>12</age>
                                    </student>
                                    <student>
                                        <name>Mary</name>
                                        <grade>A</grade>
                                        <age>11</age>
                                    </student>
                                    <student>
                                        <name>Simon</name>
                                        <grade>A</grade>
                                        <age>18</age>
                                    </student>
                                </students>
                                Java code to parse above XML.
                                package net.viralpatel.java.xmlparser;
                                 
                                import java.io.File;
                                import javax.xml.parsers.DocumentBuilder;
                                import javax.xml.parsers.DocumentBuilderFactory;
                                 
                                import org.w3c.dom.Document;
                                import org.w3c.dom.Element;
                                import org.w3c.dom.Node;
                                import org.w3c.dom.NodeList;
                                 
                                public class XMLParser {
                                 
                                    public void getAllUserNames(String fileName) {
                                        try {
                                            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
                                            DocumentBuilder db = dbf.newDocumentBuilder();
                                            File file = new File(fileName);
                                            if (file.exists()) {
                                                Document doc = db.parse(file);
                                                Element docEle = doc.getDocumentElement();
                                 
                                                // Print root element of the document
                                                System.out.println("Root element of the document: "
                                                        + docEle.getNodeName());
                                 
                                                NodeList studentList = docEle.getElementsByTagName("student");
                                 
                                                // Print total student elements in document
                                                System.out
                                                        .println("Total students: " + studentList.getLength());
                                 
                                                if (studentList != null && studentList.getLength() > 0) {
                                                    for (int i = 0; i < studentList.getLength(); i++) {
                                 
                                                        Node node = studentList.item(i);
                                 
                                                        if (node.getNodeType() == Node.ELEMENT_NODE) {
                                 
                                                            System.out
                                                                    .println("=====================");
                                 
                                                            Element e = (Element) node;
                                                            NodeList nodeList = e.getElementsByTagName("name");
                                                            System.out.println("Name: "
                                                                    + nodeList.item(0).getChildNodes().item(0)
                                                                            .getNodeValue());
                                 
                                                            nodeList = e.getElementsByTagName("grade");
                                                            System.out.println("Grade: "
                                                                    + nodeList.item(0).getChildNodes().item(0)
                                                                            .getNodeValue());
                                 
                                                            nodeList = e.getElementsByTagName("age");
                                                            System.out.println("Age: "
                                                                    + nodeList.item(0).getChildNodes().item(0)
                                                                            .getNodeValue());
                                                        }
                                                    }
                                                } else {
                                                    System.exit(1);
                                                }
                                            }
                                        } catch (Exception e) {
                                            System.out.println(e);
                                        }
                                    }
                                    public static void main(String[] args) {
                                 
                                        XMLParser parser = new XMLParser();
                                        parser.getAllUserNames("c:\\test.xml");
                                    }
                                }

                                17. Convert Array to Map in Java

                                import java.util.Map;
                                import org.apache.commons.lang.ArrayUtils;
                                 
                                public class Main {
                                 
                                  public static void main(String[] args) {
                                    String[][] countries = { { "United States", "New York" }, { "United Kingdom", "London" },
                                        { "Netherland", "Amsterdam" }, { "Japan", "Tokyo" }, { "France", "Paris" } };
                                 
                                    Map countryCapitals = ArrayUtils.toMap(countries);
                                 
                                    System.out.println("Capital of Japan is " + countryCapitals.get("Japan"));
                                    System.out.println("Capital of France is " + countryCapitals.get("France"));
                                  }
                                }

                                18. Send Email using Java

                                import javax.mail.*;
                                import javax.mail.internet.*;
                                import java.util.*;
                                 
                                public void postMail( String recipients[ ], String subject, String message , String from) throws MessagingException
                                {
                                    boolean debug = false;
                                 
                                     //Set the host smtp address
                                     Properties props = new Properties();
                                     props.put("mail.smtp.host", "smtp.example.com");
                                 
                                    // create some properties and get the default Session
                                    Session session = Session.getDefaultInstance(props, null);
                                    session.setDebug(debug);
                                 
                                    // create a message
                                    Message msg = new MimeMessage(session);
                                 
                                    // set the from and to address
                                    InternetAddress addressFrom = new InternetAddress(from);
                                    msg.setFrom(addressFrom);
                                 
                                    InternetAddress[] addressTo = new InternetAddress[recipients.length];
                                    for (int i = 0; i < recipients.length; i++)
                                    {
                                        addressTo[i] = new InternetAddress(recipients[i]);
                                    }
                                    msg.setRecipients(Message.RecipientType.TO, addressTo);
                                    
                                 
                                    // Optional : You can also set your custom headers in the Email if you Want
                                    msg.addHeader("MyHeaderName", "myHeaderValue");
                                 
                                    // Setting the Subject and Content Type
                                    msg.setSubject(subject);
                                    msg.setContent(message, "text/plain");
                                    Transport.send(msg);
                                }

                                19. Send HTTP request & fetching data using Java

                                import java.io.BufferedReader;
                                import java.io.InputStreamReader;
                                import java.net.URL;
                                 
                                public class Main {
                                    public static void main(String[] args)  {
                                        try {
                                            URL my_url = new URL("http://www.viralpatel.net/blogs/");
                                            BufferedReader br = new BufferedReader(new InputStreamReader(my_url.openStream()));
                                            String strTemp = "";
                                            while(null != (strTemp = br.readLine())){
                                            System.out.println(strTemp);
                                        }
                                        } catch (Exception ex) {
                                            ex.printStackTrace();
                                        }
                                    }
                                }

                                20. Resize an Array in Java

                                /**
                                * Reallocates an array with a new size, and copies the contents
                                * of the old array to the new array.
                                * @param oldArray  the old array, to be reallocated.
                                * @param newSize   the new array size.
                                * @return          A new array with the same contents.
                                */
                                private static Object resizeArray (Object oldArray, int newSize) {
                                   int oldSize = java.lang.reflect.Array.getLength(oldArray);
                                   Class elementType = oldArray.getClass().getComponentType();
                                   Object newArray = java.lang.reflect.Array.newInstance(
                                         elementType,newSize);
                                   int preserveLength = Math.min(oldSize,newSize);
                                   if (preserveLength > 0)
                                      System.arraycopy (oldArray,0,newArray,0,preserveLength);
                                   return newArray;
                                }
                                 
                                // Test routine for resizeArray().
                                public static void main (String[] args) {
                                   int[] a = {1,2,3};
                                   a = (int[])resizeArray(a,5);
                                   a[3] = 4;
                                   a[4] = 5;
                                   for (int i=0; i
                                      System.out.println (a[i]);
                                }