Robust Custom Container Implementation and Stream-based Data Aggregation
Dynamic Type-Safe Buffer Implementation
This module defines a generic container managing dynamic memory using templates. It enforces type safety and includes built-in validation for index boundaries.
#pragma once
#include <iostream>
#include <stdexcept>
#include <string>
template<typename T>
class ResizableArray {
publi ...
Posted on Fri, 29 May 2026 20:07:14 +0000 by Draco_03
C++ Core Concepts and Modern Features
C++ is a powerful, general-purpose programming language. This document explores various C++ concepts, from fundamental syntax to advanced features introduced in modern C++ standards.
Core C++ Concepts
Arguments and Parameters
In C++, arguments are the actual values passed to a function during its invocation, while parameters are the variables d ...
Posted on Sat, 16 May 2026 07:40:03 +0000 by anna_cm
Custom Velocity Templates for MyBatisPlus Code Generation
Controller Template
package ${package.Controller};
import org.springframework.web.bind.annotation.RequestMapping;
#if(${restControllerStyle})
import org.springframework.web.bind.annotation.RestController;
#else
import org.springframework.stereotype.Controller;
#end
#if(${superControllerClassPackage})
import ${superControllerClassPackage};
#end ...
Posted on Wed, 13 May 2026 21:34:02 +0000 by jd57
Advanced C++ Programming Techniques
Templates
Function Templates
Function templates enable generic programming by allowing functions to operate with different data types.
#include <iostream>
using namespace std;
template<typename T>
void swapValues(T& a, T& b) {
T temp = a;
a = b;
b = temp;
}
void testFunctionTemplate() {
int x = 10, y = 20;
...
Posted on Wed, 13 May 2026 14:44:33 +0000 by erth
C++ Template Implementation and Usage Patterns
C++ templates enable code reuse by allowing type parametrization—defining logic that operates on unspecified types, which the compiler resolves into concrete implementations based on user-provided type arguments. This eliminates rigid type constraints in statically-typed C++ code.
Compilers do not compile template definitions directly. Instead, ...
Posted on Wed, 13 May 2026 00:09:31 +0000 by wholetthe15
Foundations of Tornado Web Development
Creating a Basic Tornado Web Application
To develop a simple Tornado web application, inherit from tornado.web.RequestHandler and override the relevant HTTP method handlers. Initialize the application, define URL mappings, start the server, and begin the I/O loop.
from tornado import web, ioloop
class IndexHandler(web.RequestHandler):
asyn ...
Posted on Mon, 11 May 2026 03:42:09 +0000 by thepip3r
Understanding C++ decltype and decltype(auto) Type Deduction
Core Mechanisms and Syntax Differences
C++11 introduced decltype as a compile-time type inquiry operator. While it shares conceptual ground with auto, their syntactic evaluation and deduction strategies diverge significantly. The auto keyword deduces a variable's type from an initializer expression, whereas decltype inspects an arbitrary expres ...
Posted on Sun, 10 May 2026 13:57:14 +0000 by pnj
Implementing Sorting Algorithms with C++ Templates
This article demonstrates how to implement common sorting algorithms using C++ class templates with dynamic array storage. The implementation includes ranking sort, selection sort with early termination, bubble sort with early termination, and insertion sort.
Requirements
No STL containers (arrrays, vectors, etc.) Must use class templates (temp ...
Posted on Sat, 09 May 2026 10:41:46 +0000 by angelena
Demystifying C++ Templates: Function and Class Generic Programming
C++ templates enable writing generic code that works with different data types without rewriting the entire code for each type. They are broadly categorized into function templates and class templates.
Function Templates
Function templates provide a mechanism to define a generic function that can operate on different data types. The compiler ge ...
Posted on Sat, 09 May 2026 09:53:27 +0000 by h123z
Reusable C++ Templates for Fast I/O, Modular Arithmetic, and String Data Structures
Competitive programming demands a high degree of code reusability. Below is a curated set of templates that have been fine-tuned for typical on line judges, including a comprehensive header, fast input/output routines, a modular arithmetic wrapper, and implementations of the suffix automaton and suffix array.
Compact Header with Utilities
names ...
Posted on Fri, 08 May 2026 16:06:53 +0000 by infestedarch0n