If you haven't already set your NPM author info, now you should:
npm set init.author.name "Your Name"
npm set init.author.email "you@example.com"
npm set init.author.url "http://yourblog.com"
npm adduser
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title>{{$heading_title}}</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="icon" href="{{ secure_asset($site_favicon)}}" sizes="16x16"> |
account = Account.find_by_user_id(5) |
if account.balance >= item.price | |
account.balance = account.balance - item.price | |
#some other long processes here | |
account.save | |
end |
#account.balance = 100 | |
account = Account.find_by_user_id(5) | |
#item.price is 50 | |
if account.balance >= item.price | |
#it's good, allow user to buy this item | |
account.balance = account.balance - item.price | |
#account.balance is now 50 |
account = Account.find_by_user_id(5) | |
#account.balance is still 100 | |
#item.price is 80 | |
if account.balance >= item.price | |
#it's good, allow user to buy this item | |
account.balance = account.balance - item.price | |
#account.balance is now 20 |
p1 = Person.find(1) | |
p2 = Person.find(1) | |
p1.first_name = "Michael" | |
p1.save | |
p2.first_name = "should fail" | |
p2.save # Raises a ActiveRecord::StaleObjectError |
account = Account.find_by_user_id(5) | |
account.lock! | |
#no other users can read this account, they have to wait until the lock is released | |
account.save! | |
#lock is released, other users can read this account |
Provide an explanation of **what** these changes are, and provide a | |
context that helps understand **why** they are made. | |
--- | |
**Before submitting, check that:** | |
- [ ] You have added (passing) tests for your code. | |
- [ ] You have written good* commit messages. | |
- [ ] You have squashed relevant commits together. |
– Theme Boxy: thay áo cho Sublime Text. | |
– SublimeCodeIntel: gợi ý code thông minh. | |
– Emmet: package nổi tiếng và có trên hầu hết các editor và ide hiện tại, giúp viết HTML một cách nhanh chóng, bạn có thể tìm hiểu thêm về cách sử dụng và cheatsheet của nó. | |
– MarkdownEditing: viết lách với Markdown | |
– AdvancedNewFile: tạo nhanh file và thư mục | |
– SideBarEnhancements: nâng cấp tính năng cho Sidebar. |