The Qsort function implements sorting of elements in various types of arrays (simple idea)

Table of Contents Function introduction Function use case: (1) Sorting of int arrays (2) Sorting of char array (3) Sorting floating-point arrays (4) Sorting of structure types (5) Imitate the function of qsort to implement a general bubble sort Function introduction Function:Quickly sort the array elements in the pointed array Header file: stdlib.h Function prototype:void […]

2023/11/7–C#–The difference between generics and Object types, generic constraints, ArrayList variable array, Dictionary dictionary class in C#….

1. Use of generics Generics is a programming concept that allows you to write code that can handle non-specific data types, thereby improving code reusability and type safety. Generics allow you to write common algorithms, data structures, and methods to adapt to a variety of different data types without having to write specific code for […]

How to choose field types appropriately when creating a table

Foreword When we create a table, there are several types of people who choose field types: Rigorous People who strictly investigate the possible size of each field and then make selections based on the limitations of different field types will have no problem creating relational data tables. Try to save yourself the trouble Set all […]

Build a front-end development project from scratch based on Vite4, Typescript, React18, react-router-dom6.4, Redux4, Reduxjs/toolkit, and Ant Design5.9

Build a front-end development project from scratch based on Vite, Typescript, React, react-router-dom, Redux, Reduxjs/toolkit, and Ant Design vite project initialization Native environment node v16.14.2 npm 8.5.0 yarn 1.22.18 vite project initialization yarn create vite Follow the steps to enter the project name, select React for the framework, and use TypeScript for js to create […]

TypeScriptGet to know TypeScript

Author: Laojiu Personal blog: Laojiu’s CSDN blog Personal quote: Facing uncontrollable things with optimism Series of columns: Article directory TypeScript Disadvantages of Javascript Refactoring using TypeScript TypeScript compilation environment Globally install the TS compilation environment TS compilation simplified TS variable declaration TS variable type deduction type of data Javascript data types TypeScript data types Do […]

“Understanding custom types: structures, enumerations, unions”

Foreword This article will introduce three custom types in C language: structure, enumeration and union. These data types are very important in C language, they allow programmers to create their own data types to meet specific needs. By understanding these data types, you can better grasp the characteristics and applications of C language. 1. Structure […]

Typescript generics, keyof, typeof, index type, mapping

Typescript generics A major part of software engineering is building components that not only have well-defined and consistent APIs, but are also reusable. Components that can handle today’s and tomorrow’s data will give you the most flexible ability to build large software systems. Use generic type variables function identity<Type>(arg: Type): Type { return arg; } […]

Custom types – structures, enumerations, unions

Table of Contents 1. Structure 1.1 Declaration of structure type 1.2 Self-reference of structure 1.3 Definition and initialization of structure variables 1.4 Structure memory alignment Modify the default alignment number 1.5 Structure parameter passing 2. Structure implements bit segments (filling of bit segments & portability) 2.1 What is a bit segment (segmented by binary bits) […]

echarts columnar stacking, multiple types, multiple columns, dynamic rendering

Record the development needs you encounter at work, hoping it will be helpful to others. Requirements: You need to select the year, month, and day based on a drop-down selection box, pass different parameters, dynamically render the data according to different values, and compare multiple types, compare the same year together, and exclude those that […]