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 <stdlib.h> | |
#include <stdio.h> | |
#define PAGE_SIZE 8192 | |
/* | |
* main | |
* | |
* Translate a 32-bit virtual (hexadecimal) address and produce | |
* its corresponding page number and page offset for a system |
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
""" | |
Jared Halpert | |
11/5/14 | |
concat | |
Concatenate two lists of elements composed of any data type | |
into one list of elements composed of any data type | |
@param {list} a list of elements |
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
/* | |
* CenterImage | |
* | |
* Derive display parameters for centering an image within an arbitrary display area | |
* | |
* @build Processing sketch app | |
* @fileType .pde | |
* @description no physical image used, the image is defined by its dimensions (w, h) and position (x, y) | |
*/ |
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
""" | |
Problem: use 1D array to simulate 2D array | |
""" | |
array_1D = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] | |
array_2D = [[0, 1, 2, 3], [4, 5, 6, 7], [8, 9, 10, 11]] | |
""" | |
simulate_2D_array |
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
{ | |
"apiVersion": "0.0.1", | |
"swaggerVersion": "1.2", | |
"apis": [ | |
{ | |
"path": "/foo", | |
"description": "test foo.js" | |
} | |
] | |
} |
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
// Euler's Method | |
// http://en.wikipedia.org/wiki/Euler_method | |
// user input: n, d, x, and poly | |
// poly: dx/dt == f(t,x) | |
// n: # of steps | |
// d: domain a <= t <= b | |
// x: initial value | |
// h: step size | |
// t: the delta of current steps taken |
NewerOlder