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
// create a function called generatePlayerCard that takes in three arguments: name, age, and height | |
const generatePlayerCard = (name, age, height) => ` | |
<div class="player-card"> | |
<h2>${name} — ${age}</h2> | |
<p>Their height is ${height} and they are ${age} years old. In Dog years this person would be ${ | |
age * 7 | |
}. That would be a tall dog!</p> | |
<button onClick={this.closest('.player-card').remove()} class="card-delete-button" type="button">× Delete</button> | |
<style> |
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 missingWords(s, t) { | |
// split each string into an Array and have a result Array | |
const sArr = s.split(" "); | |
const tArr = t.split(" "); | |
let missingResult = []; | |
// compare the strings using a loop, pushing missing words into final missingResult Array | |
for (let i = 0; i < sArr.length; i++) { | |
if (!tArr.find(el => el === sArr[i])) { | |
missingResult.push(sArr[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
'use strict'; | |
/* | |
* Complete the 'fizzBuzz' function below. | |
* | |
* The function accepts INTEGER n as parameter. | |
*/ | |
function fizzBuzz(n) { | |
if(typeof n !== 'number') { |
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
// Top-level build file where you can add configuration options common to all sub-projects/modules. | |
buildscript { | |
repositories { | |
jcenter() | |
maven { | |
url 'https://maven.google.com/' | |
name 'Google' | |
} | |
google() |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" href="/style/style.css"> | |
<link rel="stylesheet" href="https://cdn.rawgit.com/twbs/bootstrap/48938155eb24b4ccdde09426066869504c6dab3c/dist/css/bootstrap.min.css"> | |
<script src="https://maps.googleapis.com/maps/api/js"></script> | |
</head> |
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
import React, { Component } from 'react'; | |
import { AppRegistry, StyleSheet, Text, View, Animated } from "react-native"; | |
class ProgressBar extends Component { | |
componentWillMount() { | |
this.animation = new Animated.Value(this.props.progress); | |
} | |
componentDidUpdate(prevProps, prevState) { |
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
angular.js:14525 Error: [$sce:insecurl] http://errors.angularjs.org/1.6.4/$sce/insecurl?p0=https%3A%2F%2Fapi.openweathermap.org%2Fdata%2F2.5%2Fforecast%2Fdaily | |
at https://code.angularjs.org/1.6.4/angular.min.js:6:425 | |
at getTrusted (https://code.angularjs.org/1.6.4/angular.min.js:155:411) | |
at Object.c.(anonymous function) [as getTrustedResourceUrl] (https://code.angularjs.org/1.6.4/angular.min.js:157:175) | |
at p (https://code.angularjs.org/1.6.4/angular.min.js:102:451) | |
at https://code.angularjs.org/1.6.4/angular.min.js:101:207 | |
at https://code.angularjs.org/1.6.4/angular.min.js:134:467 | |
at m.$digest (https://code.angularjs.org/1.6.4/angular.min.js:145:417) | |
at b.$apply (https://code.angularjs.org/1.6.4/angular.min.js:149:113) | |
at HTMLFormElement.<anonymous> (https://code.angularjs.org/1.6.4/angular.min.js:284:239) |
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
$('.top-btn').click(function(e) { | |
const top = $('#top')[0]; | |
$(this).animate( | |
{ | |
scrollTop: top | |
}, 600, 'swing', () => {console.log("going back up!")}); | |
}); |
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
document.querySelector('#outcome5').innerHTML = inventors.sort((a, b) => { | |
const lastPersonAge = a.passed - a.year; | |
const nextPersonAge = b.passed - b.year; | |
a.set(age, lastPersonAge); | |
b.set(age, nextPersonAge); | |
return nextPersonAge > lastPersonAge ? 1 : -1; | |
}).map(inventor => ` ${inventor.first} ${inventor.last} — age: ${inventor.passed - inventor.year}`); |
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
<div id="calc-app" class="loading">Loading</div> | |
<div class="clear"></div> |
NewerOlder