The
Generatorobject is returned by a generator function and it conforms to both the iterable protocol and the iterator protocol.
useGenerator— 핸들러를 async generator 로 받아 yield 마다 상태를 바꾼다- Iterator Helpers — async generator 페이지네이션을
take로 조기 종료 - Maybe Monad — generator 로 early return
- MobX
flow—await대신yield
- Async iterators and generators - JakeArchibald.com1
- How to consume a paginated API using JavaScript async generators
- Why would anyone need JavaScript generator functions?
Footnotes
-
Streaming 작업 시 비동기처리 방법을 알려주고 있는데…경험이 없어서 일단 메모. ↩
The OpenAPI Specification (OAS), previously known as the Swagger Specification, is a specification for a machine-readable interface definition language for describing, producing, consuming and visualizing web services.
브라우저에서 PDF 및 이미지 파일에 대한 OCR 실행
- PDF.js를 사용하여 PDF에서 이미지를 추출
- Tesseract OCR로 추출된 이미지에서 텍스트를 인식
- 직접 브라우저 상에서 OCR 작업을 실행
- https://www.smashingmagazine.com/2022/08/error-messages-ux-design/ 1
- https://developers.google.com/tech-writing/error-messages 2
Footnotes
-
에러 메시지를 어디에·어떻게 보이나 의 디자인 지침 (Vitaly Friedman). 빨간색에만 기대지 않기, 자동 스크롤 금지, 입력값을 가리지 않기, 폼에선 입력란 위에·표에선 인라인으로, 토스트로 띄우지 않기, 사용자가 에러를 무시하고 진행할 수 있게, 올바른 입력 예시와 상단 요약. ↩
-
Google Tech Writing 의 에러 메시지 문구 과정. 좋은 에러 메시지는 “무엇이 잘못됐나”와 “어떻게 고치나” 두 질문에 답한다 — 모호하거나 다음 행동을 알 수 없는 메시지가 지원 문의를 늘린다. GUI 에 띄우는 방식은 다루지 않는다. ↩
In distributed computing, a conflict-free replicated data type (CRDT) is a data structure that is replicated across multiple computers in a network, with the following features:
Footnotes
-
수학 없이 CRDT 를 처음부터 만드는 인터랙티브 연재. state-based(전체 상태를 보내 병합) 대 operation-based(동작만 보내지만 정확히 한 번·인과 순서 전달이 필요) 를 가르고, Last Write Wins Register → Map 을 직접 짠 뒤 협업 픽셀 아트 에디터로 이어간다. ↩
-
Kleppmann·Bieniusa·Shapiro 가 관리하는 CRDT 허브 — 개요·논문·구현체·용어집. 복제본 충돌을 다루는 길은 강한 일관성(조정하느라 느리고 오프라인이면 못 쓴다)과 낙관적 복제(아무 복제본이나 바로 고치고 나중에 병합) 둘인데, CRDT 는 후자에서 병합을 자동으로 해준다. 서버 하나를 전제하지 않아 P2P 에서도 되는 게 Google Docs·Figma 방식과 다른 점. ↩
getServerSideProps
|> getServerSideSitemapLegacy
|> withXMLResponseLegacy
|>
res.setHeader('Content-Type', 'text/xml')
res.write(content)
res.end()
SSR에서 XML 형식의 사이트맵을 생성하기.
The Clipboard interface of the Clipboard API provides read and write access to the contents of the system clipboard.
Footnotes
-
클립보드는 한 번 복사에 여러 표현(MIME 타입)을 함께 담는다 — Google Docs 는
text/html, VS Code 는text/plain을 꺼낸다. async Clipboard API 는text/plain·text/html·image/png외 타입을 거부하고, copy 이벤트의clipboardData.setData는 다른 타입도 받는다. Figma 는 자기 데이터를text/html안data-buffer속성에 base64 로 숨겨 붙여넣기를 지원한다. Chromium 의 Web Custom Formats("web "접두사)가 이 제약을 푸는 제안. ↩