NoSQL 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
Alec Noller07/17/14
4038 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
5091 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:

Roman Pichler07/17/14
3033 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.

Chris Odell07/17/14
3557 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?

Kai Wähner07/17/14
2589 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.

Matthew Turland07/17/14
2563 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
2077 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.

Alec Noller07/16/14
2710 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

Gabriel Dimech07/16/14
4033 views
0 replies

Retrieving JMX information programmatically

In order to retrieve JMX information from a Java application, the target application must be configured to expose JMX information. The following Java code allows for polling the JMX agent and retrieving memory, CPU usage and also shows how to remotely invoke the garbage collector:

Andrey Prikaznov07/16/14
4072 views
0 replies

WebGL With Three.js - Lesson 6

In today’s lesson we will look at the load process of ready three-dimensional objects. We will consider how to load three-dimensional models using a variety of loaders.

Andrey Prikaznov07/16/14
2398 views
0 replies

WebGL With Three.js - Lesson 6

In today’s lesson we will look at the load process of ready three-dimensional objects. We will consider how to load three-dimensional models using a variety of loaders.

Mike Bushong07/16/14
2174 views
0 replies

You Are A Topic At Your Employees' Dinner Tables

The transition from individual contributor to management is probably a bit selfish for almost everyone. In that moment when your responsibilities and title change, you will naturally focus your attention on you.

Lorna Mitchell07/16/14
3283 views
0 replies

Quickly add Amazon Cloudfront as a CDN

We needed to look at ways of trying to bring down the pressure on the servers, and decided to use a CDN (Content Delivery Network) for our image files. It was surprisingly painless to implement once I got into it so here it is in case it's helpful.

Angela Ashenden07/16/14
2696 views
0 replies

What's Next for Process Mining?

I [participated] in a panel towards the end of the one-day event focused on the prospects for Process Mining as a discipline and as a technology market; but I was also keen to hear the practitioner stories which made up a large proportion of the event’s schedule.

Mike Cottmeyer07/16/14
1539 views
0 replies

Validation and the Standing Desk

Validation is an engineering activity. In many ways it’s very much how engineers tell a product, “you’re awesome!” Unfortunately, many people don’t really understand what engineering validation really is.

Ariya Hidayat07/16/14
1647 views
0 replies

Build Agent: Template vs Provisioning

Except for various corner cases, build agents nowadays often run in a virtualized environment. With today’s technologies, a template-based build agent is not difficult to handle.

Maarten Ectors07/16/14
1671 views
0 replies

How to Survive Digital Darwinism a.k.a. Company Failure Acceleration?

Why can’t companies adapt to change? The ideal sector to see disruptive innovation at work is the technology sector. Many billions are spend on bringing products to market that fail.

Mark Morrell07/15/14
948 views
0 replies

Turn company jargon into a knowledge gold mine

Why not turn all that company jargon into a knowledge goldmine and create a wiki that can contain them for every employee to view, add or edit to?

Allen Coin07/15/14
3896 views
0 replies

Data Visualization: A Day in the Life of an NYC Taxi

This visualization displays the data for one random NYC yellow taxi on a single day in 2013. See where it operated, how much money it made, and how busy it was over 24 hours.