SEARCH KEYWORD -- UNDO CHANGE
Mock Solutions for GoLang Unit Test
In Go development, Unit Test is inevitable. And it is essential to use Mock when writing Unit Tests. Mock can help test isolate the business logic it depends on, enabling it to compile, link, and run independently. Mock needs Stub. Stub function replaces the real business logic function, returns the required result, and assists the test. I involved the related test code for Controllers while writing Kubernetes Operator recently, and there would be mocks for GRPC and HT...
A Sip of Go Log
Logging is indispensable in any code that we need its support both in debugging and in statistics. However, a package that filled withfmt.Println/fmt.Printf printing various messages can never be considered a read-to-be-adopted package, which can be optimized by a simple change, using Golang’s native log package to print information to standard output or to a file. Then, how to apply the log package? Are there any limitations? If so, can we seek open-source packages? Let&rsq...
Go 1.16 is released
Note: The post is authorized by original author to republish on our site. Original author is Stefanie Lai who is currently a Spotify engineer and lives in Stockholm, original post is published here. Last week, Go1.16 was released, bringing relatively more changes than version 1.15, which was influenced by the epidemic. The update is in many aspects, including compilation, deployment, standard library, etc. In the official Go document, all changes are classified based on Too...
GOLANG,GO1.16,NEW FEATURES 2021-02-26 21:08:42
SIEM Big Data Visualization [02]: National Cyber Threats Dashboard
Dashboard for Summarizing SG National Cyber Threats in Critical Infrastructure Program Design Purpose: The purpose of this program is to develop a comprehensive Angular web dashboard plugin for a Security Information and Event Management (SIEM) system, focusing on the effective monitoring, categorization, summarization, and visualization of cyber threat events targeting Singapore's critical infrastructure. This dashboard will provide researchers and security managers with a clear, concise view ...
Power Grid Simulation System 02 : FDI Power Outage Attack Case Study
We are excited to share that the Power Grid Simulation System we developed was used as part of one red team's targeted critical infrastructure system the international cyber exercise Crossed Swords 2024 which conducted in December 2024. In this article, we will introduce one power outage attack case study which use the Power Grid Simulation System as the demo platform for OT cyber security workshop. Project Design Purpose: This case study demonstrates using the Power Grid Simulation System as a...
Writing Java codes conforming to coding standard
Recently, I was doing some cleanup to one of my current Java project. I find there are many codes which are not conforming to the Java coding standard. So I list them here and hope that people can improve your codes and write maintainable codes. Format source code and manage imports in Eclipse Eclipse provides functions of auto-formatting and imports management, you can use following shortcuts to use these functions. Ctrl+Shift+F --> Format source code Ctrl+Shift+O -- Manage imports an...
Java, Code standard,Style 2012-09-18 12:50:28
When and How to Use the Go Channel
Go’s concise structure and powerful native library enable us to hit the ground running easily. It is more efficient than Java or Python when implementing the same functions, especially its concurrent programming, which is very handy and widely admired due to its goroutine and channel. goroutine and channel has much to dig into, and let’s start with channel, which I used to consider narrowly as a message queue to transfer data between gorouti...
How expensive is a MySQL query?
Database access speed is always the bottle neck of many applications. Many application have large amount of data to search, retrieve and display nowadays. How do we improve the performance of our applications, how do we reduce the cost of database access? Apart from the design of database, the quality of the query is also one important factor to take care. But before that, we need to know how much network traffic a query will consume. Yunyang,Zhang from Nubee in Singapore did some research...
MySQL,Network traffic,Query 2013-04-09 05:13:33
Fast tracking android app development with optimum delivery.
Most Android developers nowadays are faced with challenges of delivering optimum feature/product in due time. Most developers believe working hard will ensure their success in getting this actionable result, howbeit, working smart is the ground to get this done. working smart brings productivity while working too hard might resolve to frustration. In this article, we will be looking at some basic tips to working smart as an android developer in order to: Fasten up your nex...
Python PLC Honeypot Project
Program Design Propose : This project aims to develop a sophisticated honeypot system that emulates an OT (Operational Technology) SCADA network environment, bridging Level 1 OT field controller devices (PLCs) with Level 2 control programs, including Human-Machine Interfaces (HMIs). This honeypot will simulate various PLC models from major vendors, such as Schneider and Siemens, while supporting the primary communication protocols Modbus-TCP and Siemens-S7Comm. The system will integrate essenti...
RECENT
- How Artificial Intelligence Is Helping Fight Environmental Challenges
- How to Deal with Accusations of Negligence as a Business
- Google's Business Operations in China Amid Antitrust Scrutiny
- Deploying DeepSeek-R1 Locally with a Custom RAG Knowledge Data Base
- Balancing Convenience and Security in the Digital World
- My AI Learning Journey: Exploring the Future of Technology
- Power Grid Simulation System 02 : FDI Power Outage Attack Case Study
- Be Careful When Using Cursor to Help Build Application
- Calculating Token Count for Claude API Using Go: A Step-by-Step Guide
- Understanding Cursor and WindSurf's Code Indexing Logic
- more>>