Go - lazy initialized by sync.Once
Ex. sync.Once.Do Can code "loadHeavyOnce everytime before read the variable", it will be executed once actually.
Ex. sync.Once.Do Can code "loadHeavyOnce everytime before read the variable", it will be executed once actually.
Add number to 10000. RWLock (Use Lock/Unlock to read): 19ms, 92202 read count RWLock (Use RLock/RUnlock to read): 597ms, 4789798 read count W...
Ex. Binary semaphore Race Condition Semaphore Ex. sync.Mutex Mutex.Unlock happens before Mutex.Lock Every Lock needs Unlock, can use defe...
Prevent race condition Initialize variables when package initialization phase, it will happen before main function. And don't modify those variables a...
Close a channel to broadcast cancellation No way to know a channel is closed or not, so need another channel to indicate a channel is closed This exa...
Declare select { case <- ch: ... case x := <- ch2: &...
Inner goroutine can send event to outer goroutine by channel Ex. Pass value to inner routine function Declare a variable in inner goroutine function, ...
Declare a queue: ch := make(chan int, 3) Block send when full, block receive when empty Get capacity: cap(ch) Get currently buffered: len(ch) ...
Send only: chan<- int Receive only: <-chan int Violation will compile error Only channel used to send msg need to be closed, so to cl...
Ex. Make 3 channels and chan together, print in fmt.Println(<-channel) There is no way to check is a channel closed Close pipeline safely. Check rece...
Unbuffered channel causes sender and receiver synchronized, called synchronized channel "When a value is sent on an unbuffered channel, the receipt of ...
Declare ch := make(chan int) // unbuffered, send will be blocked until receive was called ch := make(chan int, 0) // unbuffered, send will be b...
Run f() in another goroutine: go f() To produce a race condition issue, can make for loop larger
switch x.(type) { case: 。。 default:..} No fallthrough is allowed Reuse assert type result. switch x := x.(type) {...} Can combine more than one t...
X.(T) X is interface, T is concrete type. When T is a concrete type, it assert dynamic type of X is identical to T. Result is the dynamic value wi...
Real type of an interface variable is decided dynamatically Need be careful when comparing interface, panic will occur when real type is not comparable ...
When a type value assign to a variable, it can call method declared with type value and pointer When a type pointer assign to a variable, it can call...
A function declared with type (not a pointer), can call method by type value. Can use (&t) to call method by address as well When a function d...
Declare embedding interface No problem if two interfaces have same method
Don't need implement interface, only method is enough Compile error if signature is wrong, Although don't need declare "implements", but sti...
Access control: upper case ecported to diiferent package It means the unit of encapsulation is package Difference Ex. type A int, can’t be encapsul...
Can assign method to a variable Ex. M = s.methodname; M() Can define func signature and assign implementation later Status will follow methods ...
Declare Method Method and Function can be the same name Method and Field can not have the same name Can declare another method name in the sa...
During panic, normal execution stop, defered function in goroutine executed and the program crash with log message Ex. Declare a panic. A pan...
Declare variadic function Variadic function parameter type is .... Different from slice. Action can be defered with a defer statement. Defered fun...
Must declare a func before let func call itself recursively. Otherwise compile error Loop will reuse variable address, so a new variable must be dec...
Can declare function without name. Called anonymous function. How client know it needs return value? => Because function signature has conc...
Modifications to the parameter copy don't affect the caller except pointer, slice, map, function, channel A function declaration without a body indica...
Declare func name(parameter-list) return-list {...} Parameter list type can be declared only once if types are the same func test(a string, b string,...
ex. var p = Person{}; json.Marshal(p) json.marshal return byte slice contains long string wuthout extraneous Ex.data, err = json.MarshalIndent...
Name and visibility is implicitly determined by its type Outer struct type gains not just the fields of the embedded type but its methods too
Comparable struct can be a key of a map. (What will happen when struct value changed?) Can declare a named struct type in another struct as field ...
Shorthand notation to create and initialize a struct variable Ex. pp := &Point{1,2} It’s same as pp := new(Point) *pp = Point{1,2} If all f...
A struct can be declared to require client need assign values to each fields with right order. Such pattern will be hard to maintain in the future...
A named type S CAN NOT declare a field with the same type S, but it can contains a field with type *S, for recursive data structure Zero struct field...
Declared: map[KeyType]ValueType Ex. m := make(map[string]int) m["a"]=1 m{"b"]=2 Ex. m := map[string]int { "a":1, "b":2,...
Slices contains many example images, causes I can’t save in Blogger in one article. So I split to 3 parts. Go - Slices (1/3) Go - Slices (2/3) Go - Slices (...
Ex. Slice is in the middle of an array, what will happen in that array after append? => Array value will reflect slice change, but array instance will ...
Slice is NOT comparable Standard library provide a way to compare 2 byte slices Reference type such as pointers and channels, the == test whether...
Slice is declared as "var s []T" Declare a slice by make([]int,length,capacity) Slice looks like an array without size Pointer: point to the first eleme...
Declare an array Ex. var a [3]int a[0] len(a) for idx, v range a {} for _, v range a ,{} Declare with specified values. Default value is ...
Just some ways to declare const
Boolean bool boolean Strings Conventionally UTF-8 Built-in function len returns the number of bytes, not runes in a string Detect length of s...
float float32, max value: math.MaxFloat32 float64, max value: math.MaxFloat64 float can be printed by fmt package %e: exponent %f: no ex...
int8 int16 int32 int64 uint8 uint16 uint32 uint64 int uint : natural and most efficient size on a particular platform. Different compiler may choose di...
Syntactic block: Enclosed in braces Lexical block: Not explicitly surrounded by braces Universe block: A lexical block for the entire source code. In...
Package Import Import path: packages are identified by an unique string, called import path Go lang spec doesn't define what "import path" mean, it's u...
Package Variables Exported identifiers start with an upper-case letter files in the same package can be in the same folder Package level variables ca...
Named type Format: type typeName underlying-type A constructor with underlying-type value will exist without declaring package main import ( &n...
Tuple Assignment Type Assertion Need use interface{} to declare a variable Check concrete type by v,ok := x.(T) If type "T" can't be assigned ...
A pointer value is the address of a variable Declare a variable, declare a value, assign address to that variable Variable address declared in functi...
Declaration Declare package Declare import var/const/func/type can be declared in any order Variables Declare variables with the same type a...
Introduction When trying the first helloworld, I encountered some problem to setup environment. So note here. You can find manual for complete informati...
ChatGPT generated Java Class Loader 是 Java Runtime Environment 的一部分,它動態地將 Java 類別加載到 Java Virtual Machine 中。通常,只有在需要時才會加載類別。Java 運行時系統不需要知道文件和文件系統,因為...
ChatGPT generated Java Class Loader 是 Java Runtime Environment 的一部分,它動態地將 Java 類別加載到 Java Virtual Machine 中。通常,只有在需要時才會加載類別。Java 運行時系統不需要知道文件和文件系統,因為...
1. Producer send messages ``` private static void sendMessages(Properties kafkaProps, String topic) { for (int i = 0; i < MSG_COUNT; i...
1. Producer 發送訊息 ``` private static void sendMessages(Properties kafkaProps, String topic) { for (int i = 0; i < MSG_COUNT; i++) { &nb...
1. Producer send messages ``` private static void sendMessages(Properties kafkaProps, String topic) { for (int i = 0; i < MSG_COUNT; i++) { ...
1. Producer 發送訊息 ``` private static void sendMessages(Properties kafkaProps, String topic) { for (int i = 0; i < MSG_COUNT; i++) { &n...
Full Example: https://github.com/shooeugenesea/study-practice/blob/kafka/src/main/java/examples/Main.java Create topic by Java private static void cr...
完整範例: https://github.com/shooeugenesea/study-practice/blob/kafka/src/main/java/examples/Main.java 用 Java 建立 topic private static void createTopicIfNot...
https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ref/package-summary.html https://dzone.com/articles/weak-soft-and-phantom-references-i...
https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ref/package-summary.html https://dzone.com/articles/weak-soft-and-phantom-references-i...
Introduction One day, Cassandra stop listening for thrift client until restart it manually. After checking Cassandra log, found it encountered OutOfMemory...
前言 某天,Cassandra 停止監聽 thrift client 的連線,直到手動重啟才恢復。 檢查 Cassandra log 之後,發現遇到了 OutOfMemoryError ERROR [Thrift-Selector_27] 2020-03-31 06:00:44,020 TDisrupt...
Purpose: Original value is origVal, we want to use increase/decrease to update to a specified number How? origValue = origValue + expectedValue diff...
目的:原始值是 origVal,我們想要透過增加/減少來更新到指定的數字 怎麼做? origValue = origValue + expectedValue diff = expectedValue - origValue origValue = origValue + diff ...
Reference Pro Spring Integration - https://www.amazon.com/Pro-Spring-Integration-Experts-Voice-ebook-dp-B005PZ29OA/dp/B005PZ29OA/ref=mt_kindle?_encodi...
Reference Pro Spring Integration - https://www.amazon.com/Pro-Spring-Integration-Experts-Voice-ebook-dp-B005PZ29OA/dp/B005PZ29OA/ref=mt_kindle?_encodi...
Reference Pro Spring Integration - https://www.amazon.com/Pro-Spring-Integration-Experts-Voice-ebook-dp-B005PZ29OA/dp/B005PZ29OA/ref=mt_kindle?_encodi...
Reference Pro Spring Integration - https://www.amazon.com/Pro-Spring-Integration-Experts-Voice-ebook-dp-B005PZ29OA/dp/B005PZ29OA/ref=mt_kindle?_enc...
Reference Pro Spring Integration - https://www.amazon.com/Pro-Spring-Integration-Experts-Voice-ebook-dp-B005PZ29OA/dp/B005PZ29OA/ref=mt_kindle?_enco...
Reference https://netty.io/wiki/user-guide-for-4.x.html https://github.com/shooeugenesea/study-practice/tree/spring-boot-grpc/src/main/java/examples/ne...
Reference https://www.rabbitmq.com/install-windows.html https://www.rabbitmq.com/tutorials/tutorial-one-java.html https://github.com/shooeugenesea/...
Reference Protobuf - Java Code in Github Example Install protobuf Download from Git: https://github.com/protocolbuffers/protobuf Install protobuf ...
Reference Spring Integration Basic Terms 後篇: https://www.isaacnote.com/2018/10/spring-integration-channels.html Terms org.springframework.inte...
Reference https://github.com/snazy/ohc https://docs.oracle.com/javase/8/docs/api/java/nio/MappedByteBuffer.html https://github.com/shooeugenesea/study-pra...
Reference ForkJoinPoolManyThreadMain.java ForkJoinPool Paper ForkJoinPool - Error Handling Question 原本以為 new ForkJoinPool(2) 像這樣的宣告, 是讓 ForkJoinPool 最多維...
Reference Git: ForkJoinPoolErrorMain.java 前篇: ForkJoinPool - Workstealing Next: ForkJoinPool - Thread Management Error Handling 如果 fork 出去...
Reference https://en.wikipedia.org/wiki/Work_stealing 前篇: Java Concurrency - ForkJoinPool 的 deadlock 下篇: ForkJoinPool - Error Handling Introduction Fork...
Reference 前篇 Java Concurrent - ForkJoinPool 下篇 ForkJoinPool - Work stealing Will ForkJoinTask encounter deadlock problem? 在看 ForkJoinTask 的時候, ...
ExecutorService and Problem 用一個 ExecutorService submit task 後, 如果 task 會 submit 其他的 task, 這些 task 都會放進 ExecutorService 的 queue 中. 這樣就沒辦法做到 "第一個 task 與其產生的...
Introduction CyclicBarrier 很久沒用都忘了, 來複習一下.. Description 簡單說就是很多個 thread 去作事情, 作完之後就 await. CyclicBarrier 等作完的 thread 達到指定的個數後, await 就結束. Code public ...
Introduction 今天才知道 Java 7 有提供一個 Phaser class 來處理更複雜的 CountDownLatch 需求. Simple Phaser 想用 Phaser, 首先你的 threads 工作要有分階段, 一個階段沒做完就不能進行下個階段. 有了這個限制後就可以照下面的流程...
In a project, I need zip file and append to separated folders.<div> public static void main(String[] params) throws IOException { List<String>...
Introduction After a performance issue happen, we have less information about system status at that time. There is flush log in Cassandra, so I write code ...
Reference lombok - Builder orika - Advanced Mapping Configurations Effective Java - Builder Pattern Introduction Builder Pattern is suggested in Ef...
Reference Dealing with InterruptedException How to handle InterruptedException Throw it directly If you can't throw it, call Thread.currentThread().in...
Introduction 記錄 Java 使用 SSL 的方法 (不要求 client auth) Reference https://github.com/shooeugenesea/study-practice/tree/ssl-practice http://www.programgo.com/a...
Reference Guava User Guide Practice in Github Optional Optional 可以用來處理 null value 與避免 NullPointerException public class OptionalTest {
Reference Java Performance at Amazon Notes HotSpot VM 三個主要元件: VM Runtime, JIT Compiler, memory manager JIT Compiler 與 Garbage Collector 是 pluggable. Hot...
Description Sometimes I need to follow Effective Java to write Builder Pattern. There are attributes, getters, Java Doc and a builder. I wrote a Java bas...
Reference Lesson: Basic I/O 讀寫小檔案 如果檔案比較小可以使用 Files 提供的 read/write. package test;
Description 打算把系統的執行環境從 JDK6 升級到 JDK7, 整理一下有哪些可用. 比較期待的部分是語法, NIO2, G1. 這頁是整理語法的部分. Reference Enhancements in Java SE 7 Java Language Enhancements Poin...
ngIftrue => Host div will be included in the HTML elementsfalse => Host div will be excluded in the HTML elements<div *ngIf="needShow(4)" class="bg...
ngIftrue => Host div 會被加入 HTML 元素中false => Host div 會被排除在 HTML 元素外<div *ngIf="needShow(4)" class="bg-info p-2 mt-1"> Check need to show if pass ...
<div>Commit</div><div>https://github.com/shooeugenesea/test-express/commit/b81676332041570e3d05c70dc3dcf7371001ef4c</div><d...
<div>Commit</div><div>https://github.com/shooeugenesea/test-express/commit/b81676332041570e3d05c70dc3dcf7371001ef4c</div><d...
<div><div>Commit</div><div>https://github.com/shooeugenesea/test-express/commit/eb0ac341b2ad17a6abff18d0b16ba3a1255beb9a</div>&...
<div><div>Commit</div><div>https://github.com/shooeugenesea/test-express/commit/eb0ac341b2ad17a6abff18d0b16ba3a1255beb9a</div>&...
<div><ul><li><div>Commit</div></li></ul><div>https://github.com/shooeugenesea/test-express/commit/17e1c7b1e70...
<div><ul><li><div>Commit</div></li></ul><div>https://github.com/shooeugenesea/test-express/commit/17e1c7b1e70...
By ‘checkbox’ type can choose items Commit https://github.com/shooeugenesea/test-node-js/commit/a9bc2d47208cb0feec04e9cebea71d7fcadcb6a4 Code import * as ...
透過 'checkbox' type 可以選取項目 Commit https://github.com/shooeugenesea/test-node-js/commit/a9bc2d47208cb0feec04e9cebea71d7fcadcb6a4 程式碼 import * as inquirer fr...
<div><div>Use "input" type in inquirer can support input information</div><div></div><div>Commit</div><div> ...
<div><div>使用 Inquirer 的 "input" type 可以讓使用者輸入資訊</div><div></div><div>Commit</div><div> https://github.com/sh...
Git Repositoryhttps://github.com/shooeugenesea/test-node-jsInstall librariesnpm install inquirernpm install typescriptList and Quit commandsimport * as inqui...
Git Repositoryhttps://github.com/shooeugenesea/test-node-js安裝套件npm install inquirernpm install typescriptList 和 Quit 指令import * as inquirer from "inquirer"//...
<div>Git Commit</div><div>https://github.com/shooeugenesea/study-js/commit/ed8a7b35f8b3c73a27f0491aaea23b627d70b8ae</div><div>&...
<div>Git Commit</div><div>https://github.com/shooeugenesea/study-js/commit/ed8a7b35f8b3c73a27f0491aaea23b627d70b8ae</div><div>&...
<div><div><div>Commit</div><div>https://github.com/shooeugenesea/study-js/commit/6221b2eb518c6bb784e8316d42d4d358693f6ea6</d...
<div><div><div>Commit</div><div>https://github.com/shooeugenesea/study-js/commit/6221b2eb518c6bb784e8316d42d4d358693f6ea6</d...
<div><div>Commit</div><div>https://github.com/shooeugenesea/study-js/commit/ad54df277bb17c12cf9f3bb37f965b13945ae68b</div></...
<div><div>Commit</div><div>https://github.com/shooeugenesea/study-js/commit/ad54df277bb17c12cf9f3bb37f965b13945ae68b</div></...
Current component get users collection from props. UserHeader component seems weird because the component is designed to show only one user, should not get ...
目前的 component 是從 props 取得整個 users 集合。 UserHeader component 看起來怪怪的,因為這個 component 的設計是只顯示一個使用者,不應該拿到所有使用者資料再從裡面找一筆出來。 為了只注入一筆 User 資料到 UserHeader,可以改 mapSt...
<div><div>Commit</div><div>https://github.com/shooeugenesea/study-js/commit/8d25749f6aedfc86d36b4413ecc8271809ceb8f9</div><d...
<div><div>Commit</div><div>https://github.com/shooeugenesea/study-js/commit/8d25749f6aedfc86d36b4413ecc8271809ceb8f9</div><d...
<div><div>Commit</div><div>https://github.com/shooeugenesea/study-js/commit/ad61b7d698c5e8a4256732ae91d26a8169747b6b</div><d...
<div><div>Commit</div><div>https://github.com/shooeugenesea/study-js/commit/ad61b7d698c5e8a4256732ae91d26a8169747b6b</div><d...
<div><div>Origin version</div><div><div>export const fetchPosts = () => {</div><div> // dispatch: can change ...
<div><div>原始版本</div><div><div>export const fetchPosts = () => {</div><div> // dispatch: can change any data w...
Commit https://github.com/shooeugenesea/study-js/commit/9abf9a073ca86dea1b1dcf1418a5880a7975c0ea Mistake I made I find PttPosts implementation component se...
Commit https://github.com/shooeugenesea/study-js/commit/9abf9a073ca86dea1b1dcf1418a5880a7975c0ea 我犯的錯誤 我發現 PttPosts 的實作好像不太對。 PttPosts.js import React, ...
<div>Commit</div><div>https://github.com/shooeugenesea/study-js/commit/80dd0b917eb4abf2ba5c292bfe37eaf50c350245</div><div>https...
<div>Commit</div><div>https://github.com/shooeugenesea/study-js/commit/80dd0b917eb4abf2ba5c292bfe37eaf50c350245</div><div>https...
<div>Install react and react-redux</div><div style="background-color: #fbfaf8; border-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.15); box-...
<div>安裝 react 和 react-redux</div><div style="background-color: #fbfaf8; border-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing:...
1. Given file in project folder ./mongo/docker-entrypoint-initdb.d:/initdb.sh ``` echo '=====================================>' mongo --eval 'db.get...
1. 在專案資料夾放一個檔案 ./mongo/docker-entrypoint-initdb.d:/initdb.sh ``` echo '=====================================>' mongo --eval 'db.getSiblingDB("testqq...
Start mongo and bind with interfacesudo docker run --name mongo1 -d -p 27017:27017 mongo --bind_ip_all --replSet rs1sudo docker run --name mongo2 -d -p 27018...
啟動 mongo 並綁定網路介面sudo docker run --name mongo1 -d -p 27017:27017 mongo --bind_ip_all --replSet rs1sudo docker run --name mongo2 -d -p 27018:27017 mongo --bind...
$group to group data by specified attribute // prepare data> db.company.insertOne({"name":"A","foundYear":1980,"numberOfEmployee":50}){ "ackn...
$group 依指定屬性分組資料 // prepare data> db.company.insertOne({"name":"A","foundYear":1980,"numberOfEmployee":50}){ "acknowledged" : true, "i...
Accomulator calculate values from field values found in multiple documents.
Accumulator 會從多個文件中的欄位值來計算數值。
$match: same as find
$match:跟 find 一樣
Unique index
Unique index
At first, schema in mongodb is as follows > db.users.find() { "_id" : ObjectId("5f6f162c432d41b06263640d"), "name" : "user12", "i" : 12, "age" : 27, "cre...
首先,MongoDB 中的 schema 如下 > db.users.find() { "_id" : ObjectId("5f6f162c432d41b06263640d"), "name" : "user12", "i" : 12, "age" : 27, "createdAt" : ISODate(...
explain is used to understand execution detail In this case,"totalDocsExamined" : 1380558: shows "query by username" is quite insufficient db.users.fin...
explain 用來了解執行細節 在這個例子中,"totalDocsExamined" : 1380558:顯示「用 username 查詢」效率非常差 db.users.find({"username": "user101"}).explain("executionStats")> db.us...
<div>specify returned attributes</div><div><div>// find all with all attributes</div><div>> db.users.find().pre...
<div>指定回傳的屬性</div><div><div>// find all with all attributes</div><div>> db.users.find().pretty()</div><...
Pull image
Reference https://www.amazon.com/Microservices-Patterns-examples-Chris-Richardson/dp/1617294543 The isolation property of ACID transactions ensure...
參考資料 https://www.amazon.com/Microservices-Patterns-examples-Chris-Richardson/dp/1617294543 ACID 交易的隔離性確保同時執行多個交易的結果,跟以某種串行順序執行它們的結果相同 隔離性讓撰寫同時執行...
Reference https://www.amazon.com/Microservices-Patterns-examples-Chris-Richardson/dp/1617294543 Sagas process Saga init by system command Coordina...
參考資料 https://www.amazon.com/Microservices-Patterns-examples-Chris-Richardson/dp/1617294543 Saga 流程 Saga 由系統命令啟動 協調邏輯選擇並告訴第一個 Saga 參與者執行本地交易 完成後,...
Reference https://www.amazon.com/Microservices-Patterns-examples-Chris-Richardson/dp/1617294543 Challenges In a monolithic system, a createOrder oper...
參考資料 https://www.amazon.com/Microservices-Patterns-examples-Chris-Richardson/dp/1617294543 挑戰 在單體系統中,createOrder 操作只需要依賴帶有 transactional annotation 的...
Reference https://www.amazon.com/Microservices-Patterns-examples-Chris-Richardson/dp/1617294543 synchronous communication with other services as part ...
參考資料 https://www.amazon.com/Microservices-Patterns-examples-Chris-Richardson/dp/1617294543 在處理請求時與其他服務做同步通訊會降低應用程式的可用性 因此,你應該盡可能設計服務使用非同步 messaging ...
Reference https://www.amazon.com/Microservices-Patterns-examples-Chris-Richardson/dp/1617294543 Using a message broker broker-based architecture b...
參考資料 https://www.amazon.com/Microservices-Patterns-examples-Chris-Richardson/dp/1617294543 使用 Message Broker 基於 broker 的架構 基於 brokerless 的 messagi...
Reference https://www.amazon.com/Microservices-Patterns-examples-Chris-Richardson/dp/1617294543 Pattern: Messaging A client invokes a service us...
參考資料 https://www.amazon.com/Microservices-Patterns-examples-Chris-Richardson/dp/1617294543 Pattern: Messaging Client 使用非同步 messaging 來呼叫服務。參見 ht...
Reference https://www.amazon.com/Microservices-Patterns-examples-Chris-Richardson/dp/1617294543 in order for one service to invoke another service usin...
參考資料 https://www.amazon.com/Microservices-Patterns-examples-Chris-Richardson/dp/1617294543 為了讓一個服務能用 RPI 呼叫另一個服務,它需要知道服務實例的網路位置。=> Service Discovery...
Reference https://www.amazon.com/Microservices-Patterns-examples-Chris-Richardson/dp/1617294543 Remote procedure invocation A client invokes a s...
參考資料 https://www.amazon.com/Microservices-Patterns-examples-Chris-Richardson/dp/1617294543 Remote procedure invocation Client 使用同步的 remote proce...
Reference https://www.amazon.com/Microservices-Patterns-examples-Chris-Richardson/dp/1617294543 Overview of interprocess communication in ...
參考資料 https://www.amazon.com/Microservices-Patterns-examples-Chris-Richardson/dp/1617294543 Microservice 架構中的行程間通訊概觀 互動風格 維度一 一對一 — 每個 ...
Reference https://www.amazon.com/Microservices-Patterns-examples-Chris-Richardson/dp/1617294543 https://microservices.io/patterns/decomposi...
參考資料 https://www.amazon.com/Microservices-Patterns-examples-Chris-Richardson/dp/1617294543 https://microservices.io/patterns/decomposition/...
<div>Git Commit</div><div>https://github.com/shooeugenesea/study-js/commit/ed8a7b35f8b3c73a27f0491aaea23b627d70b8ae</div><div>&...
<div>Git Commit</div><div>https://github.com/shooeugenesea/study-js/commit/ed8a7b35f8b3c73a27f0491aaea23b627d70b8ae</div><div>&...
<div><div><div>Commit</div><div>https://github.com/shooeugenesea/study-js/commit/6221b2eb518c6bb784e8316d42d4d358693f6ea6</d...
<div><div><div>Commit</div><div>https://github.com/shooeugenesea/study-js/commit/6221b2eb518c6bb784e8316d42d4d358693f6ea6</d...
<div><div>Commit</div><div>https://github.com/shooeugenesea/study-js/commit/ad54df277bb17c12cf9f3bb37f965b13945ae68b</div></...
<div><div>Commit</div><div>https://github.com/shooeugenesea/study-js/commit/ad54df277bb17c12cf9f3bb37f965b13945ae68b</div></...
Current component get users collection from props. UserHeader component seems weird because the component is designed to show only one user, should not get ...
目前的 component 是從 props 取得整個 users 集合。 UserHeader component 看起來怪怪的,因為這個 component 的設計是只顯示一個使用者,不應該拿到所有使用者資料再從裡面找一筆出來。 為了只注入一筆 User 資料到 UserHeader,可以改 mapSt...
<div><div>Commit</div><div>https://github.com/shooeugenesea/study-js/commit/8d25749f6aedfc86d36b4413ecc8271809ceb8f9</div><d...
<div><div>Commit</div><div>https://github.com/shooeugenesea/study-js/commit/8d25749f6aedfc86d36b4413ecc8271809ceb8f9</div><d...
<div><div>Commit</div><div>https://github.com/shooeugenesea/study-js/commit/ad61b7d698c5e8a4256732ae91d26a8169747b6b</div><d...
<div><div>Commit</div><div>https://github.com/shooeugenesea/study-js/commit/ad61b7d698c5e8a4256732ae91d26a8169747b6b</div><d...
<div><div>Origin version</div><div><div>export const fetchPosts = () => {</div><div> // dispatch: can change ...
<div><div>原始版本</div><div><div>export const fetchPosts = () => {</div><div> // dispatch: can change any data w...
Commit https://github.com/shooeugenesea/study-js/commit/9abf9a073ca86dea1b1dcf1418a5880a7975c0ea Mistake I made I find PttPosts implementation component se...
Commit https://github.com/shooeugenesea/study-js/commit/9abf9a073ca86dea1b1dcf1418a5880a7975c0ea 我犯的錯誤 我發現 PttPosts 的實作好像不太對。 PttPosts.js import React, ...
<div>Commit</div><div>https://github.com/shooeugenesea/study-js/commit/80dd0b917eb4abf2ba5c292bfe37eaf50c350245</div><div>https...
<div>Commit</div><div>https://github.com/shooeugenesea/study-js/commit/80dd0b917eb4abf2ba5c292bfe37eaf50c350245</div><div>https...
<div>Install react and react-redux</div><div style="background-color: #fbfaf8; border-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.15); box-...
<div>安裝 react 和 react-redux</div><div style="background-color: #fbfaf8; border-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.15); box-sizing:...
<div>apply: return current receiver once anonymous function complete</div><div><div>package examples</div><div></div&g...
<div>apply:匿名函式執行完畢後回傳目前的 receiver</div><div><div>package examples</div><div></div><div>fun main() {</div&...
<div>Types</div><ul><li><div>Byte</div></li><li><div>Short</div></li><li><div>I...
<div>型別</div><ul><li><div>Byte</div></li><li><div>Short</div></li><li><div>Int&...
<div>indexOf and substring</div><ul><li><div>indexOf</div></li><li><div>substring</div></li>...
<div>indexOf 與 substring</div><ul><li><div>indexOf</div></li><li><div>substring</div></li>&...
<div><div>Nullable</div><ul><li><div>“String?” in return type shows the function may return null</div></li>&l...
<div><div>Nullable</div><ul><li><div>回傳型別中的 “String?” 表示這個函式可能回傳 null</div></li><li><div>呼叫端需要用 “...
<div><div><div>Anonymous function</div><div><div>package examples</div><div></div><div>fun main()...
<div><div><div>匿名函式</div><div><div>package examples</div><div></div><div>fun main() {</div>...
<ul><li><div>Function parameter is read-only</div></li></ul><div></div><div>Ex. Private function (Defau...
<ul><li><div>函式參數是唯讀的</div></li></ul><div></div><div>範例:Private 函式(預設是 public)</div><div>&l...
<ul><li><div>until</div></li><li><div>downTo</div></li><li><div>Compare by char</div>...
<ul><li><div>until</div></li><li><div>downTo</div></li><li><div>用字元比較</div></li>...
<div>When</div><div><div>package examples</div><div></div><div>fun main() {</div><div> var nam...
<div>When</div><div><div>package examples</div><div></div><div>fun main() {</div><div> var nam...
<div><div>if-else</div><div><div>package examples</div><div></div><div>fun main() {</div><div&...
<div><div>if-else</div><div><div>package examples</div><div></div><div>fun main() {</div><div&...
<div><div>Hello.kt</div><div><div>fun main(args: Array<String>) { </div><div> println(“Hello, world!”)<...
<div><div>Hello.kt</div><div><div>fun main(args: Array<String>) { </div><div> println(“Hello, world!”)<...
XOR 的特性, 相同的值 XOR 會變成 0 0^0=01^0=10^1=11^1=0// codeint n = 0;for (int i = 0; i < 10000; i++) { n ^= i;}for (int i = 0; i < 10000; i++) {&n...
XOR 的特性, 相同的值 XOR 會變成 0 0^0=01^0=10^1=11^1=0// codeint n = 0;for (int i = 0; i < 10000; i++) { n ^= i;}for (int i = 0; i < 10000; i++) {&n...
題目: Given a binary array nums, return the maximum length of a contiguous subarray with an equal number of 0 and 1解法:當遇到 0 就 -1, 遇到 1 就 +1, 計算每個陣列位置的加總最重...
題目: 給定一個二元陣列 nums,回傳包含相同數量 0 和 1 的最長連續子陣列長度解法:當遇到 0 就 -1, 遇到 1 就 +1, 計算每個陣列位置的加總最重要的概念就是: 當遇到相同的加總數字, 表示中間經歷了相同的 1 & 0.因此解法就是:走過所有的陣列, 計算每個位子的 count...
LeetCode
LeetCode
LeetCode https://leetcode.com/problems/pascals-triangle/ Code
LeetCode https://leetcode.com/problems/pascals-triangle/ 程式碼
Leetcode
LeetCode
LeetCode https://leetcode.com/problems/lru-cache/ Code It will be great to implement LinkedList by myself, I use JDK LinkedList directly
LeetCode https://leetcode.com/problems/lru-cache/ 程式碼 自己實作 LinkedList 會更好,這邊直接用 JDK 的 LinkedList
<div>LeetCode</div><div>https://leetcode.com/problems/kids-with-the-greatest-number-of-candies/submissions/</div><div>&l...
<div>LeetCode</div><div>https://leetcode.com/problems/kids-with-the-greatest-number-of-candies/submissions/</div><div>&l...
<div>LeetCode</div><div>https://leetcode.com/problems/shuffle-the-array/</div><div></div><div>Code</div&g...
<div>LeetCode</div><div>https://leetcode.com/problems/shuffle-the-array/</div><div></div><div>程式碼</div>...
<div>LeetCode</div><div>https://leetcode.com/problems/running-sum-of-1d-array/</div><div></div><div>Code<...
<div>LeetCode</div><div>https://leetcode.com/problems/running-sum-of-1d-array/</div><div></div><div>程式碼</...
Got a chance to introduce my favorite book to team
In this series of notes: https://twitter.com/ajavadeveloper/status/1145615948277112833 I only notes part of "Fundamental Principles of Interaction" ...
A conceptual model is an explanation, usually highly simplified, of how something works. Ex. There are folders in screen, but it doesn't means there is...
Anti-ex. or repeatedly push the pedestrian button at a street crossing? => Because user doesn't know whether system got his request or not. Fee...
Mapping is the relationship between the elements of two sets of things Ex. Switch mapping Lights in office Mapping the layout of controls a...
Need separate to 7 posts, because image become huge base64 in Blogger, unable to upload.... Orz https://www.isaacnote.com/2019/06/designofeverydaythings-si...
When facing a device, we seeking for clue about how to use. Designer need provide it. Otherwise, we need use our own creativity and imagination. Mislea...
Ex. The sink that would not drain
<div> Ex. Slide door and said “Don’t push”</div> </span>
Ex. Bookmark indicate read progress.
Signifier is an important device for communication, whether or not communication is intended Ex. Flag indicate wind direction
Ex. A door need signifier: no signifier, dont know how to open
Affordance: it is a relationship, ex. Affordance of touching exists on the entire screen Signifier: designer put a circle on screen to signify user where t...
Chair affordance An affordance is a relationship between the properties of an object and the capabilities of the agent that determine just how the objec...
The most important characteristics of good design: Discover-ability and Understanding Discover-ability Figure out what actions are possible Where a...
Introduction I like this book very much! I always can learn from it. Have a chance to introduce this book to team, want to have some notes for "THE PS...
家裡最近買一個洗髮精, 讓我洗得很痛苦.
Goal 描述如何套用 spring cloud stream + Kafka 以及概念.適合只面對 Kafka, 不涵蓋進階議題 Example https://github.com/axxdeveloper/study-practice/tree/spring-cloud-stream Concepts ...
目標 描述如何套用 Spring Cloud Stream + Kafka 以及概念.適合只面對 Kafka, 不涵蓋進階議題 範例 https://github.com/axxdeveloper/study-practice/tree/spring-cloud-stream 概念 一個 applicatio...
Intention: Why I need Kafka Transaction需求中收到 message 並處理之後, application 需要另外傳送訊息出去給多個 topic.不管遇到任何錯誤, 我都希望訊息就不要送出去.除此之外, 原本 consume 的訊息也不要收下來How it worksProd...
動機:為什麼我需要 Kafka Transaction需求中收到 message 並處理之後, application 需要另外傳送訊息出去給多個 topic.不管遇到任何錯誤, 我都希望訊息就不要送出去.除此之外, 原本 consume 的訊息也不要收下來運作方式Producer 用 transaction.i...
Source Code: https://github.com/axxdeveloper/study-practice/tree/testcontainer 在一個 sharing session 分享如何使用 testcontainer 輔助 SpringBoot application 開發測試 K...
Source Code: https://github.com/axxdeveloper/study-practice/tree/testcontainer 在一個 sharing session 分享如何使用 Testcontainer 輔助 SpringBoot application 開發測試 K...
docker-compose.yml services: zookeeper-server: image: bitnami/zookeeper:latest ports: - "2181:2181" environment: - ALLOW_ANONYMOUS_...
docker-compose.yml services: zookeeper-server: image: bitnami/zookeeper:latest ports: - "2181:2181" environment: - ALLOW_ANONYMOUS_LO...
1. Producer send messages ``` private static void sendMessages(Properties kafkaProps, String topic) { for (int i = 0; i < MSG_COUNT; i...
1. Producer 發送訊息 ``` private static void sendMessages(Properties kafkaProps, String topic) { for (int i = 0; i < MSG_COUNT; i++) { &nb...
1. Producer send messages ``` private static void sendMessages(Properties kafkaProps, String topic) { for (int i = 0; i < MSG_COUNT; i++) { ...
1. Producer 發送訊息 ``` private static void sendMessages(Properties kafkaProps, String topic) { for (int i = 0; i < MSG_COUNT; i++) { &n...
Full Example: https://github.com/shooeugenesea/study-practice/blob/kafka/src/main/java/examples/Main.java Create topic by Java private static void cr...
完整範例: https://github.com/shooeugenesea/study-practice/blob/kafka/src/main/java/examples/Main.java 用 Java 建立 topic private static void createTopicIfNot...
https://itnext.io/how-to-install-kafka-using-docker-a2b7c746cbdc Create network $ sudo docker network create kafka-net --driver bridge Install zookee...
https://itnext.io/how-to-install-kafka-using-docker-a2b7c746cbdc 建立網路 $ sudo docker network create kafka-net --driver bridge 安裝 Zookeeper 容器 $ sudo d...
如果沒有指定要丟的參數名稱, python 就會照順序排. 如果順序對不起來就會 error.
帶入 dict 的值, 如果用 format api, dictionary 要帶 ** 去展開 key-value >>> m = {'a':1.1234, "b":"qq"} >>> '%(a)1.1f %(a)s %(b)s' %m '1.1 1.1234 qq'
tuple 就是不可變的 list.
python 的 function 是一個物件, 所以可以放進 collection 中等以後被呼叫. >>> def a(): print 'a';
I use Notepad++ to check log and debug. When log file is large, I need to split large file to smaller ones. I can't find tool so write codes to split file ...
Codes import sys import subprocess import shlex import re
Description This program will kill existing Cassandra before deploy new one. Codes import os import shutil import sys import math import urllib.request ...
Description 想學一下 Maven download 時候的 text percent progress Codes import sys import math import urllib.request
Reference http://www.apache.org/dyn/closer.cgi?path=/cassandra/2.0.4/apache-cassandra-2.0.4-bin.tar.gz http://docs.python.org/3/library/urllib.request.htm...
Reference http://docs.python.org/3/library/shutil.html#module-shutil Description 把 d:/nginx-1.4.3 壓縮到 d:/ziptarget/test.zip 再把 d:/ziptarget/test.zip 解壓...
Reference http://docs.python.org/3/tutorial/classes.html#iterators http://docs.python.org/3/tutorial/classes.html#generators Iterator 這段程式 for i in ran...
Description 現在很常用 json 當成儲存資料的格式, 用 java 的話需要導入 library. python 則是內建 json 的 module, 只要操作原生的資料結構就行了. 很方便. Reference http://docs.python.org/3/tutorial/in...
之前看 python 文章好像都沒提到怎麼寫 main method, 似乎這件事情很自然, 不過我卻不知道. 看了 6.1.1. Executing modules as scripts 裡面有寫 “the code in the module will be executed, just as if you ...
今天練習 Python 的時候發現 5.6. Looping Techniques 有個提示 "To change a sequence you are iterating over while inside the loop (for example to duplicate cert...
Source Code def print_pascal(row_cnt): pascal = [] for row in range(row_cnt): cols = [] for col in range(row+1): if row ...
1. Given file in project folder ./mongo/docker-entrypoint-initdb.d:/initdb.sh ``` echo '=====================================>' mongo --eval 'db.get...
1. 在專案資料夾放一個檔案 ./mongo/docker-entrypoint-initdb.d:/initdb.sh ``` echo '=====================================>' mongo --eval 'db.getSiblingDB("testqq...
docker-compose.yml services: zookeeper-server: image: bitnami/zookeeper:latest ports: - "2181:2181" environment: - ALLOW_ANONYMOUS_...
docker-compose.yml services: zookeeper-server: image: bitnami/zookeeper:latest ports: - "2181:2181" environment: - ALLOW_ANONYMOUS_LO...
Git branch
Git branch
Force rm containers: docker container rm ${docker container ls -aq} -f # Here is container isaac@isaac-KVM:~$ docker container ls CONTAINER ID ...
Inspect an image can understand what command will be executed by default
Start container in background: run -d (for running in background) with port mapping # Pull nginx isaac@isaac-KVM:~$ docker pull nginx:latest ...
Policies: always unless-stopped on-failure Always Always restart Unless use command to stop it Restart when docker restart, even it...
Run a container Ex. docker container run <image> <app> Ex. docker container run -it ubuntu /bin/bash -it will connect to current termin...
List image isaac@isaac-KVM:~$ docker image ls REPOSITORY TAG ...
Install ubuntu and try to check Docker version isaac@isaac-KVM:~$ docker -version Command 'docker' not found, but can be installed with: sud...
spring.jpa.open-in-view spring boot 的 property, spring.jpa.open-in-view 預設是開啟的開啟的話, OpenSessionInViewInterceptor 就會介入收到 web request 的時候, 會開一個 Hibernate...
spring.jpa.open-in-view spring boot 的 property, spring.jpa.open-in-view 預設是開啟的開啟的話, OpenSessionInViewInterceptor 就會介入收到 web request 的時候, 會開一個 Hibernate...
Goal 描述如何套用 spring cloud stream + Kafka 以及概念.適合只面對 Kafka, 不涵蓋進階議題 Example https://github.com/axxdeveloper/study-practice/tree/spring-cloud-stream Concepts ...
目標 描述如何套用 Spring Cloud Stream + Kafka 以及概念.適合只面對 Kafka, 不涵蓋進階議題 範例 https://github.com/axxdeveloper/study-practice/tree/spring-cloud-stream 概念 一個 applicatio...
Reference Pro Spring Integration - https://www.amazon.com/Pro-Spring-Integration-Experts-Voice-ebook-dp-B005PZ29OA/dp/B005PZ29OA/ref=mt_kindle?_encodi...
Reference Pro Spring Integration - https://www.amazon.com/Pro-Spring-Integration-Experts-Voice-ebook-dp-B005PZ29OA/dp/B005PZ29OA/ref=mt_kindle?_encodi...
Reference Pro Spring Integration - https://www.amazon.com/Pro-Spring-Integration-Experts-Voice-ebook-dp-B005PZ29OA/dp/B005PZ29OA/ref=mt_kindle?_encodi...
Reference Pro Spring Integration - https://www.amazon.com/Pro-Spring-Integration-Experts-Voice-ebook-dp-B005PZ29OA/dp/B005PZ29OA/ref=mt_kindle?_enc...
Reference Pro Spring Integration - https://www.amazon.com/Pro-Spring-Integration-Experts-Voice-ebook-dp-B005PZ29OA/dp/B005PZ29OA/ref=mt_kindle?_enco...
Reference Spring Integration Basic Terms 後篇: https://www.isaacnote.com/2018/10/spring-integration-channels.html Terms org.springframework.inte...
spring.jpa.open-in-view spring boot 的 property, spring.jpa.open-in-view 預設是開啟的開啟的話, OpenSessionInViewInterceptor 就會介入收到 web request 的時候, 會開一個 Hibernate...
spring.jpa.open-in-view spring boot 的 property, spring.jpa.open-in-view 預設是開啟的開啟的話, OpenSessionInViewInterceptor 就會介入收到 web request 的時候, 會開一個 Hibernate...
Source Code: https://github.com/axxdeveloper/study-practice/tree/testcontainer 在一個 sharing session 分享如何使用 testcontainer 輔助 SpringBoot application 開發測試 K...
Source Code: https://github.com/axxdeveloper/study-practice/tree/testcontainer 在一個 sharing session 分享如何使用 Testcontainer 輔助 SpringBoot application 開發測試 K...
Books suggestion@GetMapping("/unable_files")public Flux<FileInfo> wrongListFiles() throws IOException { return Flux.fromIterable...
書籍推薦@GetMapping("/unable_files")public Flux<FileInfo> wrongListFiles() throws IOException { return Flux.fromIterable(Files.newDi...
<ul style="text-align: left;"><li><div></div></li><li>Controller</li><div style="background-color: #fbfaf8; bord...
<ul style="text-align: left;"><li><div></div></li><li>Controller</li><div style="background-color: #fbfaf8; bord...
<div>Download Spring Initializer</div><div>https://start.spring.io/#!type=gradle-project&language=java&platformVersion=2.2.7.RELEAS...
<div>下載 Spring Initializer</div><div>https://start.spring.io/#!type=gradle-project&language=java&platformVersion=2.2.7.RELEASE&...
<div>Commit</div><div>https://github.com/shooeugenesea/test-express/commit/b81676332041570e3d05c70dc3dcf7371001ef4c</div><d...
<div>Commit</div><div>https://github.com/shooeugenesea/test-express/commit/b81676332041570e3d05c70dc3dcf7371001ef4c</div><d...
<div><div>Commit</div><div>https://github.com/shooeugenesea/test-express/commit/eb0ac341b2ad17a6abff18d0b16ba3a1255beb9a</div>&...
<div><div>Commit</div><div>https://github.com/shooeugenesea/test-express/commit/eb0ac341b2ad17a6abff18d0b16ba3a1255beb9a</div>&...
<div><ul><li><div>Commit</div></li></ul><div>https://github.com/shooeugenesea/test-express/commit/00d837d4470...
<div><ul><li><div>Commit</div></li></ul><div>https://github.com/shooeugenesea/test-express/commit/00d837d4470...
<div><div><ul><li>Commit</li></ul><div>https://github.com/shooeugenesea/test-express/commit/06d3978359b38d7160f94a7...
<div><div><ul><li>Commit</li></ul><div>https://github.com/shooeugenesea/test-express/commit/06d3978359b38d7160f94a7...
<div>Commit</div><div>https://github.com/shooeugenesea/test-express/commit/2f4aebcc2cb6af13ca63d4bcf51dd686a74036a6</div><div>&...
<div>Commit</div><div>https://github.com/shooeugenesea/test-express/commit/2f4aebcc2cb6af13ca63d4bcf51dd686a74036a6</div><div>&...
LeetCode
LeetCode
LeetCode https://leetcode.com/problems/pascals-triangle/ Code
LeetCode https://leetcode.com/problems/pascals-triangle/ 程式碼
<div>LeetCode</div><div>https://leetcode.com/problems/kids-with-the-greatest-number-of-candies/submissions/</div><div>&l...
<div>LeetCode</div><div>https://leetcode.com/problems/kids-with-the-greatest-number-of-candies/submissions/</div><div>&l...
<div>LeetCode</div><div>https://leetcode.com/problems/shuffle-the-array/</div><div></div><div>Code</div&g...
<div>LeetCode</div><div>https://leetcode.com/problems/shuffle-the-array/</div><div></div><div>程式碼</div>...
<div>LeetCode</div><div>https://leetcode.com/problems/running-sum-of-1d-array/</div><div></div><div>Code<...
<div>LeetCode</div><div>https://leetcode.com/problems/running-sum-of-1d-array/</div><div></div><div>程式碼</...
Reference ForkJoinPoolManyThreadMain.java ForkJoinPool Paper ForkJoinPool - Error Handling Question 原本以為 new ForkJoinPool(2) 像這樣的宣告, 是讓 ForkJoinPool 最多維...
Reference Git: ForkJoinPoolErrorMain.java 前篇: ForkJoinPool - Workstealing Next: ForkJoinPool - Thread Management Error Handling 如果 fork 出去...
Reference https://en.wikipedia.org/wiki/Work_stealing 前篇: Java Concurrency - ForkJoinPool 的 deadlock 下篇: ForkJoinPool - Error Handling Introduction Fork...
Reference 前篇 Java Concurrent - ForkJoinPool 下篇 ForkJoinPool - Work stealing Will ForkJoinTask encounter deadlock problem? 在看 ForkJoinTask 的時候, ...
ExecutorService and Problem 用一個 ExecutorService submit task 後, 如果 task 會 submit 其他的 task, 這些 task 都會放進 ExecutorService 的 queue 中. 這樣就沒辦法做到 "第一個 task 與其產生的...
Introduction CyclicBarrier 很久沒用都忘了, 來複習一下.. Description 簡單說就是很多個 thread 去作事情, 作完之後就 await. CyclicBarrier 等作完的 thread 達到指定的個數後, await 就結束. Code public ...
Introduction 今天才知道 Java 7 有提供一個 Phaser class 來處理更複雜的 CountDownLatch 需求. Simple Phaser 想用 Phaser, 首先你的 threads 工作要有分階段, 一個階段沒做完就不能進行下個階段. 有了這個限制後就可以照下面的流程...
Reference Dealing with InterruptedException How to handle InterruptedException Throw it directly If you can't throw it, call Thread.currentThread().in...
Run No arg main class Java package examples; public class TestMain { public static void main(String[] params) { &n...
執行沒有參數的 main class Java package examples; public class TestMain { public static void main(String[] params) {  ...
Edit build.gradle task helloworld { println "Hello world" } List tasks and find helloworld $gradle tasks --all ... Ot...
編輯 build.gradle task helloworld { println "Hello world" } 列出所有 task 並找到 helloworld $gradle tasks --all ... Other task...
Reference https://openhome.cc/Gossip/Spring/Gradle.html Thanks 良葛格, his explanation is so simple and good to read and practice!! Class package exam...
參考資料 https://openhome.cc/Gossip/Spring/Gradle.html 感謝良葛格,他的說明簡單明瞭又好上手!! Class package examples; public class HelloMain { &nbs...
<div>Commit</div><div>https://github.com/shooeugenesea/test-express/commit/b81676332041570e3d05c70dc3dcf7371001ef4c</div><d...
<div>Commit</div><div>https://github.com/shooeugenesea/test-express/commit/b81676332041570e3d05c70dc3dcf7371001ef4c</div><d...
<div><div>Commit</div><div>https://github.com/shooeugenesea/test-express/commit/eb0ac341b2ad17a6abff18d0b16ba3a1255beb9a</div>&...
<div><div>Commit</div><div>https://github.com/shooeugenesea/test-express/commit/eb0ac341b2ad17a6abff18d0b16ba3a1255beb9a</div>&...
By ‘checkbox’ type can choose items Commit https://github.com/shooeugenesea/test-node-js/commit/a9bc2d47208cb0feec04e9cebea71d7fcadcb6a4 Code import * as ...
透過 'checkbox' type 可以選取項目 Commit https://github.com/shooeugenesea/test-node-js/commit/a9bc2d47208cb0feec04e9cebea71d7fcadcb6a4 程式碼 import * as inquirer fr...
Git Repositoryhttps://github.com/shooeugenesea/test-node-jsInstall librariesnpm install inquirernpm install typescriptList and Quit commandsimport * as inqui...
Git Repositoryhttps://github.com/shooeugenesea/test-node-js安裝套件npm install inquirernpm install typescriptList 和 Quit 指令import * as inquirer from "inquirer"//...
Description 使用 nginx 的一個主因是要支援 web application 放在別台機器上, 將相關的 request 導過去. Reference Setting Up a Simple Proxy Server Practice prepare files D:\nginx-1...
Description 使用 nginx 主要目的之一就是要存放靜態檔如 html 或圖片 Reference Serving Static Content Practice 設定讓 "GET /" 的 request 首頁導向 testhtml/data/www/index.html prep...
Description server { listen 127.0.0.1:8080; server_name server1; location /test { return 200 'server1'; ...
Reference How nginx processes a request Description server { listen 8080; server_name example.com; location /test { ...
Reference Nginx 变量漫谈(二) Nginx Embedded Variables Practice 變數的有效範圍是 request, 所以就算不同 request 也可以使用變數 config nginx.conf server { listen ...
Description 最近在練習 Nginx, 不過電腦的環境只有 Windows 也沒打算裝 VM, 所以跟網路上文章的環境不太一樣, 在這紀錄怎麼在Windows上練習. 不過最終應該還是要裝個 Linux 環境來練習比較好.. Reference Nginx 变量漫谈(一) Preparati...
Reference Pro Spring Integration - https://www.amazon.com/Pro-Spring-Integration-Experts-Voice-ebook-dp-B005PZ29OA/dp/B005PZ29OA/ref=mt_kindle?_encodi...
Reference Pro Spring Integration - https://www.amazon.com/Pro-Spring-Integration-Experts-Voice-ebook-dp-B005PZ29OA/dp/B005PZ29OA/ref=mt_kindle?_encodi...
Reference Pro Spring Integration - https://www.amazon.com/Pro-Spring-Integration-Experts-Voice-ebook-dp-B005PZ29OA/dp/B005PZ29OA/ref=mt_kindle?_encodi...
Reference Pro Spring Integration - https://www.amazon.com/Pro-Spring-Integration-Experts-Voice-ebook-dp-B005PZ29OA/dp/B005PZ29OA/ref=mt_kindle?_enc...
Reference Pro Spring Integration - https://www.amazon.com/Pro-Spring-Integration-Experts-Voice-ebook-dp-B005PZ29OA/dp/B005PZ29OA/ref=mt_kindle?_enco...
Reference Spring Integration Basic Terms 後篇: https://www.isaacnote.com/2018/10/spring-integration-channels.html Terms org.springframework.inte...
By ‘checkbox’ type can choose items Commit https://github.com/shooeugenesea/test-node-js/commit/a9bc2d47208cb0feec04e9cebea71d7fcadcb6a4 Code import * as ...
透過 'checkbox' type 可以選取項目 Commit https://github.com/shooeugenesea/test-node-js/commit/a9bc2d47208cb0feec04e9cebea71d7fcadcb6a4 程式碼 import * as inquirer fr...
<div><div>Use "input" type in inquirer can support input information</div><div></div><div>Commit</div><div> ...
<div><div>使用 Inquirer 的 "input" type 可以讓使用者輸入資訊</div><div></div><div>Commit</div><div> https://github.com/sh...
Git Repositoryhttps://github.com/shooeugenesea/test-node-jsInstall librariesnpm install inquirernpm install typescriptList and Quit commandsimport * as inqui...
Git Repositoryhttps://github.com/shooeugenesea/test-node-js安裝套件npm install inquirernpm install typescriptList 和 Quit 指令import * as inquirer from "inquirer"//...
Requirement Developers keep releasing new software, the version format was {major}.{minor}.{micro}.{build}When a device ask for upgrade information, we need ...
需求 開發者持續發布新軟體,版本格式是 {major}.{minor}.{micro}.{build}當裝置詢問升級資訊時,我們需要找出最新的軟體版本但不只是最新的版本,我們可能還需要知道以下版本資訊,才能提供適合的建議是否有 3 個更新的軟體版本?有多少更新的軟體版本? 挑戰 資料庫用「自然排序」來排文字這兩...
Source Code: https://github.com/axxdeveloper/study-practice/tree/testcontainer 在一個 sharing session 分享如何使用 testcontainer 輔助 SpringBoot application 開發測試 K...
Source Code: https://github.com/axxdeveloper/study-practice/tree/testcontainer 在一個 sharing session 分享如何使用 Testcontainer 輔助 SpringBoot application 開發測試 K...
WAL - Write Ahead Log, or xlog, or transaction log. WAL 就像是 Cassandra 的 CommitLog, 會先被存起來, 再寫進資料庫, 使 Postgres 不管何時被關閉, 重啟後都可以恢復資料.WAL 存在 pg_wal folder...
WAL - Write Ahead Log,又叫 xlog 或 transaction log。WAL 就像是 Cassandra 的 CommitLog, 會先被存起來, 再寫進資料庫, 使 Postgres 不管何時被關閉, 重啟後都可以恢復資料.WAL 存在 pg_wal folder 下Po...
Git branch
Git branch
<div> Under Cassandra-2.0.17, I want to query a table by cqlsh</div> First of all, I put query in a file: ~/query.cql select * from "myData"...
We use Cassandra 2.0.17. Sometimes we suffer IO problem in system, we can use "iotop" to know process IO loading. But sometimes we need more detail, such a...
Introduction After a performance issue happen, we have less information about system status at that time. There is flush log in Cassandra, so I write code ...
ChatGPT generated Scrum 是一種敏捷軟體開發的框架,它的核心包含了三個支柱 (Pillars)、五個價值觀 (Values) 和十個原則 (Principles)。 三個支柱 (Pillars) 包括: 透明度 (Transparency):所有的工作都必須對所有人可見,這...
ChatGPT generated Scrum 是一種敏捷軟體開發的框架,它的核心包含了三個支柱 (Pillars)、五個價值觀 (Values) 和十個原則 (Principles)。 三個支柱 (Pillars) 包括: 透明度 (Transparency):所有的工作都必須對所有人可見,這...
Q: 我們用用 SCRUM 想幹嘛? A: 我們都曾經遇過在某個專案已經花費很多時間跟人力做得一團亂. 但在某個機緣下少少幾個人展現強大的戰鬥力把待辦清單做完, 成為膾炙人口的佳話. 這個佳話也成為團隊員日後美好的回憶. 會有佳話是因為: 待辦事項清單清楚 有人排出優先順序, 先...
Reference Thomas Tseng User story format: “As a (user type), I want to (goal), so that (reason).” Attributes of good user story: I...
<ul><li></li><li>Commit </li></ul>https://github.com/shooeugenesea/study-js/commit/2d22117a7b36ea1225b960892995e409bbc5e6...
<ul><li></li><li>Commit </li></ul>https://github.com/shooeugenesea/study-js/commit/2d22117a7b36ea1225b960892995e409bbc5e6...
<div>Git Commit</div><div>https://github.com/shooeugenesea/study-js/commit/ed8a7b35f8b3c73a27f0491aaea23b627d70b8ae</div><div>&...
<div>Git Commit</div><div>https://github.com/shooeugenesea/study-js/commit/ed8a7b35f8b3c73a27f0491aaea23b627d70b8ae</div><div>&...
Leetcode
LeetCode
LeetCode https://leetcode.com/problems/lru-cache/ Code It will be great to implement LinkedList by myself, I use JDK LinkedList directly
LeetCode https://leetcode.com/problems/lru-cache/ 程式碼 自己實作 LinkedList 會更好,這邊直接用 JDK 的 LinkedList
前篇分工不設限前言自從開始與新團隊合作後, 產品也即將 GA release. GA 之後又會有新的不同的挑戰. 在新挑戰之前, 是時候紀錄一下這段時間發生的事情.挑戰產品本身由於架構改變加上優化, 整個 backend 幾乎全部改寫, 而且加上支援 HA. 有大量還沒經過 QA 驗證的程式 (全部改寫, 都只有...
前篇分工不設限前言自從開始與新團隊合作後, 產品也即將 GA release. GA 之後又會有新的不同的挑戰. 在新挑戰之前, 是時候紀錄一下這段時間發生的事情.挑戰產品本身由於架構改變加上優化, 整個 backend 幾乎全部改寫, 而且加上支援 HA. 有大量還沒經過 QA 驗證的程式 (全部改寫, 都只有...
前言 去年一些巧合, 跟團隊幾個人接手一個案子, 這個案子原本算是服務客戶特定需求的 POC, 但由於客戶愈來愈依賴這個工具, 因此交到我們手上. PS. 在我加入之前, 已經有人辛苦耕耘了好一陣子. 不過也因緣際會離開這個案子. 一個案子要成功, 從來不是誰可以獨立勝任. 享受合作的當下, 同時...
前言 去年一些巧合, 跟團隊幾個人接手一個案子, 這個案子原本算是服務客戶特定需求的 POC, 但由於客戶愈來愈依賴這個工具, 因此交到我們手上. PS. 在我加入之前, 已經有人辛苦耕耘了好一陣子. 不過也因緣際會離開這個案子. 一個案子要成功, 從來不是誰可以獨立勝任. 享受合作的當下, 同時...
Reference Android SDK Tutorial: Working With The SeekBar Android: Enable click event on empty activity area How to create Transparent Activity in Android...
Reference Managing Bitmap Memory Supporting Multiple Screens BrightImage in Github BrightImage in Google Play How To Pick Image From Gallery In Android A...
Reference https://github.com/shooeugenesea/Brightest https://play.google.com/store/apps/details?id=net.brightest http://stackoverflow.com/questions/67086...
第一次錄影片分享技術議題. Source code: https://github.com/axxdeveloper/study-practice/tree/gpb 主要其實就是之後可以用 Any.pack( gpbEntity ).toByteArray 傳送出去.接收端也適用 Any.p...
第一次錄影片分享技術議題. Source code: https://github.com/axxdeveloper/study-practice/tree/gpb 主要其實就是之後可以用 Any.pack( gpbEntity ).toByteArray 傳送出去.接收端也適用 Any.p...
Reference Protobuf - Java Code in Github Example Install protobuf Download from Git: https://github.com/protocolbuffers/protobuf Install protobuf ...
Reference Lesson: Basic I/O 讀寫小檔案 如果檔案比較小可以使用 Files 提供的 read/write. package test;
Description 打算把系統的執行環境從 JDK6 升級到 JDK7, 整理一下有哪些可用. 比較期待的部分是語法, NIO2, G1. 這頁是整理語法的部分. Reference Enhancements in Java SE 7 Java Language Enhancements Poin...
<div> Under Cassandra-2.0.17, I want to query a table by cqlsh</div> First of all, I put query in a file: ~/query.cql select * from "myData"...
Description 一個 log 檔 3G 怎麼看? 不想裝工具, 就只能把檔案切小 Dependencies JDK7 apache commons io Codes public static void main(String[] params) throws IOException ...
# find jar files to execute zipinfo pipe to to awk '/regexp condition/{expression}' pipe to awk 'row num ==1{prin...
cd /d %~dp0不管執行 script 時候路徑在哪, cd /d %~dp0 後 script 的路徑就到該 script 路徑下 script, 放在 f:/test/test.bat cd /d %~dp0 dir execute: f:/test/test.bat f:\>test\te...
Reference Notes 應該 知道該停止做甚麼 => 認清沉沒成本, 勇敢不做 調整成中立的 => 不用當混蛋, 不用太討好人. 甚麼都不做 不該 贏太多 => 太專注於贏別人 加值過度 => 聽到好的提案, 應該說謝謝以及考慮執行, 不用再加上自己的...
參考資料 筆記 應該 知道該停止做甚麼 => 認清沉沒成本, 勇敢不做 調整成中立的 => 不用當混蛋, 不用太討好人. 甚麼都不做 不該 贏太多 => 太專注於贏別人 加值過度 => 聽到好的提案, 應該說謝謝以及考慮執行, 不用再加上自己的意見, 以為會讓...
Wireguard
Wireguard
Motivation File extension of screen record in Mac is .mov (By QuickTime) Can use ffmpeg to convert to gif to reduce file size Install ffmpeg brew install ...
動機 Mac 螢幕錄影的檔案格式是 .mov(透過 QuickTime 錄製) 可以用 ffmpeg 轉成 gif 來縮小檔案大小 安裝 ffmpeg brew install ffmpeg 將 mov 轉成 gif ffmpeg -i AM.mov output.gif 參考資料 https:/...
Git branch
Git branch
https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ref/package-summary.html https://dzone.com/articles/weak-soft-and-phantom-references-i...
https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ref/package-summary.html https://dzone.com/articles/weak-soft-and-phantom-references-i...
ngIftrue => Host div will be included in the HTML elementsfalse => Host div will be excluded in the HTML elements<div *ngIf="needShow(4)" class="bg...
ngIftrue => Host div 會被加入 HTML 元素中false => Host div 會被排除在 HTML 元素外<div *ngIf="needShow(4)" class="bg-info p-2 mt-1"> Check need to show if pass ...
Source Code: https://github.com/axxdeveloper/study-practice/tree/testcontainer 在一個 sharing session 分享如何使用 testcontainer 輔助 SpringBoot application 開發測試 K...
Source Code: https://github.com/axxdeveloper/study-practice/tree/testcontainer 在一個 sharing session 分享如何使用 Testcontainer 輔助 SpringBoot application 開發測試 K...
Source Code: https://github.com/axxdeveloper/study-practice/tree/testcontainer 在一個 sharing session 分享如何使用 testcontainer 輔助 SpringBoot application 開發測試 K...
Source Code: https://github.com/axxdeveloper/study-practice/tree/testcontainer 在一個 sharing session 分享如何使用 Testcontainer 輔助 SpringBoot application 開發測試 K...
Goal 描述如何套用 spring cloud stream + Kafka 以及概念.適合只面對 Kafka, 不涵蓋進階議題 Example https://github.com/axxdeveloper/study-practice/tree/spring-cloud-stream Concepts ...
目標 描述如何套用 Spring Cloud Stream + Kafka 以及概念.適合只面對 Kafka, 不涵蓋進階議題 範例 https://github.com/axxdeveloper/study-practice/tree/spring-cloud-stream 概念 一個 applicatio...
IntroductionDIP 應該很常見, 只是常常在談的時候會發現大家忘記了. 因此特別紀錄一下使用 DIP 實質上的好處.Assumption我們大多會希望 business logic code 可以乾淨穩定有乾淨穩定的 business logic code, 就可以寫穩定的 unit test cod...
簡介DIP 應該很常見, 只是常常在談的時候會發現大家忘記了. 因此特別紀錄一下使用 DIP 實質上的好處.假設我們大多會希望 business logic code 可以乾淨穩定有乾淨穩定的 business logic code, 就可以寫穩定的 unit test code如此未來商業邏輯有改變的時候, 如...
IntroductionDIP 應該很常見, 只是常常在談的時候會發現大家忘記了. 因此特別紀錄一下使用 DIP 實質上的好處.Assumption我們大多會希望 business logic code 可以乾淨穩定有乾淨穩定的 business logic code, 就可以寫穩定的 unit test cod...
簡介DIP 應該很常見, 只是常常在談的時候會發現大家忘記了. 因此特別紀錄一下使用 DIP 實質上的好處.假設我們大多會希望 business logic code 可以乾淨穩定有乾淨穩定的 business logic code, 就可以寫穩定的 unit test code如此未來商業邏輯有改變的時候, 如...
前篇分工不設限前言自從開始與新團隊合作後, 產品也即將 GA release. GA 之後又會有新的不同的挑戰. 在新挑戰之前, 是時候紀錄一下這段時間發生的事情.挑戰產品本身由於架構改變加上優化, 整個 backend 幾乎全部改寫, 而且加上支援 HA. 有大量還沒經過 QA 驗證的程式 (全部改寫, 都只有...
前篇分工不設限前言自從開始與新團隊合作後, 產品也即將 GA release. GA 之後又會有新的不同的挑戰. 在新挑戰之前, 是時候紀錄一下這段時間發生的事情.挑戰產品本身由於架構改變加上優化, 整個 backend 幾乎全部改寫, 而且加上支援 HA. 有大量還沒經過 QA 驗證的程式 (全部改寫, 都只有...
spring.jpa.open-in-view spring boot 的 property, spring.jpa.open-in-view 預設是開啟的開啟的話, OpenSessionInViewInterceptor 就會介入收到 web request 的時候, 會開一個 Hibernate...
spring.jpa.open-in-view spring boot 的 property, spring.jpa.open-in-view 預設是開啟的開啟的話, OpenSessionInViewInterceptor 就會介入收到 web request 的時候, 會開一個 Hibernate...
spring.jpa.open-in-view spring boot 的 property, spring.jpa.open-in-view 預設是開啟的開啟的話, OpenSessionInViewInterceptor 就會介入收到 web request 的時候, 會開一個 Hibernate...
spring.jpa.open-in-view spring boot 的 property, spring.jpa.open-in-view 預設是開啟的開啟的話, OpenSessionInViewInterceptor 就會介入收到 web request 的時候, 會開一個 Hibernate...
Referencehttps://docs.oracle.com/javase/8/docs/technotes/guides/vm/gctuning/cms.htmlhttps://www.oracle.com/technical-resources/articles/java/g1gc.htmlhttps:/...
參考資料https://docs.oracle.com/javase/8/docs/technotes/guides/vm/gctuning/cms.htmlhttps://www.oracle.com/technical-resources/articles/java/g1gc.htmlhttps://wiki...
Referencehttps://docs.oracle.com/javase/8/docs/technotes/guides/vm/gctuning/cms.htmlhttps://www.oracle.com/technical-resources/articles/java/g1gc.htmlhttps:/...
參考資料https://docs.oracle.com/javase/8/docs/technotes/guides/vm/gctuning/cms.htmlhttps://www.oracle.com/technical-resources/articles/java/g1gc.htmlhttps://wiki...
Referencehttps://docs.oracle.com/javase/8/docs/technotes/guides/vm/gctuning/cms.htmlhttps://www.oracle.com/technical-resources/articles/java/g1gc.htmlhttps:/...
參考資料https://docs.oracle.com/javase/8/docs/technotes/guides/vm/gctuning/cms.htmlhttps://www.oracle.com/technical-resources/articles/java/g1gc.htmlhttps://wiki...
ChatGPT generated Scrum 是一種敏捷軟體開發的框架,它的核心包含了三個支柱 (Pillars)、五個價值觀 (Values) 和十個原則 (Principles)。 三個支柱 (Pillars) 包括: 透明度 (Transparency):所有的工作都必須對所有人可見,這...
ChatGPT generated Scrum 是一種敏捷軟體開發的框架,它的核心包含了三個支柱 (Pillars)、五個價值觀 (Values) 和十個原則 (Principles)。 三個支柱 (Pillars) 包括: 透明度 (Transparency):所有的工作都必須對所有人可見,這...
ChatGPT generated Scrum 是一種敏捷軟體開發的框架,它的核心包含了三個支柱 (Pillars)、五個價值觀 (Values) 和十個原則 (Principles)。 三個支柱 (Pillars) 包括: 透明度 (Transparency):所有的工作都必須對所有人可見,這...
ChatGPT generated Scrum 是一種敏捷軟體開發的框架,它的核心包含了三個支柱 (Pillars)、五個價值觀 (Values) 和十個原則 (Principles)。 三個支柱 (Pillars) 包括: 透明度 (Transparency):所有的工作都必須對所有人可見,這...
ChatGPT generated Scrum 是一種敏捷軟體開發的框架,它的核心包含了三個支柱 (Pillars)、五個價值觀 (Values) 和十個原則 (Principles)。 三個支柱 (Pillars) 包括: 透明度 (Transparency):所有的工作都必須對所有人可見,這...
ChatGPT generated Scrum 是一種敏捷軟體開發的框架,它的核心包含了三個支柱 (Pillars)、五個價值觀 (Values) 和十個原則 (Principles)。 三個支柱 (Pillars) 包括: 透明度 (Transparency):所有的工作都必須對所有人可見,這...
ChatGPT generated Scrum 是一種敏捷軟體開發的框架,它的核心包含了三個支柱 (Pillars)、五個價值觀 (Values) 和十個原則 (Principles)。 三個支柱 (Pillars) 包括: 透明度 (Transparency):所有的工作都必須對所有人可見,這...
ChatGPT generated Scrum 是一種敏捷軟體開發的框架,它的核心包含了三個支柱 (Pillars)、五個價值觀 (Values) 和十個原則 (Principles)。 三個支柱 (Pillars) 包括: 透明度 (Transparency):所有的工作都必須對所有人可見,這...
ChatGPT generated Java Class Loader 是 Java Runtime Environment 的一部分,它動態地將 Java 類別加載到 Java Virtual Machine 中。通常,只有在需要時才會加載類別。Java 運行時系統不需要知道文件和文件系統,因為...
ChatGPT generated Java Class Loader 是 Java Runtime Environment 的一部分,它動態地將 Java 類別加載到 Java Virtual Machine 中。通常,只有在需要時才會加載類別。Java 運行時系統不需要知道文件和文件系統,因為...
ChatGPT generated Java Class Loader 是 Java Runtime Environment 的一部分,它動態地將 Java 類別加載到 Java Virtual Machine 中。通常,只有在需要時才會加載類別。Java 運行時系統不需要知道文件和文件系統,因為...
ChatGPT generated Java Class Loader 是 Java Runtime Environment 的一部分,它動態地將 Java 類別加載到 Java Virtual Machine 中。通常,只有在需要時才會加載類別。Java 運行時系統不需要知道文件和文件系統,因為...
ChatGPT generated Java Class Loader 是 Java Runtime Environment 的一部分,它動態地將 Java 類別加載到 Java Virtual Machine 中。通常,只有在需要時才會加載類別。Java 運行時系統不需要知道文件和文件系統,因為...
ChatGPT generated Java Class Loader 是 Java Runtime Environment 的一部分,它動態地將 Java 類別加載到 Java Virtual Machine 中。通常,只有在需要時才會加載類別。Java 運行時系統不需要知道文件和文件系統,因為...
題目 每個伺服器支援不同的 TPM (transaction per minute) 當 request 來的時候, 系統需要馬上根據 TPM 的能力隨機找到一個適合的 server. 雖然稱為 "隨機", 但還是需要有 TPM 作為權重. 解法 別名演算法(Alias Method)是一種有效率地...
題目 每個伺服器支援不同的 TPM (transaction per minute) 當 request 來的時候, 系統需要馬上根據 TPM 的能力隨機找到一個適合的 server. 雖然稱為 "隨機", 但還是需要有 TPM 作為權重. 解法 別名演算法(Alias Method)是一種有效率地...
Recently, I started experimenting with Claude Code Skills.
最近開始試用 Claude Code Skills。
Recently, I started experimenting with Claude Code Skills.
最近開始試用 Claude Code Skills。
Recently, I started experimenting with Claude Code Skills.
最近開始試用 Claude Code Skills。
When running long tests on macOS, the machine may go to sleep if you don’t touch it. There’s a built-in command that keeps it awake.
在 macOS 上跑長時間的測試,如果一段時間沒碰電腦,機器可能會進入睡眠。 其實有個內建的指令可以讓它保持清醒。
When running long tests on macOS, the machine may go to sleep if you don’t touch it. There’s a built-in command that keeps it awake.
在 macOS 上跑長時間的測試,如果一段時間沒碰電腦,機器可能會進入睡眠。 其實有個內建的指令可以讓它保持清醒。
When running long tests on macOS, the machine may go to sleep if you don’t touch it. There’s a built-in command that keeps it awake.
在 macOS 上跑長時間的測試,如果一段時間沒碰電腦,機器可能會進入睡眠。 其實有個內建的指令可以讓它保持清醒。
Recently, I benchmarked vLLM on a GPU to better understand how much throughput can realistically be expected in an LLM serving setup.
最近用 GPU 跑了 vLLM 的 benchmark,想了解在 LLM serving 的環境下,實際上能期待多少 throughput。
Description 現在很常用 json 當成儲存資料的格式, 用 java 的話需要導入 library. python 則是內建 json 的 module, 只要操作原生的資料結構就行了. 很方便. Reference http://docs.python.org/3/tutorial/in...
單引號的 \n 不會換行, 雙引號內的 \n 會換行 print("line1\nline2\n\n\n\n"); print('line3:abc\nabc'); d:\>test.pl input string:abc input number:4 abcabcabcabc d:\>test...
從 branch merge 回 master, 導致 pom.xml conflict, 想 reset pom.xml 因為這不是我要 merge 的內容. (stackoverflow) git reset pom.xml git checkout pom.xml 想清掉 untrack fil...