HOME

USING SCANNER FOR INPUT IN JAVA

Scanner is a class in java.util package used for obtaining the input of the primitive types like int, double etc. and strings.

In Java, we input with the help of the Scanner class. Java has a number of predefined classes which we can use.

import java.util.Scanner;  // This will import just the Scanner class
import java.util.*;  // This will import the entire java.util package

Continue reading “USING SCANNER FOR INPUT IN JAVA”

Advertisements

Sum of digits in c or c++ without pointers

 

Screen Shot 2017-08-16 at 1.30.35 PM

SO, the main logic behind this is=:

b = a%10; // we took the remainder after dividing by 10 thats the last digit

sum = sum+ (b*c); // adding last digit to sum

a = a/10; //to remove last digit from a

c= c/10; //to remove last digit from a

and in last we will return sum.

Append in rails

Screen Shot 2017-07-27 at 12.05.43 AM

THESE both line ; the line 3 and 9 meant same.

You can use either of them. These lines are used when you want to append html pages using ajax.

What is Bitcoin?

The founder of Bitcoin is Satoshi Nakamoto, an anonymous online alias for a forum poster. The founder remains unknown, and no one truly knows who the actual founder is.

Bitcoin is the first global, decentralized currency that allows you to send money from one person to another without involving a third party broker, such as a bank. You only need your computer to make transactions because Bitcoin is fundamentally software.

As a decentralized currency, Bitcoin isn’t controlled by anyone. It’s open so that anyone can benefit from it.

You might think that the lack of control could mean chaos, but that’s not true at all. That’s because Blockchain, the technology behind Bitcoin is one of the most accurate and secure systems ever created.

A blockchain is a ledger that keeps records of digital transactions. Instead of having a central administrator, like a bank or the government, blockchain organizes data in batches called blocks. These data batches use cryptographic validation to link themselves together. In other words, each block identifies and references the previous block by a hash value, forming an unbroken chain.

Blockchain solves two of the most challenging problems of digital transactions: controlling the information and avoiding duplication. When a purchase is carried out, the ledger records it and sends it out to the entire network. Computers all over the world then compete to confirm the operation by solving complex math equations. The first to figure out the answer and validate the block receives a reward in Bitcoins (this process is called mining.)

The validated block is timestamped and added to a chain in chronological order. The entire chain is continually updated so that it’s always an accurate representation of who owns what at any given time.

The legality of Bitcoin depends on where you’re located. Bitcoin was legalized as a formal method of payment in Japan this year, and India might be next. In most countries, however, it somewhat operates in a gray zone, with no official ban or approval of Bitcoin.

The founder of Bitcoin is Satoshi Nakamoto, an anonymous online alias for a forum poster. The founder remains unknown, and no one truly knows who the actual founder is.

At the moment, Bitcoin is owned by the community as a whole, as it is an open source initiative, with no single owner behind it. It is a community movement.

The hidden tricks of Macbook Pro

Taking screenshots of any size

Simply press Shift, Command and 3 at the same time; the screenshot will then be stored on your desktop. For a portion of the screen, the shortcut is Shift-Command-4 with the same output directory. To only capture an individual window, you can press Shift-Command-4, hit the spacebar, then click the window you’re trying to capture.

Type exotic characters

Go to the Edit menu of most apps and you’ll see Special Characters at the bottom. This panel gives you access to a huge range of symbols you can drag into your documents. Not all apps or operating systems support them, but these are mostly part of the cross-platform Unicode standard. There are probably more than you see at first too , click the cog to reveal more.

Sign PDFs right in Mail

Drag a PDF into the email you’re sending, hover over it then at the top right you’ll see a little button appear; click it, and you get a range of Markup options, including one for signing documents. Best of all, you can either add your signature by holding a signed piece of paper up to the webcam on your Mac – and it does a great job of cutting it out of the background – or by drawing on your trackpad.

Making your own keyboard shortcut

Go to System Preferences > Keyboard > Application Shortcuts. Click the + button to add a new shortcut. You can choose which app you want to apply it to from the drop-down list, but you must know the exact name of the menu command to type into the next box, including the correct case and any special characters such as ellipses. Lastly, choose a unique key combination to invoke the command, then click Add.

Making a wifi hotspot

For it to work, all you have to do is head into Settings then Sharing then navigate to the “Share your connection from:” dropdown box. From there, you can choose the source of the network connection you’re looking to share. Then pick “To computers using Wi-Fi” within that respective menu.

Email huge files

With Mail since Yosemite, though (and in fact with the webmail version of Mail at icloud.com), you can email files up to 5GB in size. What in fact happens is that the attachment really gets uploaded to iCloud, and then a link is sent to your recipient where they have 30 days from which to download it.

 

Using WhatsApp Without Internet

Everyone is familiar with WhatsApp. Even though it is a free-to-use app, still huge amount is paid for the Internet data used by it. But, with the advancement in technology and the presences of awesome apps, you can reduce the Internet expenses of yours and gain access to the whatsApp without internet. How? It is possible by WhatSim.

WhatSim is one of the latest SIM card designed by Manuel Zanella (the CEO of the Zeromobile). This SIM card provides you the facility to receive and send various messages through the WhatsApp. According to the company, the tool WhatSim hooks up to more than 400 operators all around the world (i.e. to about 150 countries).

Priced at a budget-friendly rate of 10 euros (which is approximately about Rs. 714), this tool permits you to use the whatsapp without internet pack, and that too for a year. Receiving and sending messages, sharing contact numbers and locations are some of the best features of the WhatSim. However, to download and send multimedia related files, users might have to increase the given balance of the WhatsApp and that too depending on which geographical location you are living.

For each recharge of 5 euros, the users of WhatSim will get about 1,000 credits. As India is in the Zone 3, you need 150 credits for sharing photos, 30 credits to transfer voice messages and 600 credits to share videos on the WhatsApp. Individuals who get the maximum benefits are the students and it is even a boon for people who are residing in low connectivity areas.

The developer of WhatSim, Manuel Zanella declared that he would be introducing special version of WhatSim at 10 euros for countries which are termed as Global South by the UN.

Share ZIP, PDF, EXE, APK, RAR and Big Files (WHATSAPP)

As we all know whatsapp came with the limitation that we can only send audio, video and images with it. But by this trick, you will be able to send or share ZIP, PDF, EXE, APK, RAR and even big files with your friends on whatsapp.

  1. First of all install DropBox and CloudSend Application in your mobile.
  2. Open CloudSend, you will be prompted to link with Dropbox, Click Allow.
  3. Share the file on CloudSend which you want to share with your friends on whatsapp.
  4. File be automatically uploaded to your DropBox server and link will be provided to that file.
  5. Copy the generated link and share it with your friend on WhatsApp. Your friend can open that link and can able to download the file in their mobile.

Lesser known keyboard shortcuts in MS WORD

Here are some more keyboard shortcuts in Microsoft Word for Windows.

Shortcut Does this
Ctrl+Shift+8 Toggles formatting marks on and off
Ctrl+1 Applies single-line spacing to the selected paragraph(s)
Ctrl+2 Applies double-line spacing to the selected paragraph(s)
Ctrl+5 Applies 1.5-line spacing to the selected paragraph(s)
Ctrl+0 (zero) Toggles the ‘space before’ setting for the paragraph where the cursor is to 12 pt (if some other value) or 0 pt (if the previous setting was 12 pt)
Alt+Ctrl+z Jump to your previous editing location

Blog at WordPress.com.

Up ↑