Searching txt.sour.is

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

Go 處理二進制文件這麼簡單
*1. 概述1.1 爲什麼學習二進制文件讀寫Go 語言內置了豐富的文件操作函數,可以很方便地處理文本文件。但對於音視頻、圖像等二進制文件,文本文件函數就不太適用了。學習 Go 語言的二進制文件讀寫操作,可以更高效地處理這些非文本文件,在實際項目中也很常用。1.2 Go 語言處理二進制文件的優勢Go 語言處理二進制文件具有以下優勢 1. 性能高,讀寫速度快 2. 支持跨平臺,代碼可以在多 ⌘ Read more

⤋ Read More

在 golang 中如何實現 WebSocket 的雙向通信
在 Go 語言中實現 WebSocket 的雙向通信通常需要使用第三方庫,其中 gorilla/websocket 是一個非常流行和廣泛使用的庫。以下是實現 WebSocket 雙向通信的步驟和簡單示例代碼:1 安裝 gorilla/websocket 庫:go get github.com/gorilla/websocket2 編寫 WebSocket 服務器:package mainimpor ⌘ Read more

⤋ Read More

將 go 代碼打包成 docker 鏡像
概述–在本教程中,你將生成一個容器映像。該映像包括運行應用程序所需的一切:編譯的應用程序二進制文件、運行時、庫以及應用程序所需的所有其他資源。前置條件—-若要完成本教程,需要滿足以下條件:golang 1.19+ 本地安裝了 docker Git 客戶端 程序–該應用程序提供兩個 HTTP endpoint:/ 返回符號 < 3 /health 返回 {“Statu ⌘ Read more

⤋ Read More

iOS 16.7.4 and iPadOS 16.7.4 Released for Older iPhone & iPad Models
Apple has released iOS 16.7.4 for older iPhone and iPadOS 16.7.4 for older iPad models that are not updating to iOS 17.2.1 or iPadOS 17.2.1. Specifically, iOS 16.7.4 and iPadOS 16.7.4 are available for iPhone 8, iPhone 8 Plus, iPhone X, iPad 5th generation, iPad Pro 9.7-inch, and iPad Pro 12.9-inch 1st generation. The software … [Read More](https://osxdaily.com/2023/12/20/ios-16-7-4-and-ipados- … ⌘ Read more

⤋ Read More

Gob 實踐全攻略,數據傳輸利器
*1. Gob 簡介1.1 Gob 概述Gob(Go binary)是 Go 語言中用於序列化和反序列化數據的編碼庫。它是 Go 語言的標準庫之一,專門設計用於在 Go 程序之間高效地傳輸數據。Gob 可以將複雜的數據結構編碼成二進制格式,便於在不同系統之間傳遞,並支持版本控制和演進。1.2 爲什麼選擇 GobGob 相比其他序列化格式(如 JSON、XML)具有更高的性能和更小的數據體積。它是專 ⌘ Read more

⤋ Read More

MacOS Sonoma 14.2.1 Update Released with Bug Fixes
Apple has released macOS Sonoma 14.2.1 as a software update for Mac users running the Sonoma operating system. The update is said to include important bug fixes and security updates, and is therefore recommended for all users to install. Separately, Apple has released iOS 17.2.1 for iPhone, iPadOS 17.2.1 for iPad, iOS 16.7.4 and iPadOS … Read MoreRead more

⤋ Read More

iOS 17.2.1 & iPadOS 17.2.1 Updates Released for iPhone & iPad with Bug Fixes
Apple has released iOS 17.2.1 for iPhone, and iPadOS 17.2.1 for iPad. The small point release updates are said to include important but unspecific bug fixes for those devices, and is therefore recommended for all users to install. Separately, Apple also released a similar update for Mac as macOS Sonoma 14.2.1, and for older iPhone … [Read More](https://osxdaily.com/2023/12/19 … ⌘ Read more

⤋ Read More

每個 Go 程序員必犯之錯
說起每個程序員必犯的錯誤,那還得是 “循環變量” 這個錯誤了,就連 Go 的開發者都犯過這個錯誤,這個錯誤在 Go 的 FAQ 中也有提到 What happens with closures running as goroutines?[1]:func main() {    var wg sync.WaitGroup    values := []string{“a”, ”b”, ”c”} ⌘ Read more

⤋ Read More

«М.Видео-Эльдорадо»: продажи игровых консолей увеличились в два раза по сравнению с 2022 годом
За 11 месяцев 2023-го продали больше 1 миллиона устройств.

Image

Read more

⤋ Read More

Today’s Advent of Code puzzle was rather easy (luckily), so I spent the day doing two other things:

  • Explore VGA a bit: How to draw pixels on DOS all by yourself without a library in graphics mode 12h?
  • Explose XMS a bit: How can I use more than 640 kB / 1 MB on DOS?

Both are … quite awkward. 😬 For VGA, I’ll stick to using the Borland Graphics Interface for now. Mode 13h is great, all pixels are directly addressable – but it’s only 320x200. Mode 12h (640 x 480 with 16 colors) is pretty horrible to use with all the planes and what not.

As per this spec, I’ve written a small XMS example that uses 32 MB of memory:

https://movq.de/v/9ed329b401/xms.c

It works, but it appears the only way to make use of this memory is to copy data back and forth between conventional memory and extended memory. I don’t know how useful that is going to be. 🤔 But at least I know how it works now.

Image

⤋ Read More

Isode: Red/Black – 2.1 New Capabilities

Overview

This release adds important new functionality and adds further device drivers to Red/Black, a management tool that allows you to monitor and control devices and servers across a network, with a particular focus on HF Radio Systems.  A general summary is given in the white paper Red/Black Overview.

![](https://www.isode.com/company/wordpress/wp-content/uploads/2023/12/red-black-bla … ⌘ Read more

⤋ Read More

Beta 1 of iOS 17.3, iPadOS 17.3, macOS Sonoma 14.3 Available for Testing
Apple has issued the first beta versions of iOS 17.3 for iPhone, ipadOS 17.3 for iPad, and macOS Sonoma 14.3 for Mac. The beta builds are available now to users enrolled in the beta testing programs on their compatible devices. iOS 17.3 will introduce a new feature called Stolen Device Protection which aims to help … [Read More](https://osxdaily.com/2023/12/12/beta-1-of-ios-17-3-ipados-17-3- … ⌘ Read more

⤋ Read More

Go 語言控制協程 -goroutine- 的併發數量,有哪些好的解決方法
在使用協程併發處理某些任務時, 其併發數量往往因爲各種因素的限制不能無限的增大. 例如網絡請求、數據庫查詢等等。從運行效率角度考慮,在相關服務可以負載的前提下(限制最大併發數),儘可能高的併發。在 Go 語言中,可以使用一些方法來控制協程(goroutine)的併發數量,以防止併發過多導致資源耗盡或性能下降。以下是一些常見的方法:1. 使用信號量(Semaphore):可以使用 Go 語言中的 c ⌘ Read more

⤋ Read More

老外總結的 14 條 Go 接口最佳實踐,有些不一樣
最近幾個月,沒事喜歡看看老外寫的技術文章,發現他們的一些思考維度真的有些不太一樣。當然,他們寫的文章大多數沒有國內的那麼卷。今天這篇文章是關於 Go 語言中接口設計的一些最佳實踐,與 Java 等語言不盡相似,但又帶着 Go 語言的特色,可以對照學習,拓展編程思想層面的認知面。以下是在 Go 中使用接口的一些最佳實踐:1、優先小接口:接口是 Go 中的強大工具,但要保持它們小巧並專注於特定任務。這 ⌘ Read more

⤋ Read More

2023 年 Go 併發庫的變化
2023 年來, Go 的併發庫又有了一些變化,這篇文章是對這些變化的綜述。小細節的變化,比如 typo、文檔變化等無關大局的變化就不介紹了。sync.Once———Go 1.21.0 中增加了和 Once 相關的三個函數,便於 Once 的使用。func OnceFunc(f func()) func()func OnceValueT any T) func() Tfunc Once ⌘ Read more

⤋ Read More

В патче 2.1 для Cyberpunk 2077 Ви сможет приглашать своих партнёров в квартиру для совместного времяпрепровождения
Романтические отношения с персонажами станут более реалистичными.

Image

Read more

⤋ Read More
In-reply-to » Day 2, Part 1 and Day 2, Part 2 of #AdvenOfCode all done and dusted 😅

@xuu@txt.sour.is Ah, you went with the “scanning” approach as well. I did that, too.

It’s quite surprising to see (imho) how many people on reddit started substituting strings (one becomes 1 etc.). That makes the puzzle much harder by introducing nasty corner cases.

(Maybe I was just lucky this time to pick the correct approach right from the start. 🤣 Or maybe it’s a bit of experience from doing past AoC events …)

⤋ Read More

Esta mini-ficção em formato de artigo da Wikipédia delicia-me sempre que a volto a encontrar

MMAcevedo (Mnemonic Map/Acevedo), also known as Miguel, is the earliest executable image of a human brain. It is a snapshot of the living brain of neurology graduate Miguel Acevedo Álvarez (2010–2073), taken by researchers at the Uplift Laboratory at the University of New Mexico on August 1, 2031.

https://qntm.org/mmacevedo

⤋ Read More

TCP 基礎詳解:Telnet 迴音服務器搭建
*概述Telnet 迴音服務器是一個簡單而實用的網絡應用,通過 Telnet 協議連接,用戶輸入什麼,服務器就回顯什麼。本文將介紹如何使用 Go 語言創建一個 Telnet 迴音服務器,通過完整的示例代碼和詳細註釋,便於理解 TCP 服務器的基本結構和實現。1. TCP 服務器基礎TCP 協議簡介package mainimport (“fmt”“net”)func main() { liste ⌘ Read more

⤋ Read More

В студии Larian заявили, что Baldur‘s Gate 3 прошло более 1,3 миллиона игроков
О продажах игры после её выхода из раннего доступа разработчики пока не говорят.

Image

Read more

⤋ Read More

iOS 17.1.2 & iPadOS 17.1.2 Released for iPhone & iPad with Security Fixes
iOS 17.1.2 has been released for iPhone users, along with iPadOS 17.1.2 for iPad. The small software update includes security fixes and is recommended for all users to install onto their eligible devices. It is unclear if any bug fixes are included in the release, as none are mentioned in the release notes, which are … [Read More](https://osxdaily.com/2023/11/30/ios-17-1-2-ipados-1 … ⌘ Read more

⤋ Read More

MacOS Sonoma 14.1.2 Update Released with Security Fixes
macOS Sonoma 14.1.2 update has been released for Mac users running the Sonoma operating system. The software update includes unspecified bug fixes and security enhancements, and is recommended for all Mac users running Sonoma to install. Full release notes are included below. Separately, Apple has also released iOS 17.1.2 update for iPhone, and iPadOS 17.1.2 … [Read More](https://osxdaily.com/2023/11/30/macos-sonoma-14-1-2 … ⌘ Read more

⤋ Read More

Go 淺析主流日誌庫:從設計層學習如何集成日誌輪轉與切割功能
前言在現有的日誌庫中,包括 go 1.21.0 引入的 slog 日誌庫,它們通常都支持對日誌文件進行輪轉與切割,只不過這些功能並不直接被內置,而是需要我們主動配置來啓用。本文將探討幾個熱門的日誌庫如 logrus、zap 和官網的 slog,我將分析這些庫的的關鍵設計元素,探討它們是如何支持日誌輪轉與切割功能的配置。 淺析 logrus、zap 和 slog 的設計在對 logrus、zap 和 ⌘ Read more

⤋ Read More

Go 打造高效的聊天系統
*概述構建一個高效的 Go 語言聊天服務器是一個具有挑戰性而又令人興奮的任務。本文將通過示例代碼和註釋,逐步實現一個功能強大的 Go 語言聊天服務器。通過清晰的項目結構和合理的邏輯劃分,將能夠理解服務器的設計和實現。1. 項目規劃與結構設計1.1 項目規劃在開始構建聊天服務器之前,需要進行項目規劃。明確通信協議、確定服務器功能和定義用戶管理方式是關鍵步驟。1.2 結構設計設計一個清晰的結構是確保項 ⌘ Read more

⤋ Read More

Go 語言 CSP 編程實戰:通道通信技術
*概述通信順序進程(Communicating Sequential Processes,CSP)是一種併發編程的形式化理論,由計算機科學家 Tony Hoare 於 1978 年提出。在 Go 語言中,CSP 被廣泛應用,通過通道(Channel)實現了簡單且強大的併發模型。本文將介紹 Go 語言中的 CSP 概念,通過詳細的示例代碼和註釋,理解 CSP 的運作原理和在 Go 中的實現。1. C ⌘ Read more

⤋ Read More

Go 排序算法探祕:打造通用 qsort 函數
*概述快速排序(QuickSort)是一種經典的排序算法,其高效性和廣泛應用使之成爲計算機科學領域的瑰寶。本文將介紹如何在 Go 語言中封裝快速排序函數,使其更易用、更具通用性,並通過示例和代碼解釋,讓讀者深入瞭解其原理和實現。1. 快速排序算法簡介1.1 算法原理快速排序是一種分治策略的排序算法,基本思想是通過選定一個基準元素。將序列分爲兩部分,小於基準的元素放在左邊,大於基準的元素放在右邊,然 ⌘ Read more

⤋ Read More

3 Helpful Tech Ideas for Your Thanksgiving Visits
It’s not unusual for those of us who are the “family geek” to spend time with less tech savvy people during the holidays, so why not use Thanksgiving as an opportunity to assist or improve the tech lives of loved ones? Express your thankfulness and gratitude with some helpful tech tips! 1: Setup, Explain, & … Read MoreRead more

⤋ Read More

Ignite Realtime Blog: External Service Discovery plugin 1.0.2 released!
Version 1.0.2 of the External Service Discovery plugin has been released!

This Openfire plugin allows your users to use external STUN and TURN services, optionally making use of temporary credentials for those services. It often is a prerequisite for being able to set up audio or video calls with Openfire.

This version brings better compatibility with TURN services other than those implemented by CoTur … ⌘ Read more

⤋ Read More

Ignite Realtime Blog: REST API Openfire plugin 1.10.2 released!
Earlier today, we have have performed a maintenance release for the REST API plugin for Openfire. In this release, version 1.10.2, we have made a warning in documentation more visible. This is aimed at reducing confusion around installation with Openfire 4.7.5.

Also in this release a translation into Ukrainian, gracefully provided by community member Yurii Savchuk (svais) and his son Vladislav Savchuk (Bruhmozavr)!

Th … ⌘ Read more

⤋ Read More