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
| // Example program | |
| #include <iostream> | |
| #include <iomanip> | |
| using namespace std; | |
| int main () | |
| { | |
| const double COST_PER_CUBIC_FOOT = 0.23; | |
| const double CHARGE_PER_CUBIC_FOOT = 0.5; |
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
| //TODO: clean up after checking for accuracy | |
| /* Returns either the index of the location in the array, | |
| or -1 if the array did not contain the targetValue */ | |
| var doSearch = function(array, targetValue) { | |
| var min = 0; | |
| var max = array.length - 1; | |
| var guess; | |
| for( var i = 0; var i >= max; i++ ) { | |
| guess = ( min + max ) / 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
| """ A brief breakdown of how variables and assignments work in Python through example. | |
| Check out Chapter 4 of 'Learning Python, 4th Edition' """ | |
| # To start, variables serve as a way to identify data objects in Python | |
| # Kinda like a nametag identifies people on the job | |
| # Below is an example of such The format is [variable name] ( applies to [ aka: = ] ) [data object value] | |
| one = 1 # the name "one" is applied to an object with the value of 1 | |
| one = 2 # now, a new object holding a value of 2 is created. one is applied to the new object | |
| one = 1 # so, when we originally switched assignment values: our object valued at 1 was in limbo, waiting to die a la GC |
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
| /* | |
| Summary: Brief demo of linq queries implemented in C# | |
| Disclaimer: This barely scratches the surface of LINQ | |
| I'd suggest looking at ASP.NET Development to get a | |
| more "Real life" taste for LINQ | |
| */ | |
| [Description("This sample uses the where clause to find all customers in Washington " + | |
| "and then it uses a foreach loop to iterate over the orders collection that belongs to each customer.")] | |
| public void Linq4() | |
| { |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using System.Threading.Tasks; | |
| namespace pset6JCS | |
| { |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| namespace pset6JCS | |
| { | |
| class Course | |
| { |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| namespace pset6JCS | |
| { | |
| class Aeroplane : Vehicle | |
| { |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| namespace pset6JCS | |
| { | |
| class Calculator : IDisposable | |
| { |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| namespace pset5JCS | |
| { | |
| class Course | |
| { |
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
| var http = require( 'http' ); | |
| var bl = require( 'bl' ); | |
| var my_url = process.argv[2]; | |
| var responses = []; | |
| function print_the_stuff() { | |
| for( var i = 0; i < responses.length; i++ ) { | |
| console.log( responses[ i ] ); | |
| } | |
| } |