2014年12月11日 星期四

DOS指令

設定組態檔位置C:\【config.sys】


md \a\b\c\d 建多層目錄
copy C:\a.lrc + C:\y.txt D:\Folder
move C:\a.txt D:\b.txt /-Y : 提示是否覆蓋
DIR介紹 #Dir microsoft 說明
print a list of the folders and subfolders of a directory to a file.
I only need the folders and sub folders.
dir /s /b /o:n /ad > f.txt

DIR /4 
顯示檔案清單以列出目錄中的檔案及子目錄
DIR /S /A:-D /B /O:N > list.txt
DIR /? 說明
說明指令/? 或執行 help 



Linux相似架構可參考鳥哥
檔案架構
沒有 C:\,取而代之的是根目錄 / ,下面有 /etc, /usr, /mnt, /boot, /home家目錄 等等,可以把任一個指定資料夾分到任一磁碟分割區,如 / 分到第一個分割區, /home 分到第二個分割區,這樣下次重灌不用再備份資料。 
權限 
分為rwx
Linux 的權限是很複雜的,尤其多了一個要有可「執行」權限才可執行程式。 
正規表示法
用來處理字串的方法,幾乎可以處理大部份的問題
指令查詢
除了 /? 、-h 、--help 的方法, Linux 還多了 man 的指令,如可用 man echo 查詢 echo 的用法。 
文字編輯
內建命令列的文字編輯器 vi 有很多指令要記但很重要

參考

簡單的DOS 指令

CMD 命令速查手冊

命令提示字元 00:教學目錄

How do i get a list of folders and subfolders without the files

[CMD] 目錄與檔案管理常用指令

Netbeans之tomcat部署 Deployment error: Starting of Tomcat failed. '127.0.0.1' 不是內部或外部命令、可執行的程式或批次檔

測試netbeans要添加外部tomcat


一直失敗搞了兩天,終於找到解決的方法

如果跑測試時出現錯誤


Deployment error: Starting of Tomcat failed. 
log檔有跑到
ContextListener: contextDestroyed().......
在netbeans啟動tomcat視窗中出現
'127.0.0.1' 不是內部或外部命令、可執行的程式或批次檔。
('127.0.0.1*' is not recognized as an internal or external command)

確定tomcat單獨執行是沒有問題的,但在netbeans無法順利部署
解決方法:

在tomcat中編輯 bin/catalina.bat

拿掉原本JAVA_OPTS字串的雙引號""
例如
:noJuliConfig
set "JAVA_OPTS=%JAVA_OPTS% %LOGGING_CONFIG%"
......

:noJuliManager
set "JAVA_OPTS=%JAVA_OPTS% %LOGGING_MANAGER%"
改成
:noJuliConfig
set JAVA_OPTS=%JAVA_OPTS% %LOGGING_CONFIG%
.. ....

:noJuliManager
set JAVA_OPTS=%JAVA_OPTS% %LOGGING_MANAGER%


再跑一次測試OK

來源:

Error starting Tomcat from NetBeans - '127.0.0.1*' is not recognized as an internal or external command

網路停用IPv6

window 8 停用IPv6
不需要IPv6可以在控制台>網路>網路和共用中心>網際網路>內容>取消勾選IPv6
過程可參考:

How To Disable IPv6 On Windows 7


其他參考:
Disabling IPv6 in Microsoft Windows 8 and Server 2012

2014年12月8日 星期一

neabean 安裝新版本jdk移除舊版本, jdkhome對照路徑找不到

如果更新jdk後,移除在安裝netbean一併安裝的舊版本jdk,或者安裝時路徑的更動
會導致netbean找不到jdk來源,開啟時會跳出類似下列訊息

Cannot locate Java installation in specified jdkhome:
C:\Program Files\Java\jdk1.8.0_20
Do you want to try to use default version?
解決方法:找到安裝目前jdk路徑(或者找不到趕快安裝)
C:\Program Files (x86)\Java\jdk1.8.0_25後
到netbean安裝目錄C:\Program Files\NetBeans 8.0\etc\netbeans.conf
編輯這個檔案內的jdkhome位置
netbeans_jdkhome="C:\Program Files\Java\jdk1.8.0_20"
改為netbeans_jdkhome="C:\Program Files (x86)\Java\jdk1.8.0_25"

參考:
NetBeans “Cannot locate java installation in specified jdkhome”?

2014年12月7日 星期日

blog搬家參考

目前用blogger來寫練習程式的筆記,
(點這裡看其他文章寫blogger原因Five reasons I recommend daily blogging (even if you disagree))
雖然blogger是最容易上手功能也很像word一樣簡單
但是總覺得版面看得很不順眼哪~
最近打算改用wordpress來寫blog
bloger幾乎成了顯學, 如何編輯一個blogger的資源實在很多,
常見blog平台:
1.blogger
2.wordpress
3.Tumblr.
4.ghost(有人介紹)
5.痞客邦(台灣)
6.微博(大陸)
7. Live Journal(俄國)
其他適合用來架站的還有: Joomla! , Drupal
(好文推THE Best Places to Start a Blog (Updated 2014 Edition))
recommended-blogging-resources/

Ghost 是比較後來推出的平台,有人寫了PK文可以參考看看個人需求

WordPress vs. Ghost – Which Blogging Platform Is Right For You?

wordPress還蠻多人寫中文的架站教學文可以參考




One idea of Computer Technology Trend


I want to apologize I might express not good, but I try my best in the words.

so far as I know google only for crawler from pages of every web site on the internet.
but how about the information through system or the apps ?
Think that one day we don't need to type a lot word into your computer in front of the table.
we can do more like siri, make a virtual reality that time . And we don't wanna a search bar, we want some more anthropocentric that can interact with people. something call automation.
I think this concept occurred in lots of movies ,like in the movie of Resident Evil there is a little robot girl which is a computer can communicate with you.

but Steve Jobs create this possibility, I think so far only little people knew what he was doing is "one little step for man one giant leap for mankind". I think he foresee this great change of computer technology, but what he cannot do is the technique all we have enough technique fulfill this big step for now. so Steve Jobs choose take a little step to lead human forward a least before he died, pretty smart guy right?
What I really want to mention is, I know I'm not the first or only one to think about this.
That's why I want to share this here.With the limitation I know,I believe this rudimentary idea might be down in some way in near future. I present here for I know some will accomplish it or maybe in decades I'm able to make it.



If  you have anything for discussion ,I glad to know your opinion. :)


2014年12月4日 星期四

install JDK8 on linux

from:


To add the WebUpd8 Oracle Java PPA repository and install Oracle Java 8 in Debian, use the following commands:

su -
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
apt-get update
apt-get install oracle-java8-installer
exit
java -version

//accept the Oracle JDK8 license automatically
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections

//set the Java environment variables
sudo apt-get install oracle-java8-set-default
另一方法為安裝openjdk的套件

How to download and install prebuilt OpenJDK packages

[debian]Debian底下安裝JAVA