👋 Welcome to my blog site!
- Writing, coding, and living at my own pace.
- 写作、编程、以自己的节奏生活。
- A quiet corner of the web for ideas and growth.
- 在这片安静的网络角落,记录思想与成长。
👋 Welcome to my blog site!
This is just a design proposal for a permission system; it does not contain any code. Overview What is Bitwise operations? Bitwise operations are calculations performed on binary bits, but do not include mathematical operations such as addition, subtraction, multiplication, and division. Common bitwise operations include AND (&), OR (|), NOT (~), XOR (^), left shift («), and right shift (»). AND: As the name suggests, 1001 & 1010 => 1000. The result is 1 only if both corresponding bits in the binary representation are 1. ...
First of all, this is just a tutorial, there is no complete code. Overview What is the NFC M1 card? The NFC M1 is a passive RFID/NFC card produced by NXP Semiconductors. It has 1 KB of storage, divided into 16 sectors. It operates at 13.56 MHz (High Frequency), which is the standard frequency for NFC. It follows the ISO/IEC 14443-A(Type-A) protocol. For example diagram: Read Card How to read card in Android? First, you should have a android phone of NFC function. You must be enable NFC in your android phone. A empty or useless card. Let’s write code. AndroidManifest.xml Request permissions <uses-permission android:name="android.permission.NFC" /> <uses-feature android:name="android.hardware.nfc" android:required="true" /> MainActivity.kt Define a NFC adapter: private var nfcAdapter: NfcAdapter? = null, NfcAdapter is android.nfc.NfcAdapter Init NFC adapter in MainActivity#onCreate method: this.nfcAdapter = NfcAdapter.getDefaultAdapter(this) Create a override method(For example): If you need to read cards from other SAKs or card models, you will need to write the corresponding multi-branch conditions yourself. ...
Aisa China HongKong, China VPS Ningbo, Zhejiang, China DS Ningbo, Zhejiang, China VPS Japan Tokyo, Japan IIJ BGP VPS Eurpo Germany Frankfurt, Germany VPS North America United States Los Angeles, United States VPS 1 A400 Los Angeles, United States VPS 2 A400 Los Angeles, United States VPS 3 DMIT
Today, my Windows server account was automatically locked due to a series of login failures (Event ID 4740), preventing me from logging in normally. I urgently checked the firewall rules and found that manually blocking these IPs was too late, and the frequent account lockouts were impacting normal business operations. Overview This script is primarily used to automatically detect IPs that fail to log in via RDP. When the number of failed attempts by the same IP exceeds a threshold within a set time window, its access will be automatically blocked. It can also detect account lockout events (4740) and attempt to unlock locked accounts, reducing manual intervention. ...
This tutorial is designed for macOS or BSD systems. What is kqueue? kqueue is an event notification mechanism in macOS (and BSD systems such as FreeBSD). If you are writing a server, but you don’t want to allocate a thread for each client; you can use kqueue to listen for events from clients, for example: Who just connected? Who disconnected? Which client has sent a message? The system notifies you automatically. Multiple clients can be served by a single thread. This is I/O Multiplexing. kqueue is similar to epoll in Linux and iocp in Windows. This will save resources. ...