-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
552 additions
and
79 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>PJ's Site – Categories</title><link>https://pj-99.github.io/categories/</link><description>Recent content in Categories on PJ's Site</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="https://pj-99.github.io/categories/index.xml" rel="self" type="application/rss+xml"/></channel></rss> | ||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>PJ's Blog – Categories</title><link>https://pj-99.github.io/categories/</link><description>Recent content in Categories on PJ's Blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="https://pj-99.github.io/categories/index.xml" rel="self" type="application/rss+xml"/></channel></rss> |
1 change: 1 addition & 0 deletions
1
css/compiled/main.min.53c9617cf9cb82685ec5af463dec3ecab7f3b4c3ad5c9cf22185fc7cf9b39519.css
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
css/compiled/main.min.b46fd7db01ff8daa59442bd219a92f9cd9d9d2485f520efd386a847d43f29727.css
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"/about/":{"data":{"":"This is the about page."},"title":"About"},"/posts/":{"data":{"":"隨手紀錄。"},"title":"Posts"}} | ||
{"/about/":{"data":{"":"","#":"About me I like milk tea.\nSome experience developing Android apps and Unity games Currently learning Go Education Master’s in Computer Science, National Chengchi University (2023 - Present)\nMember of NCCU Software Engineering Lab Bachelor’s in Interdisciplinary Program of Technology and Art, National Tsing Hua University (2019 - 2023)\nMember of NTHU Ubicomp Lab Experience Shopback software engineer intern, mobile platform team (2022.6 - 2023.6) Featured Projects 習慣城自然:當代人類行為百科 The Story of a Nostalgic Town - AR App This work presents through an installation, based on a landscape model of a town, accompanied by a dedicated app. Audiences can use augmented reality (AR) to view fragments of stories within the model, piecing together the narratives of the town and the residents.\nAn interactive installation art work with an AR App for the graduation exhibition. Tech stack used: Unity, C#, Vuforia, Figma, Firebase, Raspberry Pi, Python 放視大賞 2023 決選入圍 Watch video✨ Online exhibition TechLifeProbe - Android App A system to probe how data sharing with adolescents’ parents improves their technology abuse through mobile phones\nDeveloped an Android app for human-computer interaction research aimed at improving technology abuse. This research was published in ACM CHI 2022.\nTech stack used: Android, Kotlin, MySQL, PHP, Figma, Python\nRelated publication\nUsing Mobile and Wearable Technologies to Improve Adolescents’ Smartphone Addiction through the Sharing of Personal Data with Parents. Pin-Chieh Chen, Min-Wei Hung, Hsueh-Sung Lu, Chien Wen (Tina) Yuan, Nanyi Bi, Wan-Chen Lee, Ming-Chyi Huang, Chuang-Wen You - ACM CHI, 2022 Project Gallery 習慣城自然:當代人類行為百科 | ARAn interactive installation art work with an AR App for the tech art grduation exhibition. TechLifeProbe Android AppAn Android App for sharing data between tech abuse adolescents and their parents. "},"title":"Hi, I'm PJ."},"/blog/":{"data":{"":"一些筆記📓"},"title":"Blog"},"/blog/go/go_channels/":{"data":{"":"","channel#Channel":"Channel 是個 typed 的管道,go 程式可以透過 channel operator \u003c- 去接受或發送某個值。透過 channel 可以同步不同的 Goroutine。\n箭頭的方向就代表了資料的傳輸方向:\nch := make(chan int) // create a channel for int v := 100 go func() { fmt.Println(\"Sending v to channel\") ch \u003c- v // Send value to the channel }() recv := \u003c- ch // Get value from the channel fmt.Printf(\"recv: %v\", recv) 預設情況下,接受與發送都會 block 住,直到另一端也發送或接受,像是以下的程式會停在 ch \u003c- v,因為程式還在等人發送值到 channel 中,會出現 deadlock 錯誤 fatal error: all goroutines are asleep - deadlock!:\nch := make(chan int) // create a channel for int v := 100 fmt.Println(\"Sending v to channel\") ch \u003c- v // The code will stop here and wait for the value... recv := \u003c- ch fmt.Printf(\"recv: %v\", recv) channel 的 block 行為是可以被控制的,channel 可以宣告成 buffered channel,一個 buffered channel 裡的值可以保存起來,接受端只要拿的到值就可以繼續,發送端只要發送值進去後 channel 沒有超過容量也可以繼續。\nbuffered channel 的容量透過 make() 的第二個參數指定:\nch := make(chan int, 1) 將上面會造成 deadlock 的 channel 改成 buffered channel (size = 1) ,就可以正常執行了:\nch := make(chan int, 1) // create a buffered channel for int v := 100 fmt.Println(\"Sending v to channel\") ch \u003c- v recv := \u003c- ch fmt.Printf(\"recv: %v\", recv) Close the channel Sender 可以透過 close(channel) 通知 receiver 之後不會傳東西到這個 channel 中了。 Receiver 可以透過 v, ok := \u003c- ch 的 ok 是 false 得知 channel 已被關閉,也可以透過 for i := range c 接受值,直到 channel 被關閉。 ","refs#Refs":" A Tour of Go Go 语言 select 的实现原理 | Go 语言设计与实现 (draveness.me) ","select#Select":" select 可以從多個 case 中執行符合的操作。 如果同時有多個條件都符合,隨機選一個。 select (在沒有定義 default 時),會 block 並等待某個 case 並執行對應的操作: select 加上 default 後就不會 block,因為當其他 channel 都還沒好時,會進到 default 中,見官方範例參考: tick := time.Tick(100 * time.Millisecond) boom := time.After(500 * time.Millisecond) for { select { case \u003c-tick: fmt.Println(\"tick.\") case \u003c-boom: fmt.Println(\"BOOM!\") return default: fmt.Println(\" .\") time.Sleep(50 * time.Millisecond) } } "},"title":"Go - Channels"}} |
8 changes: 8 additions & 0 deletions
8
en.search.min.3db95834d7cbb513c5e7bd8ff469faec73b56798f9d73f74f2e09a725dbbeac2.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
en.search.min.9afdc7c586c6f971dd94df10b989f10faaf38e5702571fd8cfc9ff9135c2d495.js
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.