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
| /* | |
| * This is a manifest file that'll be compiled into application.css, which will include all the files | |
| * listed below. | |
| * | |
| * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, | |
| * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path. | |
| * | |
| * You're free to add application-wide styles to this file and they'll appear at the bottom of the | |
| * compiled file so the styles you add here take precedence over styles defined in any styles | |
| * defined in the other CSS/SCSS files in this directory. It is generally better to create a new |
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 'digest' | |
| # INFO THAT THE SERVER KNOWS AND IS SHARED WITH THE CLIENT | |
| # Public and secret keys are defined on the server level and shared | |
| # only with the person who has the account. | |
| PUBLIC_KEY = "PUBLIK" | |
| SECRET_KEY = "SEKRET" | |
| CLIENTS = { |
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
| n = 10 | |
| while n != 0 | |
| puts "n is #{n}: IMPERITIVE" | |
| n = n - 1 | |
| 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
| def reverse_str(str) | |
| letters = str.chars | |
| reversed = [] | |
| while letters.length > 0 | |
| reversed << letters.pop | |
| end | |
| return reversed.join | |
| 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
| def blur | |
| @array.each_with_index do |row,x| | |
| row.each_with_index do |cell,y| | |
| last_x_pixel = # TODO: calculate the width of the image here. May need to subtract 1. | |
| if @array[x][y] == 1 | |
| @new_array[x][y] ||= 1 | |
| @new_array[x-1][y] = 1 if x != 0 # makes sense to go left, unless it's the left-most | |
| @new_array[x][y-1] = 1 | |
| @new_array[x][y+1] = 1 | |
| @new_array[x+1][y] = 1 if x != last_x_pixel # only go right if it's not the last x_pixel |
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> | |
| <body> | |
| <p>Creating a JavaScript Object.</p> | |
| <p id="text"></p> | |
| <script> | |
| var person = {firstName:"John", lastName:"Doe", age:50, eyeColor:"blue"}; |
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
| class LinkedListNode | |
| attr_accessor :value, :next_node | |
| def initialize(value, next_node=nil) | |
| @value = value | |
| @next_node = next_node | |
| end | |
| end | |
| class Stack |
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
| 18:10:54 From David Savatski : hooray for Sandi Metz and POODR | |
| 18:11:34 From David Savatski : POODR I heard is better to read with 1-2 yrs of exp but useful starting out as well | |
| 18:12:06 From David Savatski : http://www.poodr.com/ | |
| 18:12:15 From rachaelsalter : Hi Marco - things are going well! I have my environment installed and I am currently working on adding CSS to my Splurty App. | |
| 18:12:34 From Brad : I did! | |
| 18:12:49 From Marco Morawec : Thanks Brad :) | |
| 18:13:13 From Colin R : sorry guys, I'm drawing a blank on questions. I'll see what I can come up in the meantime. | |
| 18:14:33 From myotkyaw : just liked the fb page 👍🏻 | |
| 18:14:57 From myotkyaw : nice posts | |
| 18:15:36 From David Savatski : me too - don’t cry intern! |
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
| class Image | |
| attr_accessor :output_image | |
| def initialize(array) | |
| @input_image = array | |
| end | |
| def blur | |
| @a_rows = @input_image.length | |
| @a_columns = @input_image[1].length |
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 is_obstructed?(x, y) | |
| return false if self.x_coord != x | |
| # this could be a horizontal obstruction - let's check | |
| (x..self.x_coord).each do |x_pos| | |
| # is there a piece in position `x_pos`, y | |
| # if there is there's an obstruction | |
| end | |