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
Mitch Pronschinske05/01/13
3479 views
0 replies

Links You Don't Want To Miss (May 1)

Get some advice for dealing with burnout or if you find that you don't want to program anymore. Plus some important news about the JS spec "Promises" and a 17 year old girl who won a major hackathon.

Johanna Rothman04/30/13
2688 views
0 replies

Personal Kanban and Iterations, Day 2

And, since I’m cheating on how to do a real personal kanban, I thought I would at least describe for you how to do real personal kanban over at Personal Kanban for Your Job Hunt.

//Code for Joining Multiple Documents Together

[C#]
 
// The document that the other documents will be appended to.
Document doc = new Document();
// We should call this method to clear this document of any existing content.
doc.RemoveAllChildren();

int recordCount = 5;
for (int i = 1; i <= recordCount; i++)
{
    // Open the document to join.
    Document srcDoc = new Document(@"C:\DetailsList.doc");

    // Append the source document at the end of the destination document.
    doc.AppendDocument(srcDoc, ImportFormatMode.UseDestinationStyles);

    // In automation you were required to insert a new section break at this point, however in Aspose.Words we
    // don't need to do anything here as the appended document is imported as separate sectons already.

    // If this is the second document or above being appended then unlink all headers footers in this section
    // from the headers and footers of the previous section.
    if (i > 1)
        doc.Sections[i].HeadersFooters.LinkToPrevious(false);
} 
 
[VB.NET]
 

' The document that the other documents will be appended to.
Dim doc As New Document()
' We should call this method to clear this document of any existing content.
doc.RemoveAllChildren()

Dim recordCount As Integer = 5
For i As Integer = 1 To recordCount
    ' Open the document to join.
    Dim srcDoc As New Document("C:\DetailsList.doc")

    ' Append the source document at the end of the destination document.
    doc.AppendDocument(srcDoc, ImportFormatMode.UseDestinationStyles)

    ' In automation you were required to insert a new section break at this point, however in Aspose.Words we
    ' don't need to do anything here as the appended document is imported as separate sectons already.

    ' If this is the second document or above being appended then unlink all headers footers in this section
    ' from the headers and footers of the previous section.
    If i > 1 Then
        doc.Sections(i).HeadersFooters.LinkToPrevious(False)
    End If
Next i
Sean Hull04/30/13
2440 views
0 replies

I Thought Sales Sucked, Then I Gained a Business Perspective...

The sales team made promises of technology the company wasn’t capable of delivering. Meanwhile the engineering team was sent scrambling to answer to those promises. This is why I started out hating sales in my early career.

John Sonmez04/29/13
1494 views
0 replies

How To Deal With Making Mistakes

It is to easy to get hung up on a mistake and become paralyzed by it in such a way that it prevents you from having future success. I seem to have an instinctual desire to throw away what I am doing or try to completely wipe the board clean, whenever I make a mistake.

Roman Pichler04/29/13
1368 views
0 replies

Agile Scenarios and Storyboards

Scenarios and storyboards are great tools to describe how users interact with a product. They also complement user stories nicely: Scenarios and boards help explore risky stories, discover new user stories, and capture the relationship between stories.

Martin Fowler04/29/13
3991 views
0 replies

The Component Test

A component test is a test that limits the scope of the exercised software to a portion of the system under test. It is in contrast to a Broad-Stack Test that's intended to exercise as much of the system as is reasonable.

Jim Bird04/29/13
4768 views
0 replies

Code Ownership – Who Should Own the Code?

A key decision in building and managing any development team is agreeing on how ownership of the code will be divided up: who is going to work on what code; how much work can be, and should be, shared across the team; and who will be responsible for code quality.

Zac Gery04/29/13
4000 views
0 replies

Multitasking is Bad?!?

Denouncing multitasking might sound crazy, but let's put some context around the statement. Multitasking made the modern computer a viable solution. The desire for people to multitask in business is a natural progression.

Kane Mar04/29/13
3084 views
0 replies

A Collection of Funny Scrum Videos

Richard Hundhausen has put together a great list of funny Scrum/Agile related videos. Some of these are classics such as High Moon Studios: Portrait of Scrum and Adam Weisbart’s Shit Bad Scrum Masters say.

Giorgio Sironi04/28/13
759 views
0 replies

How to stub SOAP in PHP

How wonderful is the world of REST (or maybe ROT) web services... But many legacy and enterprise systems that we need to integrate are only accessible via SOAP. With a bit of experience and the right testing support, SOAP web services are not technologically difficult to call from PHP code.

Oscar Berg04/28/13
6476 views
0 replies

Is the Office Really the Best Place to Get Work Done?

Yahoo’s decision to ban working from home can hardly have escaped anyone’s attention. Whatever the reasons might be, to me their decision sends out a signal of desperation and reveals that Yahoo's management is incapable of dealing with flexible working.

Martin Fowler04/28/13
2981 views
1 replies

Business Facing Test

A business-facing test is a test that's intended to be used as an aid to communicating with the non-programming members of a development team such as customers, users, business analysts and the like.

Rob Allen04/27/13
4441 views
0 replies

Adding Diff Syntax Highlighting to Sublime Text

My chosen color scheme for Sublime Text doesn't include support for diff/patch files, so I added my own.

Esther Derby 04/26/13
1095 views
1 replies

Are Part-Time Workers Part of the Team?

“Part-timers just don’t seem to fit in with the team,” a manager complained recently. “I do everything I can to impress on them the importance of teamwork and team spirit, but they just don’t gel with the team. What can I do to motivate these people to fit in?”