2014年8月29日 星期五

Ubuntu安裝Apache+Mariadb+PHP+phpMyAdmin



久久沒來寫個網誌,就來記錄一下自己曾學過的東西,至於出處我就不清楚了,如果有侵犯到您的網誌或者文章就請跟我說。


安裝Apache
$~ sudo apt-get install apache2





安裝Mariadb(用來取代MySQL的)
$~ sudo apt-get install mariadb-server





安裝PHP5
$~ sudo apt-get install php5 php5-mysql libapache2-mod-php5





安裝phpMyAdmin
$~ sudo apt-get install phpmyadmin



完畢,接下來就好好享受開發網站的過程吧!不過我都用Python來取代PHP就對了。XD


可以在這裡下載安裝文件ampp.sh












2014年6月6日 星期五

jQuery 隨手寫!


jQuery 的線上庫可以選擇 jQuery官方網站  或者 Google Hosted Libraries

引用方法
<script src=//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js></script>


撰寫方法
$(document).ready(
function(){
<!-- 程式碼撰寫區 -->
});

等於

$(function(){
<!-- 程式碼撰寫區 -->
});

2014年6月5日 星期四

Eclipse Google AppEngine(Python) 參數




--admin_host=ADMIN_HOST
Host name to which the local Development Console should bind (default: localhost).

--admin_port=ADMIN_PORT
Port to which the local Development Console should bind (default: 8000).

--enable_sendmail
Uses the local computer's Sendmail installation for sending email messages.

--help
Prints a helpful message then quits.

--host=...
The host address to use for the server. You may need to set this to be able to access the development server from another computer on your network. An address of 0.0.0.0 allows both localhost access and hostname access. Default is localhost.

--log_level=...
The lowest logging level at which logging messages will be written to the console; messages of the specified logging level or higher will be output. Possible values are debug, info, warning, error, and critical.

--port=...
The port number to use for the server. Default is 8080. If multiple servers are launched, they will be assigned subsequent ports (e.g. 8081, 8082, etc).

--logs_path=LOGS_FILE
By default, development server logs are stored in memory only. This option turns on disk storage of logs at the location specified by LOGS_FILE, making the logs available across server restarts. For example,devappserver.py --logs_path=/home/logs/boglogs bog


--require_indexes=yes|no
Disables automatic generation of entries in the index.yaml file. Instead, when the application makes a query that requires that its index be defined in the file and the index definition is not found, an exception will be raised, similar to what would happen when running on App Engine. The default value is no.

--smtp_host=...
The hostname of the SMTP server to use for sending email messages.

--smtp_port=...
The port number of the SMTP server to use for sending email messages.

--smtp_user=...
The username to use with the SMTP server for sending email messages.

--smtp_password=...
The password to use with the SMTP server for sending email messages.

--storage_path=...
Path at which all local files (such as the Datastore, Blobstore files, Google Cloud Storage Files, logs, etc) will be stored, unless overridden by --datastore_path, --blobstore_path, --logs_path, etc.



來源:https://developers.google.com/appengine/docs/python/tools/devserver?hl=zh-tw#Python_Command-line_arguments

2014年5月8日 星期四

Eclipse 佈景主題


好久沒來寫我的Blog了,就來篇讓Eclipse(日蝕)變的美美的的教學!

Eclipse UI theme plugin


在help -> Install New Software -> Add



Name: 隨你打自己想要的名字
Location: https://raw.github.com/guari/eclipse-ui-theme/master/com.github.eclipseuitheme.themes.updatesite


Eclipse Color theme plugin


在help -> Install New Software -> Add

Name: 隨你打自己想要的名字
Location: http://eclipse-color-theme.github.com/update


下面是安裝後,Eclipse佈景樣式


這裡是安裝後的文字樣式,我個人喜歡obsidian


最後祝福你們好好的享受你的eclipse畫面啦!

P.S. 當然上面這些樣式都是可以跨平台的,只要eclipse可以跑的都可以安裝。

2014年2月19日 星期三

2014年2月5日 星期三

HTML5 學習筆記

HTML5 學習筆記




P.S. HTML5現在可以不用使用雙引號(單引號)來宣告。像是像是link後面的href=可以直接連接CSS檔案的路徑(看你要用絕對路徑還是相對路徑。),而不用<link href='XXX.css'>。
※不過如果像是HTML元素內的class、id等等,像是如此class="nav navbar",你必須要用雙引號(單引號)來告訴瀏覽器知道這是class的宣告。

HTML5 宣告

<!DOCTYPE html>
<html lang=zh-tw>
<head>
  <meta charset=utf-8>
  <title>你的網站標題</title>
  <meta name=keywords content=網站的關鍵字,可以用〝,〞來寫多個關鍵字。>
  <meta name=description content=你網站的描述。>
  <meta name=author content=您的名字或者暱稱。>
  <meta name=copyright content=你的版權宣告。>
  <link rel=stylesheet href=你的CSS檔案的路徑>
  <script src=你的JS檔案的路徑 ※建議主要的JS函式庫。></script>
</head>
<body>
/******************************************************
 *                HTML元素放置區域。
 ******************************************************/
<script src=你的JS檔案的路徑 ※建議子網頁的JS設定></script>
</body>
</html>

頁面元素

header 元素

header表示頁面中一個內容區塊或者整個頁面的標題。

HTML5
<header></header>

HTML4
<div id="header"></div>

nav元素

nav表示頁面中導覽連結的部分。
HTML5
<nav></nav>
HTML4
<div id=nav></div>

article元素

article表示頁面中的一塊與上下文不相關的獨立內容
HTML5
<article></article>

HTML4
<div id="article"></div>

section元素

section表示頁面中的內容區塊。
HTML5
<section></section>
HTML4
<div id="section"></div>

aside元素

aside表示aside元素的內容之外與article元素的內容相關的輔助資訊。
HTML5
<aside></aside>
HTML4
<div id="aside"></div>

footer元素

footer表示整個頁面或頁面中一個內容區塊的註腳。
HTML5
<footer></footer>
HTML4
<div id=footer></div>

hgroup元素

hgroup用於對整個頁面或頁面中一個內容區塊的標題進行組合。
HTML5
<hgroup></hgroup>

HTML4
<div id="hgroup"></div>

figure元素

figure表示一段獨立的流內容
HTML5