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 currentCount = 99; | |
| function bottles99() { | |
| while (currentCount > 0) { | |
| console.log( currentCount + " bottle(s) of beer on the wall, " + currentCount + " bottle(s) of beer." | |
| + " Take 1 down, pass it around, " + (currentCount - 1) + " bottle(s) of beer on the wall") | |
| currentCount--; | |
| } | |
| } | |
| bottles99(); |
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
| function fizzBuzz() { | |
| for (var count = 1; count <= 100; count++) { | |
| if (count % 15 == 0) { | |
| console.log("FizzBuzz"); | |
| } | |
| else if (count % 3 == 0) { | |
| console.log("Fizz"); | |
| } | |
| else if (count % 5 == 0) { | |
| console.log("Buzz"); |
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"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Random Colored Boxes</title> | |
| <style> | |
| .grid { | |
| display: grid; |
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"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Document</title> | |
| <style> | |
| .button { | |
| background-color: grey; | |
| border: solid 3px darkgray; |
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
| using System; | |
| using System.Data.SqlClient; | |
| using System.Reflection.Metadata.Ecma335; | |
| namespace Day24GroupTwitter | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { |
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
| using System; | |
| using System.Data.Common; | |
| using System.Data.SqlClient; | |
| using System.Reflection; | |
| using System.Reflection.Metadata.Ecma335; | |
| using System.Runtime.CompilerServices; | |
| namespace W4D4_DatabaseTwitter | |
| { |
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
| # what is an enumerator? | |
| # see enumerable: https://ruby-doc.org/core-2.7.2/Enumerable.html | |
| # it is the thing that points to each part of a collection | |
| # "hello".each_char do |letter| | |
| # puts letter | |
| # end | |
| # what is gsub? | |
| # global substitution | |
| puts "hello".sub("he", "jean") # jeanllo |
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
| require './morse_converter' | |
| describe MorseConverter do | |
| # let creates a variable that you can use in each test under this same context | |
| let(:converter) { MorseConverter.new } | |
| # don't worry too much about this! | |
| # before(:each) do | |
| # @input = "a" | |
| # end |
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
| require './morse_converter' | |
| describe MorseConverter do | |
| it "sets up testing properly" do | |
| # expect means a line that makes the test pass/fail | |
| expect(true).to be true | |
| expect(true).to eql(true) | |
| end | |
| it "can convert a to .-" do |
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
| require 'ruby2d' | |
| #you can install Ruby 2D on WIN by entering "gem install ruby2d" in the terminal | |
| set background: 'black' | |
| set fps_cap: 20 | |
| #grid size is 20 pixels | |
| SQUARE_SIZE = 20 | |
| #for default window size of 480px * 640px, width is 32 (640/20) and height is 24 (480/20) at grid size = 20 pixels | |
| GRID_WIDTH = Window.width / SQUARE_SIZE | |
| GRID_HEIGHT = Window.height / SQUARE_SIZE |
NewerOlder