Skip to content

Commit

Permalink
Update fetched posts.
Browse files Browse the repository at this point in the history
  • Loading branch information
zhgchgli0718 committed Aug 10, 2023
1 parent 32f42dc commit 5ffb59b
Show file tree
Hide file tree
Showing 79 changed files with 858 additions and 1,063 deletions.
18 changes: 8 additions & 10 deletions _posts/zmediumtomarkdown/2018-10-06-b7a3fb3d5531.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
---
title: Medium的第一篇
author: ZhgChgLi
title: "Medium的第一篇"
author: "ZhgChgLi"
date: 2018-10-06T04:53:36.745+0000
last_modified_at: 2022-06-21T08:44:35.707+0000
categories: ZRealm Life.
tags: [blog,blogger,developer,生活,medium]
description: 前言:已經超過4年沒有在經營Blog,之前的廣告收益尾款US$88就這樣一直卡著,最近發現可以主動要求取消Adsense帳戶,只要達到最低給付額度Google就會把最後一筆收益給你;這也算是給了我一個動力再回來寫Blog.
last_modified_at: 2023-08-05T17:29:21.770+0000
categories: "ZRealm Life."
tags: ["blog","blogger","developer","生活","medium"]
description: "前言:已經超過4年沒有在經營Blog,之前的廣告收益尾款US$88就這樣一直卡著,最近發現可以主動要求取消Adsense帳戶,只要達到最低給付額度Google就會把最後一筆收益給你;這也算是給了我一個動力再回來寫Blog."
image:
path: /assets/b7a3fb3d5531/1*haJDXXSgWX--oHXqpRVhaQ.jpeg
render_with_liquid: false
---

### 萬事起頭難


已經超過4年沒有在經營Blog,之前的廣告收益尾款US$88就這樣一直卡著,最近發現可以主動要求取消Adsense帳戶,只要達到最低給付額度Google就會把最後一筆收益給你;這也算是給了我一個動力再回來寫Blog.

初來乍到,就用“萬事起頭難” 這個簡單的標題當作開端
Expand Down Expand Up @@ -44,7 +45,7 @@ render_with_liquid: false

後期自己申請網域跟買空間架了一個WordPress Blog,但什麼都要自己來、設定、調整功能…我無法專注在寫內容這件事上ㄧ樣是斷斷續續在寫,空間到期後就不續約網站直接下線直到現在。

總結,一路走來從對Blog這個東西感到很新鮮\->\->研究玩轉Blog的功能\->\->開始專注Blog本質\-文章內容\->\->分享技術型文章
總結,一路走來從對Blog這個東西感到很新鮮\->\->研究玩轉Blog的功能\->\->開始專注Blog本質\-文章內容\->\->分享技術型文章

懶了、少了紀錄過程及回頭檢視和分享出來、嘗過廣告收益的甜頭,漸漸地離初衷越來越遠,單純熱心想要與大家分享的那顆心

Expand All @@ -60,9 +61,6 @@ render_with_liquid: false



[![Like Z Realm's work](https://button.like.co/images/og/likebutton.png "Like Z Realm's work")](https://button.like.co/in/like/zhgchgli){:target="_blank"}



> _本文同步發表於個人 Blog: [**\[點我前往\]**](../b7a3fb3d5531/)_
Expand Down
18 changes: 8 additions & 10 deletions _posts/zmediumtomarkdown/2018-10-13-e37d66ea1146.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
title: iOS UITextView 文繞圖編輯器 (Swift)
author: ZhgChgLi
title: "iOS UITextView 文繞圖編輯器 (Swift)"
author: "ZhgChgLi"
date: 2018-10-13T18:07:49.431+0000
last_modified_at: 2023-03-11T17:17:16.946+0000
categories: ZRealm Dev.
tags: [swift,ios,mobile-app-development,uitextview,ios-app-development]
description:
last_modified_at: 2023-08-05T17:28:19.061+0000
categories: "ZRealm Dev."
tags: ["swift","ios","mobile-app-development","uitextview","ios-app-development"]
description: ""
image:
path: /assets/e37d66ea1146/1*Sh0XaryqYnqVGV0wJ_dDHA.gif
render_with_liquid: false
Expand All @@ -14,6 +14,7 @@ render_with_liquid: false
### iOS UITextView 文繞圖編輯器 \(Swift\)

實戰路線

#### 目標功能:

APP上有一個讓使用者能發表文章的討論區功能,發表文章功能介面需要能輸入文字、插入多張圖片、支援文繞圖穿插.
Expand Down Expand Up @@ -188,7 +189,7 @@ p\.s 試過各種壓縮/其他儲存方式,結果依然
#### 第二章

發現記憶體這個「硬傷」後,繼續在網路上搜索解決方案,得到以下其他做法:
- 用WebView嵌套HTML檔案\( <div contentEditable=”true”></div>\)並用JS跟WebView做交互處理
- 用WebView嵌套HTML檔案\( &lt;div contentEditable=”true”&gt;&lt;/div&gt;\)並用JS跟WebView做交互處理
- 用UITableView结合UITextView,能Reuse
- 基於TextKit自行擴充UITextView🏆

Expand Down Expand Up @@ -313,9 +314,6 @@ if let regex = try? NSRegularExpression(pattern: pattern, options: .caseInsensit



[![Like Z Realm's work](https://button.like.co/images/og/likebutton.png "Like Z Realm's work")](https://button.like.co/in/like/zhgchgli){:target="_blank"}


有任何問題及指教歡迎 [與我聯絡](https://www.zhgchg.li/contact){:target="_blank"} 。


Expand Down
32 changes: 15 additions & 17 deletions _posts/zmediumtomarkdown/2018-10-15-cb6eba52a342.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
title: iOS ≥ 10 Notification Service Extension 應用 (Swift)
author: ZhgChgLi
title: "iOS ≥ 10 Notification Service Extension 應用 (Swift)"
author: "ZhgChgLi"
date: 2018-10-15T15:44:01.193+0000
last_modified_at: 2021-02-24T01:26:53.094+0000
categories: ZRealm Dev.
tags: [swift,push-notification,notificationservice,ios,ios-app-development]
description: 圖片推播、推播顯示統計、推播顯示前處理
last_modified_at: 2023-08-05T17:27:16.674+0000
categories: "ZRealm Dev."
tags: ["swift","push-notification","notificationservice","ios","ios-app-development"]
description: "圖片推播、推播顯示統計、推播顯示前處理"
image:
path: /assets/cb6eba52a342/1*8juoKO7BZiT3PQjqufWcrA.jpeg
render_with_liquid: false
Expand All @@ -15,6 +15,7 @@ render_with_liquid: false

圖片推播、推播顯示統計、推播顯示前處理


關於基礎的推播建置、推播原理;網路資料很多,這邊就不再論述,本篇主要重點在如何讓APP支援圖片推播及運用新特性達成更精準的推播顯示統計.


Expand All @@ -37,7 +38,7 @@ iOS ≥ 10\.0
- \(目標2\) 統計推播有無顯示🏆
- 推播內容修改、重組內容
- 推播內容加解密\(解密\)顯示
- _決定推播要不要顯示?_ =>> **答案:不行**
- _決定推播要不要顯示?_ =&gt;&gt; **答案:不行**

#### 首先,後端推播程式的 Payload 部分

Expand All @@ -58,19 +59,19 @@ iOS ≥ 10\.0
#### And… 第一步,為專案新建一個Target


![**Step 1\.** Xcode \-> File \-> New \-> Target](/assets/cb6eba52a342/1*ZjPVTxLR6ywAdk70Y7_J7A.png)
![**Step 1\.** Xcode \-&gt; File \-&gt; New \-&gt; Target](/assets/cb6eba52a342/1*ZjPVTxLR6ywAdk70Y7_J7A.png)

**Step 1\.** Xcode \-> File \-> New \-> Target
**Step 1\.** Xcode \-&gt; File \-&gt; New \-&gt; Target


![**Step 2\.** iOS \-> Notification Service Extension \-> Next](/assets/cb6eba52a342/1*2KRusR8MJUim7UH1CmS7pw.png)
![**Step 2\.** iOS \-&gt; Notification Service Extension \-&gt; Next](/assets/cb6eba52a342/1*2KRusR8MJUim7UH1CmS7pw.png)

**Step 2\.** iOS \-> Notification Service Extension \-> Next
**Step 2\.** iOS \-&gt; Notification Service Extension \-&gt; Next


![**Step 3\.** 輸入Product Name \-> Finish](/assets/cb6eba52a342/1*sAuzxJPpohTGp-KV13yupg.png)
![**Step 3\.** 輸入Product Name \-&gt; Finish](/assets/cb6eba52a342/1*sAuzxJPpohTGp-KV13yupg.png)

**Step 3\.** 輸入Product Name \-> Finish
**Step 3\.** 輸入Product Name \-&gt; Finish


![**Step 4\.** 點選 Activate](/assets/cb6eba52a342/1*3DF_fMQLSrGxTbmLY6CJAg.png)
Expand Down Expand Up @@ -215,7 +216,7 @@ override func didReceive(_ request: UNNotificationRequest, withContentHandler co
可以看到當接受到有推播通知時,我們先Call Api告訴後端有收到並將顯示推播了,方便我們後台做推播統計;然後若有附加圖片再對圖片進行處理.
#### In\-App狀態時:

ㄧ樣會觸發Notification Service Extension didReceive 再觸發AppDelegate的 **func** application\( **\_** application: UIApplication, didReceiveRemoteNotification userInfo: \[AnyHashable : **Any** \], fetchCompletionHandler completionHandler: **@escaping** \(UIBackgroundFetchResult\) \-> Void\) 方法
ㄧ樣會觸發Notification Service Extension didReceive 再觸發AppDelegate的 **func** application\( **\_** application: UIApplication, didReceiveRemoteNotification userInfo: \[AnyHashable : **Any** \], fetchCompletionHandler completionHandler: **@escaping** \(UIBackgroundFetchResult\) \-&gt; Void\) 方法
#### 附註:關於圖片推播的部分你還可以…\.

使用 Notification Content Extension 自訂推播按壓時要顯示的UIView\(可以自己刻\),還有按壓的動作
Expand All @@ -232,9 +233,6 @@ Notification Content Extension的部分,我只拉了一個能展示圖片推
[結婚吧APP](https://itunes.apple.com/tw/app/%E7%B5%90%E5%A9%9A%E5%90%A7-%E4%B8%8D%E6%89%BE%E6%9C%80%E8%B2%B4-%E5%8F%AA%E6%89%BE%E6%9C%80%E5%B0%8D/id1356057329?ls=1&mt=8){:target="_blank"}


[![Like Z Realm's work](https://button.like.co/images/og/likebutton.png "Like Z Realm's work")](https://button.like.co/in/like/zhgchgli){:target="_blank"}


有任何問題及指教歡迎 [與我聯絡](https://www.zhgchg.li/contact){:target="_blank"} 。


Expand Down
16 changes: 7 additions & 9 deletions _posts/zmediumtomarkdown/2018-10-16-9a9aa892f9a9.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
title: Vision 初探 — APP 頭像上傳 自動識別人臉裁圖 (Swift)
author: ZhgChgLi
title: "Vision 初探 — APP 頭像上傳 自動識別人臉裁圖 (Swift)"
author: "ZhgChgLi"
date: 2018-10-16T16:01:24.511+0000
last_modified_at: 2021-02-24T01:27:03.600+0000
categories: ZRealm Dev.
tags: [swift,machine-learning,facedetection,ios,ios-app-development]
description: Vision 實戰應用
last_modified_at: 2023-08-05T17:25:03.764+0000
categories: "ZRealm Dev."
tags: ["swift","machine-learning","facedetection","ios","ios-app-development"]
description: "Vision 實戰應用"
image:
path: /assets/9a9aa892f9a9/1*c-ioRH_Z2nMYRxSbuBD71A.png
render_with_liquid: false
Expand All @@ -14,6 +14,7 @@ render_with_liquid: false
### Vision 初探 — APP 頭像上傳 自動識別人臉裁圖 \(Swift\)

Vision 實戰應用

#### 一樣不多說,先上一張成品圖:


Expand Down Expand Up @@ -198,9 +199,6 @@ if let image = sourceImage,#available(iOS 11.0, *),let ciImage = CIImage(image:
程式碼已上傳至Github: [請點此](https://github.com/zhgchgli0718/VisionDemo){:target="_blank"}


[![Like Z Realm's work](https://button.like.co/images/og/likebutton.png "Like Z Realm's work")](https://button.like.co/in/like/zhgchgli){:target="_blank"}


有任何問題及指教歡迎 [與我聯絡](https://www.zhgchg.li/contact){:target="_blank"} 。


Expand Down
24 changes: 11 additions & 13 deletions _posts/zmediumtomarkdown/2018-10-17-793bf2cdda0f.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
title: 嚐鮮 iOS 12 CoreML — 使用機器學習自動預測文章分類,連模型也自己訓練!
author: ZhgChgLi
title: "嚐鮮 iOS 12 CoreML — 使用機器學習自動預測文章分類,連模型也自己訓練!"
author: "ZhgChgLi"
date: 2018-10-17T15:20:35.448+0000
last_modified_at: 2021-02-24T01:28:01.622+0000
categories: ZRealm Dev.
tags: [swift,ios,machine-learning,natural-language-process,ios-app-development]
description: 探索CoreML 2.0,如何轉換或訓練模型及將其應用在實際產品上
last_modified_at: 2023-08-05T17:23:37.166+0000
categories: "ZRealm Dev."
tags: ["swift","ios","machine-learning","natural-language-process","ios-app-development"]
description: "探索CoreML 2.0,如何轉換或訓練模型及將其應用在實際產品上"
image:
path: /assets/793bf2cdda0f/1*pOYPHRwPNLVtikVKzfIqsw.png
render_with_liquid: false
Expand All @@ -15,6 +15,7 @@ render_with_liquid: false

探索CoreML 2\.0,如何轉換或訓練模型及將其應用在實際產品上


接續 [上一篇](../9a9aa892f9a9/) 針對在 iOS上使用機器學習的研究,本篇正式切入使用CoreML

首先簡述一下歷史,蘋果在2017年發布了CoreML\(包含上篇文章介紹的Vision\) 機器學習框架;2018緊接著推出CoreML 2\.0,除 [效能提升](https://www.appcoda.com.tw/core-ml-2/){:target="_blank"} 外還支援 **自訂客製化CoreML模型**
Expand Down Expand Up @@ -81,7 +82,7 @@ render_with_liquid: false
斷詞請參考 [在 iOS App 中進行自然語言處理:初探 NSLinguisticTagger](https://www.appcoda.com.tw/nslinguistictagger/){:target="_blank"}
### 今日主要重點 — 文字內容識別分類+ **自己訓練模型**

講白話就是,我們給機器「文字內容」跟「分類」訓練電腦對未來的資料做分類.例如:「點擊查看最新優惠!」、「1000$購物金馬上領」=>「廣告」;「Alan發送一則訊息給您」、「您的帳戶即將到期」=>「重要事項」
講白話就是,我們給機器「文字內容」跟「分類」訓練電腦對未來的資料做分類.例如:「點擊查看最新優惠!」、「1000$購物金馬上領」=&gt;「廣告」;「Alan發送一則訊息給您」、「您的帳戶即將到期」=&gt;「重要事項」

實際應用:垃圾信件判別、標籤產生、分類預測

Expand Down Expand Up @@ -128,9 +129,9 @@ SELECT `title` AS `text`,`type` AS `label` FROM `posts` WHERE `status` = '1'
下載好訓練工具後,點擊 TextClassifer\.playground 打開 Playground


![點擊紅匡執行\->點擊綠匡切換View顯示](/assets/793bf2cdda0f/1*ct9AHpetBuEKHDGfRwvMlg.png)
![點擊紅匡執行\-&gt;點擊綠匡切換View顯示](/assets/793bf2cdda0f/1*ct9AHpetBuEKHDGfRwvMlg.png)

點擊紅匡執行\->點擊綠匡切換View顯示
點擊紅匡執行\-&gt;點擊綠匡切換View顯示


![將JSON檔案拉入GUI工具](/assets/793bf2cdda0f/1*kV_Dh2pP94gUakcmYcI6bQ.png)
Expand Down Expand Up @@ -163,7 +164,7 @@ CoreML 模型檔
到此你的模型就已經訓練好囉!是不是很容易

**具體訓練方式:**
1. 先將輸入的語句做斷詞\(我想知道婚禮需要準備什麼=>我想,知道,婚禮,需要,準備,什麼\),再看他的分類是什麼做一連串的機器學習計算。
1. 先將輸入的語句做斷詞\(我想知道婚禮需要準備什麼=&gt;我想,知道,婚禮,需要,準備,什麼\),再看他的分類是什麼做一連串的機器學習計算。
2. 將訓練資料分組,例如: 80% 是拿來訓練另外20%是拿來測試驗證


Expand Down Expand Up @@ -210,9 +211,6 @@ if #available(iOS 12.0, *),let prediction = try? textClassifier().prediction(tex
參考資料: [WWDC2018之Create ML\(\)](https://www.jianshu.com/p/205ee896663f){:target="_blank"}


[![Like Z Realm's work](https://button.like.co/images/og/likebutton.png "Like Z Realm's work")](https://button.like.co/in/like/zhgchgli){:target="_blank"}


有任何問題及指教歡迎 [與我聯絡](https://www.zhgchg.li/contact){:target="_blank"} 。


Expand Down
16 changes: 7 additions & 9 deletions _posts/zmediumtomarkdown/2018-10-18-1ca246e27273.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
title: 提升使用者體驗,現在就為您的 iOS APP 加上 3D TOUCH 功能(Swift)
author: ZhgChgLi
title: "提升使用者體驗,現在就為您的 iOS APP 加上 3D TOUCH 功能(Swift)"
author: "ZhgChgLi"
date: 2018-10-18T14:36:57.668+0000
last_modified_at: 2021-02-24T01:28:03.754+0000
categories: ZRealm Dev.
tags: [ios,swift,3d-touch,iphone,ios-app-development]
description: iOS 3D TOUCH 應用
last_modified_at: 2023-08-05T17:23:48.025+0000
categories: "ZRealm Dev."
tags: ["ios","swift","3d-touch","iphone","ios-app-development"]
description: "iOS 3D TOUCH 應用"
image:
path: /assets/1ca246e27273/1*AAFevro2x7s9J6yRshAGtg.png
render_with_liquid: false
Expand All @@ -14,6 +14,7 @@ render_with_liquid: false
### \[TL;DR\]提升使用者體驗,現在就為您的 iOS APP 加上 3D TOUCH 功能\(Swift\)

iOS 3D TOUCH 應用

### \[TL;DR\] 2020/06/14


Expand Down Expand Up @@ -220,9 +221,6 @@ func application(_ application: UIApplication, performActionFor shortcutItem: UI
如果你測的夠細會發現以上效果,在CollectionView滑動中圖有部分已經滑出畫面這時按壓就會出現以上情況😅


[![Like Z Realm's work](https://button.like.co/images/og/likebutton.png "Like Z Realm's work")](https://button.like.co/in/like/zhgchgli){:target="_blank"}


有任何問題及指教歡迎 [與我聯絡](https://www.zhgchg.li/contact){:target="_blank"} 。


Expand Down
16 changes: 7 additions & 9 deletions _posts/zmediumtomarkdown/2018-10-25-a4bc3bce7513.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
title: iOS UUID 的那些事 (Swift/iOS ≥ 6)
author: ZhgChgLi
title: "iOS UUID 的那些事 (Swift/iOS ≥ 6)"
author: "ZhgChgLi"
date: 2018-10-25T14:26:20.002+0000
last_modified_at: 2021-02-24T01:28:55.697+0000
categories: ZRealm Dev.
tags: [iplayground,swift,ios-app-development,uuid,idfv]
description: iPlayground 2018 回來 & UUID那些事
last_modified_at: 2023-08-05T17:21:30.074+0000
categories: "ZRealm Dev."
tags: ["iplayground","swift","ios-app-development","uuid","idfv"]
description: "iPlayground 2018 回來 & UUID那些事"
image:
path: /assets/a4bc3bce7513/1*gEmmuDOD92d2b2fLp4AKsw.jpeg
render_with_liquid: false
Expand All @@ -14,6 +14,7 @@ render_with_liquid: false
### iOS UUID 的那些事 \(Swift/iOS ≥ 6\)

iPlayground 2018 回來 & UUID那些事

### 前言:

上週六、日跑去參加 [iPlayground](https://iplayground.io/){:target="_blank"} Apple 軟體開發者研討會,這個活動訊息是同事PASS過來的,去之前我也不清楚這個活動。
Expand Down Expand Up @@ -141,9 +142,6 @@ let DEVICE_UUID:String = {
```


[![Like Z Realm's work](https://button.like.co/images/og/likebutton.png "Like Z Realm's work")](https://button.like.co/in/like/zhgchgli){:target="_blank"}


有任何問題及指教歡迎 [與我聯絡](https://www.zhgchg.li/contact){:target="_blank"} 。


Expand Down
16 changes: 7 additions & 9 deletions _posts/zmediumtomarkdown/2018-11-01-ade9e745a4bf.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
title: 什麼?iOS 12 不需使用者授權就能收到推播通知(Swift)
author: ZhgChgLi
title: "什麼?iOS 12 不需使用者授權就能收到推播通知(Swift)"
author: "ZhgChgLi"
date: 2018-11-01T15:35:02.255+0000
last_modified_at: 2022-06-11T06:22:42.813+0000
categories: ZRealm Dev.
tags: [ios,swift,push-notification,ios-app-development,ios12]
description: UserNotifications Provisional Authorization 臨時權限、iOS 12 靜音通知介紹
last_modified_at: 2023-08-05T17:21:41.147+0000
categories: "ZRealm Dev."
tags: ["ios","swift","push-notification","ios-app-development","ios12"]
description: "UserNotifications Provisional Authorization 臨時權限、iOS 12 靜音通知介紹"
image:
path: /assets/ade9e745a4bf/1*NX0r7q5ikfoJnxWq_eGRWQ.jpeg
render_with_liquid: false
Expand All @@ -14,6 +14,7 @@ render_with_liquid: false
### 什麼?iOS 12 不需使用者授權就能傳送推播通知\(Swift\)\(2019–02–06 更新\)

UserNotifications Provisional Authorization 臨時權限、iOS 12 靜音通知介紹

### MurMur……

前陣子在改善APP推播通知允許及點擊率過低問題,做了些優化調整;最初版的時候體驗非常差,APP 安裝完一啟動就直接跳「APP想要傳送通知」的詢問視窗;想當然而關閉率非常高,根據前一篇使用 [Notification Service Extension](../cb6eba52a342/) 統計通知實際顯示數,推測按允許推播的使用者只有大約10%.
Expand Down Expand Up @@ -175,9 +176,6 @@ iOS 12的這項通知貼心優化,讓使用者跟開發者之間對通知功



[![Like Z Realm's work](https://button.like.co/images/og/likebutton.png "Like Z Realm's work")](https://button.like.co/in/like/zhgchgli){:target="_blank"}


有任何問題及指教歡迎 [與我聯絡](https://www.zhgchg.li/contact){:target="_blank"} 。


Expand Down
Loading

0 comments on commit 5ffb59b

Please sign in to comment.