Skip to content

Instantly share code, notes, and snippets.

View mhansen's full-sized avatar
🏠
Trying

Mark Hansen mhansen

🏠
Trying
View GitHub Profile
function outerFunction(id) {
var outerFunctionVariable = id;
return function innerFunction() {
return outerFunctionVariable;
}
}
var a = outerFunction(5);
a() //returns 5
var car = {
"odometer" : 100000,
"drive" : function(distance) {
if (distance > 0) this.odomoter += distance;
}
};
var car = {
"odometer" : 100000,
"drive" : function(distance) {
if (distance > 0) this.odomoter += distance;
}
};
function makeCar(initialOdometer) {
var privateOdometer = initialOdometer;
return {
"getOdometer" : function() {
return privateOdometer;
}
"drive" : function(distance) {
if (distance > 0) privateOdometer += distance;
}
};
/** Define enum class that will popuplate your combo box */
public enum E_ComboBoxEnum {
Item1("Item 1"),
Item2("Item 2"),
Item3("Item 3");
/* Mark Hansen 1082336 */
//uri is in the form /pages/mh168/ or form
public void URI2LocalPath(string uri) {
// convert directory listings to directory/index.html
if (uri.endsWith("/")) uri += "index.html";
//remove first slash so java searches from the local directory, not the root of the filesystem
if (uri.startsWith("/")) uri.replaceFirst("/", "");
We couldn’t find that file to show.
--- oldsrc/include/minix/com.h 2009-10-22 18:24:30.366723300 +1300
+++ src/include/minix/com.h 2009-10-22 18:09:03.442706300 +1300
@@ -17,61 +17,62 @@
*===========================================================================*/
/* The values of several task numbers depend on whether they or other tasks
* are enabled. They are defined as (PREVIOUS_TASK - ENABLE_TASK) in general.
* ENABLE_TASK is either 0 or 1, so a task either gets a new number, or gets
* the same number as the previous task and is further unused. Note that the
* order should correspond to the order in the task table defined in table.c.
--- oldsrc/tools/Makefile 2009-10-22 18:28:35.954770100 +1300
+++ src/tools/Makefile 2009-10-22 18:08:25.751550500 +1300
@@ -1,49 +1,50 @@
# Makefile for the kernel image.
u=/usr
CC= exec cc
CFLAGS= -O -D_MINIX -D_POSIX_SOURCE
MDEC= /usr/mdec
--- oldsrc/servers/vfs/dmap.c 2009-10-22 18:23:09.689108800 +1300
+++ src/servers/vfs/dmap.c 2009-10-22 18:12:17.095782600 +1300
@@ -17,61 +17,61 @@
#define DT(enable, opcl, io, driver, flags, label) \
{ (enable?(opcl):no_dev), (enable?(io):0), \
(enable?(driver):0), (flags), label, FALSE },
#define NC(x) (NR_CTRLRS >= (x))
/* The order of the entries here determines the mapping between major device
* numbers and tasks. The first entry (major device 0) is not used. The