I really learned the most about object oriented programming by playing with Ruby on Rails.
PeepCode rocks! Excellent screencasts for beginners and advanced coders. Here's a handful of good ones. The first two are specifically for beginners.
// SproutCore Modifications to version 2.0.beta.3 Metal and Runtime, | |
// and SproutCore wrappers for several Appcelerator Titanium views | |
// Brian Pattison @brianpattison | |
/////////////////// | |
// sproutcore.js // | |
/////////////////// | |
// Added to the beginning of sproutcore.js | |
var window = {}; |
<!-- It'd be easy for me to do what you want without changing much --> | |
<%= stylesheet_link_tag 'desktop/desktop' %> | |
<%= stylesheet_link_tag 'tablet/tablet', :media => 'only screen and (min-width: 768px) and (max-width: 991px)' %> | |
<%= stylesheet_link_tag 'mobile/mobile', :media => 'only screen and (max-width: 767px)' %> | |
<!-- Changed This --> | |
<meta name="viewport" content="width=device-width" /> | |
<!-- To This --> |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" | |
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> | |
<head> | |
<title>Dialoggs Login</title> | |
<style> | |
body { | |
background-color: #dbdcdd; |
https://www.google.com/design/spec/style/color.html
The 500 color will be used if you use the variable name alone.
.base-color {
hash = { | |
aligning: "key/values", | |
is: "so much", | |
easier: "with spaces" | |
} |
class JamonHash < HashWithIndifferentAccess | |
def default(key = nil) | |
if key.is_a?(String) && key.include?(".") | |
find_value(key.split(".")) | |
else | |
super | |
end | |
end | |
def find_value(keys) |
MenuMotion is a RubyMotion wrapper inspired by Formotion for creating OS X status bar menus with a syntax that should feel familiar if you've used Formotion.
Add this line to your application's Gemfile:
gem "menu-motion"
Backend.ApplicationSerializer = DS.RESTSerializer.extend({ | |
extractMeta: function(store, type, payload) { | |
store.metaForType(type, { | |
count: payload.count, | |
currentPage: payload.current_page, | |
pages: payload.pages | |
}); | |
delete payload.count; | |
delete payload.current_page; |