發表文章

目前顯示的是 6月, 2017的文章

什麼是JVM JRE JDK

圖片
JVM(Java Virtual Machine) 為上圖最下層所示,他是一個虛擬的計算機是透過實際的計算機模擬出底層硬體的功能介面,有完整的硬體架構,總而言之JVM讓Java可以跨平台,什麼是跨平台呢? 舉個例來說:當Java source code(.java檔)經由Java Compiler編譯成Byte Code(*.class檔),Java Compiler並不會直接編譯成機器碼而是轉成Byte Code,因各平台有各自的機器碼,再經由JVM去解釋Byte Code成機器碼。 所以不論任何作業系統,只要有安裝JVM,使用Java寫出來的程式都可以正確被執行。

Java物件導向的概念 (一)

在Java物件導向程式設計的世界裡, 類別(Class)就好比像是藍圖, 這個類別的擁有了什麼特性, 我們希望動物擁有名字,重量 所以就在類別中定義這些特性或行為或方法(method). 寫好類別之後,

開啟FireFox受限的port

在Firefox網址列輸入about:config, 進入設定內新增字串network.security.ports.banned.override value填入需要開啟的port, 多個用  ; 隔開即可。

CS50 week1作業

圖片
Problem1 hello world $mkdir pset1   //創建一個目錄pset1 $cd ./pset1    //進入pset1目錄 check50 2016.hello hello.c      //CS50 IDE提供的檢查檔案是否正確 submit50 cs50/2017/x/hello           //提交檔案如下圖所示 Problem2 water Suffice it to say that the longer you shower, the more water you use. But just how much? Even if you have a "low-flow" showerhead, odds are your shower spits out 1.5 gallons of water per minute. A gallon, meanwhile, is 128 ounces, and so that shower spits out 1.5 × 128 = 192 ounces of water per minute. A typical bottle of water (that you might have for a drink, not a shower), meanwhile, might be 16 ounces. So taking a 1-minute shower is akin to using 192 ÷ 16 = 12 bottles of water. Taking (more realistically, perhaps!) a 10-minute shower, then, is like using 120 bottles of water. Deer Park, that’s a lot of water! Of course, bottled water itself is wasteful; best to use reusable containers when you can. But it does put into perspective what’s being spent in a s

CS50終端機編譯教學

在IDE上用vim編輯, http://linux.vbird.org/linux_basic/⋯⋯ $ vim hello.c 按i鍵入insert #include <stdio.h> int main(void) { printf(“Hello,world\n”); } 鍵入esc

CS50註冊教學

圖片
1. 首先先看看這篇的介紹文吧 https://www.inside.com.tw/2014/12/1⋯⋯ 2.進入此網址註冊吧 https://www.edx.org/course/introduc⋯⋯ 3.註冊完之後推薦在edx上面學習就好,上面資源整合的相當完整 4.點擊課程之後會看到像這樣的畫面,如果影片全英看不懂的話,可以直接看notes 5.接下來就接著影片教學了 6.之後如何submit作業上去之後再補充囉