~ - Home Directory
. - Current Directory
.. - Enclosing Directory
/ - Root Directory
test |
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
class TodoList < Array | |
def self.load(file) | |
# read the file, create a list, create items, add them to the list, return the list | |
list = TodoList.new | |
File.read(file).each_line do |line| | |
list << line.chomp | |
end | |
list | |
end |
Here's a list of resources that have been helpful for me in getting acquainted with Ember.js, in no particular order. Ember is relatively young and changing really fast, so I found that searching for answers on Google and Stack Overflow was not quite as easy as it is with Rails. Try to stick with resources that have been written in the past few months. Look at the older stuff too but remember that things have likely changed.
-
The official Ember guides. The guides are useful for a general overview of what's going on in Ember, and the API docs will help you get familiar with the methods that are available to you. http://guides.emberjs.com/v1.13.0/
-
Ember Inspector for Debugging. https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi
# Answer to a question on Flask mailing list | |
# http://librelist.com/browser//flask/2012/6/30/using-ajax-with-flask/ | |
# NOTE: *REALLY* don't do the thing with putting the HTML in a global | |
# variable like I have, I just wanted to keep everything in one | |
# file for the sake of completeness of answer. | |
# It's generally a very bad way to do things :) | |
# | |
from flask import (Flask, request, jsonify) | |
app = Flask(__name__) |
Vim has two modes insertion mode and command mode. The editor begins in command mode, where the cursor movement and text deletion and pasting occur. Insertion mode begins upon entering an insertion or change command. [ESC]
returns the editor to command mode (where you can quit, for example by typing :q!
). Most commands execute as soon as you type them except for "colon" commands which execute when you press the ruturn key.
:x
Exit, saving changes:q
Exit as long as there have been no changesZZ
Exit and save changes if any have been made:q!
Exit and ignore any changes
Created by Christopher Manning
[](http://bl.ocks.org/d/1703449/#/[0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, 28657, 46368, 75025, 121393, 196418, 317811, 514229, 832040, 1346269, 2178309, 3524578, 5702887, 9227465, 14930352, 24157817, 39088169]43/0/1) [](http://bl.ocks.org/d/1703449/#/