DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
  • submit to reddit
Tinu Awopetu07/27/09
34724 views
5 replies

NetBeans IDE 6.7.1 with JavaFX Now Available for Download!

The NetBeans Team is pleased to announce the release of NetBeans IDE 6.7.1, which supports the latest JavaFX SDK. Download NetBeans 6.7.1 (A JavaFX-only download bundle is also available.) NetBeans IDE 6.7.1 is an update to NetBeans IDE 6.7 and includes the...

Rick Ross02/14/08
13982 views
16 replies

Welcome to DZone's new IndicZone community for Indian IT Pros

Let me welcome all of you to the new DZone community for one of the most important and fastest growing groups in the worldwide IT scene: Indian developers and IT professionals. No matter where you look, if something interesting is happening on the IT and...

Oscar Berg10/31/14
188 views
0 replies

Compelling facts about email (ab)use in organizations

It has almost become a truism that the average corporate employee spends around 25-30 percent of the workday on email related tasks. For example, McKinsey found that workers spend 28% of their workweek on reading e-mails. By comparison we spend 14 percent of our time, or just 6.4 hours per week, on "communicating and collaborating internally."

Adi Gaskell10/31/14
128 views
0 replies

Peer Academy aims to drive change collaboratively

The last few years have seen learning take on an unquestionably more social air to it. Whether it’s MOOCs bringing higher education to the masses or a raft of new social games, there are a whole host of new ways for people to learn online, and to do so in a more social way.

Hearsay Social10/31/14
587 views
0 replies

Advisor use of social media matures, regulatory requirements are still a challenge

Last week we attended the sold out SIFMA Social Media Seminar in New York City, a one-day event in the heart of Wall Street that brings together experts from a variety of business roles including marketing, business, compliance, and legal, as well as financial advisors, to discuss the expanding use of social media for financial services.

Illya Pavlichenko10/31/14
174 views
0 replies

Brainswarming because Brainstorming does not work

An interesting fact, but no study since 1953 has confirmed the benefits of Brainstorming. You can use a different approach called Brainswarming that has many disadvantages. Create creative and innovative solutions using natural swarming.

Dmitry Filippov10/30/14
11 views
0 replies

PyCharm Educational Edition is here to teach you programming with Python!

Please welcome PyCharm Educational Edition, a new easy-to-use yet powerful Python IDE for learning and teaching Python programming!

Interact Intran...10/30/14
908 views
0 replies

Considering Your Collaboration and Knowledge Management as a Freemium Model

Freemium has become a popular model throughout software, from mobile apps and games which are free to download and then charge you to hasten progress or receive exclusive prizes, through to enterprise software which gives free access for a set period of time, for example you can trial Interact for 30 days for free and then decide if you wish to purchase it on a subscription basis.

Adi Gaskell10/30/14
269 views
0 replies

When good news isn’t welcome on social media

I wrote recently about some new research that explored the sharing of good news. The study wanted to explore the hypothesis that those around us would love to hear the exciting and wonderful things we have to share.

Christopher Blake10/30/14
959 views
0 replies

Digital Disruption - Sad but even Google isn't going far enough with their new "Inbox that works for you"

Google is someone that I have associated with rapid innovation and positive digital disruption in the past, and on the surface I was quite excited to read about their 'reinvention' of their inbox and email.

Robert Reeves10/30/14
875 views
0 replies

Your Job is to Manage, Automate, and Improve - So, Why Are You Only Doing the First Part?

No matter what position you have in IT, you can distill your job down to three tasks - Manage, Automate, and Improve.

Anshul Mittal10/30/14
210 views
0 replies

Resuable BPEL Subprocesses in Oracle SOA 12c

Oracle SOA Suite provides a subprocess extension to BPEL. A subprocess is a fragment of BPEL code that can be reused within a particular processor by separate processes. BPEL process code reusability, which reduces the need to create the same activities multiple times to perform the same tasks. Subprocesses are only supported with BPEL version 2.0. There is no support with BPEL version 1.1. Subprocesses cannot be shared between multiple composites.

Julia Wunder10/29/14
34 views
0 replies

Jelastic Version 2.5 Released: Automatic Horizontal Scaling, Multiple Nodes of Different Middleware Layers, Improved and Extended Marketplace

Jelastic, Inc., the first company that combined Unlimited PaaS (Platform-as-a-Service) and IaaS (Infrastructure-as-a-Service) in one solution, announced today a new Jelastic version 2.5 with support for multiple nodes of different stacks, automatic horizontal...

public class ThreadProc implements Runnable {

	boolean isRunning = true;
	Workbook testWorkbook;
	Random r = new Random();

	public ThreadProc(Workbook workbook)
	{
		this.testWorkbook = workbook;
	}

	public int randomNext(int Low, int High)
	{
		int R = r.nextInt(High-Low) + Low;
		return R;
	}

	public void kill()
	{
		this.isRunning = false;
	}

    public void run(){

    	while(this.isRunning)
    	{
            int row = randomNext(0, 100);
            int col = randomNext(0, 10);

            String s = testWorkbook.getWorksheets().get(0).getCells().get(row, col).getStringValue();

            if (s.equals("R" + row + "C" + col)!=true)
            {
                System.out.println("This message box will show up when cells read values are incorrect.");
            }
    	}
    }
  }


//........MainActivity.java........
//.................................
import java.io.File;
import java.util.Random;

import android.app.Activity;
import android.os.Bundle;
import android.os.Environment;
import android.view.Menu;

import com.aspose.cells.CellsHelper;
import com.aspose.cells.IWarningCallback;
import com.aspose.cells.WarningInfo;
import com.aspose.cells.WarningType;
import com.aspose.cells.Workbook;

public class MainActivity extends Activity {

@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		
try{
    Workbook testWorkbook = new Workbook();
    testWorkbook.getWorksheets().clear();
    testWorkbook.getWorksheets().add("Sheet1");

    for (int row = 0; row < 100; row++)
        for (int col = 0; col < 10; col++)
            testWorkbook.getWorksheets().get(0).getCells().get(row, col).setValue("R" + row + "C" + col);

    //Commenting this line will show a pop-up message
    testWorkbook.getWorksheets().get(0).getCells().setMultiThreadReading(true);

    ThreadProc tp = new ThreadProc(testWorkbook);

    Thread myThread1 = new Thread(tp);
    myThread1.start();

    Thread myThread2 = new Thread(tp);
    myThread2.start();

    Thread.currentThread().sleep(5*1000);
    tp.kill();
}
		catch (Exception e)
		{
			e.printStackTrace();
		}
	}

.........

}

John Walter10/29/14
5382 views
0 replies

Dev of the Week: Michael Hunger

Every week here and in our newsletter, we feature a new developer/blogger from the DZone community to catch up and find out what he or she is working on now and what's coming next. This week we're talking to Michael Hunger, Neo4j Developer Advocate and author of our upcoming Neo4j Refcard.

John Walter10/29/14
6683 views
0 replies

The Best of DZone: Oct. 22 - Oct. 29

If you missed anything on DZone this week, now's your chance to catch up! This week's best include navigating the DSL Jungle, a look at Google Analytics, a tutorial for updating your legacy code, and more.

Kevin Daly10/29/14
1218 views
0 replies

Don’t Expect Female Candidates to “Geek Out” With You When You Are Interviewing Them

Why are there not more women in software development? What can we do to improve this?

Illya Pavlichenko10/29/14
302 views
1 replies

Perfection Game + SSKML Retrospective

This article describes in detailes how to conduct a Retrospective created by combining two well-known formats "Perfection Game" and "Stop/Start/Keep/More/Less". Lots of images precise facilitation instructions will help you to understand how to use it during your next Sprint Retrospective.

Interact Intran...10/29/14
416 views
0 replies

What happened at Interaction Intranet Conference 2014

The largest intranet conference in Europe kicked off with what is fast becoming a tradition of the conference – a video of Interact’s CEO Nigel Danson’s children. Their Oscar worthy performance showcases time wasting in organisations with repetition being one of the biggest culprits, begging the question “is it time for a social intranet?”.

Adi Gaskell10/29/14
512 views
0 replies

What ignites the fire of innovation within an organization?

Innovation is hard. I don’t think anyone really disputes that. It often makes the innovator rather unpopular amongst their peers, and there tends to be a well established army willing to fight tooth and nail to preserve what already is rather than plump for the uncertainty of what might be.