Fading Coder

One Final Commit for the Last Sprint

Securing DedeCMS: A Guide to Common Vulnerabilities and Patches

Arbitrary File Upload in Media Manager The file dede/media_add.php is vulnerable to arbitrary file uploads. An attacker could upload a malicious script. Patch Locate the line assigning the full filename (around line 69) and replace it with the following code: if (preg_match('/\.(php|pl|cgi|asp|aspx...

Implementing a React Quiz Application with User Authentication

The folllowing demonstrates a React appilcation featuring user authentication on the left panel and a quiz interface on the right. First, create a new React project: npx create-react-app quiz-app Layout Structure Create a flex container with two child elements: <div className='container'> <...

Getting Started with MyBatis and Core Configuration

Understanding ORM and MyBatis Object-Relational Mapping (ORM) bridges the gap between object-oriented programming and relational databases by linking persistent data to entity objects. A schematic illustrates the correspondence between database tables and class fields, while another diagram depicts...

Competitive Programming Problem Set and Solutions

L1-1: Print Greeting Print a fixed greeting message. print("yuan shen, qi dong!") L1-2: Value Comparison Given a real number x, compare it to 1 and print the appropriate relational operator. #include <iostream> using namespace std; int main() { double val; cin >> val; if(val &l...

Configuration Management for SSM Integration with SpringMVC

Configuration Management for SSM Integration with SpringMVC
This article outlines the configuration files reuqired for integrating Spring, SpringMVC, and MyBatis (SSM). The steps include setting up Maven dependencies, MyBatis configuration, Spring context files for persistence and service layers, SpringMVC configuration, web deployment descriptor, and loggin...

Implementing Complex Types in Entity Framework Code First

In Entity Framwork (EF) Code First development, a Complex Type is a class that serves as a container for properties but lacks its own identity (i.e., it does not have a primary key). Unlike standard entity types, complex types are not mapped to their own database tables. Instead, their properties ar...

A Practical Guide to K‑Means Clustering with Data Cleaning and Elbow Method

A Practical Guide to K‑Means Clustering with Data Cleaning and Elbow Method
In the previous discussion we examined visual analytical methods for clustering, which helped us better understand relationships and structures within data. Now we turn to practical applicaiton, using the classic K‑means algorithm to train and evaluate a clustering model. Building the Model K‑means...

Functional Programming Concepts for Software Developers

A Practical Problem Scenario Consider developing a library for plotting mathematical functions on a coordinate plane. The system needs to handle various function types including linear functions (f(x)=mx+b), quadratic functions (f(x)=ax²+bx+c), and trigonometric functions (f(x)=asinx+b). Each functi...

Porting Quectel EC20 USB Modem Driver to Linux Kernel

USB Serial Driver Modifications Adding Vendor and Product IDs To enable kernel recognition of the module, add its Vendor ID (VID) and Product ID (PID) definitions. Modify the drivers/usb/serial/option.c file as shown. #define VIATELECOM_VENDOR_ID 0x15eb #define VIATELECOM_PRODUCT_CDS7 0x0001 #define...

Comparing Socket and RPC Communication for Cross-Server Game Architecture

Background In modern game development, implementing cross-server functionality has become essential for most games (though some casual games may not require this feature). Cross-server design can enhance player engagement by fostering competition for higher power levels and consolidate player popula...