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
def lines(file1, file2): | |
result = set() | |
def getLinesList(file): | |
# storage array | |
fileList = [] | |
# temp storage array | |
tempList = [] | |
# if all lines have \n at the end |
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
//BASIC FUNCTION | |
function fetchJSON (src) { | |
let promise = $.ajax({ | |
dataType: 'json', | |
url: src, | |
error: function (jqXHR, response) { | |
console.log('inside') | |
console.log(jqXHR) | |
var msg = '' |
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
// controller.js | |
module.exports = { | |
extractDims: (inputUrl) => { | |
//this gets the nums form the URL | |
return stuff | |
}, | |
resize: (path, format, width, height) => { | |
//this does some image processing |
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
Warning: the running version of Bundler is older than the version that created the lockfile. We suggest you upgrade to the latest version of Bundler by running `gem install bundler`. | |
Fetching gem metadata from https://rubygems.org/........... | |
Fetching version metadata from https://rubygems.org/... | |
Fetching dependency metadata from https://rubygems.org/.. | |
Using rake 10.4.2 | |
Using backports 3.6.8 | |
Using daemons 1.2.4 | |
Installing eventmachine 1.2.0.1 with native extensions | |
Gem::Ext::BuildError: ERROR: Failed to build gem native extension. |
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
// get array of ids | |
function getTopIDs(url) { | |
return fetch(url).then(blob => blob.json()).then(json => json) | |
} | |
// returns a promise resolves to an object | |
function getStory(id) { | |
let url = `https://hacker-news.firebaseio.com/v0/item/${id}.json?print=pretty` | |
return fetch(url).then(blob => blob.json()).then(json => json) | |
} |
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
if(this.props.indexes){ | |
//so props does exist | |
if(i === 100){ | |
console.log(this.props.indexes.includes(i)) | |
//this is true | |
} | |
return( | |
//yet this still does not add the class on 100 | |
<div className={`box ${(this.props.indexes.includes(i) ? 'backgroundColor' : '')}`}> | |
</div> |
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 <stddef.h> | |
int delete_nth(size_t szin, int order[szin], int max_e, size_t *szout); | |
int main(void) { | |
// 12311223345 | |
int order[] = {1,2,3,1,1,2,1,2,3,3,2,4,5,3,1}; | |
int res = delete_nth(14, order, 3, NULL); | |
printf("RES:%i\n",res ); |
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
// When input it blank, this returns the error | |
// INPUT | |
<fg-input | |
v-model="editCustomer.firstName" | |
placeholder="First Name" | |
label="First Name" | |
name="firstName" | |
:error="handleErrors" | |
></fg-input> |
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
// inside computed | |
formErrors() { | |
return { | |
firstNameError: () => { | |
if(!this.editCustomer.firstName){ | |
return this.errorMessages.blankError | |
} | |
}, | |
lastNameError: () => { | |
if(!this.editCustomer.lastName){ |
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
int main(void){ | |
//enter number of times input with propmpt for string | |
int count; | |
puts("Enter count: "); | |
scanf("%i", &count); | |
// hack so it does not shallow fget | |
getchar(); | |
// 1000 is arbitraty | |
char arr[count][1000]; | |
for (size_t i = 0; i < count; i++) |