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
class BoggleBoard | |
def initialize(board) | |
@board = board | |
end | |
def create_word(*coords) | |
coords.map { |coord| @board[coord.first][coord.last]}.join("") | |
end |
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> | |
<link rel="stylesheet" href="http://cdn.jsdelivr.net/normalize/2.1.0/normalize.css"> | |
<link rel="stylesheet" href="main.css"> | |
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800"> | |
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Lato:100,900"> | |
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.0.2/css/font-awesome.min.css"> | |
</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
//------------------------------------------------------------------------------------------------------------------ | |
// YOUR CODE: Create your Zoo "object literal" and Animal "constructor" and "prototypes" here. | |
//------------------------------------------------------------------------------------------------------------------ | |
//------------------------------------------------------------------------------------------------------------------ | |
// DRIVER CODE: Do **NOT** change anything below this point. Your task is to implement code above to make this work. | |
//------------------------------------------------------------------------------------------------------------------ |
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
// Shorthand for $(document).ready(); | |
$(function(){ | |
// Your code goes here... | |
}); |
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
<html> | |
<head> | |
<title>drag and drop demo</title> | |
</head> | |
<body> | |
<div id="box" style="background-color:green;width:100px;height:100px; position:absolute; cursor:pointer"></div> | |
<script type="text/javascript"> | |
// get and name the element | |
var box = document.getElementById("box"); | |
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
.glowing-gold { | |
-webkit-animation: gold-glow 0.75s ease-in-out infinite alternate; | |
-moz-animation: gold-glow 0.75s ease-in-out infinite alternate; | |
animation: gold-glow 0.75s ease-in-out infinite alternate; | |
} | |
@-webkit-keyframes gold-glow { | |
from { | |
box-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #fff, 0 0 40px #FFDD1B, 0 0 70px #FFDD1B, 0 0 80px #FFDD1B, 0 0 100px #FFDD1B, 0 0 150px #FFDD1B; | |
} |
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 do you create an prompt on the page then get an input of a search term | |
// Then replace all of the images with images based on that search term? | |
jQuery.getJSON( | |
"https://api.giphy.com/v1/gifs/search", | |
{q: "Ryan Gosling", api_key: "dc6zaTOxFJmzC"} | |
).done(function(response) { | |
var images = response.data.map(function(imgObj) { | |
return imgObj.images.original.url; | |
}); |
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
// In Airtable, expand a record and make sure its activity panel is expanded. | |
// Click "Show more" at the top of the activity panel until you get to the beginning of the record's history. | |
// Press Ctrl+Shift+J (on PC) or Cmd+Opt+J (on Mac) in your Chrome browser to pull up the JavaScript console. | |
// Paste the below script into the console to download the activity history as a CSV. | |
function arrayToCSV(nestedArray, exportName) { | |
const filename = exportName || "exported_js.csv"; | |
const csvString = nestedArray.map((row) => row.map((field) => '\"' + field + '\"').join(',')).join('\r\n'); | |
let a = document.createElement('a'); |
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 PRECIPITATION_YESTERDAY() { | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var rainfallSheet = ss.getSheetByName("Brooklyn daily rainfall"); | |
var hourlyWeatherSheet = ss.getSheetByName("Brooklyn hourly weather"); | |
// DEPENDENCY: Assumes worksheets exist with the above to names. | |
var endpoint = "https://api.openweathermap.org/data/2.5/onecall/timemachine"; | |
var unixTimeYesterday = Math.floor((new Date((new Date).setDate(((new Date).getDate() - 1)))).valueOf() / 1000); | |
OlderNewer