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
You currently have ... | |
componentDidMount() { | |
fetch(API).then( | |
response => response.json() | |
).then( | |
data => this.setState( | |
{ | |
quotes: data | |
} |
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
def u8s_to_i16(low_u8, high_u8): | |
# get the high byte without the top bit ( sign bit ) | |
high_byte = high_u8 & 127 | |
# get the sign bit as a 1 ( negative ) or a 0 ( possitive ) | |
high_byte_sign = (high_u8 & 128) >> 7 # get top bit | |
# get the low byte ( no adjustments needed ) | |
low_byte = low_u8 |
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
# read the bytes from the I2C device | |
eight8 = bus.read_byte_data(address, 0x88) | |
eight9 = bus.read_byte_data(address, 0x89) | |
# get the high byte without the top bit ( sign bit ) | |
high_byte = eight9 & 127 | |
# get the sign bit as a 1 ( negative ) or a 0 ( possitive ) | |
high_byte_sign = (eight9 & 128) >> 7 # get top bit |
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
thequbit@tim-thinkpad-t550:~/dev/hhroc/yellr-server/website$ npm install | |
npm http GET https://registry.npmjs.org/glob | |
npm http GET https://registry.npmjs.org/autoprefixer | |
npm http GET https://registry.npmjs.org/cssnano | |
npm http GET https://registry.npmjs.org/grunt | |
npm http GET https://registry.npmjs.org/bower | |
npm http GET https://registry.npmjs.org/grunt-banner | |
npm http GET https://registry.npmjs.org/grunt-contrib-concat | |
npm http GET https://registry.npmjs.org/grunt-contrib-copy | |
npm http GET https://registry.npmjs.org/grunt-contrib-jade |
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
{ | |
"posts": [ | |
{ | |
"has_voted": false, | |
"language_code": "en", | |
"contents": "This is a test post!", | |
"lat": 43.1, | |
"assignment": {}, | |
"is_up_vote": false, | |
"id": "72833379-fb27-4471-af08-758e3437be3f", |
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
POST to /api/post with the following json as the body of the document | |
{ | |
"assignment_id": null, ( or the assignment id ) | |
"contents": "this is the text contents of my post!" | |
} | |
POST to /api/media_objects as a form submit ( as we had been doing before ) | |
media_type = audio|video|image |
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
{ | |
"client": { | |
"creation_datetime": "2015-10-24 18:05:32", | |
"last_lat": 43.1, | |
"verified": false, | |
"email": "", | |
"platform": "test", | |
"verified_datetime": "None", | |
"cuid": "43c4e9c0-bb48-4cde-ad5a-00f24b43dbfc", | |
"last_lng": -77.5, |
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
{ | |
"assignments": [ | |
{ | |
"bottom_right_lng": -77.3, | |
"top_left_lng": -77.9, | |
"id": "1ecec874-74a9-4903-b418-0cedd14c788a", | |
"creation_datetime": "2015-10-24 17:49:11", | |
"name": "Test Assignment", | |
"bottom_right_lat": 43.0, | |
"questions": [ |
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
{ | |
"posts": [ | |
{ | |
"lng": -77.1, | |
"has_voted": false, | |
"assignment": null, | |
"down_count": 0, | |
"contents": "This is a test post!", | |
"up_count": 0, | |
"approved": true, |
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
{ | |
"posts": [ | |
{ | |
"deleted": false, | |
"id": "1eaf645f-99ed-4ea0-ba2c-2c0be5faf09b", | |
"language_code": "en", | |
"down_count": 0, | |
"assignment": null, | |
"creation_datetime": "2015-10-24 03:45:16", | |
"lng": -77.1, |
NewerOlder