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
window.googletag = window.googletag || {}; | |
googletag.cmd = googletag.cmd || []; | |
googletag.cmd.push(detectAdLoad); | |
function detectAdLoad() { | |
/** | |
* NOTE: This function depends on the ad slot ID (var targetSlot). If this changes, this function will break | |
* | |
* Patched together using documentation at https://developers.google.com/doubleclick-gpt/reference |
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
const MissinNum = () => { | |
const myArray = [2, 4, 1, 5] | |
const N = 5 | |
let Sum = N*(N+1) | |
Sum = Sum/2 | |
sumCount = 0 | |
for (let i = 0; i < (myArray.length); i++) { | |
sumCount += myArray[i] |
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
const CompareArrays = () => { | |
var arrayA = [1, 2, 3, 4, 5]; | |
var arrayB = [1, 2, 4, 4, 4]; | |
var totalmatches = 0; | |
if (arrayA.length == arrayB.length) { | |
for (i = 0; i < arrayA.length; i++) { | |
for (j = 0; j < arrayB.length; ++j) { | |
if (arrayA[i] == arrayB[j]) { | |
totalmatches++; |
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
//Das Original | |
const Original = () => { | |
const array = [5, 9, 3, 19]; | |
let x = 0; | |
for (let i = 0; i < array.length; i++) { | |
for (let j = 0; j < array.length; j++) { | |
// const notValue = array[i] - array[j] | |
const value = Math.abs(array[i] - array[j]); |
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
function Node(data) { | |
this.data = data; | |
this.next = null; | |
} | |
function LinkedList() { | |
this.head = null; | |
this.tail = null; | |
this.length = 0; | |
} |
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
//How I am making the api call | |
export function fetchAPI(url, method = 'GET', body = null, isBlob = false) { | |
let request; | |
if (method === 'POST') { | |
request = fetch(url, { | |
method, | |
body: isBlob ? body : JSON.stringify(body), | |
headers: { | |
'X-Parse-Application-Id': 'myAppId', |
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
var directionsDisplay; | |
var directionsService; | |
var marker; | |
var geocoder; | |
var map; | |
var defaultCenter; | |
var infowindow; | |
var center; | |
var prefix; | |
var textfield; |
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
<script type="text/javascript"> | |
(function(document){ | |
function syncDatePickers(startDateNode, endDateNode) { | |
startDateNode.datepicker().on("changeDate", function(e) { | |
endDateNode.datepicker('setDate', new Date(e.target.value)); | |
}); | |
} | |
function changeLabelText(datePickerNode, text) { | |
datePickerNode.closest('div').css('width', '100%').find('label').text(text); |
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
FROM ruby:2.3.4 | |
MAINTAINER Sharetribe Team <team@sharetribe.com> | |
ENV REFRESHED_AT 2016-11-08 | |
RUN apt-get update \ | |
&& apt-get dist-upgrade -y | |
# |
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
{ | |
// http://eslint.org/docs/rules/ | |
"ecmaFeatures": { | |
"binaryLiterals": false, // enable binary literals | |
"blockBindings": false, // enable let and const (aka block bindings) | |
"defaultParams": false, // enable default function parameters | |
"forOf": false, // enable for-of loops | |
"generators": false, // enable generators | |
"objectLiteralComputedProperties": false, // enable computed object literal property names |
NewerOlder