ALL


  Understand GoLang WaitGroup internals and how it works

BackgroundBefore getting into the main content, let me give a brief introduction to WaitGroup and its related background knowledge. Here, the focus is on the basic usage of WaitGroup and the fundamental knowledge of system semaphores. For those who are familiar with these, you can skip this section directly.WaitGroupWaitGroup is one of the most common concurrency control techniques in Golang, and its function can be roughly compared to the join() in concurrency control of other languages' multithreading. The sample code is as follows:package mainimport ( "fmt" "sync" "time")func main(...

2,431 0       SOURCE CODE GOLANG WAITGROUP


  Mastering a New Programming Language: A Professional Guide

IntroductionLearning a new programming language can seem daunting, but with the right approach, anyone can become proficient in a new language. Whether you're a beginner or an experienced programmer, mastering a new language can open up new opportunities in your career and enable you to tackle new and exciting programming challenges. In this guide, we'll provide you with a step-by-step process for mastering a new programming language.Step 1: Choose a Language and Set GoalsThe first step in mastering a new programming language is to choose a language that aligns with your career goals and inter...

707 0       PROGRAMMING TIPS GUIDE


  Mastering Go Channels: How to Build Concurrent Applications Like a Pro

IntroductionIn the world of concurrent programming, Go channels have quickly become a popular tool for building fast and efficient applications. Utilizing channels can help you take full advantage of the power of Go's lightweight threads, or goroutines, and enable you to easily and effectively manage data sharing and synchronization. In this article, we'll dive deep into the world of Go channels and show you how to build concurrent applications like a pro.Understanding Go ChannelsTo start, let's take a closer look at what Go channels are and how they work. In Go, channels are a way to communic...

701 0       CONCURRENCY GOLANG CHANNEL


  GitHub Copilot may generate code containing GPL code

GitHub Copilot is a new AI-powered code completion tool that can generate code snippets from natural language descriptions. It is powered by OpenAI Codex, a deep learning system that has been trained on billions of lines of public code. GitHub Copilot claims to be a “copilot, not a pilot”, meaning that it is not intended to write code for you, but rather to help you write code faster and better.However, some developers have raised concerns about the legal and ethical implications of using GitHub Copilot. One of the main issues is that GitHub Copilot may emit code that is derived fr...

7,523 0       GITHUB COPILOT GPL


  How to Convert Images on Mac Finder

If you have a lot of images in different formats and you want to convert them to a common format, you can use the Mac Finder to do it easily and quickly. Here are the steps to follow:1. Open the Finder and navigate to the folder where your images are stored.2. Select the images that you want to convert. You can use the Shift key or the Command key to select multiple images at once.3. Right-click on the selected images and choose Services > Preview from the context menu. This will open the Preview app with all the selected images.4. In the Preview app, go to File > Export Selected Images....

642 0       MACOS FINDER IMAGE CONVERSION


  JavaScript's New Features: Exploring the Latest Additions to the Language

As the web continues to evolve, so too does the JavaScript ecosystem. With the release of ECMAScript 2023 (ES2023), JavaScript developers can now leverage a range of new features that promise to improve code quality, readability, and maintainability. In this blog post, we'll dive into some of ES2023's most exciting additions and provide practical examples of how they can be used in your projects.1. Private Fields and Methods in ClassesOne of the most anticipated features in ES2023 is the introduction of private fields and methods in classes. These enable developers to encapsulate internal clas...

1,261 0       JAVASCRIPT ES2023


  Why (offset, limit) is slow in database select?

Starting from a problemFive years ago when I was working at Tencent, I found that MySQL request speed was very slow in the pagination scenario. With only 100,000 data, a select query on a single machine took about 2-3 seconds. I asked my mentor why, and he asked in return, "In an indexing scenario, what is the time complexity to get the nth largest number in MySQL?"The pursuit of the answerConfirming the scenarioAssuming there is an index on the "status" column, a query like "select * from table where status = xx limit 10 offset 10000" will be very slow. Even with a small amount of data, there...

3,355 0       MYSQL SLOW LIMIT OFFSET


  Nokia is still alive and lives a good life indeed

1Do you believe that Nokia, which you thought had gone bankrupt, not only survived but is still one of the world's most profitable technology companies, making trillions of dollars in profit every year?In 2022, Nokia's annual revenue reached 24.9 billion euros. Its net profit of 4.25 billion euros also hit a new high in nearly a decade. Moreover, as early as 2017, it quietly returned to the Fortune Global 500.In the telecommunications field, it is the world's third-largest telecommunications equipment manufacturer, second only to Huawei and Ericsson. In terms of 5G, its number of patents ranks...

2,491 0       NOKIA APPLE 5G