devxlogo

Tip Bank

Making Complex Arrays

Sometimes you need a vector or list of associations. An association is a pair of values that has some link in the problem model. For example, a student and grade

Escape Sequences in .NET Resource Files

Displaying strings from.NET resource files may be a puzzle if the strings include escape sequences. For example, take the newline (linefeed) character. Suppose you want to display a hardcoded text

Reading Multiple Variables Simultaneously

Suppose you want to input name, age, and grade from the console. You may write: string name,int age;int grade;cin >> name;cin >> age;cin >> grade; But it’s also possible to

Signing a .jar File in Java

Everyone wants their applications to be secure and to disallow unauthorized changes. Java makes this task relatively easy for developers and deployment teams with the jarsigner tool. Assuming you have

How Do I Know When the “Handshake” Is Over?

The following code is a JSSE client application that uses the HandshakeCompletedListener interface to find out when a handshake is over. import java.net.*;import java.io.*;import javax.net.*;import javax.net.ssl.*;class contact_server implements HandshakeCompletedListener{Socket SSLsoclu=null;