Skip to content

Instantly share code, notes, and snippets.

var InputXML = "qld_example.xml";
var WordXSL = "word_qld_authority.xsl";
function CreateWordDoc()
{
var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.6.0");
xmlDoc.async = false;
xmlDoc.load(InputXML);
var xsl = new ActiveXObject("Msxml2.DOMDocument.6.0");
@richardlehane
richardlehane / element_matching.c
Created February 9, 2011 08:12
every rule should have a default action
MatchRule register_rule (MatchRule *rule, int type, gchar *name, (void *action)(void))
{
MatchRule new_rule;
MatchRule *next = rule;
new_rule.type = type;
new_rule->name = name;
new_rule->action = action;
new_rule->subrule = NULL;
new_rule->fails = NULL;
#include "itchy.h"
int main (int argc, char* argv[]) {
char* new_doc = "<hello/>";
gtk_init(&argc, &argv);
hello = itchy_application_new();
doc = itchy_doc_new(new_doc, "hello", 0);
itchy_application_add_doc(hello, doc);
class PunchCard:
hourly_rate = 47.82
notify_interval = 3600.0
shift_start = 0
lunch_start = 0
lunch_mins = 0
timer = 0
def calculate_cost():
start = to_mins(shift_start)
<interface>
<object class="GtkUIManager" id="uiman">
<child>
<object class="GtkActionGroup" id="actiongroup">
<child>
<object class="GtkAction" id="file">
<property name="label">_File</property>
</object>
</child>
</object>
#include <gtk/gtk.h>
void on_destroy (GtkObject *object, gpointer user_data)
{
gtk_main_quit ();
}
int main( int argc,
char *argv[] )
{