What object-oriented programming advice is this code violating?
def check_for_overheating(system_monitor)
if system_monitor.temperature > 100
system_monitor.sound_alarms
end
end
^diff.+$
-- Highlight Text (Whatever Background)^diff.+$
-- Highlight Text (Whatever Foreground)uninitialized\sconstant\s([\w:]+)
-- Highlight Text (White on Red)undefined\slocal\svariable\sor\smethod\s
(.+)'` -- Highlight Text (White on Red)undefined\smethod\s
(.+)'` -- Highlight Text (White on Red)no\simplicit\sconversion\sof\s(\w+)\sinto\s(\w+)
-- Highlight Text (White on Red)\
?(.+)?'?:?\swrong\snumber\sof\sarguments\s` -- Highlight Text (White on Red)\(\d+\sfor\s\d[\.\+\d]?\)
-- Highlight Text (Red on White)Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
#Simple Authentication with Bcrypt
This tutorial is for adding authentication to a vanilla Ruby on Rails app using Bcrypt and has_secure_password.
The steps below are based on Ryan Bates's approach from Railscast #250 Authentication from Scratch (revised).
You can see the final source code here: repo. I began with a stock rails app using rails new gif_vault
##Steps
/*------------------------------------------ | |
Responsive Grid Media Queries - 1280, 1024, 768, 480 | |
1280-1024 - desktop (default grid) | |
1024-768 - tablet landscape | |
768-480 - tablet | |
480-less - phone landscape & smaller | |
--------------------------------------------*/ | |
@media all and (min-width: 1024px) and (max-width: 1280px) { } | |
@media all and (min-width: 768px) and (max-width: 1024px) { } |
I have a lot of people at Hacker Hours ask about where to look for jobs - here are some places I recommend.
This list has been superseded by Public APIs. Check there for APIs with Auth: No
, HTTPS
and CORS
Yes
.
List of data APIs that require no server-side auth or private credentials, and are thus good for small browser-only JS projects.
Sometimes you want to have a subdirectory on the master
branch be the root directory of a repository’s gh-pages
branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master
branch alongside the rest of your code.
For the sake of this example, let’s pretend the subfolder containing your site is named dist
.
Remove the dist
directory from the project’s .gitignore
file (it’s ignored by default by Yeoman).