Systems Developer at Penn State
hjc14@psu.edu / @hectorjcorrea
Slides at: http://tinyurl.com/rdf4rdbms
// A very basic web server in node.js | |
// Stolen from: Node.js for Front-End Developers by Garann Means (p. 9-10) | |
var port = 8000; | |
var serverUrl = "127.0.0.1"; | |
var http = require("http"); | |
var path = require("path"); | |
var fs = require("fs"); | |
var checkMimeType = true; |
var getNewId = function(db, callback) { | |
var counters = db.collection('counters'); | |
var query = {'name': 'myCustomId'}; | |
var order = [['_id','asc']]; | |
var inc = {$inc:{'next':1}}; | |
var options = {new: true, upsert: true}; | |
counters.findAndModify(query, order, inc, options, function(err, doc) { | |
if(err) { |
function isValidTree(root) { | |
// Walk the tree in order and add values to an array. | |
var values = []; | |
walkNode(root, values); | |
if (values.length == 1) { | |
// one-node tree is valid | |
return true; | |
} |
// Validates a binary tree. | |
// This is a much elegant implementation than the previous two | |
// since it does not store an array of all the values, but rather | |
// it just keeps track of the last element compared against. | |
// Also, notice how processing is stopped as soon as a bad | |
// element is found. | |
function isValidTree(root) { | |
var lastValue = null; | |
var validator = function(value) { |
// Validates a binary search tree (BST) to make sure | |
// all nodes are in order. | |
// | |
// Same implementation as https://gist.github.com/hectorcorrea/9064942 in JavaScript | |
class Node(theValue: Int, leftNode: Node, rightNode: Node) { | |
def value = theValue | |
def left = leftNode | |
def right = rightNode | |
override def toString = value.toString |
PS1="\w \$ " | |
alias ls='ls -G -la' | |
# Git aliases | |
alias st='git status' | |
alias br='git branch' | |
alias co='git checkout' | |
alias lg='git log' | |
alias df='git diff' |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>DPLA API demo</title> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> | |
</head> | |
<body> | |
<h2>DPLA API Demo</h2> | |
<p>Enter your DPLA API and git <i>Go</i> to fetch images from the Getty Trust</p> |
Systems Developer at Penn State
hjc14@psu.edu / @hectorjcorrea
Slides at: http://tinyurl.com/rdf4rdbms
This document is a summary of the basic differences between the different kind of containers that Linked Data Platform (LDP) supports.
LDP specifies three types of containers:
This documents describes the differences between the three types of containers by showing what triples are added by an LDP Server when adding a new element to each kind of container.
In particular we assume we have a fictitious blog entry (/blog/entry1/
) and we want to add a comment to it. We start by showing what happens if the blog entry is a Basic Container, then we show what happens if the blog entry was instead a Direct Container, and lastly if it was an Indirect Container.
My notes from the Google Hangout organized by Christina Harlow (@cm_harlow) on 7/14/2015
Keep in mind that I captured this as the video call went on and I might have gotten some of it wrong. I'll update this page with a link to the recording once it becomes available.
FRBR (Functional Requirements for Bibliographic Records) is a 1998 recommendation of the International Federation of Library Associations and Institutions (IFLA) to restructure catalog databases to reflect the conceptual structure of information resources. - http://www.oclc.org/research/activities/frbr.html