Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| class Sort { | |
| private int[] a; // ref to array a | |
| private int nElems; // number of data items | |
| public Sort(int max) // constructor | |
| { | |
| a = new int[max]; // create the array | |
| nElems = 0; // no items yet | |
| } |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| double[] a; // 1. declare the array with a name | |
| a = new double[n]; // 2. create the array | |
| for (int i = 0; i < n; i++) // 3. elements are indexed from 0 to n-1 | |
| a[i] = 0.0; // initialize all elements to 0.0 |
| /* Linked List (empty), shows structure of classes and initial members */ | |
| class Node { | |
| public int value; | |
| public Node next; | |
| // Constructor | |
| public Node(int i) { /* blank for now */ } | |
| // Method |
| /* Simple Linked List with Insert First */ | |
| class SimpleLinkedList { | |
| private Node first; // private link to the first element | |
| // constructor sets first to null | |
| public void SimpleLinkedList(){ | |
| this.first = null; | |
| } | |
| public boolean isEmpty(){ |
| /* Double-ended Linked List with Insert First, Insert Last */ | |
| class DoubleEndedLinkedList { | |
| private Node first; // private link to the first element | |
| private Node last; | |
| // constructor sets first to null | |
| public void DoubleEndedLinkedList(){ | |
| this.first = null; | |
| this.last = null; |
This script and example were prepared to show how to use the awk program to split the BlackBoard download to multiple files. This assumes that you selected format of results = By Question and By User, such that each row represents a single question for a single student. See the csv file as an example.
Go to Grade Center > Full Grade Center > Navigate to the Assignment or test's Column > Click on the down arrow next to the column's title > Select Download Results. Select 'By Question and User'. This gives you a file named Test.downloading.csv
To run the awk program file you can try the following command.
| # This program sorts input by a specified column | |
| # Author: Katherine Chuang (@katychuang on Github) | |
| # example awk -v column=2 -f prog.awk data.csv | |
| # | |
| # Program Steps: | |
| # 1. Read input and store items in an array of array. | |
| # 2. Sort by column specified (user input letter c) | |
| # 3. Print the sorted version | |
| BEGIN { |
| const express = require("express"); | |
| const app = express(); | |
| const router = express.Router(); | |
| app.use(express.json()); | |
| const port = 3000; | |
| // Start server | |
| app.listen(port, () => { | |
| console.log("Server running on port %PORT%".replace("%PORT%",port)) |
| See makefile for execution |