This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <gtk/gtk.h> | |
void on_destroy (GtkObject *object, gpointer user_data) | |
{ | |
gtk_main_quit (); | |
} | |
int main( int argc, | |
char *argv[] ) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- This XSL stylesheet demonstrates how a batch file can be generated to automatically create directory structures that correspond to the terms (functions and activities) of an XML authority. --> | |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:rda="http://www.records.nsw.gov.au/schemas/RDA" version="1.0" > | |
<xsl:output method="text" encoding="UTF-8"/> | |
<xsl:include href="include/utils.xsl"/> | |
<xsl:template match="/"> | |
<xsl:apply-templates select="//rda:Term"/> | |
</xsl:template> | |
<xsl:template match="rda:Term"> | |
<!-- the "%~dp0" creates the new directories in the directory where the batch file sits. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# This script generates a CSV that can be used by Propublica's timeline-setter | |
# tool to make a nice timeline. It calls out to Wikipedia and Wragge's TROVE | |
# api to fill out the data provided by State Records NSW in the ministries.xml file. | |
# | |
# | |
require 'rubygems' | |
require 'nokogiri' | |
require 'net/http' | |
require 'date' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(mods.m::location.m::shelfLocator.length()) { | |
// change behaviour | |
newItem.archiveLocation = mods.m::location.m::shelfLocator.text().toString(); | |
newItem.archive = mods.m::location.m::physicalLocation.text().toString(); | |
} else { | |
// leave as is | |
newItem.archiveLocation = mods.m::location.m::physicalLocation.text().toString(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type keyFrame struct { | |
Typ OffType // defined in frames.go | |
Min int | |
Max int | |
Alive func(int)(bool, int, int) // return L and R distances for tests | |
} |
OlderNewer