2014年5月18日 星期日
2014年5月16日 星期五
bootstrap color
bg-warning {
background-color: #FCF8E3;
}
.bg-info {
background-color: #D9EDF7;
}
bg-success {
background-color: #DFF0D8;
}
.bg-success {
background-color: #DFF0D8;
}
.bg-danger {
background-color: #F2DEDE;
}
background-color: rgba(86, 61, 124, 0.15); /* light purple */
.color-swatches .gray-darker {
background-color: #222222;
}
.color-swatches .gray-dark {
background-color: #333333;
}
.color-swatches .gray {
background-color: #555555;
}
.color-swatches .gray-light {
background-color: #999999;
}
.color-swatches .gray-lighter {
background-color: #EEEEEE;
}
.color-swatches .brand-primary {
background-color: #428BCA;
}
.color-swatches .brand-success {
background-color: #5CB85C;
}
.color-swatches .brand-warning {
background-color: #F0AD4E;
}
.color-swatches .brand-danger {
background-color: #D9534F;
}
.color-swatches .brand-info {
background-color: #5BC0DE;
}
.color-swatches .bs-purple {
background-color: #563D7C;
}
.color-swatches .bs-purple-light {
background-color: #C7BFD3;
}
.color-swatches .bs-purple-lighter {
background-color: #E5E1EA;
}
.color-swatches .bs-gray {
background-color: #F9F9F9;
}
responsive-utilities td.is-visible {
background-color: #DFF0D8 !important; /*is-visible*/
color: #468847;
}
.bs-callout-info { /* light blue */
background-color: #F4F8FA;
border-color: #5BC0DE;
}
bs-callout-danger {
background-color: #FDF7F7;
border-color: #D9534F;
}
bs-callout-warning {
background-color: #FCF8F2;
border-color: #F0AD4E;
}
pre {
background-color: #F5F5F5; /* light gray */
2014年5月15日 星期四
javascript day issue
when I want to show the date fetch from backend, I realised that its one day off. ex. the date is 2014/5/15, however it shows 2014/5/14.
The problem is datestring
reference:
http://stackoverflow.com/questions/9509360/datepicker-date-off-by-one-day
console.log(new Date('2012-03-21')); //prints Tue Mar 20 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
The Javascript Date object can accept one of the following syntax as below,
- new Date()
- new Date(milliseconds)
- new Date(dateString)
- new Date(year, month, day [, hour, minute, second, millisecond ])
So in your case it is going to call the dateString and parse. So try appending the time as below,
new Date ('2012-03-21T00:00:00') //should return you Wed Mar 21 2012
or Better to use as below,
new Date (2012, 2, 21).
year - Integer value representing the year. For compatibility (in order to avoid the Y2K problem), you should always specify the year in full; use 1998, rather than 98.
month - Integer value representing the month, beginning with 0 for January to 11 for December.
day - Integer value representing the day of the month (1-31).
2014年5月14日 星期三
rails turbolink
If you want to disable Turbolinks for certain links, add a
data-no-turbolink
attribute to the tag:< a href = "..." data-no-turbolink>No turbolinks here</ a >.
|
2014年5月9日 星期五
2014年5月3日 星期六
2014年5月2日 星期五
bootstrap Responsive Utilities
template
http://startbootstrap.com/all-templates
Responsive Utilities
Just like Bootstrap 2, Bootstrap 3 provides responsive utilities for hiding and showing elements based on the browser size. This will also help us in defining our grid system.
.visible-xs
.visible-sm
.visible-md
.visible-lg
.hidden-xs
.hidden-sm
.hidden-md
.hidden-lg
git
http://tech.marsw.tw/blog/2013/08/16/git-notes-github
1.第一次初始
在Github開repo
在Github開repo
git clone [clone URL]
先把code從Github抓下來
2.
進到該目錄中
進到該目錄中
git branch [branch-name]
生一個新branchgit checkout [branch-name]
切換到此branch上
3.
重複步驟3.直到 git status 顯示沒有任何修改過的檔案
git status
看修改了哪些檔案git add [修改到的檔案]
一個檔一個檔自己加,因為這樣可以Double check自己到底改了哪些檔git commit
註解要寫清楚 完成一個小功能就要commit一次重複步驟3.直到 git status 顯示沒有任何修改過的檔案
4.
push to heoku
git checkout master
git merge [branch-name]
和master merge起來git push
然後接著輸入Github的帳號密碼push to heoku
git push heroku master
rails command line
rails console
rails server
rake
rails generate
rails dbconsole
rails new app_name
$ rails console --sandbox
rails foo
|
訂閱:
文章 (Atom)