Monday, July 9, 2012

Evil C


This is a collection of strange C (and some Java) constructs. It's probably best not to use them, but you should know why they work
.

The cast-to-bool operator

Node *left, *right;
int childCount() 

{

Calling C Code from Java


**Using native code with Java applications and the Sun JDK



Introduction


This article shows how to access C code (also called native code) from within Java code. The C code exists as a PowerPC shared library containing several Process Manager calls. The functions in the shared library are used to get and store process information. A Java front-end calls the shared library at specified intervals to retrieve and display the process information. Timing for these calls is accomplished using a thread. The front-end also includes a preferences dialog with a pseudo-custom control written in Java. This program runs as a Java application, not an applet.

Sunday, July 8, 2012

General Keyboard Shortcuts


General Keyboard Shortcuts

  1. CTRL+C (Copy)
  2. CTRL+X (Cut)
  3. CTRL+V (Paste)
  4. CTRL+Z (Undo)
  5. DELETE (Delete)

Saturday, July 7, 2012

Constructing variable length structs in C

A trick to using structs that have a variable sized member is to use an overloaded operator new to allocate space for the struct.

struct string