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
#include "bigDecimal.h" | |
#include <iostream> | |
#include <sstream> | |
#include <stack> | |
#include <math.h> | |
using namespace std; | |
// helper functions | |
bool isPositive(Node* b){ | |
if(b->data == '-') return false; |
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
#include "bigDecimal.h" | |
#include <iostream> | |
#include <sstream> | |
#include <stack> | |
#include <math.h> | |
#include <cstring> | |
using namespace std; | |
// helper functions | |
bool isPositive(Node* b) { |
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
#include <iostream> | |
using namespace std; | |
#include "TreeNode.h" | |
void insertNodeHelper( TreeNode< int > **ptr, int arr[], int len) | |
{ | |
cout<<len<<endl; | |
if (len == 1) {*ptr = new TreeNode< int >( arr[0] ); cout<<"len 0"<<endl;} |
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
// FILE: table2.h | |
// TEMPLATE CLASS PROVIDED: Table<RecordType> | |
// This class is a container template class for a Table of records. | |
// The template parameter, RecordType, is the data type of the records in the | |
// Table. It may any type with a default constructor, a copy constructor, | |
// an assignment operator, and an integer member variable called key. | |
#ifndef TABLE1_H | |
#define TABLE1_H |
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
// FILE: link2.h | |
// PROVIDES: A toolkit of ten template functions for manipulating linked lists. | |
// Each node of the list contains a piece of data and a pointer to the next | |
// node, as shown in this template struct: | |
// | |
// template <class Item> Item may be any of the C++ built-in types | |
// struct Node (int, char, etc.), or a class with a default | |
// { constructor, an assignment operator, | |
// Item data; and a test for equality (x == y). | |
// Node *link; |
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
pragma solidity ^0.4.11; | |
/** | |
* @title Ownable | |
* @dev The Ownable contract has an owner address, and provides basic authorization control | |
* functions, this simplifies the implementation of "user permissions". | |
*/ | |
contract Ownable { | |
address public owner; |
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
function functionSignatureFromAbi(abiArray) { | |
let functionSignatures = []; | |
for (i in abiArray) { | |
let abi = abiArray[i]; | |
let functionSignature = abi.name + '(' + abi.inputs.map((input) => input.type + ' ' + input.name).join(', ') + ')'; | |
functionSignatures.push(functionSignature); | |
// console.log(functionSignature); | |
} | |
return functionSignatures; | |
} |
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
pragma solidity ^0.4.24; | |
// @title MAR mode: Module-Agnostic Rendering Mode (Core) | |
// @author Jeff Hu | |
// @dev This smart contract is modularized via a module agnostic execution scheme |
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
pragma solidity ^0.4.24; | |
contract Math { | |
uint public ans; | |
function add(uint a,uint b) public { | |
ans = a + b; | |
} | |
} |
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
pragma solidity ^0.4.24; | |
//// All Modules //// | |
contract Math { | |
// Module #0 | |
function plus(uint _n1, uint _n2) public pure returns (uint) { return _n1 + _n2; } | |
// Module #1 | |
function minus(uint _n1, uint _n2) public pure returns (uint ans) { return _n1 - _n2; } | |
// Module #2 |