- What are the three longest trips on rainy days?
WITH rainy as
(
SELECT
DATE(date) rain_date
From weather
WHERE events = 'Rain'
GROUP BY 1
)
WITH rainy as
(
SELECT
DATE(date) rain_date
From weather
WHERE events = 'Rain'
GROUP BY 1
)
const fizzbuzz = function(num){ | |
if(num%15 === 0){ | |
return 'fizzbuzz'; | |
} | |
if(num%5 === 0){ | |
return 'buzz'; | |
} | |
if(num%3===0){ | |
return 'fizz'; | |
} |
const littleYacht1 = { | |
hornSound: "Ride of the Walkeries", | |
playHorn: function() { | |
console.log(this.hornSound); | |
} | |
}; | |
littleYacht1.playHorn(); | |
const biggerYacht = { |
/* | |
https://github.com/rich-at-thinkful/ft-curric-gists/blob/master/fundamentals/function-drills-2.md#cracking-the-code) | |
A code has been invented which replaces each character in a sentence with a | |
five letter word. The first letter of each encoded word determines which of the remaining | |
four characters contains the decoded character according to this table: | |
First letter Character number | |
a 2 | |
b 3 |
Install Travis CI's CLI:
gem install travis
A palindrome is a word, phrase, or number that is spelled the same forward and backward. For example, “dad” is a palindrome; “A man, a plan, a canal: Panama” is a palindrome if you take out the spaces and ignore the punctuation; and 1,001 is a numeric palindrome. We can use a stack to determine whether or not a given string is a palindrome.
Write a function that takes a string of letters and returns true or false to determine whether it is palindromic. For example:
function is_palindrome(s) {
s = s.toLowerCase().replace(/[^a-zA-Z0-9]/g, "");
/* | |
### 1. URLify a string | |
A common mistake users make when they type in an URL is to put spaces between words or letters. One solution that developers can use to solve this problem is to replace any spaces with a '%20'. Write a method that takes in a string and replaces all its empty spaces with a '%20'. Your algorithm can only make 1 pass through the string. | |
Examples of input and output for this problem can be | |
Input: tauhida parveen | |
Output: tauhida%20parveen | |
input: www.thinkful.com /tauh ida parv een |
Write a function called jediName
which takes two arguments:
firstName
- a person's first namelastName
- a person's last nameTwo of the most commonly used data structures in web development are stacks and queues. The history of pages visited in a web browser and the undo operation in a text editor are examples of operations made possible using stacks. The handling of events in web browsers often uses a queue data structure.
A stack is a data structure that stores elements in a LIFO (Last In First Out) order. It's like a stack of plates in your kitchen. When a plate is added, it is pushed towards the bottom of a stack. The last plate that you stack becomes the one on the top of the stack and it is the first one that you get to use.
A stack has two basic functions:
A palindrome is a word, phrase, or number that is spelled the same forward and backward. For example, “dad” is a palindrome; “A man, a plan, a canal: Panama” is a palindrome if you take out the spaces and ignore the punctuation; and 1,001 is a numeric palindrome. We can use a stack to determine whether or not a given string is a palindrome.
Write a function that takes a string of letters and returns true or false to determine whether it is palindromic. For example:
function is_palindrome(s) {
s = s.toLowerCase().replace(/[^a-z]/g, "");
// your code goes here