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 reverse_array(array = []) | |
| reverse_array = [] | |
| (1..array.length).each { |n| | |
| reverse_array << array[n*-1] | |
| } | |
| puts reverse_array | |
| end | |
| reverse_array(["00", "01", "02", "03", "04", "05"]) |
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
| [Max B] | |
| Yeezy, Yeezy, what's good? | |
| It's your boy Max B, what's going on? | |
| Just checking in on you | |
| Appreciate the love and support | |
| The wave is here | |
| You a wavey dude anyway, so you already know | |
| Ain't no problem, man, the game... | |
| You already know how this game thing goes | |
| Do your wave |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <script src="https://cdn.plot.ly/plotly-latest.min.js"></script> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.13.0/moment.min.js"></script> | |
| <title>Document</title> | |
| </head> | |
| <body> | |
| <div id="ex-step-pies"></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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <style> | |
| .legacy { | |
| font-size: 12px; | |
| } | |
| rect { | |
| stroke-width: 2; | |
| } |
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 fizzbuzz_value(i) | |
| if i % 5 == 0 && i % 3 == 0 | |
| "FizzBuzz" | |
| elsif i % 5 == 0 | |
| "Buzz" | |
| elsif i % 3 == 0 | |
| "Fizz" | |
| else | |
| i |
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
| # Determine whether a string contains a SIN (Social Insurance Number). | |
| # A SIN is 9 digits and we are assuming that they must have dashes in them | |
| require 'pry' | |
| def has_sin?(string) | |
| !!string.match(/\b\d{3}-\d{3}-\d{3}\b/) | |
| end | |
| puts "\nhas_sin? returns true if it has what looks like a SIN" | |
| puts has_sin?("please don't share this: 234-604-142") #== true |
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
| # Save this file to your computer so you can run it | |
| # via the command line (Terminal) like so: | |
| # $ ruby shakil_the_dog.rb | |
| # | |
| # Your method should wait for user input, which corresponds | |
| # to you saying something to your dog (named Shakil). | |
| # You'll probably want to write other methods, but this | |
| # encapsulates the core dog logic | |
| def shakil_the_dog |
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
| // 'use strict'; | |
| // console.log('You got $' + cash); | |
| // var amount = function bet(){ | |
| // amount = prompt("Place a bet between $5-$10: "); | |
| // while (amount < 5 || amount > 10){ | |
| // alert("That's not right!"); | |
| // amount = prompt("Bet must be between $5-$10. Try Again: "); | |
| // } |
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
| $(document).ready(function(){ | |
| /* Listening for keypress events on the firstname input box */ | |
| $("#fname").keypress(function(event){ | |
| switch(event.which){ | |
| case 65: | |
| console.log("[SHIFT] + [A]") | |
| break; | |
| case 16: | |
| console.log("[SHIFT]") | |
| break; |
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
| var dilraj = { | |
| date: '', | |
| time:[], | |
| bg:[], | |
| bolus:[], | |
| carbs:[], | |
| total:[] | |
| }; |