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
<body class="templateC subcategory spring-mesa page-personal breakpoint-lg" id="page-top" data-is-modal-opened="false" data-is-video-modal-opened="false" style=""> | |
<div class="app-container stretch-content-Auto" id="js-app-container" style="position: relative;"> | |
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
SparseArrayNode *SparseArray::getPreviousNode(int index) | |
{ | |
// if null or current index is greater than head index | |
cout << endl; | |
cout << "current node INDEX " << index << endl; | |
if (headPtr != NULL) | |
{ | |
cout << "prev node HEAD INDEX " << headPtr->index << endl; | |
} | |
cout << 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
#include <string> | |
#include <iostream> | |
#include "SparseArray.h" | |
using namespace std; | |
SparseArray::SparseArray() | |
{ | |
default_value = ""; | |
headPtr = NULL; | |
} |
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 <string> | |
#include <iostream> | |
#include "SparseArray.h" | |
using namespace std; | |
const string &SparseArray::getAt(int index) const | |
{ | |
if (getExactNode(index) != NULL) |
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 <string> | |
#include <iostream> | |
#include "SparseArray.h" | |
using namespace std; | |
SparseArray::SparseArray() | |
{ | |
default_value = ""; | |
headPtr = NULL; | |
} |
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
bool Rectangle::isIntersection(const Rectangle &otherRect) const | |
{ | |
assert(invariant()); | |
// cout << "current " << getColumnCount() << endl; | |
// cout << "current " << getMinColumn() << endl; | |
// cout << "other " << otherRect.getColumnCount() << endl; | |
// cout << "other " << otherRect.getMinColumn() << endl; | |
int currentRectCheck = abs(getMinColumn()) + abs(getColumnCount()) - 2; | |
int otherRectCheck = abs(otherRect.getMinColumn()) - abs(otherRect.getColumnCount()) + 2; | |
// cout << "check 1 " << currentRectCheck << 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
Buffer::Buffer() | |
{ | |
BUFFER_ROW_COUNT = 20; | |
BUFFER_COLUMN_COUNT = 60; | |
offSetColumn = 0; | |
offSetRow = 0; | |
//how to I set the values of the - this does not work | |
buffer[BUFFER_ROW_COUNT][BUFFER_COlUMN_COUNT]; | |
}; |
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
// call to api | |
httpCall: async url => { | |
return new Promise((resolve, reject) => { | |
http.get(url, res => { | |
res.setEncoding('utf8') | |
res.on('data', d => { | |
resolve(d) | |
}) | |
}) | |
}) |
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
{ | |
"generated_at":"2019-07-11T21:00:59+00:00","schema":"http:\/\/schemas.sportradar.com\/bsa\/formula1\/v1\/json\/endpoints\/formula1\/summary.json","stage":{"id":"sr:stage:324771","description":"Formula 1 2018","scheduled":"2018-03-23T01:00:00+00:00","scheduled_end":"2018-11-25T15:10:00+00:00","type":"season","single_event":false,"parents":[{"id":"sr:stage:7668","description":"Formula 1","type":"sport","single_event":false}],"stages":[{"id":"sr:stage:324773","description":"Australian Grand Prix 2018","scheduled":"2018-03-23T01:00:00+00:00","scheduled_end":"2018-03-25T07:10:00+00:00","type":"event","status":"Finished","single_event":false},{"id":"sr:stage:324991","description":"Bahrain Grand Prix 2018","scheduled":"2018-04-06T11:00:00+00:00","scheduled_end":"2018-04-08T17:10:00+00:00","type":"event","status":"Finished","single_event":false},{"id":"sr:stage:325209","description":"Chinese Grand Prix 2018","scheduled":"2018-04-13T02:00:00+00:00","scheduled_end":"2018-04-15T08:10:00+00:00","type":"event","stat |
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 <stdio.h> | |
#include <string.h> | |
#include <math.h> | |
#include <stdlib.h> | |
#include <stdbool.h> | |
#define NAME_LENGTH 45 | |
#define HASHTABLE_SIZE 65536 | |
typedef struct Node | |
{ |