Searching txt.sour.is

Twts matching #reading
Sort by: Newest, Oldest, Most Relevant

golang 高性能無 GC 的緩存庫 bigcache 是怎麼實現的?
我們寫代碼的時候,經常會需要從數據庫裏讀取一些數據,比如配置信息或者諸如每週熱點商品之類的數據。如果這些數據既不經常變化,又需要頻繁讀取,那比起每次都去讀數據庫,更優的解決方案就是將它們放到應用的本地內存裏,這樣可以省下不少數據庫 IO,性能嘎一下就上來了。那麼現在問題就來了,假設我要在某個服務應用裏實現一個緩存組件去存各種類型的數據,該怎麼實現這個組件呢?從一個 map 說起———- ⌘ Read more

⤋ Read More

Linux-Compatible Pico Pro/Max Boards Featuring Rockchip RV1106 and 5M@30fps ISP
The LuckFox Pico Pro/Max is a cost-effective Linux micro development board designed for hobbyists and developers. Centered around the Rockchip RV1106 chip, this board can be used for smart home devices, remote monitoring, and various IoT applications, particularly those needing 10/100M Ethernet connectivity. Unlike the Luckfox Pico Mini (RV1103 based) covered in October 2023, these […] ⌘ Read more

⤋ Read More

Status 2024-02-25
Status report again!

Image

Figure 1: A visitor this morning.

Sitting in front of the wood stove in my country cottage. It’s nice
and quiet. Meanwhile it seems NordicFuzzCon is going on in Malmö.
4,000 furries. I had no idea! That seems fun!

On the other hand I just read that at least 10,000 were protesting in
Malmö today against the Israel-Palestine conflict. I’ve seen the much
smaller protest … ⌘ Read more

⤋ Read More

Fix “Not authorized to send Apple events to System Events” Mac Error
Some Mac users may occasionally stumble into a oddly worded error message when attempting to launch an application that states “Not authorized to send Apple events to System Events”, and, when clicking OK to dismiss the error, nothing happens – the app does not launch on MacOS. If you attempt to open the app triggering … [Read More](https://osxdaily.com/2024/02/25/fix-not-authorized-to-s … ⌘ Read more

⤋ Read More

DietPi February 2024 news (version 9.1)
DietPi’s new release, version 9.1, launched this week, brings exciting new support and enhancements to the lightweight Linux OS. This version is particularly notable for its extended support for the Raspberry Pi 5 and several other single-board computers , along with improvements across various dietpi-software options. DietPi: DietPi is a lightweight and optimized OS based […] ⌘ Read more

⤋ Read More

How to Make Microsoft Edge the Default Mac Web Browser
Microsoft Edge is a great web browser alternative that is available for MacOS, iPhone, iPad, and obviously Windows, and Android too. Not only is it fast and offers free access to ChatGPT 4, but if you regularly use different computing platforms, you’ll appreciate that you can sync your browser data across all of your devices, … [Read More](https://osxdaily.com/2024/02/24/how-to-make-microsoft-edge-the-default-mac-web-browser … ⌘ Read more

⤋ Read More

I was just looking at SSD prices and wow, have they gone up! Last year in May I ordered a Crucial P5 Plus with 1 TB for 79,99 €. In the late summer of last year, the price was as low as 59,90 €. But now the lowest price I can find is 92,81 €, the second lowest is 134,28 €. 😱 Seems like I should wait a bit before buying a new drive to back up all the tape videos… ⌘ Read more

⤋ Read More

Action Nvidia : prudence sur les objectifs de ventes
Un article de Henry Bonner Comme on pouvait s’y attendre, l’espoir de baisses de taux d’intérêt par les banques centrales tire les actions boursières à la hausse. Selon les calculs de CME Group, les marchés attendent des taux de la Fed à 4,50 % ou moins avant la fin de l’année, contre 5,50 % à […] ⌘ Read more

⤋ Read More

Milk-V Duo S: Dual-Core RISC-V SBC Open for Pre-Order Starting at $11.00
The Milk-V Duo S is another tiny Single Board Computer that combines the open-source RISC-V instruction set architecture with the widely used ARM architecture. This dual-core design offers flexibility and performance for embedded computing. Scheduled to ship in March 2024, this board has improved specifications and features compared to the Duo Classic, and it supports […] ⌘ Read more

⤋ Read More

How to Disable Content Blockers for Specific Sites in Safari for Mac
Some Mac users have content blockers installed into Safari, which are usually designed to prevent a part of a webpage from loading, things like preventing a remote javascript that tracks cookies or loads ads, or something that places a cookie into your browser, etc. The very nature of how content blockers work can cause interference … [Read More](https://osxdaily.com/2024/02/23/how-to-disable-cont … ⌘ Read more

⤋ Read More

實現負載均衡器,打造億級流量入口
*負載均衡概述什麼是負載均衡負載均衡是指通過某種手段, 將任務合理地分配到多個操作單元上進行執行, 從而使得系統的負載分散在不同操作單元上, 避免因爲單個操作單元負載過高而影響請求服務能力的技術手段。比如將大量的客戶端請求分擔給多個服務器處理, 從而避免單個服務器超負荷工作對服務的影響。負載均衡的作用負載均衡主要有以下幾個作用: 1. 降低單個服務器的壓力, 防止服務器過載; 2. 增 ⌘ Read more

⤋ Read More

Golang 數據結構性能優化實踐
僅僅通過對 struct 字段重新排序,優化內存對齊方式,就可以獲得明顯的內存和執行效率提升。原文: How to Speed Up Your Struct in Golang[1]如果你有 Golang 開發經驗,一定定義過 struct 類型。但可能你不知道,通過簡單的重新排序 struct 字段,可以極大提高 Go 程序的速度和內存使用效率!是不是難以置信?我們一起來看一下吧!簡單 De ⌘ Read more

⤋ Read More

如何正確處理 Go 項目中關於文件路徑的問題
在使用 Go 開發項目時,估計有不少人遇到過無法正確處理文件路徑的問題,特別是剛從如 PHP、python 這類動態語言轉向 Go 的朋友,已經習慣了通過相對源碼文件找到其他文件。這個問題能否合理解決,不僅關係到程序的可移植性,還直接影響到程序的穩定性和安全性。本文將嘗試從簡單到複雜,詳細介紹 Go 中獲取路徑的不同方法及應用場景。歡迎關注我的公衆號:引言首先,爲什麼要獲取文件路徑?一般來說,程序 ⌘ Read more

⤋ Read More

使用 Templ 進行 Go 模板化
使用 Templ 在 Go 項目中高效生成動態內容的指南—————————-動態內容生成是 Web 開發的一個基本方面。無論您是在構建網站、Web 應用程序還是 API,根據數據和模板生成動態內容的能力都至關重要。在 Go 編程世界中,一個名爲 “Templ” 的強大工具簡化了這一過程。在這份全面的指南中,我們將探索使用 Templ 進行 Go 模板化,它的關鍵 ⌘ Read more

⤋ Read More

Golang 泛型入門指南
Go 語言中的泛型是指一種語言特性,允許創建可以處理不同類型的函數、數據結構和接口。換句話說,泛型使得可以創建不受特定類型或數據結構限制的代碼。如果我們此前有使用 Java 或者 C++ 的經驗,那麼會很好理解。在 Go 語言引入泛型之前,開發人員必須編寫多個函數來處理不同類型的數據。這種方法通常很繁瑣,並導致代碼重複。有了泛型,開發人員可以編寫更簡潔和可重用的代碼,可以處理不同類型的數據。Go ⌘ Read more

⤋ Read More

Go 利用上下文進行併發計算
在 Go 編程中,上下文(context)是一個非常重要的概念,它包含了與請求相關的信息,如截止日期和取消信息,以及在請求處理管道中傳遞的其他數據。在併發編程中,特別是在處理請求時,正確處理上下文可以確保我們尊重和執行請求中設定的限制,如截止時間。讓我們通過一些代碼示例來探討如何在併發計算中使用上下文,以及如何在處理請求時尊重上下文所設定的截止日期和取消要求。// download 函數用於下載給 ⌘ Read more

⤋ Read More

Les violeurs, quand ils sont de gauche, sont-ils moins traumatisants ?
Sapristi, voilà encore un fois que les turpitudes sexuelles d’une personnalité de gauche la rattrapent ! Certes, la presse s’est fait discrète sur les petits ennuis qui semblent s’accumuler sur Gérard Miller, psychanalyste vedette des médias de gauche et distributeur automatique de morale pour ceux-là, mais il n’en reste pas moins qu’une cinquantaine d’accusations de viol […] ⌘ Read more

⤋ Read More

分佈式搜索引擎,你真的懂嗎?
*一、分佈式搜索引擎簡介(一) 概念分佈式搜索引擎通過在多臺服務器上分配索引和搜索負載, 實現索引和搜索吞吐能力的橫向擴展。主要特徵: 索引和搜索負載分佈在多臺服務器 支持大規模數據和訪問量 (二) 與集中式搜索引擎區別集中式搜索引擎在單個節點上完成全部工作, 硬件資源限制其擴展能力。分佈式搜索引擎通過分佈式計算技術, 實現可橫向擴展的大規模搜索引擎。(三) 優勢 處理更多文檔, 支持 ⌘ Read more

⤋ Read More

Go Module 語義化版本規範
Go Module 的設計採用了語義化版本規範,語義化版本規範非常流行且具有指導意義,本文就來聊聊語義化版本規範的設計和在 Go 中的應用。語義化版本規範語義化版本規範(SemVer)是由 Gravatars 創辦者兼 GitHub 共同創辦者 Tom Preston-Werner 所建立,旨在解決 依賴地獄 問題。它清楚明瞭的規定了版本格式、版本號遞增規:版本格式:採用 X.Y.Z 的格式,X ⌘ Read more

⤋ Read More

Particle Unveils M-Series: Multi-Radio (Satellite/LoRaWAN) Connectivity for Advanced IoT Solutions
Particle has introduced its M-Series device portfolio, an innovative range of multi-radio connectivity solutions. This series includes three variants of the M-SoM module, each customized for distinct connectivity requirements, and the Muon development board, equipped with a comprehensive range of peripheral interfaces. Aimed at rapid prototyping, the … ⌘ Read more

⤋ Read More

JMP: Mobile-friendly Gateway to any SIP Provider
We have for a long time supported the public Cheogram SIP instance, which allows easy interaction between the federated Jabber network and the federated SIP network. When it comes to connecting to the phone network via a SIP provider, however, very few of these providers choose to interact with the federated SIP network at all. It has always been possible to work around this with a self-hosted PBX, b … ⌘ Read more

⤋ Read More

Use a Free Net Worth Spreadsheet on iPhone, Mac, iPad, with Numbers
If you’re looking to keep track of your net worth easily, you don’t need to download an app or sign up for a new service. If you’re an iPhone, Mac, or iPad owner, you’ll be happy to know that Apple conveniently offers a really great spreadsheet for tracking your net worth, and it’s free, bundled … Read MoreRead more

⤋ Read More

JMP: Mobile-friendly Gateway to any SIP Provider
We have for a long time supported the public Cheogram SIP instance, which allows easy interaction between the federated Jabber network and the federated SIP network. When it comes to connecting to the phone network via a SIP provider, however, very few of these providers choose to interact with the federated SIP network at all. It has always been possible to work around this with a self-hosted PBX, b … ⌘ Read more

⤋ Read More

Erlang Solutions: What is Elixir?

What is Elixir: Exploring its Functional Programming Essence

In our latest post, we’ll be exploring Elixir, a robust programming language known for its concurrency and fault-tolerance capabilities. We’ll look at some of Elixir’s syntax, and core features, as well as the Elixir community some resources for beginners and enthusiasts alike.

The birth of Elixir

As the brainchild of José Valim, Elixir is rooted in Valim’s experiences with Ruby on Rails and Erlang. Elixi … ⌘ Read more

⤋ Read More

ESP32-H2-DEV-KIT-N4: A $5.99 Development Board Featuring a 96MHz RISC-V 32-bit Core
“Waveshare recently introduced the ESP32-H2-DEV-KIT-N4, a compact and versatile microcontroller development board equipped with essential connectivity features like Zigbee, Thread, and Bluetooth. Ideal for various applications including smart homes and other IoT projects. The board, centered around the ESP32-H2-MINI-1 module, features a RISC-V 32-bit single-core processor with a … ⌘ Read more

⤋ Read More

Golang 使用 Zookeeper 實現分佈式鎖
什麼是分佈式鎖?——–分佈式鎖是一種在分佈式系統中用於控制併發訪問的機制。在分佈式系統中,多個客戶端可能會同時對同一個資源進行訪問,這可能導致數據不一致的問題。分佈式鎖的作用是確保同一時刻只有一個客戶端能夠對某個資源進行訪問,從而避免數據不一致的問題。分佈式鎖的實現通常依賴於一些具有分佈式特性的技術,如 ZooKeeper、Redis、數據庫等。這些技術提供了在分佈式環境中實現互斥訪問的 ⌘ Read more

⤋ Read More

Golang 流水線設計模式實踐
流水線設計模式對於順序處理業務數據非常有用,可以以一致的方式直觀的定義對數據的處理流程。原文: Using a Pipeline Pattern in Golang[1]到目前爲止,我已經將 Golang 整合到項目中有一段時間了,Golang 是一種非常強大的語言,我渴望在其生態系統中進一步磨練技能。基於項目的特定需求,我需要實現流水線模式 (Pipeline Pattern),數據需要通過 ⌘ Read more

⤋ Read More

Go Gin 框架與 Let’s Encrypt 集成指南
本文將深入探討如何在 Go 語言的 Gin 框架中集成 Let’s Encrypt,以實現自動化管理 SSL/TLS 證書。Let’s Encrypt 作爲一個免費、自動、開放的證書頒發機構,能讓 HTTPS 部署變得簡單便捷。通過該教程,您將瞭解到如何配置 Gin 以支持 HTTPS 服務,並自動從 Let’s Encrypt 申請和續簽證書,確保 Web 應用的安全可靠性。爲什麼需要 Let’ ⌘ Read more

⤋ Read More

Golang 如何有效限制併發數?
Go 語言目前很火熱,一部分原因在於自身帶 “高併發” 的標籤,其本身就擁有優秀的併發量和吞吐量。1 協程可以無限創建嗎?我們在日常開發中會有高併發場景,有時會用多協程併發實現。在高併發業務場景,能否可以隨意開闢 goroutine 並且放養不管呢?畢竟有強大的 GC 和優越的 GMP 調度算法。看下面的代碼:package mainimport (    ”fmt”    ”math”    ” ⌘ Read more

⤋ Read More

用 Go 語言實現劉謙春晚魔術,還原尼格買提汗流浹背的尷尬瞬間-
龍年春晚如期而至,想必大家都看(沒)完(眼)了(看)吧,今年春晚最搞笑節目,當屬劉謙的魔術:《守歲共此時》,不過笑點不是節目本身,而是本場魔術的 托兒(主持人)尼格買提。小尼:已經開始流汗了 😅。本文將帶大家一起用 Go 語言來還原下整個魔術的過程。 在開始寫代碼前,翻車畫面必須置頂 🤣:這是一個公式魔術,即有着固定的套路,從數學角度來看是一個「約瑟夫問題」(嚴格證明可以在網上搜到,如果你感興趣 ⌘ Read more

⤋ Read More

4th Beta of iOS 17.4, macOS Sonoma 14.4, iPadOS 17.4, Available for Testing
Apple has issued the fourth beta versions of iOS 17.4, iPadOS 17.4, macOS Sonoma 14.4, watchOS 14.4, and tvOS 17.4. Additionally a new beta of visionOS 1.1 is available for the developers who are working with Apple Vision Pro. These beta updates are available to all users who are enrolled in the beta testing programs … [Read More](https://osxdaily.com/2024/02/21/4th-beta-of-ios-17-4-mac … ⌘ Read more

⤋ Read More

** In reply to: Scaling accessibility beyond compliance at VA.gov through community and culture - Ad Hoc **
In reply to: Scaling accessibility beyond compliance at VA.gov through community and culture - Ad Hoc

If“accessibility as compliance” is a staircase where outcomes are restricted to the normative limitations of the law, Accessibility Beyond Compliance is an exponential curve. It isn’t limited to fulfilling legal constraints, and we can use it to explore, understand, and b … ⌘ Read more

⤋ Read More

Where Are Screenshots Saved on Mac?
It’s a reasonable question to wonder where screenshots are stored on the Mac, particularly if you’re a Mac user that is taking screenshots who then needs to interact with those screen captures for whatever reason. Maybe you want to send a screenshot file to someone, or maybe you want to work with a particular screenshot … Read MoreRead more

⤋ Read More

Bruno Le Maire tente de faire des zéconomies
Allons bon, zut, flûte, saperlipopette ! Voilà que les choses prennent une tournure embarrassante : alors qu’avec une crânerie que certains n’imaginait possible que pour les cuistres les plus inconscients, le gouvernement français tablait sur une croissance tournant autour de 1,4% pour l’année 2024, Bruno Le Maire s’est dernièrement retrouvé dans un quelconque journal télévisé pour expliquer […] ⌘ Read more

⤋ Read More

在 Golang 中 如何實現 NATS JetStream 隊列
NATS JetStream 是一個高性能、持久化、分佈式消息隊列系統,它爲發佈 / 訂閱、隊列和流式處理提供了豐富的功能。在 Go 中實現 NATS JetStream 隊列可以通過 NATS 客戶端庫來完成。一、NATS JetStream 的歷史NATS JetStream 是 NATS 消息系統的一個重要組件,旨在提供持久性消息傳遞和流處理功能。下面是 NATS JetStream 的歷史 ⌘ Read more

⤋ Read More

程序員必會的任務調度實踐
*1. 延時任務系統介紹延時任務系統 (Delayed Job System) 是一種用於設置任務在將來的某個時刻自動觸發執行的機制。定義:延時任務系統使作業 / 任務能夠在未來的某個預定義時間運行。簡單來說, 就是一種可以設置任務在未來執行的系統。延時任務系統的主要特點是:時間觸發: 根據預設的時間來自動觸發任務執行可靠性: 具備容錯能力, 防止任務丟失擴展性: 可以水平擴展, 提高吞吐量靈活性 ⌘ Read more

⤋ Read More

精心設計的 DNS Failover 策略在 Go 中竟然帶來了反效果,發生了什麼?
本期作者衛智雄嗶哩嗶哩高級運維工程師一. 背景如下配置所示,我們在 /etc/resolv.conf 中配置了兩個 nameserver,其中 server2 在災備機房 ,作爲一種 failover 策略。nameserver server1nameserver server2options timeout:1 attempts:1我們的預期是如果 server1 服務正常,則所有的 DNS 請 ⌘ Read more

⤋ Read More

NVMe-Enabled HiFiBerry-Like Board for Raspberry Pi 5 SBC
The 52Pi NVDAC is a recent addition to the range of hardware accessories designed for the Raspberry Pi 5. This hat board combines NVMe and DAC functionalities, offering a unique integration of storage and audio enhancements for the Raspberry Pi 5. Currently on pre-sale, it is expected to ship within a month. The board includes […] ⌘ Read more

⤋ Read More

Le complexe militaro-industriel de la censure
Billet initialement paru le 17.02.2024 sur X.com Pour les anglophones, il faut écouter cet entretien crucial pour comprendre ce qui se passe actuellement sur internet et la véritable guerre que l’establishment mène contre les peuples au travers de la censure et du contrôle fin de l’information. EP 75 : Le principe de “sécurité nationale” est […] ⌘ Read more

⤋ Read More

How to Automatically Fill SMS Passcodes & Security Codes on iPhone, iPad, Mac
Messages for iPhone, Mac, and iPad all contain a really handy feature that autofills security codes that are sent to you via text message. You know the type, as these text message verification codes are often required for signing into financial institutions or many other things that use it as a method of identity and … [Read More](https://osxdaily.com/2024/02/20/how-to-automatic … ⌘ Read more

⤋ Read More

Wi-Fi HaLow Development Platform is Compatible with OpenWrt
Morse Micro’s MM6108-EKH03 Wi-Fi HaLow Development Platform offers a sophisticated solution for enhancing wireless connectivity in IoT applications. Ideal for diverse uses like smart city infrastructures, long-range access points, and various industrial and commercial scenarios. The Morse Micro MM6108-EKH03 Wi-Fi HaLow Development Platform provides an efficient configuration for easy and rapid evaluation of Wi-Fi HaLow […] ⌘ Read more

⤋ Read More

Go Gin 框架定義路由日誌格式
在本文中,我們將深入探討如何在 Go 語言的 Gin 框架中自定義路由日誌的格式。Gin 是一個高性能的 HTTP web 框架,它提供了一個默認的日誌格式,但在實際的開發環境中,我們可能需要根據特定的業務需求調整日誌輸出的格式。我們將從瞭解 Gin 的默認日誌格式開始,逐步地引導你自定義和擴展路由日誌的輸出方式。文章內容將詳實介紹相關的代碼實現,以確保你能夠在自己的工作中靈活運用。Gin 框架默 ⌘ Read more

⤋ Read More

How to Use 134 New Aerial Wallpapers in MacOS Sonoma
macOS Sonoma arrived with 134 new stunning wallpapers available that you can use to spruce up your Mac desktop background. The giant collection of new wallpapers are themed, with wallpaper options for landscapes, cityscapes, underwater, and Earth from space. Even better, these are not just static, they’re all animated wallpapers, meaning they will briefly move … [Read More](https://osxdaily.com/2024/02/19/how-to-use-134-new-aeri … ⌘ Read more

⤋ Read More

Politique française et parasitologie
Dominique Voynet a récemment servi à nous rappeler que certains politiciens relevaient régulièrement le défi de provoquer des dégâts bien après de leur mandat. Son nom est en effet réapparu alors que des troubles secouent actuellement le département français de Mayotte, dans lequel elle a eu l’occasion de sévir en tant que directrice, jusqu’en 2021, […] ⌘ Read more

⤋ Read More

Go 更強的代碼潔癖,可以把 gofmt 給換了!
大家好,我是煎魚。我們從一開始寫 Go 代碼和應用,就會被各種官方和民間教程,甚至 IDE 教導我們必須配一個 gofmt 工具。他能夠格式化 Go 程序的代碼。會使用製表符表示縮進,空白表示對齊。這解決了程序員屆的老大難問題之一,代碼格式上的規範問題。有效的提高了 Go 代碼的閱讀的友好度和減少了同事間的 ****。非常值得認可。但有時候,還是會看到一些糟心的代碼,總會覺得 gofmt,還是格式 ⌘ Read more

⤋ Read More

Go 中最常用的數據校驗庫
項目地址: github.com/go-playground/validator/v10| 標記 | 標記說明 | 例 || — | — | — || required | 必填 | Field 或 Struct validate:“required” || omitempty | 空時忽略 | Field 或 Struct validate:“omitempty” || len ⌘ Read more

⤋ Read More

Go Gin 框架的模型綁定與驗證詳解
在 Web 開發中,模型綁定和驗證是確保數據完整性和減少安全風險的重要步驟。Go 語言的 Gin 框架提供了強大而靈活的模型綁定和驗證機制,本文將深入講解 Gin 框架中如何進行模型綁定和驗證,以及如何自定義驗證器。在 Gin 框架中,模型綁定通常指將請求的數據(例如 JSON、表單數據)綁定到指定的結構體上,而驗證則是確保綁定後的數據符合我們設置的規則。Gin 框架使用binding標籤來實現模 ⌘ Read more

⤋ Read More

Deals: M1 iPad Air 25% Off at $449, Apple Pencil 2 for $79, & More
Amazon is offering some particularly generous deals on the iPad Air M1 model, taking $150 off the $599 MSRP and bringing the discount price down to just $450. But it gets better, because they’re also offering hefty discounts on the iPad Magic Keyboard, and Apple Pencil, so you can get a full iPad setup for … [Read More](https://osxdaily.com/2024/02/18/deals-m1-ipad-air-25-off-at-449-apple-pencil-2-for-79 … ⌘ Read more

⤋ Read More

Asus Expands Tinker Board 3N Series with 3N Plus and 3N Lite Variants
The Tinker Board 3N is a single-board computer built around the Rockchip RK3568 System-on-Chip which was originally launched last year. Asus has expanded this lineup with two new SBC variants, designed to meet diverse requirements, from advanced computing tasks to basic functionalities. These two variants are powered by the Rockchip RK3568 SoC as in the […] ⌘ Read more

⤋ Read More

3 Ways to Unblock YouTube & Watch Blocked Videos from Any Device
Many networks will block YouTube for any number of reasons; maybe you’re in a region or country where YouTube is not allowed, maybe you’re at a school or institution where YouTube is blocked, maybe censorship is blocking YouTube content, maybe your current network blocks YouTube, or maybe a particular YouTube video is region restricted. Whatever … [Read More](https://osxdaily.com/2024/02/18/3-ways-to-unblock-youtube-w … ⌘ Read more

⤋ Read More

Go 語言版本 1-22 的路由增強功能
Go 1.22 對 net/http包中的路由器進行了兩項增強:方式匹配和通配符。這些特性允許你將常見的路由表示爲模式,而非 Go 代碼。儘管這些功能簡單易解釋和使用,但想選擇成功模式的正確規則(當多個模式匹配一個請求時)依然是個挑戰。我們作出這些改變是爲了持續讓 Go 成爲構建生產系統的優秀語言。我們研究了許多第三方 web 框架,提取出我們認爲最常用的特性,並將它們集成進 net/http。然 ⌘ Read more

⤋ Read More

使用 Gin 框架中的 PureJSON 發送未轉義的 JSON
當我們使用 Go 的 Gin web 框架來構建 RESTful API 時,通常會遇到返回 JSON 響應的需求。Gin 框架提供了c.JSON方法來以 JSON 格式發送回覆,同時它會對特殊字符進行轉義,比如把 < 轉換爲 \u003c。但在某些情況下,我們需要發送未轉義的 JSON 數據,這時我們就可以使用 Gin 框架中的c.PureJSON方法。在 Gin 框架中,c.PureJSON方 ⌘ Read more

⤋ Read More

GO 中高效 int 轉換 string 的方法與源碼剖析
Go 語言 中,將整數(int)轉換爲字符串(string)是一項常見的操作。本文將從逐步介紹幾種在 Go 中將 int 轉換爲 string 的常見方法,並重點剖析這幾種方法在性能上的特點。另外,還會重點介紹 FormatInt 高效的算法實現。使用 strconv.Itoa—————–最直接且常用的方法是使用 strconv 包中的 Itoa 函數。Itoa 是 “Int ⌘ Read more

⤋ Read More

Golang 實現協程池
Go 協程池解決的問題:當需要創建大量的goroutine的時候,如果不限定goroutine的數量,將是對程序的巨大災難 使用完的goroutinue可以複用繼續執行下一個任務(而不是立即銷燬),如果每次都是創建新goroutinue執行任務,頻繁的創建銷燬goroutinue導致利用率低下 項目地址 https://github.com/gofish2020/easygpool 歡 ⌘ Read more

⤋ Read More

(Updated) Banana Pi teases RK3588-powered Single Board Computer with dual 2.5GbE
Banana Pi recently provided details about a new Single Board Computer with Pico ITX form-factor and built around the Rockchip RK3588 quad-core processor, Arm Mali-G610 Graphics Processing Unit and a 6TOPS Neural Processor Unit. This new embedded device joins Banana Pi’s lineup featuring the RK3588 SoC seen in other Banana Pi products like the BPI-W3 […] ⌘ Read more

⤋ Read More

Toybrick TB-RK3588SD Board Blends Raspberry Pi Form-Factor with Rockchip Performance
The Toybrick TB-RK3588SD is a single-board computer tailored for chip debugging, testing, and verification, centering around the high-performing Rockchip RK3588S chip. This board facilitates support for multiple displays and is available with up to 8GB of LPDDR4X RAM. The TB-RK3588SD boasts a small footprint of only 89mm x 57mm and features the following Rockchip System-on-Ch … ⌘ Read more

⤋ Read More

IOL HAT: Enhancing Smart Sensor Integration for Raspberry Pi and Industrial Applications.
Pinetek Networks is set to launch the IOL HAT on Crowdsupply soon, a versatile solution designed for integrating industrial sensors into single-board computer-based projects, such as the Raspberry Pi. This device facilitates data exchange with smart SDCI sensors and actuators, adhering to the IEC 61131-9 standards, commonly referred to as IO-Link. There will be two [… … ⌘ Read more

⤋ Read More

Presentation at Sundsgymnasiet school
I was invited by Mats, a teacher at the Sundsgymnasiet school in
Vellinge, to give a talk to his students, all three years of the
Technical Programme. Sundsgymnasiet is an upper secondary school,
probably what in the US would be called senior highschool, with
students normally starting in the year they turn 16 and finishing
at 19.

I didn’t know what to expect, really. Mats told me I could talk about
whatever I wanted, so of course I talked about … ⌘ Read more

⤋ Read More

Retro: Enjoy the 1993 Easter Egg Video from the Macintosh Quadra 840av Team in Apple
If you’re a fan of Apple history and retro Apple stuff, you’ll probably appreciate this little blast from the past. Sometime in 1993, a small team of young developers at Apple built the Macintosh Quadra 840AV and Centris 660AV, and upon completion of their project, filmed a little celebration video, where they toast to their … [Read More](https://osxdaily.com/2024/02 … ⌘ Read more

⤋ Read More

How to Collaborate on Playlists with Spotify
Spotify is a fantastic music streaming platform that is widely used by many people around the world. Collaborating on music playlists with friends, family, coworkers, and loved ones, is a fun feature that is included with Spotify. But, like so many features of apps and operating systems these days that are hidden behind things that … Read MoreRead more

⤋ Read More

Une extension galopante du domaine de la censure
La Macronie panique et l’extrême-centre, devenant totalitaire, a visiblement les mains moites. Cette semaine, ils ont mis les bouchées doubles pour enfin faire taire la dissidence. Il était temps : un peu plus, et les gens allaient s’exprimer librement ! D’un côté, l’Assemblée a voté mercredi la nouvelle loi de lutte contre les sectes et, notamment, son […] ⌘ Read more

⤋ Read More