This file contains hidden or 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
| { | |
| "actors": [ | |
| { "id": 1, "name": "Bryan Cranston", "starred": true }, | |
| { "id": 2, "name": "Aaron Paul", "starred": true }, | |
| { "id": 3, "name": "Bob Odenkirk", "starred": true }, | |
| { "id": 4, "name": "Dean Norris", "starred": false } | |
| ] | |
| } |
This file contains hidden or 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
| // Client-side code | |
| /* jshint browser: true, jquery: true, curly: true, eqeqeq: true, forin: true, immed: true, indent: 4, latedef: true, newcap: true, nonew: true, quotmark: double, undef: true, unused: true, strict: true, trailing: true */ | |
| // Server-side code | |
| /* jshint node: true, curly: true, eqeqeq: true, forin: true, immed: true, indent: 4, latedef: true, newcap: true, nonew: true, quotmark: double, undef: true, unused: true, strict: true, trailing: true */ |
This file contains hidden or 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
| #!/usr/bin/env node | |
| "use strict"; | |
| var http = require("http"), | |
| querystring = require("querystring"), | |
| child_process = require("child_process"); | |
| function writeCSS(res) { | |
| res.writeHead(200, { |
This file contains hidden or 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
| /* genlogs.c - Generate fake log entries to stdout */ | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <time.h> | |
| #include <unistd.h> | |
| #define DATE_MAX_CHARS 25 | |
| #define SIZE(a) (sizeof(a) / sizeof(*(a))) |
This file contains hidden or 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
| message: This is a message defined in the configuration file config.yaml | |
| messageRepetitions: 3 | |
| database: | |
| driverClass: org.hsqldb.jdbc.JDBCDriver | |
| user: cpsc476 | |
| password: Passw0rd | |
| url: jdbc:hsqldb:hsql://localhost/cpsc476;ifexists=true |
This file contains hidden or 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" ?> | |
| <!-- | |
| HSQLDB database server | |
| Install Ant | |
| Place this build.xml in a directory by itself | |
| (e.g. C:\hsqldb or $HOME/hsqldb) |
This file contains hidden or 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 (typeof message !== "undefined") { %> | |
| <%= message %> | |
| <% } %> | |
| <form method="POST"> | |
| State: | |
| <input type=text name="state" | |
| <% if (typeof state !== "undefined") { %> | |
| value="<%= state %>" | |
| <% } %> | |
| size="2" maxlength="2"> |
This file contains hidden or 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 (typeof message !== "undefined") { %> | |
| <%= message %> | |
| <% } %> | |
| <form method="POST"> | |
| State: | |
| <input type=text name="state" | |
| value="<%= state %>" size=2 maxlength=2> | |
| <input type="submit"> | |
| </form> |
This file contains hidden or 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
| (function(global) { | |
| if (typeof java !== "undefined") { | |
| this.console = { log: function(s) { println(s); } } | |
| // Download from https://raw.github.com/micmath/Rhino-Require/master/src/require.js | |
| load("require.js"); | |
| } | |
| }(this)); | |
| // Call console.log() and require() as usual |
This file contains hidden or 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
| /* | |
| Per <http://stackoverflow.com/questions/5691901/using-the-underscore-module-with-node-js>, | |
| from the Node.js REPL, use two underscores (__) instead of a single underscore (_) | |
| because Node uses _ for the last return value. | |
| Note that if your program is in a file, you can still use a single underscore (_). | |
| */ | |
| var __ = require("underscore"); | |
| __.each([1, 2, 3], function(e) { console.log(e); }); |