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
function outerFunction(id) { | |
var outerFunctionVariable = id; | |
return function innerFunction() { | |
return outerFunctionVariable; | |
} | |
} | |
var a = outerFunction(5); | |
a() //returns 5 |
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 car = { | |
"odometer" : 100000, | |
"drive" : function(distance) { | |
if (distance > 0) this.odomoter += distance; | |
} | |
}; |
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 car = { | |
"odometer" : 100000, | |
"drive" : function(distance) { | |
if (distance > 0) this.odomoter += distance; | |
} | |
}; |
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
function makeCar(initialOdometer) { | |
var privateOdometer = initialOdometer; | |
return { | |
"getOdometer" : function() { | |
return privateOdometer; | |
} | |
"drive" : function(distance) { | |
if (distance > 0) privateOdometer += distance; | |
} | |
}; |
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
/** Define enum class that will popuplate your combo box */ | |
public enum E_ComboBoxEnum { | |
Item1("Item 1"), | |
Item2("Item 2"), | |
Item3("Item 3"); |
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
/* 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("/", ""); |
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
--- 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. |
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
--- 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 | |
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
--- 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 |
OlderNewer