java

Many of you might have wondered, as I did, how to deal with integers of say more than 50 digits or so. And might have thought about breaking the integer into parts or storing it in a string and parse letter-by-letter.
Java provides a class for such large numbers: BigInteger.
You can find it in the package: java.math.BigInteger
We can do some operations like addition, subtraction, multiplication, division etc, but slightly in a different way.
For detailed information on its usage, have a look at this.
Today I tried to a new project in eclipse and on clicking
File>New> 
I found
<No Applicable Items>
I'm not able to create any kind of project. Then I found a solution on ecipse discussion group.
There are some selections in the IDE in the upper right corner; Java, JAVA EE and Resource etc. It was set to Java EE. When I selected JAVA, I can now create new projects again
Today Apple released much awaited update cum upgrade OSX Mavericks as a free update.

You can download it from App Store. Here is the list of new features:

iBooks
• Download and read books from the iBooks Store.
• Pick up right where you left off. iCloud keeps your current page up to date across all your devices.
• Swipe through Multi-Touch books with interactive features, diagrams, photos, videos, and more.
• Keep multiple books open while using other apps — great for writing a paper or doing research.

Maps
• Send directions from your Mac to your iPhone and use voice navigation when you’re on the go.
• Explore select cities in stunning, photo-realistic 3D with Flyover.
• See detailed directions, real-time traffic, and alternate routes.
• Find restaurants, stores, and other places of interest with local search in Maps.

Calendar
• Create new events in a snap with the new, streamlined event inspector.
• Enter event locations fast with address autocompletion.
• Add walking or driving travel time to your event so you know when to leave.
• See a map of your event’s location, as well as the weather forecast for that day.
• See holidays and Facebook events in Calendar.

Safari
• Use Shared Links to discover new, interesting links posted by people you follow on Twitter and LinkedIn.
• Browse longer thanks to new core technologies that boost energy efficiency.
• Easily access your bookmarks, Reading List, and Shared Links in the new Sidebar.
• Protect your online privacy with new tracking-prevention features.

iCloud Keychain
• Don’t worry about remembering passwords — iCloud Keychain fills them in so you don’t have to.
• Keep your website passwords, credit card numbers, and Wi-Fi passwords up to date across your trusted devices. Robust 256-bit AES encryption helps keep your information safe.
• Sign in once to all of your mail, contacts, calendar, and other internet accounts, and iCloud pushes them to all your Mac computers.

Multiple Displays
• Just plug in a second display to use it with your Mac — no configuration required.
• Access the Dock and the menu bars on each display.
• Use full-screen apps on any or all of your displays.
• Use your HDTV as a second display with Apple TV.

Notifications
• Reply to mail or messages right from a notification, without having to leave the app you’re using.
• Receive notifications for incoming FaceTime calls and reply with an iMessage or set a callback reminder.
• Receive notifications from websites, even when Safari isn’t running.

Finder Tabs
• Declutter your desktop by consolidating multiple Finder windows into one.
• Move files between your tabs by simply dragging and dropping them.
• Select a custom view — icon, list, or column — for each of your tabs.
• Use tabs with full-screen Finder to organize and access all your files and folders.

Tags
• Organize files with tags no matter where they’re located — in iCloud or on your Mac.
• Give a document as many tags as you want.
• Click a tag in the Finder sidebar to see all the files with that tag.

Advanced Technologies
• With energy-saving core technologies in OS X Mavericks, you can surf the web longer on a single charge.
• Watching iTunes HD video is now more efficient, so you can watch more video when you’re not plugged in.
• App Nap regulates applications you’re not using so they consume less energy.

iCloud Keychain on iPhone, iPad, and iPod touch requires iOS 7.0.3.

Multiple Display with Apple TV and an HDTV works with Apple TV (2nd generation or newer), iMac (mid 2011 or newer), Mac mini (mid 2011 or newer), MacBook Air (mid 2011 or newer), MacBook Pro (early 2011 or newer), and Mac Pro (late 2013).

[Source] : https://itunes.apple.com/us/app/os-x-mavericks/id675248567?mt=12&ls=1
Hello guys,
I planned to start this section a long back, but due to some of the reasons, which even I don't know, hadn't made it.
From now onwards, along with the regular workarounds, tips and tuts, I would like to blog some of the good web development tutorials, plugins etc and also good templates I came across.
So keep visiting...............

Today I'm searching for a way to mount a remote directory on my local machine, such that it acts like a local machine. The sole reason is to run the remotely compiled code locally.
I've found a nice article on it and would like to blog it here.
Here we go:
  • Install SSHFS:
sudo apt-get install sshfs
  • Add root to the fuse group: 
sudo adduser root fuse 
  • Create the local backup director

mkdir backup
  • Then mount the remote /home directory to backup:
sshfs -o idmap=user <username>@<remote system's ip>:/home backup
  • Let's check if the remote directory got mounted to /backup:
mount
df -h
  • To unmount the directory
fusermount -u backup
Check the backup folder to see your remote directory...

Source: howtoforge
java
Sometimes we would like to save the output from console into a file and to do this we use some stream writer/reader to read from console and write to a file.

But this can be done in much easier way as follows. Add the following code at the beginning of the program:
PrintStream out = new PrintStream(new FileOutputStream("output.txt"));
System.setOut(out);
Now the default behaviour of out is changed to PrintStream out, and the output is redirected to the file provided above.

Edit:
To reset the standard behaviour, add the following code
System.setOut(stdout);
ubuntu bug

Quite often we ran into some bug on Ubuntu. Thanks to such a huge community which provides solutions to many of them. Today I found a thread which includes most of the bugs and their workarounds. Here is the link.
Known Hardy bugs and workarounds

Popular Labels

Featured Post (TOP)

Flickr Images

Follow Me on Facebook.com

Follow on Google+

Recent Posts

AD (728x60)

Pages

Powered by Blogger.

Labels

Followers

Popular Posts

Popular Posts

Subscribe Via Email

Sign up for our newsletter, and well send you news and tutorials on web design, coding, business, and more! You'll also receive these great gifts: