Article Archives for `2023`
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
Sub-Databases and Sub-Tables in Database Architecture
1. What is sub-database and sub-table?
Table splitting: Split the data in one table into multiple tables according to certain rules, reduce lock granularity and index trees, and improve data query efficiency.
Split database: Split the data in one database into multiple databases according to certain
...
More >>
2023-10-19
Database
/
Back End
The Java HashMap Under the Hood
OverviewHashMap is a K/V key-value pair data structure with fast search and good insertion and deletion performance. It is implemented based on the Map interface of the hash table. It is one of the commonly used Java collections and is non-thread safe.
Data StructureJDK1.7
The bottom layer uses
...
More >>
MySQL Connection Ramble
In PHP and MySQL, there are different ways to manage database connections. These include short connections, long connections, and connection pooling.
1.Short connectionsShort connections refer to connecting to the database only when necessary and disconnecting immediately after the query is executed
...
More >>
2023-10-07
Back End
/
MySQL
Introduction to Cross-Border Payment System Design
With increasing global trade and financial interactions, cross-border payment systems have become critical. Not only do these systems need to handle transactions between different countries and currencies, they must also address the various regulatory, currency conversion and security challenges inv
...
More >>
2023-09-28
Back End
/
Design Principles
Android Fingerprint Recognition
General overviewAt the time of Android6.0 (Api23), the Android system added the api interface of fingerprint recognition, namely FingerprintManager, which defined the most basic fingerprint recognition interface. However, at the time of AndroidP (Api28), it was no longer officially recommended, and
...
More >>
2023-09-20
Android
/
Fingerprint Recognition
Understanding Kafka: A High-Level Overview
IntroductionApache Kafka is a distributed messaging system that has become an integral part of modern data processing pipelines. It is designed to handle real-time, high-throughput, and fault-tolerant data streaming. Kafka is widely used for ingesting, storing, and processing data in various applica
...
More >>
2023-09-12
Back End
/
Kafka
A High Reliability Task Execution Framework Based on XXL-JOB
What is a Task Scheduling FrameworkIn many applications, some tasks need to be performed periodically, such as generating reports, backing up data, updating caches, and so on. These tasks usually need to be executed automatically within a specified time interval, and need to run stably and reliably,
...
More >>
Understanding and Implementing Kotlin Coroutines
1. Concept of Kotlin CoroutinesKotlin Coroutines is a well-designed thread framework that uses threads at the underlying level. Coroutines can be understood as tasks executed on threads, and these tasks can switch between different threads. A single thread can run multiple coroutines, and coroutines
...
More >>
A Brief Discussion on API Design and Its Security
When it comes to API design and security, there are two main issues that must be addressed. If not handled properly, they can pose significant threats to the security and performance of the server.Based on my experience, API design primarily needs to consider the following two aspects:
Preventing m
...
More >>
2023-08-22
Security
/
API communication
Intelligent Speech Technology
1.NLP(Natural Language Processing)Natural language processing is an important direction in the field of computer science and artificial intelligence. It studies theories and methods that enable effective communication between humans and computers in natural language. Natural language processing is a
...
More >>
2023-08-14
Speech
/
Recognition
/
Model
How to Quickly Perform Interface Testing Under Microservices
Generally speaking, development engineers have defined microservice interfaces in the early stage of development, and test engineers and development engineers start their own development tasks almost simultaneously. However, this harmonious work scenario is soon destroyed by the spider web-like micr
...
More >>
2023-08-08
microservices
/
Back End
Master These 16 Essential Coding Habits for Increased Efficiency
IntroductionThis article provides a comprehensive compilation of 16 essential coding practices that the author deems are indispensable for enhancing work efficiency
1. After modifying the code, remember to test it“Test the code after modification” is a basic requirement for every programmer. Don’t h
...
More >>
2023-08-02
Back End
/
Coding
/
Efficiency
Why Does MySQL Sometimes Choose the Wrong Index?
After the table is indexed, sql can select the right index when the amount of data is small, but when the amount of data becomes large, it cannot select the correct index. We analyze the reasons for mysql’s wrong index selection from the following aspects.
Impact the execution of sql cost analysis
A
...
More >>
2023-07-26
Back End
/
Mysql
Mysql Online DDL
About Online DDLDDL(Data Definition Language), that is, the data definition language, including new table, table add fields, change fields and other operations.Large table DDL at will execute dozens of minutes, even a few hours, such a long time to lock the table for the business is obviously unacce
...
More >>
2023-07-17
Back End
/
Mysql
CAP Theorem
The CAP theorem is a common criterion used by engineers to measure the design of distributed systems. The CAP theorem holds that a network-based data sharing system can only satisfy at most two of the three elements of data consistency, availability, and partition tolerance; during the system design
...
More >>
2023-07-11
Back End
/
CAP
Redis Big Key Problem: Causes, Impacts, and Solutions
1. What is the Redis big key problem?The Redis big key problem refers to a situation where a key in Redis has a value that consumes a significant amount of memory, leading to performance degradation, insufficient memory, data imbalance, and delayed master-slave synchronization, among other issues.Wh
...
More >>
2023-07-03
Redis
/
Back End
/
key
Android Custom Gradle Plugin Statistics Task Time-Consuming
1. forewordWhen we use Gradle to build tasks, we sometimes want to count the time consumption of each task, so as to find out the running time of each task and whether there is room for optimization.
train of thought1.Custom Gradle plugins2.Use Listener to monitor3.Register Listener in custom Gradle
...
More >>
2023-06-26
Listener
/
Android
/
Gradle
How Is an SQL Query Statement Executed?
Overview of mysql infrastructureMySQL can be divided into two parts: the server layer and the storage engine layer.
The Server layer includes connectors, query caches, analyzers, optimizers, executors, etc., including most of MySQL’s core service functions, as well as all built-in functions (such as
...
More >>
2023-06-19
Back End
/
MySQL
What is cross-site scripting (XSS)
1.What is cross-site scripting (XSS)(1)conceptCross-site scripting (also known as XSS) is a web security vulnerability that allows an attacker to compromise the interactions that users have with a vulnerable application. It allows an attacker to circumvent the same origin policy, which is designed t
...
More >>
2023-06-05
Front-end
/
XSS
/
secure
What are WebSockets?
What are WebSockets?The WebSocket protocol was born in 2008 and became an international standard in 2011. All browsers already support it.
WebSockets are a bi-directional, full duplex communications protocol initiated over HTTP. They are commonly used in modern web applications for streaming data an
...
More >>
2023-05-29
HTTP
/
Front-end
/
WebSocket
Unit test
Abstract: Unit testing is the basis of software testing. This article discusses in detail the two steps of unit testing, manual static inspection and dynamic execution, the work items to be executed and related strategies and methods.How to conduct unit testing with white box testing method, keyword
...
More >>
Mechanism difference between ios and Android
1. ArchitectureiOS:
cocoa Touch layer: including Foundation Framework, UIkit Framework, Address Book UI Framework
Media layer: including image, audio, and video technologies
Core service layer: For example, CoreFoundationframework is an interface set based on C language, providing
Basic data ma
...
More >>
2023-05-19
QA
/
Android
/
ios
/
operation mechanism
Front-end JS basic knowledge point combing (a) the basic chapter
IntroductionI believe there are a lot of people like me are halfway front-end development, when it is to find a training institution to train a four or five months out to find a job, so the basic part of the front-end Js mastery is very weak, although the work is found, but in the daily work of many
...
More >>
2023-05-09
Front-end
/
basic
/
variable
/
Data type
Front-end to get battery information
Today's positive energy: When strange needs are made more and more, it proves that your vision is also becoming broad.
Product Manager: Add a requirement that if a user's computer device is running out of power, I have to warmly tell him it's time to plug it in.
Front-end Atta
...
More >>
Common Design Patterns and Their Applications
Design patterns are recurring solutions to common software design problems. They are generally considered to be the best practices for solving common software design challenges. In this article, we will introduce ten common design patterns and their applications.
Chain of ResponsibilityThe Chain of
...
More >>
Database introduction
1. Concept introductionThe database is a warehouse for storing data. It organizes, manages and stores data according to the data structure, and provides the functions of adding, deleting, modifying and checking.
2. database things(1) What is a database transactionTreat a group of additions, deletion
...
More >>
2023-04-21
QA
/
things
/
Relational
/
Mysql engines
Android implementation of screenshot function (already adapted to Android 11)
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-04-13
screenshot
/
Listener
/
image
Front End Frontier
As the Internet continues to grow and become more popular, front-end technologies are evolving to bring a better experience to users.
1.WebAssembly
WebAssembly (abbreviated as WASM) is an emerging technology that allows you to run high-performance programming languages such as C++, Rust, etc.
...
More >>
Using Netty, understand its connection idle handling
Connection Idle
An idle network connection means that the current network connection is idle, i.e., there is no ongoing data transfer or communication activity. When one of our connections is no longer sending requests or receiving responses, that connection begins to be idle.
The long
...
More >>
2023-03-30
Netty
/
handler
/
ReadTimeoutHandler
/
WriteTimeoutHandler
Basic knowledge of meta in HTML
When writing a front-end page, the page structure is usually quickly generated by the editor. There is a meta tag in the page header. What does this tag do?
In MDN he defines it like this:
The <meta> HTML element represents metadata that cannot be represented by other HTML meta-related elemen
...
More >>
2023-03-23
HTML
/
meta
/
name
/
http-equiv
The latest MongoDB specification in 2023
prefaceMongoDB is a typical representative of non-relational databases. According to DB-Engines Ranking data, in recent years, MongoDB has always been the leader in the NoSQL field. MongoDB is a database system designed for the rapid development of Internet applications. Its data model and persisten
...
More >>
2023-03-08
Database
/
MongoDB
/
specification
/
rules
What is an event loop in JavaScript ?
What is an event loop in JavaScript ?Synchronize and AsynchronousSynchronize:Execute in orderAsynchronous:Execute a part first, wait for the result and then execute the subsequent code
1.setTimeout
2.Ajax
3.IO
After the synchronous program is executed, execute the asynchronous program
Single Threa
...
More >>
2023-02-27
JavaScript
/
Event Loop
/
Promise
Internet of Things: Bubble or Technology Revolution?
At that time there was a cartoon about several beggars in New York begging, people passing by from time to time to give them some coins. One of the clever beggar is different, he hung a sign on his chest, which simply wrote “.com”, and he received is actually a cash check after another.
Burning mone
...
More >>
2023-02-23
Internet of Things
/
Technological Revolution
Test the novice compass
Test the novice compassHello everyone, here is a brief introduction to what newcomers should do to improve their level in today’s testing industry. The overall test is divided into two directions: business and technology. talk about these two directions
Do functional testing
Test cases, this is an e
...
More >>
2023-02-21
QA
/
Technical Testing
/
Performance Testing
Layoffs in silicon valley
layoffs in silicon valleyIn the world Internet market,Microsoft, Google, Amazon, and Apple are the four giants of the Internet,Just recently, Microsoft and Amazon have launched their own layoff plans,Google can’t hold back, In the middle of the night, it suddenly announced the layoff of 12,000 peopl
...
More >>
2023-02-13
Layoffs
/
Silicon valley
/
Google
How to Make Your Application Highly Cohesive and Lowly Coupled?
Preface
I recently reviewed the company's code and found that the degree of code coupling is particularly high, modifying a place, unknowingly affect the other places, which made me think about how to make the code we write cohesive enough to reduce coupling?
"Highly cohesive and loosely
...
More >>
2023-02-07
Highly Cohesive
/
Lowly Coupled
/
Design Idea
ChatGPT becomes a powerful tool for hackers to write malware!
Since the launch of ChatGPT, it has generated a lot of attention in tech circles, but there are also many researchers who are concerned that generative AI, while popularizing AI, will also popularize cybercrime.
This fear is not without merit, and in some hacker forums, security researchers have obs
...
More >>
2023-02-03
Back End
/
ChatGPT
/
AI
/
Python
From registers to user state and kernel state
Key words: register, ring0, ring3, kernel state, user state
The register is an important part inside the CPU. The register is composed of N flip-flops inside, and each flip-flop can save 1 bit of binary number, so the 16-bit register can save 16 bits.
CPU generally has multiple registe
...
More >>
2023-01-20
User State
/
Kernel State
/
Register
Web Performance Optimization - Performance Metrics
In the past, most tools only used loading performance as a web performance metric, but poor performance can happen at any time, not just during loading. Applications that don't respond quickly to clicks, don't scroll smoothly, or have stuttering animations can all lead to a poor experience. Users ca
...
More >>
2023-01-18
Performance
/
Front End
/
DOM
/
Browser
In-depth Understanding of Redis Data Structures - Dictionaries
A dictionary, also known as a symbolic table, associative array, or mapping, is an abstract data structure used to hold key-value pairs. In a dictionary, a key can be associated with a value, and these associated keys and values are called key-value pairs. The keys in a key-value pair are unique, a
...
More >>
2023-01-12
Redis
/
Technology
/
Hash
/
Map
FluentD vs FluentBit - Which log collector to choose?
Tools like Fluentbit and Fluentd make log management more efficient by centralizing log data from multiple sources and providing the ability to monitor and analyze it all in one place.
Log management is the practice of collecting, storing, analyzing, and monitoring log data from various
...
More >>
2023-01-06
OPS
/
FluentBit
/
FluentD