2014年9月29日 星期一

二欄式(二個div對齊),使用inline-block要注意的關鍵是...

關鍵是... 第二個div要使用vertical-align: top; 以前要做兩欄常用float或是inline-block,不過不知不覺會排斥用inline-block的方式 原因"似乎"是因為第一時間inline後會無法對齊,雖然就是加個vertical-align,但沒有硬性記著就忘了 簡言之,記得這個就會很喜歡用了

2014年6月12日 星期四

var $ = function(el) { return document.querySelectorAll(el);}
  function erica(x) { if(X===1) {return true }else{return false}}
if(erica(1){ console.log("text"); }

2013年6月2日 星期日

The Best Way to Learn JavaScript

決定來follow!

作業0:了解javascript"是什麼"以及"不是什麼"
註:作者不建議先學jquery
作業1:上Codecademy.com來實作→馬上就來申請一個BearKoi
作業2:上appendTo看影片教學
作業3:閱讀好的javascript導論
(1)A Re-introduction to JavaScript
(2)Eloquent JavaScript
(3)Getting Good with JavaScript
--------------------------------------(↓另外自己找的好文)
(4)語言技術:JavaScript Essence
(5)FRONT-END TECHNOLOGIES
(6)w3cschool JavaScript Tutorial


作業4:安裝並學習Firebug(或其他開發者工具)
作業5:讀一本書
(1)Professional JavaScript for Web Developers
(2)JavaScript 24-hour Trainer
(3)JavaScript Patterns
(4)JavaScript: The Good Parts

作業6:建一些東西
(1)相簿
(2)待辦事項
(3)會動的箱子

作業7:開始學javascript函式庫
(1)jQuery - Learn jQuery in 30 Days
(2)Dojo
(3)YUI
(4)MooTools
(5)Prototype
作業8:跟隨佼佼者


reference: The Best Way to Learn JavaScript 












2013年4月1日 星期一

Ubuntu 12.10安裝無蝦米

終於裝好了,本來就一直不成功,又加上電腦老了,開了好幾次機才成功開瀏覽器
請一定要再撐三個星期阿,等我上完課再說

因為用VM裝Ubuntu在我的小A上跑實在太頓了
(是該換的意思?隔壁的同學電腦核心比我低但順很多)
所以就用老蕭不用的MSI切一個槽裝ubuntu
但之前一直沒裝輸入法,心裡無意識的會排斥它
為了之後要好好跟他相處,非裝無蝦米不可

先不說小A跑很頓,這台MSI剛剛開機+開瀏灠器也花了我不少時間阿...

用了這幾天的心得大致覺得用終端機模式很有趣
也有點看懂指令的意思,不像剛裝ubuntu時那麼害怕了
而且我今天也發現另一槽的vista的密碼我忘了,所以真的好好跟ubuntu相處了

雖然用終端機很有趣,但幾乎不會像網路上的tutoral教的一模一樣
通常都要混合好幾種方法才會成功,所以我要記錄一下

使用的Reference
在Ubuntu上安裝Gcin及嘸蝦米輸入法-海芋小站
http://www.inote.tw/2009/05/ubuntugcin.html
在 Ubuntu 12.10 的 Gcin 輸入法平台安裝嘸蝦米輸入法- Compunotes
http://changyuheng.github.com/blog/2013/01/25/zai-ubuntu-12-dot-10-an-zhuang-fu-xia-mi-shu-ru-fa/
安裝嘸蝦米
http://phorum.study-area.org/index.php?topic=37664.0;wap
安裝gcin遇到的問題
http://www.ubuntu-tw.org/modules/newbb/viewtopic.php?viewmode=thread&topic_id=5120&forum=8&post_id=21122



基本上安裝第一個教學完後打開gcin-setup時就會出現
gcin:cannot create /root/.gcin/config/left-right-button-tips
如第三個reference寫的,要先自己建.gcin跟config資料夾
不能簡單用mkdir建,而是如第四個reference的方法
打完再去把gcin-setup打開就成功了


2013年3月29日 星期五

Install RoR on Ubuntu 12.10 (note for myself)

Cause I am not used to BoPoMo, type in English for quickly record my process
spend over 4 hours for RoR enviroment building and Ubuntu Chinese input and something unfamiliar stuff

I follow this reference
http://developerdad.com/2012/11/20/how-to-install-ruby-on-rails-on-ubuntu-12-10/


however, the third step


pkgconfig should be pkg-config

reference:http://askubuntu.com/questions/226148/unable-to-locate-package-pkgconfig

the process not really follow the step, some error occured
but can be easily deal with by the hint
the command will show you how to install the thing you don't have

after installed rvm
do this job for using rvm function on terminal
https://rvm.io/integration/gnome-terminal/


install rails files not find:lib
reference: http://stackoverflow.com/questions/4129882/rails-3-install-error-file-not-found-lib

after all things done
type  irb can quickly calculate and execute ruby code
reference: http://www.slideshare.net/ryudoawaru/ruby1


Good tutorial i should read
https://speakerdeck.com/eddie/ruby-for-starter <<Teacher!
http://www.slideshare.net/ryudoawaru/ruby1
http://ihower.tw/rails3/index.html


=============================
some command:
back to home
cd ~ cd ..
http://hi.hiing.net/2008/11/terminal-introduction.html


stop terminal process
crel + c or z
http://ubuntuforums.org/showthread.php?t=1047348


easy, cute and funny terminal trivia skill
https://docs.google.com/viewer?a=v&q=cache:RWjCt546Xn8J:ftp://www.tmes.mlc.edu.tw/chaper8.pdf+ubuntu+%E7%B5%82%E7%AB%AF%E6%A9%9F+%E4%B8%8D%E5%8B%95&hl=zh-TW&gl=tw&pid=bl&srcid=ADGEESiaoetTL2ymQAYX4Ld0p0dIrJ0yLdHVqIQDuFQFzZL56dY45nwhM0uNfL3W0Y-dFCiXuv_YnteIYdZO8xvN9_JR_S5Mjd5Y95i507WENn-Z9UFWJ4vZMvUoXbV-lJ9yeoQfRe4c&sig=AHIEtbQ-eWzCvVDgsgaMR2KlZpTY_s-muA


===============================
Ubuntu note
VMware cannot display Ubuntu desktop Correctly
Answer: on vmware player Do "Edit virtual Machine settings" On "Hardware tab" go to "Display" Clear "Accelerate 3D graphics"
http://askubuntu.com/questions/215439/after-installing-ubuntu-12-10-the-desktop-does-not-display-correctly



1.StartX for Ubuntu GUI

2.ctrl + alt + F1 for Terminal mode
ps. but when type startx for caming back again to gui, it's empity desktop, dont know how to fix it, should take some time to research
http://ubuntuforums.org/showthread.php?t=1981250

3.ctrl + alt  T call out the terminal windows on GUI


Time for going to bed, i need more coffee tomorrow
I have to do the review job before the second class start

2013年3月10日 星期日

SQL的insert, delete 和 update


Insert

正常版本
INSERT INTO table_name (column1, column2, column3,···)
VALUES (value1, value2, value3,···);

簡化版本(但每一欄位必填)
INSERT INTO table_name
VALUES (value1, value2, value3,···);

僅輸入特定欄位
INSERT INTO customers (C_Id, Name, City)
VALUES (3, '李三', '高雄縣');

多筆輸入
INSERT INTO table_name
VALUES (value1, value2, value3,···),
(value2_1, value2_2, value2_3,···),
(value3_1, value3_2, value3_3,···),
······;

從其他table輸入資料
INSERT INTO table_name (column1, column2, column3,···)
SELECT othercolumn1, othercolumn2, othercolumn3,···
FROM othertable_name;

refrence: http://webdesign.kerthis.com/sql/sql_insert


------------------------------------------------------------

Delete
正常版本
DELETE FROM customers
WHERE Name='王二';

註:一定要加where,不然會整個資料表的資料會全清空

reference: http://webdesign.kerthis.com/sql/sql_delete


------------------------------------------------------------


Update
正常版本
UPDATE customers
SET Phone='03-87654321'
WHERE Name='王二';

註:一定要加where,不然會整個資料表的資料都會被更新

reference: http://webdesign.kerthis.com/sql/sql_update







2013年2月6日 星期三

努力交朋友

以前畫畫時很單純,就是遇到同好就聊天
但大學之後交朋友就變得很小心,(也變得很懶)
個人還滿自豪能過濾出自己處得開心的朋友,但太過窄化自己的路了

現在開始努力open mind!
雖然這個部落格寫的零零散散的,
但好在沒有停掉,就這樣一點一滴的建立起自己的專業王國吧