Posts

Showing posts from January, 2016

GODADDY來台灣!

GODADDY來台灣囉! 現在只要特價3.17美金就能有一年DNS代管!

XAMPP 使用多PORT來執行不同網頁

XAMPP 使用多PORT來執行不同網頁 XAMPP 使用多PORT來執行不同網頁 XAMPP的預設值PORT是80 因為開啟 SKYPE或Internet Information Services(IIS) 導致PORT被占用 使用virtual host的方法來達成使用PORT 7777與7778來實作 httpd.conf Listen 80 Listen 7778 Listen 7777 httpd-vhosts.conf <VirtualHost *:80> DocumentRoot "C:/xampp/htdocs/Web1" ServerName localhost </VirtualHost> <VirtualHost *:7777> DocumentRoot "C:/xampp/htdocs/Web2" ServerName localhost </VirtualHost> <VirtualHost *:7778> DocumentRoot "C:/xampp/htdocs/Web3" ServerName localhost </VirtualHost>

Make a Website: CSS Layout-Navigation 2/4

Navigation The navigation menus are made up of two  ul elements. In each  ul , the  li  elements display on new lines because they are block elements. Let's style the  li  elements so that they display on the same line. This can be done with the  display  property. Instructions In  main.css Make a new CSS rule that selects all  li elements nested inside  < div   class = "nav" > .. </ div > . Change the  li  elements from being block elements to inline elements by setting the display  to  inline . ? Hint To select the  h1  element inside  < div class = "nav" > .. </ div > , we used this selector: .nav h1 { ... } Make a Website: CSS Layout-Navigation .nav li { color : #5a5a5a ; font-size : 11 px ; font-weight : bold ; padding : 14 px 10 px ; text-transform : uppercase ; display : inline ; } .jumbotron { background-image : url( 'http://goo.gl/04j7Nn' ) ; height

Make a Website: CSS Layout-Preview 1/4

Preview The CSS properties  display ,  position , and float  can be used to control where an element sits on the page. Let's see how to use them to arrange elements on the Airbnb home page. Instructions Click  Save & Submit Code  to get started. Make a Website: CSS Layout-Preview 1/4 <!DOCTYPE html> < html > < head > < link href = "http://s3.amazonaws.com/codecademy-content/courses/ltp/css/shift.css" rel = "stylesheet" > < link rel = "stylesheet" href = "main.css" > </ head > < body > < div class = "nav" > < div class = "container" > < ul > < li > < a href = "#" > Airbnb logo </ a > </ li > < li > < a href = "#" > Browse </ a > </ li > </ ul > < ul > <

MAKE A WEBSITE-Organize your Page

Introduction A web page is a collection of HTML elements. CSS can control the design of an element, like its color, font, and spacing. CSS can also control where an element sits on a page to create a page layout. For example, the layout to the right has a top navigation bar, a large feature element, a grid of images, and then three pieces of supporting content. What CSS properties are available to move elements around and create page layouts? Here are three common CSS properties. display CSS treats HTML elements like boxes. A box can be "block" or "inline". Block elements display on a new line (e.g.,  h1 ,  p , ul ,  li ). Inline elements display on the same line as their neighboring elements (e.g.,  img ,  a ) It's possible to change whether a box is block or inline by using the  display  property. Try it out Change the  display  of the  li  elements from  block  to  inline  so that they display on the same line. .nav li {

深入淺出JAVA-第一個物件程式(P37)

深入淺出JAVA-第一個物件程式(P37) 類別class Class Movie{ string Name; string Type; int rating; void PlayIt(){ System. out .printIn( "playing the movie" ) } } 測試類別 public class MovieTestDrive{ public static void main ( string [] args{ Movie One = New Movie(); one Name = "Starwars" one Type = "Tech" ont rating = "8" Movie Two = New Movie(); two Name = "Revengers" two Type = "Hero" two rating= "5" Movie Three = New Movie(); Three Name = "SpiderMan" Three Type = "Hero" Three rating= "9" } }

深入淺出JAVA-物件村(p28~35)

深入淺出JAVA-物件村(p28~35) 沒有物件導向的觀念 PlaySound ( ItemNumber ) { } extend ( ItemNumber ) { } 物件導向的觀念-寫出三個CLASS(都如下) PlaySound{ //程式內容 } Extend{ //程式內容 } 物件導向寫法當增加項目時 直接複製把Class增加 但非物件導向必須這樣寫 PlaySound(ItemNumber) { //if not ItemNumber 照原來 //else 播放新項目 } extend(ItemNumber) { } 當要在某一個項目進行延伸的改變時 非物件導向的寫法 extend(ItemNumber, xpt ,ypt){ // if not 進行原項目 // else 以xpt ypt做為中心點延伸 } 但物件導向只要 改其中一個的class的內容 int xpt int ypt PlaySound{ //程式內容 } Extend{ //使用xpt ypt進行延伸 //執行延伸 } **四個相同的class有同樣的程式碼叫做有相同的method 而非相同的procedure** 萃取出來以後 獨立成一個單獨的class 然後下面的只要繼承(inheritance)即可 而繼承下來的subclass,也可以進行override 就可以進行改寫