Requirements: Get coffee-script installed (refer above)
Ref: http://babinho.net/2011/05/autocomplete-fields-in-rails-3-1-with-jquery-ui/
To use this I had to download jquery-ui (http://jqueryui.com/download) and select Autocomplete
[ | |
{ "keys": ["f8"], "command": "reindent"}, | |
{ "keys": ["home"], "command": "move_to", "args": {"to": "bol"} }, | |
{ "keys": ["end"], "command": "move_to", "args": {"to": "eol"} }, | |
{ "keys": ["shift+end"], "command": "move_to", "args": {"to": "eol", "extend": true} }, | |
{ "keys": ["shift+home"], "command": "move_to", "args": {"to": "bol", "extend": true } } | |
] |
/** | |
* Stylesheet that implements Entypo font | |
* http://www.entypo.com/ | |
* | |
* Autor Yordan Ivanov | |
* [email protected] | |
*/ | |
@font-face { | |
font-family: 'EntypoRegular'; |
execute pathogen#infect() | |
filetype plugin indent on | |
set encoding=utf-8 | |
set tabstop=2 | |
set expandtab | |
set shiftwidth=2 | |
set shiftround | |
set ai | |
set si |
{ | |
"color_scheme": "Packages/Color Scheme - Default/Solarized (Light).tmTheme", | |
"font_size": 12.0, | |
"font_face": "monaco", | |
"word_wrap": true, | |
"wrap_width": 80, | |
"line_padding_bottom": 1, | |
"line_padding_top": 1, | |
"highlight_modified_tabs": true, | |
"highlight_line": true, |
// Define a function that sets a DOM node's color | |
// to yellow and then fades it to white. | |
var fade = function (node) { | |
var level = 1; | |
var step = function () { | |
var hex = level.toString(16); node.style.backgroundColor = '#FFFF' + hex + hex; if (level < 15) { | |
level += 1; | |
setTimeout(step, 100); | |
} | |
}; |
class Subject < ActiveRecord::Base | |
mount_uploader :icon, IconUploader | |
validates_presence_of :icon | |
validate :image_size_validation, :image_type_validation, :if => "icon?" | |
def image_size_validation | |
errors[:icon] << "should be less than 2MB" if icon.size > 2.megabytes | |
end |
Requirements: Get coffee-script installed (refer above)
Ref: http://babinho.net/2011/05/autocomplete-fields-in-rails-3-1-with-jquery-ui/
To use this I had to download jquery-ui (http://jqueryui.com/download) and select Autocomplete
# config/initializers/redcarpet.rb | |
class ActionView::Template | |
class Redcarpet < Handler | |
include Handlers::Compilable | |
def compile template | |
::Redcarpet.new(template.source).to_html.inspect | |
end | |
end |
今早一来,突然发现使用-put命令往HDFS里传数据传不上去了,抱一大堆错误,然后我使用bin/hadoop dfsadmin -report查看系统状态 | |
admin@adw1:/home/admin/joe.wangh/hadoop-0.19.2>bin/hadoop dfsadmin -report | |
Configured Capacity: 0 (0 KB) | |
Present Capacity: 0 (0 KB) | |
DFS Remaining: 0 (0 KB) | |
DFS Used: 0 (0 KB) | |
DFS Used%: ?% | |
------------------------------------------------- | |
Datanodes available: 0 (0 total, 0 dead) |
body { | |
font-family: Helvetica, arial, sans-serif; | |
font-size: 14px; | |
line-height: 1.6; | |
padding-top: 10px; | |
padding-bottom: 10px; | |
background-color: white; | |
padding: 30px; } | |
body > *:first-child { |