Big Data/Analytics Zone is brought to you in partnership with:
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
Mark Needham07/21/14
2345 views
0 replies

R: ggplot: Problem automatically picking scale for difftime object

I thought it’d be interesting to create some visualisations around the times that people RSVP ‘yes’ to the various Neo4j events that we run in London. I tried to use ggplot to create a bar chart of the data. Unfortunately that resulted in this error:

Johanna Rothman07/21/14
3754 views
0 replies

What is Your Minimum Agile Reading List?

I have created a Minimum Reading List for an Agile Transition. Note the emphasis on minimum. I could have added many more books to this list. But the problem I see is that people don’t read anything. They think they do agile if they say they do agile.

Phil Whelan07/21/14
365 views
0 replies

Release! Card Game Adds New Twist to Software Development

"Release!" is a card game about making software inspired by development strategies like Lean, Agile, and DevOps.

Chris Odell07/19/14
3636 views
0 replies

Agile Decompiled : Incremental And Iterative Releases

Proponents of the Waterfall Model suggest that by doing all the design up front and making sure that each part of the process is correct before moving onto the next part, means that bugs are found sooner and therefore costs are reduced.

Jim Bird07/18/14
6950 views
0 replies

Trust instead of Threats

According to Dr. Gary McGraw’s ground breaking work on software security, up to half of security mistakes are made in design rather than in coding. For the last 10 years we’ve been told that we are supposed to do this through threat modeling. What else can we do to include security in application design?

Mike Bushong07/18/14
4996 views
0 replies

Open Compute, Open Switch API and Open Network Install Environment

Much has been published about the Open Compute Project. Initiated by Facebook, it has become an industry effort focused on standardization of many parts and components in the datacenter. It’s not a huge innovative leap, but it’s a significant convenience.

Johanna Rothman07/18/14
3097 views
0 replies

Do Teams Gel or Jell?

In my role as technical editor for agileconnection.com, I have the opportunity to read many terrific articles. I also have the opportunity to review and comment on those articles.

Gil Fink07/18/14
5343 views
0 replies

Quick Tip: AngularJS Controller Destructor

One of the things you might need to do is to clean up resources when a controller in AngularJS is being deactivated. The following code example shows how to use the $destroy event to remove an event handler that was registered in some pubsubService:

Alexey Kutuzov07/18/14
7069 views
0 replies

Docker using private registry

There is an easy way to define Docker container using Dockerfile. The other way to do it is private Docker registry. I will install now MongoDB in a Docker container w/o Dockerfile

Robert Diana07/18/14
3446 views
0 replies

Geek Reading July 17, 2014

These items are a combination of tech business news, development news and programming tools and techniques.

Len DiMaggio07/17/14
485 views
0 replies

If Bad Things Happen to Good Automated Tests - How Red Deer Helps you to Debug Failed Tests

This is the fourth in a series of posts on the new JBoss Red Deer automated test framework. This post describes features in Red Deer that make it easier to debug test failures.

Alec Noller07/17/14
3909 views
0 replies

The Best of DZone: July 9 - 16

If you missed anything on DZone this week, now's your chance to catch up! This week's best include reasons not to switch to Java 8 (yet), Raspberry Pi's new release, the Dockerized future, the downsides of Google Play Services 5.0, the good, bad, and ugly of JSON, and more.

Kristina Chodorow07/17/14
4823 views
0 replies

Sharing Programming

I’m going to be volunteer teaching AP computer science this fall at a NYC high school! Aside from actually prepping them for the AP exam, I’ve been thinking about how to share the programming culture I love with the students. Off the top of my head, I’d like to tell them about:

Chris Odell07/17/14
3428 views
0 replies

Every Library Needs an Index

Imagine walking into a library, and having to walk up and down the aisles trying to find the book you want. Imagine walking into a hardware store, row upon row and shelf upon shelf. But nobody has put any signs up. Do you document your code libraries and keep an index?

Roman Pichler07/17/14
2895 views
0 replies

10 Tips for Creating an Agile Product Strategy with the Vision Board

Traditionally, a product strategy is the result of months of market research and business analysis work. It is intended to be factual, reliable, and ready to be implemented. But in an agile, dynamic environment a product strategy is best created differently.

Matthew Turland07/17/14
2473 views
0 replies

Speaking Resources

I was fortunate enough to recently be accepted to the inaugural php[world] conference. Shortly thereafter, a friend of mine within the community inquired about submitting to and speaking at conferences. I thought I’d post the resources I shared with them here for others interested in the same topic.

Mike Bushong07/17/14
1999 views
0 replies

Bare metal switching, pricing, and the impacts on resellers

Most people in the IT space understand the trend towards bare metal everything (servers, switches, etc.). The movement to commodity hardware drives down costs in infrastructure where price is disproportionately determined by the cost of hardware.

Kai Wähner07/17/14
1601 views
0 replies

Enterprise Integration Patterns Revisited in 2014

This slide deck revisits Enterprise Integration Patterns (EIP) and gives an overview about the status quo. Fortunately, EIPs offer more possibilities than just be used for modelling integration problems in a standardized way. Several frameworks and tools already implement these patterns.

Alec Noller07/16/14
2641 views
0 replies

Devs of the Week: Jeffrey Kim & Trevor Gasdaska

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 getting a different sort of perspective from DZone's development interns, Jeffery Kim and Trevor Gadaska!

//The sample code below shows how to use the steps above to run OCR on part of an image. 

//[C#]

const string resourceFileName = @"Aspose.OCR.Resources.zip";

try
{
    //Create an instance of OcrEngine and assign 
    //image, language and image settings
    OcrEngine ocrEngine = new OcrEngine();
    ocrEngine.Image = ImageStream.FromFile("Sample.bmp");

    ocrEngine.Languages.AddLanguage(Language.Load("english"));
    ocrEngine.Config.UseDefaultDictionaries = true;

    //Define the block in which to recognize text
    int startX = 0, startY = 0, width = 120, height = 100;

    //Clear recognition blocks
    ocrEngine.Config.ClearRecognitionBlocks();

    //Add 3 rectangle blocks to user defined recognition blocks
    ocrEngine.Config.AddRecognitionBlock(RecognitionBlock.CreateTextBlock(startX, startY, width, height));

    //Set the resource file name and extract OCR text
    using (ocrEngine.Resource = new FileStream(resourceFileName, FileMode.Open))
    {
        try
        {
            if (ocrEngine.Process())
            {
                //Retrieve user defined blocks that determines the paye layout
                var blocks = ocrEngine.Config.RecognitionBlocks;
                //Loop over the list of blocks
                foreach (var block in blocks)
                {
                    //Display if block is set to be recognized
                    Console.WriteLine(block.ToRecognize);
                    //Check if block has recognition data
                    if (block.RecognitionData == null)
                    {
                        Console.WriteLine("Null{0}", Environment.NewLine);
                        continue;
                    }
                    //Display dimension & size of rectangle that defines the recognition block
                    Console.WriteLine("Block: {0}", block.Rectangle);
                    //Display the recognition results
                    Console.WriteLine("Text: {0}{1}", block.RecognitionData.Text, Environment.NewLine);
                }
            }
        }
        catch (Exception ex)
        {
            Console.WriteLine("Exception: " + ex.Message);
        }
    }
    ocrEngine = null;
}
catch (Exception ex)
{
    Console.WriteLine("Exception: " + ex.Message);
} 
 

//[VB.NET]
 
Const resourceFileName As String = "Aspose.OCR.Resources.zip"

Try
	'Create an instance of OcrEngine and assign 
	'image, language and image settings
	Dim ocrEngine As New OcrEngine()
	ocrEngine.Image = ImageStream.FromFile("Sample.bmp")

	ocrEngine.Languages.AddLanguage(Language.Load("english"))
	ocrEngine.Config.UseDefaultDictionaries = True

	'Define the block in which to recognize text
	Dim startX As Integer = 0, startY As Integer = 0, width As Integer = 120, height As Integer = 100

	'Clear recognition blocks
	ocrEngine.Config.ClearRecognitionBlocks()

	'Add 3 rectangle blocks to user defined recognition blocks
	ocrEngine.Config.AddRecognitionBlock(RecognitionBlock.CreateTextBlock(startX, startY, width, height))

	'Set the resource file name and extract OCR text
	ocrEngine.Resource = New FileStream(resourceFileName, FileMode.Open)
	Using ocrEngine.Resource
		Try
			If ocrEngine.Process() Then
				'Retrieve user defined blocks that determines the paye layout
				Dim blocks = ocrEngine.Config.RecognitionBlocks
				'Loop over the list of blocks
				For Each block In blocks
					'Display if block is set to be recognized
					Console.WriteLine(block.ToRecognize)
					'Check if block has recognition data
					If block.RecognitionData Is Nothing Then
						Console.WriteLine("Null{0}", Environment.NewLine)
						Continue For
					End If
					'Display dimension & size of rectangle that defines the recognition block
					Console.WriteLine("Block: {0}", block.Rectangle)
					'Display the recognition results
					Console.WriteLine("Text: {0}{1}", block.RecognitionData.Text, Environment.NewLine)
				Next block
			End If
		Catch ex As Exception
			Console.WriteLine("Exception: " & ex.Message)
		End Try
	End Using
	ocrEngine = Nothing
Catch ex As Exception
	Console.WriteLine("Exception: " & ex.Message)
End Try