PROGRAMMING
Go 1.22 for-range Fix and go.mod Dependency
With the release of Go 1.22, the Go team addressed a long-standing issue with the for-range loop variable scoping, which had been a common pitfall for developers writing concurrent code. Specifically, the problem was that the loop variable in a for-range loop was reused across iterations, leading to unexpected behavior when closures were involved.The Issue Before Go 1.22Consider the following example:package forangeimport "fmt"func Do() { done := make(chan bool) values := []string{"a", "b", "c"} for _, v := range values { go func() { fmt.Println(v) // Prints unexpect...
The Ultimate Guide to Implement Function Overloading in Python
IntroductionWhen it comes to function overloading, those who have learned Java should be familiar with it. One of the most common uses is logging, where different overloaded functions are called for different parameters. So, how can we implement function overloading in Python?Concept of OverloadingFunction overloading allows multiple functions with the same name to exist within the same scope, but with different parameter lists. Although many programming languages (like Java and C++) support function overloading, Python’s design philosophy does not support this feature directly.Without O...
2,631 0 PYTHON OVERLOADING JAVA GUIDE
SIEM Big Data Visualization [04] : Data Transmission Latency SIEM Log Analysis Dashboard
This article will introduce the Data Transmission Latency Log Analysis Dashboard developed for SIEM big data analytics. This is part of the SIEM big data visualization project, if you are interested about other dashboard plug in, you can check below links:SIEM Big Data Visualization [01] : Dashboard for Monitoring Scam Events in Critical InfrastructureSIEM Big Data Visualization [02] : Dashboard for Summarizing SG National Cyber Threats in Critical InfrastructureSIEM Big Data Visualization [03] : Graph-Based SIEM Log Analysis DashboardProgram Design Purpose: The Data Transmission Latency SIEM ...
867 0
Power Grid OT Simulation System
Mini OT-Energy-System Cyber Security Digital TwinFigure-00: Power_Grid_OT_Simulation_System Environment Diagram, version v0.1.2 (2024)Project Design Purpose: The primary objective of this project is to develop a scaled-down Operational Technology (OT) digital twin/equivalent — an advanced software simulation system capable of emulating the functionality of an small-sized 18KW (560+MkWh/year) hybrid power grid. This system will meet the requirements for cybersecurity training, exercises, and research, serving as an essential platform for assessing the resilience and security of OT environ...
411 0
Why is Golang's Compilation Speed So Fast?
OverviewWhen I started learning the Go language, I already had experience with three statically typed languages—C/C++ and Java—and two dynamically typed languages—PHP and JavaScript. Because of this background, when I compiled a demo file of several hundred lines for the first time in Go, I was genuinely impressed by its compilation speed. At that moment, I thought to myself, "Go claims to have the execution speed of statically typed languages and the compilation speed of dynamically typed languages—it indeed lives up to its reputation." Indeed, one of the primary motiv...
2,922 0 GO COMPILATION GOLANG
Introduction to the Application of eBPF in Golang
Most of the time, when we develop software or even use software, we play within the safe boundaries of the operating system. We might not know how the network interface welcomes that IP packet, nor how the filesystem handles the inodes when we save a file.This boundary is called user space, which is where we write applications, libraries, and tools. But there's another world, kernel space, where the operating system's kernel resides and is responsible for managing system resources such as memory, CPU, and I/O devices.We usually don’t need to go below the socket or file descriptor level, ...
1,548 0 EBPF GOLANG GUIDE APPLICATION
Python FTP Server and Client
Distributed Log File Automated Archive SystemThis week, we will introduce the automated compute cluster nodes' log automated archive system project and FTP Communication utility library module.Program Design Purpose: This project aims to create an FTP server & client lib program for file transfer and a files management system for log data synchronization. We will develop an automated log file archive system that regularly collects newly generated log files from multiple nodes in a computer cluster and saves them on a central log file historian server. Additionally, a web interface will be ...
518 0
OT Power Grid System Development
Use PLC to Remote Control Circuit Breaker in Power Grid SystemFigure-00: Project Overview Diagram, version v0.0.2 (2024)Project Design Purpose: The objective of this project is to demonstrate how to utilize Programmable Logic Controllers (PLC) to remotely monitor and control circuit breakers within a power (grid/supply) system. Using a Schneider Electric circuit breaker, sensor, closer and PLC, the project will cover the physical hardware connections and provide a step-by-step guide for designing a PLC ladder diagram to sense and control the breaker states. Additionally, the project will expla...
708 0