About Joseph

Joseph 25, a computer engineer primarily , is a mouse potato, blogger, and a professional technology trainer. He started to get interested in computers and technology, since early 90's. Trying to find different problems, sometimes he posts weird and amazing things. Joseph believes in the quote, "Better to find the problem, than finding a solution".

Coffee and Diabetes – Can Coffee reduce the risk of Diabetes?

Coffee and Diabetes

Coffee and Diabetes

According to recent American Research, persons who have sufficient intake of coffee in a single day, have less susceptible to the risk of being caught the disease of Diabetes in future. It has also been proved through the research that almost 120,000 workers of health sector, who increased their quantity of caffeine intake along with change in their food and diet and took almost 1.5 cup daily, reduced the risk of Diabetes type 2 by 11 percent. This is about only those people who consistently used coffee for 4 consecutive years. Moreover, those who increased the intake of coffee by 2 cups, they reduced the risk of Diabetes by 18%. Changing the intake of coffee habitually, can also bring rapid change in the risk of being caught by Diabetes, said by principal investigator of Boston team of public health, at Harvard Med school. The persons, whose intake is 3 cups of coffee in a day, can reduce the chance of being Diabetic by 37%.

Coffee and Diabetes

This all information and statistics was collected by experimenting and studying over the cases of about 95000 Females and 28000 males for at least research of Four (4) Years. At the end, the persons were tested for Type 2 Diabetes. During the test, patients of Blood Pressure and Cholesterol were already warned about the test.

Below a graph is also shown roughly based on the results.

Coffee and Diabetes

Cartoons about coffees (fact).

Coffee and Diabetes

Something even more involving more knowledge about the relationship of coffee and Diabetes.

Coffee and Diabetes

NOTE: If you really loved our article about “Coffee and Diabetes – Can Coffee reduce the risk of Diabetes?“, then we warmly welcome you to share it with your friends and family members by just clicking the social media icons given below.

China will become world’s largest economy and will take over USA

As we know that China is world’s second largest economy and United States is first among all. Financial and economic critics have opinion that China should become the world’s largest economy now and will rule the world’s economy.

Technical Economics facts

The nominal Gross domestic Product (GDP) for USA estimated for year 2013 is $16.799 trillion, While China’s estimated nominal GDP for 2013 is $9.182 trillion. Although, it is quite clear that China’s economy is way far behind US (almost half), but USA may will abate very soon. English language, Education System, IT market could be the reasons behind it. China is communist, while US is having strong political system too.

According to the world bank, This year china is set to overtake US economy and eventually China will become world’s largest economy.

After remaining superpower for 100 years, The great America will be lagging behind china. So, the power and economy will be shifted towards east from the west. Watch this video report below for further information.

Don’t hesitate to share this information with your friends. See ya.

Optimised Prime Numbers generation and testing (JAVA Code)

Hi, there.

This code was actually written by our teacher, who was an expert in Object Oriented Programming and JAVA. We are placing his code here, to make it public. This code is for Optimised Prime Numbers generation.

 

Thank you sir for the code.

Optimised prime number generation algorithm

Optimised Prime Numbers generation and testing (JAVA Code)

import java.io.*;
import java.util.Set;
import java.util.LinkedHashSet;
import java.util.Iterator;

public class PrimeNumber {
	public void findPrimes(long[] primes) {
		if (primes.length == 0) return;

		primes[0] = 2;
		for (int i=1; i < primes.length; i++) {
			primes[i] = findNextPrime(primes[i-1]);
		}
	}

	public long[] findPrimes(long from, long to) {
		Set primeSet = new LinkedHashSet();

		for (long i = from; i <= to; i++) {
			long prime = findNextPrime(i);
			if (prime <= to) primeSet.add(new Long(prime));
			i = prime-1;
		}

		long[] primes = new long[primeSet.size()];
		Iterator it = primeSet.iterator();
		for(int i=0; it.hasNext(); i++) {
			primes[i] = ((Long)it.next()).longValue();
		}

		return primes;
	}

	public long findNextPrime(long num) {
		for (long i=num+1; ;i++) {
			if (isPrime(i)) return i;
		}
	}

	public void printPrimes(long[] primes) {
		for (int i=0; i < primes.length; i++) {
			System.out.println(primes[i]);
		}
	}

	public boolean savePrimes(long[] primes, String dirName, String fileName)
								throws IOException {
		if (!createFile(dirName, fileName)) return false;

		DataOutputStream primeStream = new DataOutputStream(
										new BufferedOutputStream(
										new FileOutputStream(fileName)));
		for (int i=0; i < primes.length; i++) {
			primeStream.writeLong(primes[i]);
		}

		primeStream.close();

		return true;
	}

	public boolean savePrimesAsText(long[] primes, String dirName, String fileName)
								throws IOException {
		if (!createFile(dirName, fileName)) return false;

		BufferedWriter primeWriter = new BufferedWriter(new FileWriter(fileName));
		for (int i=0; i < primes.length; i++) {
			primeWriter.write(Long.toString(primes[i]));
			//primeWriter.newLine();
		}

		primeWriter.close();

		return true;
	}

	private boolean createFile(String dirName, String fileName) {
		try {
			File primeDir = new File(dirName);
			File primeFile = new File(fileName);

			if (!primeDir.exists()) primeDir.mkdir();
			if (!primeFile.exists()) primeFile.createNewFile();
		} catch (IOException e) {
			e.printStackTrace();
			return false;
		}

		return true;
	}

	public boolean isPrime(long num) {
		//System.out.println("isPrime: " + num);
		if (num == 2) return true;
		if (num%2 == 0) return false;

		long limit = (int)Math.ceil(Math.sqrt(num));
		//long limit = (int)(Math.sqrt(num));
		for (long i = 3; i <= limit; i+=2) {
			if (num%i == 0) return false;
		}

		return true;
	}

	public boolean isPrimeSlow(long num) {
		int count =0;

		for (long i = 1; i <= num; i++) {
			if (num%i == 0) count++;
		}

		if (count == 2) {
			return true;
		} else {
			return false;
		}
	}

	public static void main(String[] args) throws IOException {
		PrimeNumber pn = new PrimeNumber();
		long[] primes = pn.findPrimes(1, 20);

		pn.printPrimes(primes);
		pn.savePrimes(primes, "C:/Practice", "primes.data");
		pn.savePrimesAsText(primes, "C:Practice", "primes.txt");

		System.out.println("Primes saved successfully");
	}

/*	public static void main(String[] args) {
		PrimeNumber pn = new PrimeNumber();
		long primes[] = new long[100];

		pn.findPrimes(primes);
		pn.printPrimes(primes);
	}
*/

/*	public static void main(String[] args) {
		PrimeNumber pn = new PrimeNumber();
		boolean ansSlow, ansFast;

		long num = Long.parseLong(args[0]);

		long t1 = System.nanoTime();
		ansSlow = pn.isPrimeSlow(num);
		long t2 = System.nanoTime();
		ansFast = pn.isPrimeFast(num);
		long t3 = System.nanoTime();

		//System.out.println(ansFast);
		System.out.println("Slow=" + (t2-t1)/1000 + " Fast=" + (t3-t2)/1000);
	}
*/

}

Additionally, you can download the file for optimised prime numbers generation from link below (Mediafire public link).

http://adf.ly/mWzIN

 

 

Kindly comment here freely, If you are feeling any problems regarding optimised prime number generation, Share it here.
Good Day.

A good story, a great life lesson

Recently, while using one of the social networks, i went through an status of friend, who actually discussed a very good story, it was reflecting a great life lesson. I have decided to put it here for making it the part of Internet.

life

 

A professor stood before his Philosophy class and had some items in front of him. When the class began, wordlessly picked up a very large and empty mayonnaise jar and proceeded to fill it with golf balls. He then asked the students if the jar was full. They agreed it was.

The professor picked up a box of pebbles and poured it into the jar. He shook the jar lightly. The pebbles rolled into the open areas between the golf balls. He then asked the students if the jar was full. They agreed it was.

The professor picked up a box of sand and poured it into the jar. Of course, the sand filled up everything else. He asked once more if the jar was full .. The students responded with an unanimous “yes.”

The professor then produced two beers from under the table and poured the entire contents into the jar effectively filling the empty space between the sand. The students laughed ..

‘Now,’ said the professor as the laughter subsided, ‘I want you to recognize that this jar represents your life. The golf balls are the important things – your family, your children, your health, your friends and your favorite passions – and if everything else was lost and only they remained, your life would still be full. The pebbles are the other things that matter like your job, your house and your car .. The sand is everything else – the small stuff.

‘If you put the sand into the jar first, “he continued,” there is no room for the pebbles or the golf balls. The same goes for life.

If we spend all our time and energy on the small stuff you will never have room for the things that are important to you.

Pay attention to the things that are critical to your happiness.

Spend time with your children. Spend time with your parents. Visit with grandparents. Take your partner out to dinner. Play another 18. There will always be time to clean the house and mow the lawn.

Take care of the golf balls first – the things that really matter. Set your priorities. The rest is just sand.

One of the students raised her hand and inquired what the coffee represented. The professor smiled and said. “Glad you asked ‘Beer just shows you that no matter how full your life may seem, there’s always room for a couple of beers with a friend.

 

So, see how the lesson is quite clear! told in the story clearly.

Facebook acquires whatsapp says Zuckerburg

Facebook is now world’s leading website and a business company too. It has fixed many deals with smaller companies and acquired them. Facebook is not only a social media and networking site, additionally it is a big business firm, which advertises many other companies and earn a lot of money from them.

FACEBOOK ACQUIRES WHATSAPP

In his Facebook status, Facebook’s chief Mark Zuckerberg confirmed the news saying Facebook acquires Whatsapp, a popular instant messaging app and service used over variety of platforms.

zuckerburg announces that facebook acquires whatsapp

 

His first paragraph of the status says that ,” I’m excited to announce that we’ve agreed to acquire WhatsApp and that their entire team will be joining us at Facebook.”

Furthermore, he said “Our mission is to make the world more open and connected. We do this by building services that help people share any type of content with any group of people they want. WhatsApp will help us do this by continuing to develop a service that people around the world love to use every day.

WhatsApp is a simple, fast and reliable mobile messaging service that is used by over 450 million people on every major mobile platform. More than 1 million people sign up for WhatsApp every day and it is on its way to connecting one billion people. More and more people rely on WhatsApp to communicate with all of their contacts every day.

WhatsApp will continue to operate independently within Facebook. The product roadmap will remain unchanged and the team is going to stay in Mountain View. Over the next few years, we’re going to work hard to help WhatsApp grow and connect the whole world. We also expect that WhatsApp will add to our efforts forInternet.org, our partnership to make basic internet services affordable for everyone.

WhatsApp will complement our existing chat and messaging services to provide new tools for our community. Facebook Messenger is widely used for chatting with your Facebook friends, and WhatsApp for communicating with all of your contacts and small groups of people. Since WhatsApp and Messenger serve such different and important uses, we will continue investing in both and making them each great products for everyone.

WhatsApp had every option in the world, so I’m thrilled that they chose to work with us. I’m looking forward to what Facebook and WhatsApp can do together, and to developing great new mobile services that give people even more options for connecting.

I’ve also known Jan for a long time, and I know that we both share the vision of making the world more open and connected. I’m particularly happy that Jan has agreed to join the Facebook board and partner with me to shape Facebook’s future as well as WhatsApp’s.

Jan and the WhatsApp team have done some amazing work to connect almost half a billion people. I can’t wait for them to join Facebook and help us connect the rest of the world.” Source [Mark’s facebook status]

facebook acquires whatsapp

It seems quite clear from his status that really Facebook acquires whatsapp. Whatsapp has more than 40 million users worldwide, making it worth up to $3 Billion. Despite of its such a big worth, Facebook authorities have agreed to buy it even at more than 6 times of its worth. Yes, they are paying $19 Billion. source [TechCruch], while other sources like [mashable]  and [CNBC] says that facebook has bought whatsapp for $16 Billion. After Facebook acquires Whatsapp, it will even give Facebook more power and penetration is the social media.

That’s definitely a new news for technology geeks!

We will meet later on sometimes with a some new post! see yeah!