Latest Articles
How to Run Parallel Coroutines in Kotlin
OverviewWe can think about Kotlin coroutines as lightweight threads. They allow us to execute code concurrently and are less resource-consuming than threads. Using coroutines can improve the performance, responsiveness, and scalability of our applications.In this tutorial, we’ll explore different wa
...
More >>
2024-01-12
Kotlin
/
Lightweight Threads
Kubernetes Network
Kubernetes NetworkIn this article, we’ll give you an in-depth look at the networking and monitoring capabilities provided by Kubernetes to prepare you for rolling out your application into a production environment with open network services and good visibility.
Kubernetes networking featuresKubernet
...
More >>
2024-01-03
Kubernetes
/
Network
OPEN AI Learning
OPEN AIOfficial Site (Most Useful Tool)
https://openai.com/product#made-for-developersPricing
https://openai.com/pricingQuick Start
1234567891011Install$ pip install openaiAPI Keyimport osimport openai# Load your API key from an environment variable or secret management serviceopenai.api_key = os
...
More >>
Android YUV Frame Data Overlays Watermark
When we want to add a watermark to a video while recording it, there are two options:
A. The video frame data is converted to Bitmap, watermark is drawn on bitmap, and then the watermarked Bitmap is converted to frame dataThis scheme can achieve watermark addition, although the use of RenderScript i
...
More >>
MySQL Slow Query
What is SQL slow query?When we execute a sql, the database not only returns the execution result, but also returns the execution time of the sql. MySQL slow queries refer to queries whose execution time exceeds the threshold (the default value is 10 seconds). These slow queries will be recorded as s
...
More >>
2023-12-12
Back End
/
MySQL
Android Implements Screenshot Function
Background of the projectIn order to meet the needs of monitoring user screenshots and displaying the floating feedback portal, we conducted a simple survey on the user screenshot function on the Android side. Since the Android system does not provide APIs related to screen capture notifications, we
...
More >>
2023-12-04
Android
/
Screenshot
Android Activity Components
Android Activity Components
Introduction: One of the four major components of Android, the medium for interaction between App and users.
Activity Lifecycle
In general the movement through an activity’s lifecycle looks like this:1.onCreate()
Called when the activity is first created. This is where
...
More >>
Why Does ChatGPT Use SSE to Push Data
As we all know, there are many AI chat software on the market, most of which use SSE to push messages, and ChatGPT is no exception. Everyone knows that WebSocket can communicate in two directions, and naturally it can also push messages from the server to the client. SSE only pushes messages in one
...
More >>
Adapter
DefinitionAdapter is a structural design pattern that allows objects with incompatible interfaces to collaborate.
ProblemImagine that you’re creating a stock market monitoring app. The app downloads the stock data from multiple sources in XML format and then displays nice-looking charts and diagram
...
More >>
2023-11-02
Adapter
/
Design Pattern
Using ShardingSphere for Sharding Databases and Tables
1. What is ShardingSphereShardingSphere is an open source distributed database middleware solution that provides database sharding, database replication, and distributed transaction support for various database management systems. It aims to help achieve horizontal scalability and data distribution
...
More >>
2023-10-26
Database
/
Back End