Performance 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
Has Altaiar08/13/14
2441 views
0 replies

How I Reduced Worker Role Time from >5 Hours to <1 Hour

This post talks about my experience in reducing the execution time of the Worker Role from above 5 hours to under 1 hour. This Worker Role is set up to call some external APIs to get a list of items with their promotions and store them locally.

Mike Driscoll08/12/14
2563 views
0 replies

The new sh Package: A subprocess wrapper

The project’s documentation has lots more information and additional examples that are worth your time perusing. It tells you how to accomplish sub-commands, get exit codes, piping, sub-commands and more.

Benjamin Ball08/12/14
7057 views
0 replies

An Early Mover's Guide to the Internet of Things

In the very near future, as more and more things connect to the internet, internet connectivity from IoT devices will dwarf the amount of traditional web browsing. The core standards and assumptions that will drive this next revolution in computing technology are still being established.

Dave Fecak08/12/14
3776 views
1 replies

"...but I'm negotiable"

Never start negotiating downward until some objection is provided, and don’t mistake the silence of an interviewer as an objection.

Steven Lott08/12/14
5174 views
0 replies

Some Basic Statistics

I've always been fascinated by the essential statistical algorithms. First, some basics. Once we have these, though, the definitions of mean and standard deviation become simple and kind of cool.

Rob Galanakis08/12/14
3210 views
0 replies

You must manage what you can’t measure

If you want to truly engage with employees as empowered and creative individuals, you must manage what you can’t measure. If you want to create a learning organization optimized for long-term health, you must manage what you can’t measure.

Chen Harel08/11/14
6671 views
0 replies

Oracle’s Latest Java 8 Update Broke Your Tools — How Did it Happen?

Learn how the latest Java 8 and Java 7 builds broke some popular 3rd party tools such as JRebel, Javassist, Google’s Guice, and even Groovy itself.

Nicolas Frankel08/11/14
5091 views
0 replies

Sanitizing webapp outputs as an an afterthought

For sure, software security should be part of every developer’s requirements: they should be explained and detailed before development. Unfortunately, it happens in real life that this is not always the case. I’ve been thinking about a way to sanitize the output of a large-scale legacy Spring MVC application in a reliable way (i.e. not go on each page to fix issues).

Robert Greathouse08/11/14
5209 views
0 replies

Create Your Own Private Docker Registry

Shortly after you start building docker containers you will realize that you need some place to publish your images. You could push to the central docker registry. However, the central registry is public. Not a great idea if you are working on a private project.

David Catuhe08/08/14
6350 views
1 replies

JavaScript: using closure space to create real private members

Closure space properties can be a great way to create really private data. You may have to deal with a small increase in memory consumption but from my point of view this is fairly reasonable.

Niels Matthijs08/07/14
9179 views
2 replies

On Messing Up and Missing Deadlines

Looking at all the projects I've worked on over the years, big or small, there's been one nasty constant. A mistake that creeps up on you at least once a project and puts an indelible mark on all future work. And it has everything to do with not sticking to the optimal workflow.

Michael Mccandless08/07/14
4696 views
0 replies

A new proximity query for Lucene, using automatons

As of Lucene 4.10 there will be a new proximity query to further generalize on MultiPhraseQuery and the span queries: it allows you to directly build an arbitrary automaton expressing how the terms must occur in sequence, including any transitions to handle slop.

Hubert Klein Ikkink08/07/14
3437 views
0 replies

Grails Goodness: Using Bintray JCenter as Repository

Bintray JCenter is the next generation (Maven) repository. The repository is already a superset of Maven Central, so it can be used as a drop-in replacement for Maven Central.

Alec Noller08/07/14
6008 views
0 replies

SQL Performance Disasters: Your DBA Just Wants to Help

Your DBA just wants to help. And when you're working with large sets of data - or any sets of data, really - sometimes that's the help you need, because small mistakes can quickly balloon into large ones.

Troy Miles08/07/14
3417 views
0 replies

Ten Groovy Little JavaScript Tips

I gave this talk last year and it is still valid information. The best part is that the tips are quick and easy.

Mike Cottmeyer08/07/14
6067 views
0 replies

Agile in a Remote Workplace World

How do you enable collaboration when team members are working from home? How do remote teams engage in stand up meetings, sprint planning sessions, retrospective meetings, and other Agile ceremonies?

Swathi Venkatachala08/07/14
2923 views
1 replies

Raspberry Pi B+: Connect to your Pi with no display monitor, keyboard or mouse

The moment I had this credit card sized thing on my palm, I was so excited to get started with it. But then, wait! Do you need a HDMI TV or display monitor, USB keyboard and a USB mouse to connect to it? Oh really!? I was not interested to invest any further. Here is what I did.

//open document
com.aspose.pdf.Document pdfDocument = new com.aspose.pdf.Document("/mnt/sdcard/input.pdf");
//create text stamp
com.aspose.pdf.TextStamp textStamp = new com.aspose.pdf.TextStamp("Sample Stamp");
//set properties of the stamp
textStamp.setTopMargin(10);
textStamp.setHorizontalAlignment(com.aspose.pdf.HorizontalAlignment.Center);
textStamp.setVerticalAlignment(com.aspose.pdf.VerticalAlignment.Top);

//set text properties
textStamp.getTextState().setFont(new com.aspose.pdf.FontRepository().findFont("Arial"));
textStamp.getTextState().setFontSize(14.0F);
textStamp.getTextState().setFontStyle(com.aspose.pdf.FontStyles.Bold);
textStamp.getTextState().setFontStyle(com.aspose.pdf.FontStyles.Italic);
textStamp.getTextState().setForegroundColor(java.awt.Color.GREEN);

// iterate through all pages of PDF file
for (int Page_counter =1; Page_counter<=pdfDocument.getPages().size();Page_counter++)
{
    //add stamp to all pages of PDF file
    pdfDocument.getPages().get_Item(Page_counter).addStamp(textStamp);
}
//save output document
pdfDocument.save("/mnt/sdcard/TextStamp_output.pdf");

Alec Noller08/06/14
14887 views
0 replies

Dev of the Week: Andreea Borcea

This week we're talking to Andreea Borcea, developer of patient-empowering solutions for the healthcare industry, co-host of Farstuff: The IoT Podcast, and featured author in DZone's 2014 Guide to Internet of Things.

Andrew Gilmartin08/06/14
7565 views
0 replies

Logging and the utility of message patterns

We use a logging layer over log4j to encourage our developers to log at any point in the code where they thought some extra context would help resolve runtime errors. The layer had to have a familiar API, be effortless to code, and cheap to call. This posting is mostly about the cost to call the logger and a little about enhancing the presentation of logged values.