object(WP_Post)#2878 (24) {
  ["ID"]=>
  int(997)
  ["post_author"]=>
  string(1) "1"
  ["post_date"]=>
  string(19) "2024-07-12 09:44:45"
  ["post_date_gmt"]=>
  string(19) "2024-07-12 09:44:45"
  ["post_content"]=>
  string(904) "





"
  ["post_title"]=>
  string(31) "Java第10堂: Inheritance again"
  ["post_excerpt"]=>
  string(0) ""
  ["post_status"]=>
  string(7) "publish"
  ["comment_status"]=>
  string(4) "open"
  ["ping_status"]=>
  string(4) "open"
  ["post_password"]=>
  string(0) ""
  ["post_name"]=>
  string(14) "java-lesson-10"
  ["to_ping"]=>
  string(0) ""
  ["pinged"]=>
  string(0) ""
  ["post_modified"]=>
  string(19) "2024-07-13 01:27:54"
  ["post_modified_gmt"]=>
  string(19) "2024-07-13 01:27:54"
  ["post_content_filtered"]=>
  string(0) ""
  ["post_parent"]=>
  int(0)
  ["guid"]=>
  string(29) "https://www.hkprog.org/?p=997"
  ["menu_order"]=>
  int(0)
  ["post_type"]=>
  string(4) "post"
  ["post_mime_type"]=>
  string(0) ""
  ["comment_count"]=>
  string(1) "0"
  ["filter"]=>
  string(3) "raw"
}
		
Java第10堂: Inheritance again
			object(WP_Post)#2887 (24) {
  ["ID"]=>
  int(951)
  ["post_author"]=>
  string(1) "1"
  ["post_date"]=>
  string(19) "2024-07-10 15:55:46"
  ["post_date_gmt"]=>
  string(19) "2024-07-10 15:55:46"
  ["post_content"]=>
  string(5680) "








下載nasm https://www.nasm.us/

下載bochs https://bochs.sourceforge.io/ , 如果在linux或mac,可以試下自己build

./configure --enable-debugger --enable-debugger-gui --with-sdl2 --with-nogui --with-term
make -j
make install

Asm例子

a.asm:

org 0x7c00
	mov	ax,1
	mov	bx,2
	add ax, bx   ; ax = ax + bx
	inc ax
	sub ax, bx	 ; ax = ax - bx

	mov ah, byte [ds:bx]

	xor ch,ch    ; set zero
	mov byte [ds:bx], ch
	
loop1:
	jmp loop1

	times   512-($-$$)-2    db      0
	signature       dw      0xaa55

bochsrcSDL.bxrc:

###############################################################
# bochsrc.txt file for DLX Linux disk image.
###############################################################

# how much memory the emulated machine will have
megs: 16

# filename of ROM images
romimage: file=$BXSHARE/BIOS-bochs-latest
vgaromimage: file=$BXSHARE/VGABIOS-lgpl-latest

# what disk images will be used
#floppya: 1_44=../bootimage, status=inserted
#floppyb: 1_44=floppyb.img, status=inserted

# hard disk
#ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
#ata0-master: type=disk, path="hd10meg.img", cylinders=306, heads=4, spt=17
ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
#ata0-master: type=disk, path="10mb.img", mode=flat, cylinders=20, heads=16, spt=63
ata0-master: type=disk, path="hd.img", mode=flat, cylinders=40, heads=16, spt=63
#ata0-master: type=disk, path="../hd.img", mode=flat, cylinders=203, heads=16, spt=63	# 100MB
#ata0-master: type=disk, path="../harddisk", mode=flat, cylinders=2080, heads=16, spt=63   # 1GB

# choose the boot disk.
boot: c

#display_library: term
# other choices: win32 sdl wx carbon amigaos beos macintosh nogui rfb term svga
display_library: sdl2

# where do we send log messages?
log: bochsout.txt

# disable the mouse, since DLX is text only
mouse: enabled=0

# enable key mapping, using US layout as default.
#
# NOTE: In Bochs 1.4, keyboard mapping is only 100% implemented on X windows.
# However, the key mapping tables are used in the paste function, so
# in the DLX Linux example I'm enabling keyboard_mapping so that paste
# will work.  Cut&Paste is currently implemented on win32 and X windows only.

#keyboard_mapping: enabled=1, map=$BXSHARE/keymaps/x11-pc-us.map
#keyboard_mapping: enabled=1, map=$BXSHARE/keymaps/x11-pc-fr.map
#keyboard_mapping: enabled=1, map=$BXSHARE/keymaps/x11-pc-de.map
#keyboard_mapping: enabled=1, map=$BXSHARE/keymaps/x11-pc-es.map

magic_break: enabled=1

#debug: action=report
info: action=report
error: action=report
panic: action=report

insertData.sh:

#!/bin/bash

if [ $# != 4 ]; then
	echo "Usage : insertData.sh source dest <source skip position> <dest seek position>"
	exit;
fi

source_size=$(ls -l $1 | awk {'print $5'})
#dest_size=$(ls -l $2 | awk {'print $5'})
total_seek_size=$((source_size + $4))
#dd if=$2 of=insertData_temp skip=$total_seek_size ibs=1 obs=1MB > /dev/null
if [ $4 = 0 ]; then
	rm -fr first
	touch first
else
	echo "dd if=$2 of=first bs=$4 count=1";
	dd if=$2 of=first bs=$4 count=1
fi

#### back #####
echo "dd if=$2 of=back skip=1 bs=$total_seek_size";
dd if=$2 of=back skip=1 bs=$total_seek_size

cat first $1 back > $2

rm -fr first back

Compile指令:

nasm a.asm -l a.lst
dd if=/dev/zero of=hd.img count=3072 bs=10240
./insertData.sh a hd.img 0 0
bochs -q -f bochsrcSDL.bxrc
" ["post_title"]=> string(14) "x86 ASM第1堂" ["post_excerpt"]=> string(0) "" ["post_status"]=> string(7) "publish" ["comment_status"]=> string(4) "open" ["ping_status"]=> string(4) "open" ["post_password"]=> string(0) "" ["post_name"]=> string(16) "x86-asm-lesson-1" ["to_ping"]=> string(0) "" ["pinged"]=> string(0) "" ["post_modified"]=> string(19) "2024-07-10 16:48:01" ["post_modified_gmt"]=> string(19) "2024-07-10 16:48:01" ["post_content_filtered"]=> string(0) "" ["post_parent"]=> int(0) ["guid"]=> string(29) "https://www.hkprog.org/?p=951" ["menu_order"]=> int(0) ["post_type"]=> string(4) "post" ["post_mime_type"]=> string(0) "" ["comment_count"]=> string(1) "0" ["filter"]=> string(3) "raw" }
x86 ASM第1堂
下載nasm https://www.nasm.us/ 下載bochs https://bochs.sourceforge.io/ , 如果在linux或mac,可以試下自己build Asm例子 a.asm: bochsrcSDL.bxrc: insertData.sh: Compile指令:

下載nasm https://www.nasm.us/

下載bochs https://bochs.sourceforge.io/ , 如果在linux或mac,可以試下自己build

./configure --enable-debugger --enable-debugger-gui --with-sdl2 --with-nogui --with-term
make -j
make install

Asm例子

a.asm:

org 0x7c00
	mov	ax,1
	mov	bx,2
	add ax, bx   ; ax = ax + bx
	inc ax
	sub ax, bx	 ; ax = ax - bx

	mov ah, byte [ds:bx]

	xor ch,ch    ; set zero
	mov byte [ds:bx], ch
	
loop1:
	jmp loop1

	times   512-($-$$)-2    db      0
	signature       dw      0xaa55

bochsrcSDL.bxrc:

###############################################################
# bochsrc.txt file for DLX Linux disk image.
###############################################################

# how much memory the emulated machine will have
megs: 16

# filename of ROM images
romimage: file=$BXSHARE/BIOS-bochs-latest
vgaromimage: file=$BXSHARE/VGABIOS-lgpl-latest

# what disk images will be used
#floppya: 1_44=../bootimage, status=inserted
#floppyb: 1_44=floppyb.img, status=inserted

# hard disk
#ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
#ata0-master: type=disk, path="hd10meg.img", cylinders=306, heads=4, spt=17
ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
#ata0-master: type=disk, path="10mb.img", mode=flat, cylinders=20, heads=16, spt=63
ata0-master: type=disk, path="hd.img", mode=flat, cylinders=40, heads=16, spt=63
#ata0-master: type=disk, path="../hd.img", mode=flat, cylinders=203, heads=16, spt=63	# 100MB
#ata0-master: type=disk, path="../harddisk", mode=flat, cylinders=2080, heads=16, spt=63   # 1GB

# choose the boot disk.
boot: c

#display_library: term
# other choices: win32 sdl wx carbon amigaos beos macintosh nogui rfb term svga
display_library: sdl2

# where do we send log messages?
log: bochsout.txt

# disable the mouse, since DLX is text only
mouse: enabled=0

# enable key mapping, using US layout as default.
#
# NOTE: In Bochs 1.4, keyboard mapping is only 100% implemented on X windows.
# However, the key mapping tables are used in the paste function, so
# in the DLX Linux example I'm enabling keyboard_mapping so that paste
# will work.  Cut&Paste is currently implemented on win32 and X windows only.

#keyboard_mapping: enabled=1, map=$BXSHARE/keymaps/x11-pc-us.map
#keyboard_mapping: enabled=1, map=$BXSHARE/keymaps/x11-pc-fr.map
#keyboard_mapping: enabled=1, map=$BXSHARE/keymaps/x11-pc-de.map
#keyboard_mapping: enabled=1, map=$BXSHARE/keymaps/x11-pc-es.map

magic_break: enabled=1

#debug: action=report
info: action=report
error: action=report
panic: action=report

insertData.sh:

#!/bin/bash

if [ $# != 4 ]; then
	echo "Usage : insertData.sh source dest <source skip position> <dest seek position>"
	exit;
fi

source_size=$(ls -l $1 | awk {'print $5'})
#dest_size=$(ls -l $2 | awk {'print $5'})
total_seek_size=$((source_size + $4))
#dd if=$2 of=insertData_temp skip=$total_seek_size ibs=1 obs=1MB > /dev/null
if [ $4 = 0 ]; then
	rm -fr first
	touch first
else
	echo "dd if=$2 of=first bs=$4 count=1";
	dd if=$2 of=first bs=$4 count=1
fi

#### back #####
echo "dd if=$2 of=back skip=1 bs=$total_seek_size";
dd if=$2 of=back skip=1 bs=$total_seek_size

cat first $1 back > $2

rm -fr first back

Compile指令:

nasm a.asm -l a.lst
dd if=/dev/zero of=hd.img count=3072 bs=10240
./insertData.sh a hd.img 0 0
bochs -q -f bochsrcSDL.bxrc
			object(WP_Post)#2874 (24) {
  ["ID"]=>
  int(895)
  ["post_author"]=>
  string(1) "1"
  ["post_date"]=>
  string(19) "2024-07-07 04:37:14"
  ["post_date_gmt"]=>
  string(19) "2024-07-07 04:37:14"
  ["post_content"]=>
  string(2786) "

Thank you HKOSCON, their Chairman Mr Sammy, and all members for the chance to present there

" ["post_title"]=> string(12) "HKOSCON 2024" ["post_excerpt"]=> string(0) "" ["post_status"]=> string(7) "publish" ["comment_status"]=> string(4) "open" ["ping_status"]=> string(4) "open" ["post_password"]=> string(0) "" ["post_name"]=> string(12) "hkoscon-2024" ["to_ping"]=> string(0) "" ["pinged"]=> string(0) "" ["post_modified"]=> string(19) "2024-07-07 04:38:35" ["post_modified_gmt"]=> string(19) "2024-07-07 04:38:35" ["post_content_filtered"]=> string(0) "" ["post_parent"]=> int(0) ["guid"]=> string(29) "https://www.hkprog.org/?p=895" ["menu_order"]=> int(0) ["post_type"]=> string(4) "post" ["post_mime_type"]=> string(0) "" ["comment_count"]=> string(1) "0" ["filter"]=> string(3) "raw" }
HKOSCON 2024
Thank you HKOSCON, their Chairman Mr Sammy, and all members for the chance to present there

Thank you HKOSCON, their Chairman Mr Sammy, and all members for the chance to present there

			object(WP_Post)#2881 (24) {
  ["ID"]=>
  int(855)
  ["post_author"]=>
  string(1) "1"
  ["post_date"]=>
  string(19) "2024-07-05 14:05:30"
  ["post_date_gmt"]=>
  string(19) "2024-07-05 14:05:30"
  ["post_content"]=>
  string(902) "





"
  ["post_title"]=>
  string(38) "Java第9堂: Constructor & Multithread"
  ["post_excerpt"]=>
  string(0) ""
  ["post_status"]=>
  string(7) "publish"
  ["comment_status"]=>
  string(4) "open"
  ["ping_status"]=>
  string(4) "open"
  ["post_password"]=>
  string(0) ""
  ["post_name"]=>
  string(13) "java-lesson-9"
  ["to_ping"]=>
  string(0) ""
  ["pinged"]=>
  string(0) ""
  ["post_modified"]=>
  string(19) "2024-07-05 15:31:42"
  ["post_modified_gmt"]=>
  string(19) "2024-07-05 15:31:42"
  ["post_content_filtered"]=>
  string(0) ""
  ["post_parent"]=>
  int(0)
  ["guid"]=>
  string(29) "https://www.hkprog.org/?p=855"
  ["menu_order"]=>
  int(0)
  ["post_type"]=>
  string(4) "post"
  ["post_mime_type"]=>
  string(0) ""
  ["comment_count"]=>
  string(1) "0"
  ["filter"]=>
  string(3) "raw"
}
		
Java第9堂: Constructor & Multithread
			object(WP_Post)#2876 (24) {
  ["ID"]=>
  int(844)
  ["post_author"]=>
  string(1) "1"
  ["post_date"]=>
  string(19) "2024-07-03 13:39:41"
  ["post_date_gmt"]=>
  string(19) "2024-07-03 13:39:41"
  ["post_content"]=>
  string(2029) "

終於找到一位有心人Charles Ng先生帶領大家成立Embedded System Special Interest Group,本會和吳先生承諾呢個SIG會last for最少一年,吳先生會搞兩次workshop,會長亦都會一對一搞另多兩次workshop以作支持。吳先生是業界從事嵌入式開發超過幾十年之專業人士,佢自己實作左塊PCB可以mount raspberry pi cm上去,佢會舉辦workshop教一教大家點做,請大家支持。

吳先生作品

" ["post_title"]=> string(50) "Embedded System Special Interest Group宣布成立" ["post_excerpt"]=> string(0) "" ["post_status"]=> string(7) "publish" ["comment_status"]=> string(4) "open" ["ping_status"]=> string(4) "open" ["post_password"]=> string(0) "" ["post_name"]=> string(38) "embedded-system-special-interest-group" ["to_ping"]=> string(0) "" ["pinged"]=> string(0) "" ["post_modified"]=> string(19) "2024-07-03 15:23:05" ["post_modified_gmt"]=> string(19) "2024-07-03 15:23:05" ["post_content_filtered"]=> string(0) "" ["post_parent"]=> int(0) ["guid"]=> string(29) "https://www.hkprog.org/?p=844" ["menu_order"]=> int(0) ["post_type"]=> string(4) "post" ["post_mime_type"]=> string(0) "" ["comment_count"]=> string(1) "0" ["filter"]=> string(3) "raw" }
Embedded System Special Interest Group宣布成立
終於找到一位有心人Charles Ng先生帶領大家成立Embedded System Special Interest Group,本會和吳先生承諾呢個SIG會last for最少一年,吳先生會搞兩次workshop,會長亦都會一對一搞另多兩次workshop以作支持。吳先生是業界從事嵌入式開發超過幾十年之專業人士,佢自己實作左塊PCB可以mount raspberry pi cm上去,佢會舉辦workshop教一教大家點做,請大家支持。 吳先生作品

終於找到一位有心人Charles Ng先生帶領大家成立Embedded System Special Interest Group,本會和吳先生承諾呢個SIG會last for最少一年,吳先生會搞兩次workshop,會長亦都會一對一搞另多兩次workshop以作支持。吳先生是業界從事嵌入式開發超過幾十年之專業人士,佢自己實作左塊PCB可以mount raspberry pi cm上去,佢會舉辦workshop教一教大家點做,請大家支持。

吳先生作品

			object(WP_Post)#2873 (24) {
  ["ID"]=>
  int(773)
  ["post_author"]=>
  string(1) "1"
  ["post_date"]=>
  string(19) "2024-06-30 06:38:05"
  ["post_date_gmt"]=>
  string(19) "2024-06-30 06:38:05"
  ["post_content"]=>
  string(25143) "





















"
  ["post_title"]=>
  string(33) "Azure User Group聚會 2024/06/29"
  ["post_excerpt"]=>
  string(0) ""
  ["post_status"]=>
  string(7) "publish"
  ["comment_status"]=>
  string(4) "open"
  ["ping_status"]=>
  string(4) "open"
  ["post_password"]=>
  string(0) ""
  ["post_name"]=>
  string(33) "azure-user-group-meetup2024-06-29"
  ["to_ping"]=>
  string(0) ""
  ["pinged"]=>
  string(0) ""
  ["post_modified"]=>
  string(19) "2024-06-30 06:41:15"
  ["post_modified_gmt"]=>
  string(19) "2024-06-30 06:41:15"
  ["post_content_filtered"]=>
  string(0) ""
  ["post_parent"]=>
  int(0)
  ["guid"]=>
  string(29) "https://www.hkprog.org/?p=773"
  ["menu_order"]=>
  int(0)
  ["post_type"]=>
  string(4) "post"
  ["post_mime_type"]=>
  string(0) ""
  ["comment_count"]=>
  string(1) "0"
  ["filter"]=>
  string(3) "raw"
}
		
Azure User Group聚會 2024/06/29
			object(WP_Post)#2872 (24) {
  ["ID"]=>
  int(766)
  ["post_author"]=>
  string(1) "1"
  ["post_date"]=>
  string(19) "2024-06-28 08:06:53"
  ["post_date_gmt"]=>
  string(19) "2024-06-28 08:06:53"
  ["post_content"]=>
  string(899) "





"
  ["post_title"]=>
  string(41) "Java第8堂: Overriding & Static func"
  ["post_excerpt"]=>
  string(0) ""
  ["post_status"]=>
  string(7) "publish"
  ["comment_status"]=>
  string(4) "open"
  ["ping_status"]=>
  string(4) "open"
  ["post_password"]=>
  string(0) ""
  ["post_name"]=>
  string(13) "java-lesson-8"
  ["to_ping"]=>
  string(0) ""
  ["pinged"]=>
  string(0) ""
  ["post_modified"]=>
  string(19) "2024-06-28 14:14:04"
  ["post_modified_gmt"]=>
  string(19) "2024-06-28 14:14:04"
  ["post_content_filtered"]=>
  string(0) ""
  ["post_parent"]=>
  int(0)
  ["guid"]=>
  string(29) "https://www.hkprog.org/?p=766"
  ["menu_order"]=>
  int(0)
  ["post_type"]=>
  string(4) "post"
  ["post_mime_type"]=>
  string(0) ""
  ["comment_count"]=>
  string(1) "0"
  ["filter"]=>
  string(3) "raw"
}
		
Java第8堂: Overriding & Static func
			object(WP_Post)#2871 (24) {
  ["ID"]=>
  int(755)
  ["post_author"]=>
  string(1) "1"
  ["post_date"]=>
  string(19) "2024-06-21 15:14:46"
  ["post_date_gmt"]=>
  string(19) "2024-06-21 15:14:46"
  ["post_content"]=>
  string(1801) "








功課一

功課二

" ["post_title"]=> string(92) "Java第7堂: Interface接口 & Polymorphism多態 & Exception例外 & Java Swing" ["post_excerpt"]=> string(0) "" ["post_status"]=> string(7) "publish" ["comment_status"]=> string(4) "open" ["ping_status"]=> string(4) "open" ["post_password"]=> string(0) "" ["post_name"]=> string(13) "java-lesson-7" ["to_ping"]=> string(0) "" ["pinged"]=> string(0) "" ["post_modified"]=> string(19) "2024-06-21 15:15:27" ["post_modified_gmt"]=> string(19) "2024-06-21 15:15:27" ["post_content_filtered"]=> string(0) "" ["post_parent"]=> int(0) ["guid"]=> string(29) "https://www.hkprog.org/?p=755" ["menu_order"]=> int(0) ["post_type"]=> string(4) "post" ["post_mime_type"]=> string(0) "" ["comment_count"]=> string(1) "0" ["filter"]=> string(3) "raw" }
Java第7堂: Interface接口 & Polymorphism多態 & Exception例外 & Java Swing
功課一 功課二

功課一

功課二

			object(WP_Post)#2870 (24) {
  ["ID"]=>
  int(736)
  ["post_author"]=>
  string(1) "1"
  ["post_date"]=>
  string(19) "2024-06-14 11:18:45"
  ["post_date_gmt"]=>
  string(19) "2024-06-14 11:18:45"
  ["post_content"]=>
  string(2733) "








Stack例子:

import java.util.Stack;

public class Example6 {
	public static void main(String args[]) {
		Stack<String> s = new Stack();
		s.add("A");
		s.add("B");
		s.add("C");

		s.remove(1);
		System.out.println(s.size());

		System.out.println(s.pop());
		if (!s.empty()) {
			System.out.println(s.pop());
		}
		System.out.println(s.pop());
		if (!s.empty()) {
			System.out.println(s.pop());
		}
	}
}

LinkedList例子:

import java.util.LinkedList;

public class Example6 {
	public static void main(String args[]) {
		LinkedList<String> list = new LinkedList();
		list.add("Peter 1");
		list.add("Peter 2");
		list.add("Peter 3");

		for (int x = 0; x < list.size(); x++) {
			System.out.println(list.get(x));
		}
	}
}
" ["post_title"]=> string(43) "Java第6堂: Data Structure & OOP again" ["post_excerpt"]=> string(0) "" ["post_status"]=> string(7) "publish" ["comment_status"]=> string(4) "open" ["ping_status"]=> string(4) "open" ["post_password"]=> string(0) "" ["post_name"]=> string(13) "java-lesson-6" ["to_ping"]=> string(0) "" ["pinged"]=> string(0) "" ["post_modified"]=> string(19) "2024-06-15 17:15:17" ["post_modified_gmt"]=> string(19) "2024-06-15 17:15:17" ["post_content_filtered"]=> string(0) "" ["post_parent"]=> int(0) ["guid"]=> string(29) "https://www.hkprog.org/?p=736" ["menu_order"]=> int(0) ["post_type"]=> string(4) "post" ["post_mime_type"]=> string(0) "" ["comment_count"]=> string(1) "0" ["filter"]=> string(3) "raw" }
Java第6堂: Data Structure & OOP again
Stack例子: LinkedList例子: 注意 : 如果用VSCode打Code,淺灰式e:只是提示不是真正代碼,不用打去你段Code到

Stack例子:

import java.util.Stack;

public class Example6 {
	public static void main(String args[]) {
		Stack<String> s = new Stack();
		s.add("A");
		s.add("B");
		s.add("C");

		s.remove(1);
		System.out.println(s.size());

		System.out.println(s.pop());
		if (!s.empty()) {
			System.out.println(s.pop());
		}
		System.out.println(s.pop());
		if (!s.empty()) {
			System.out.println(s.pop());
		}
	}
}

LinkedList例子:

import java.util.LinkedList;

public class Example6 {
	public static void main(String args[]) {
		LinkedList<String> list = new LinkedList();
		list.add("Peter 1");
		list.add("Peter 2");
		list.add("Peter 3");

		for (int x = 0; x < list.size(); x++) {
			System.out.println(list.get(x));
		}
	}
}
			object(WP_Post)#2869 (24) {
  ["ID"]=>
  int(721)
  ["post_author"]=>
  string(1) "1"
  ["post_date"]=>
  string(19) "2024-06-07 16:20:13"
  ["post_date_gmt"]=>
  string(19) "2024-06-07 16:20:13"
  ["post_content"]=>
  string(1946) "








功課一 : 改下段Bubble Sort Code令到佢唔好Loop咁多次

功課二:將下面張圖轉成Code

" ["post_title"]=> string(45) "Java第5堂: Sorting & OOP(Class, Object)" ["post_excerpt"]=> string(0) "" ["post_status"]=> string(7) "publish" ["comment_status"]=> string(4) "open" ["ping_status"]=> string(4) "open" ["post_password"]=> string(0) "" ["post_name"]=> string(13) "java-lesson-5" ["to_ping"]=> string(0) "" ["pinged"]=> string(0) "" ["post_modified"]=> string(19) "2024-06-07 16:25:25" ["post_modified_gmt"]=> string(19) "2024-06-07 16:25:25" ["post_content_filtered"]=> string(0) "" ["post_parent"]=> int(0) ["guid"]=> string(29) "https://www.hkprog.org/?p=721" ["menu_order"]=> int(0) ["post_type"]=> string(4) "post" ["post_mime_type"]=> string(0) "" ["comment_count"]=> string(1) "0" ["filter"]=> string(3) "raw" }
Java第5堂: Sorting & OOP(Class, Object)
功課一 : 改下段Bubble Sort Code令到佢唔好Loop咁多次 功課二:將下面張圖轉成Code

功課一 : 改下段Bubble Sort Code令到佢唔好Loop咁多次

功課二:將下面張圖轉成Code

			object(WP_Post)#2868 (24) {
  ["ID"]=>
  int(702)
  ["post_author"]=>
  string(1) "1"
  ["post_date"]=>
  string(19) "2024-05-31 14:59:02"
  ["post_date_gmt"]=>
  string(19) "2024-05-31 14:59:02"
  ["post_content"]=>
  string(899) "





"
  ["post_title"]=>
  string(29) "Java第4堂: Array & Loop"
  ["post_excerpt"]=>
  string(0) ""
  ["post_status"]=>
  string(7) "publish"
  ["comment_status"]=>
  string(4) "open"
  ["ping_status"]=>
  string(4) "open"
  ["post_password"]=>
  string(0) ""
  ["post_name"]=>
  string(34) "java%e7%ac%ac4%e5%a0%82-array-loop"
  ["to_ping"]=>
  string(0) ""
  ["pinged"]=>
  string(0) ""
  ["post_modified"]=>
  string(19) "2024-05-31 15:02:22"
  ["post_modified_gmt"]=>
  string(19) "2024-05-31 15:02:22"
  ["post_content_filtered"]=>
  string(0) ""
  ["post_parent"]=>
  int(0)
  ["guid"]=>
  string(29) "https://www.hkprog.org/?p=702"
  ["menu_order"]=>
  int(0)
  ["post_type"]=>
  string(4) "post"
  ["post_mime_type"]=>
  string(0) ""
  ["comment_count"]=>
  string(1) "0"
  ["filter"]=>
  string(3) "raw"
}
		
Java第4堂: Array & Loop
			object(WP_Post)#2867 (24) {
  ["ID"]=>
  int(688)
  ["post_author"]=>
  string(1) "1"
  ["post_date"]=>
  string(19) "2024-05-24 15:04:17"
  ["post_date_gmt"]=>
  string(19) "2024-05-24 15:04:17"
  ["post_content"]=>
  string(1733) "








功課一

功課二

" ["post_title"]=> string(21) "Java第3堂: For Loop" ["post_excerpt"]=> string(0) "" ["post_status"]=> string(7) "publish" ["comment_status"]=> string(4) "open" ["ping_status"]=> string(4) "open" ["post_password"]=> string(0) "" ["post_name"]=> string(32) "java%e7%ac%ac3%e5%a0%82-for-loop" ["to_ping"]=> string(0) "" ["pinged"]=> string(0) "" ["post_modified"]=> string(19) "2024-05-24 15:09:02" ["post_modified_gmt"]=> string(19) "2024-05-24 15:09:02" ["post_content_filtered"]=> string(0) "" ["post_parent"]=> int(0) ["guid"]=> string(29) "https://www.hkprog.org/?p=688" ["menu_order"]=> int(0) ["post_type"]=> string(4) "post" ["post_mime_type"]=> string(0) "" ["comment_count"]=> string(1) "0" ["filter"]=> string(3) "raw" }
Java第3堂: For Loop
功課一 功課二

功課一

功課二

			object(WP_Post)#2866 (24) {
  ["ID"]=>
  int(679)
  ["post_author"]=>
  string(1) "1"
  ["post_date"]=>
  string(19) "2024-05-17 17:15:08"
  ["post_date_gmt"]=>
  string(19) "2024-05-17 17:15:08"
  ["post_content"]=>
  string(1446) "








練習

public class Example1{
	public static void main(String args[]){
		int score=55;

		if (score >= 80){
			System.out.println("A");
		}else if (score >= 60){
			System.out.println("B");
		}else if (score >= 40){
			System.out.println("C");
		}else{
			System.out.println("F");
		}

		System.out.println("End");
	}
}
" ["post_title"]=> string(33) "Java第2堂 : Variable & Loop" ["post_excerpt"]=> string(0) "" ["post_status"]=> string(7) "publish" ["comment_status"]=> string(4) "open" ["ping_status"]=> string(4) "open" ["post_password"]=> string(0) "" ["post_name"]=> string(6) "java-2" ["to_ping"]=> string(0) "" ["pinged"]=> string(0) "" ["post_modified"]=> string(19) "2024-05-18 03:51:14" ["post_modified_gmt"]=> string(19) "2024-05-18 03:51:14" ["post_content_filtered"]=> string(0) "" ["post_parent"]=> int(0) ["guid"]=> string(29) "https://www.hkprog.org/?p=679" ["menu_order"]=> int(0) ["post_type"]=> string(4) "post" ["post_mime_type"]=> string(0) "" ["comment_count"]=> string(1) "0" ["filter"]=> string(3) "raw" }
Java第2堂 : Variable & Loop
練習

練習

public class Example1{
	public static void main(String args[]){
		int score=55;

		if (score >= 80){
			System.out.println("A");
		}else if (score >= 60){
			System.out.println("B");
		}else if (score >= 40){
			System.out.println("C");
		}else{
			System.out.println("F");
		}

		System.out.println("End");
	}
}
			object(WP_Post)#2865 (24) {
  ["ID"]=>
  int(641)
  ["post_author"]=>
  string(1) "1"
  ["post_date"]=>
  string(19) "2024-05-10 16:51:25"
  ["post_date_gmt"]=>
  string(19) "2024-05-10 16:51:25"
  ["post_content"]=>
  string(5935) "




PowerPoint

Notes

  1. 下載Java https://java.sun.com
  1. 以下是HelloWorld代碼
class Example1{
    public static void main(String args[]){
          System.out.println("Hello World");
    }
}

Compile指令

javac Example1.java
java Example1

常見錯誤

錯誤一 : 打錯字

首先打錯字唔洗驚, 睇下個Error Message, 佢會有個箭咀指住大約錯邊個位, 同埋有個行數, 跟住就可以揾到錯邊

錯誤二: Save錯文件名

錯誤張文件名Save做.java.txt, 所有Java文件必需要用.java做尾. 你地係notebook到要簡下面嘅撰項

" ["post_title"]=> string(12) "Java 第1堂" ["post_excerpt"]=> string(0) "" ["post_status"]=> string(7) "publish" ["comment_status"]=> string(4) "open" ["ping_status"]=> string(4) "open" ["post_password"]=> string(0) "" ["post_name"]=> string(6) "java-1" ["to_ping"]=> string(0) "" ["pinged"]=> string(0) "" ["post_modified"]=> string(19) "2024-05-13 09:00:19" ["post_modified_gmt"]=> string(19) "2024-05-13 09:00:19" ["post_content_filtered"]=> string(0) "" ["post_parent"]=> int(0) ["guid"]=> string(29) "https://www.hkprog.org/?p=641" ["menu_order"]=> int(0) ["post_type"]=> string(4) "post" ["post_mime_type"]=> string(0) "" ["comment_count"]=> string(1) "0" ["filter"]=> string(3) "raw" }
Java 第1堂
PowerPoint Notes Compile指令 javac Example1.javajava Example1 常見錯誤 錯誤一 : 打錯字 首先打錯字唔洗驚, 睇下個Error Message, 佢會有個箭咀指住大約錯邊個位, 同埋有個行數, 跟住就可以揾到錯邊 錯誤二: Save錯文件名 錯誤張文件名Save做.java.txt, 所有Java文件必需要用.java做尾. 你地係notebook到要簡下面嘅撰項

PowerPoint

Notes

  1. 下載Java https://java.sun.com
  1. 以下是HelloWorld代碼
class Example1{
    public static void main(String args[]){
          System.out.println("Hello World");
    }
}

Compile指令

javac Example1.java
java Example1

常見錯誤

錯誤一 : 打錯字

首先打錯字唔洗驚, 睇下個Error Message, 佢會有個箭咀指住大約錯邊個位, 同埋有個行數, 跟住就可以揾到錯邊

錯誤二: Save錯文件名

錯誤張文件名Save做.java.txt, 所有Java文件必需要用.java做尾. 你地係notebook到要簡下面嘅撰項

			object(WP_Post)#2864 (24) {
  ["ID"]=>
  int(629)
  ["post_author"]=>
  string(1) "1"
  ["post_date"]=>
  string(19) "2024-04-09 09:11:48"
  ["post_date_gmt"]=>
  string(19) "2024-04-09 09:11:48"
  ["post_content"]=>
  string(1727) "

Get in HKPS website, you see "Hour Of Code" menu on top

If you are not registered yet, you jump in above page. Two options: register for teen or adult

This is the main screen, since we don't have many courses yet, so no search bar. "On going" means the course still has lessons, you may ask teacher questions. "Done" means the course is ended, no question to teacher.

View course info and video play back

" ["post_title"]=> string(21) "HOC system proposal 1" ["post_excerpt"]=> string(0) "" ["post_status"]=> string(7) "publish" ["comment_status"]=> string(4) "open" ["ping_status"]=> string(4) "open" ["post_password"]=> string(0) "" ["post_name"]=> string(21) "hoc-system-proposal-1" ["to_ping"]=> string(0) "" ["pinged"]=> string(0) "" ["post_modified"]=> string(19) "2024-04-09 09:17:27" ["post_modified_gmt"]=> string(19) "2024-04-09 09:17:27" ["post_content_filtered"]=> string(0) "" ["post_parent"]=> int(0) ["guid"]=> string(29) "https://www.hkprog.org/?p=629" ["menu_order"]=> int(0) ["post_type"]=> string(4) "post" ["post_mime_type"]=> string(0) "" ["comment_count"]=> string(1) "0" ["filter"]=> string(3) "raw" }
HOC system proposal 1
Get in HKPS website, you see “Hour Of Code” menu on top If you are not registered yet, you jump in above page. Two options: register for teen or adult This is the main screen, since we don’t have many courses yet, so no search bar. “On going” means the course still has lessons, you […]

Get in HKPS website, you see "Hour Of Code" menu on top

If you are not registered yet, you jump in above page. Two options: register for teen or adult

This is the main screen, since we don't have many courses yet, so no search bar. "On going" means the course still has lessons, you may ask teacher questions. "Done" means the course is ended, no question to teacher.

View course info and video play back

			object(WP_Post)#2863 (24) {
  ["ID"]=>
  int(532)
  ["post_author"]=>
  string(1) "1"
  ["post_date"]=>
  string(19) "2024-02-23 16:49:19"
  ["post_date_gmt"]=>
  string(19) "2024-02-23 16:49:19"
  ["post_content"]=>
  string(454) "

Lunch with Thei and Microsoft to discuss the project about the AI platform

" ["post_title"]=> string(29) "Lunch with Thei and Microsoft" ["post_excerpt"]=> string(0) "" ["post_status"]=> string(7) "publish" ["comment_status"]=> string(4) "open" ["ping_status"]=> string(4) "open" ["post_password"]=> string(0) "" ["post_name"]=> string(29) "lunch-with-thei-and-microsoft" ["to_ping"]=> string(0) "" ["pinged"]=> string(0) "" ["post_modified"]=> string(19) "2024-02-23 16:52:18" ["post_modified_gmt"]=> string(19) "2024-02-23 16:52:18" ["post_content_filtered"]=> string(0) "" ["post_parent"]=> int(0) ["guid"]=> string(29) "https://www.hkprog.org/?p=532" ["menu_order"]=> int(0) ["post_type"]=> string(4) "post" ["post_mime_type"]=> string(0) "" ["comment_count"]=> string(1) "0" ["filter"]=> string(3) "raw" }
Lunch with Thei and Microsoft
Lunch with Thei and Microsoft to discuss the project about the AI platform

Lunch with Thei and Microsoft to discuss the project about the AI platform

			object(WP_Post)#2862 (24) {
  ["ID"]=>
  int(334)
  ["post_author"]=>
  string(1) "1"
  ["post_date"]=>
  string(19) "2023-12-13 05:59:38"
  ["post_date_gmt"]=>
  string(19) "2023-12-13 05:59:38"
  ["post_content"]=>
  string(2149) "

McCode is a weekly event for coding enthusiasts who want to share their passion, learn new skills, and enjoy some delicious food. Every week, we meet at a local McDonald’s restaurant and work on different coding projects, challenges, and tutorials. Whether you are a beginner or an expert, you are welcome to join us and have fun with coding. McCode is a great opportunity to network with other coders, get feedback on your work, and discover new tools and resources. Plus, you get to enjoy some tasty burgers, fries, and drinks while you code. What’s not to love? If you are interested in joining McCode, please visit our website and sign up for our newsletter. We hope to see you soon at McCode, the coding event that satisfies your hunger for learning and eating.

" ["post_title"]=> string(6) "McCode" ["post_excerpt"]=> string(0) "" ["post_status"]=> string(7) "publish" ["comment_status"]=> string(4) "open" ["ping_status"]=> string(4) "open" ["post_password"]=> string(0) "" ["post_name"]=> string(6) "mccode" ["to_ping"]=> string(0) "" ["pinged"]=> string(0) "" ["post_modified"]=> string(19) "2023-12-15 07:34:05" ["post_modified_gmt"]=> string(19) "2023-12-15 07:34:05" ["post_content_filtered"]=> string(0) "" ["post_parent"]=> int(0) ["guid"]=> string(29) "https://www.hkprog.org/?p=334" ["menu_order"]=> int(0) ["post_type"]=> string(4) "post" ["post_mime_type"]=> string(0) "" ["comment_count"]=> string(1) "0" ["filter"]=> string(3) "raw" }
McCode
McCode is a weekly event for coding enthusiasts who want to share their passion, learn new skills, and enjoy some delicious food. Every week, we meet at a local McDonald’s restaurant and work on different coding projects, challenges, and tutorials. Whether you are a beginner or an expert, you are welcome to join us and […]

McCode is a weekly event for coding enthusiasts who want to share their passion, learn new skills, and enjoy some delicious food. Every week, we meet at a local McDonald’s restaurant and work on different coding projects, challenges, and tutorials. Whether you are a beginner or an expert, you are welcome to join us and have fun with coding. McCode is a great opportunity to network with other coders, get feedback on your work, and discover new tools and resources. Plus, you get to enjoy some tasty burgers, fries, and drinks while you code. What’s not to love? If you are interested in joining McCode, please visit our website and sign up for our newsletter. We hope to see you soon at McCode, the coding event that satisfies your hunger for learning and eating.

			object(WP_Post)#2735 (24) {
  ["ID"]=>
  int(311)
  ["post_author"]=>
  string(1) "1"
  ["post_date"]=>
  string(19) "2023-12-01 16:16:42"
  ["post_date_gmt"]=>
  string(19) "2023-12-01 16:16:42"
  ["post_content"]=>
  string(2865) "

Thank you someone for providing us with the venue (we can't disclose his name). The workshop is very hands-on and everyone gets their first feeling to code the FPGA.

" ["post_title"]=> string(24) "FGPA Workshop 2023/12/01" ["post_excerpt"]=> string(0) "" ["post_status"]=> string(7) "publish" ["comment_status"]=> string(4) "open" ["ping_status"]=> string(4) "open" ["post_password"]=> string(0) "" ["post_name"]=> string(24) "fgpa-workshop-2023-12-01" ["to_ping"]=> string(0) "" ["pinged"]=> string(0) "" ["post_modified"]=> string(19) "2023-12-13 05:54:59" ["post_modified_gmt"]=> string(19) "2023-12-13 05:54:59" ["post_content_filtered"]=> string(0) "" ["post_parent"]=> int(0) ["guid"]=> string(29) "https://www.hkprog.org/?p=311" ["menu_order"]=> int(0) ["post_type"]=> string(4) "post" ["post_mime_type"]=> string(0) "" ["comment_count"]=> string(1) "0" ["filter"]=> string(3) "raw" }
FGPA Workshop 2023/12/01
Thank you someone for providing us with the venue (we can’t disclose his name). The workshop is very hands-on and everyone gets their first feeling to code the FPGA.

Thank you someone for providing us with the venue (we can't disclose his name). The workshop is very hands-on and everyone gets their first feeling to code the FPGA.