Implementing a simple address book using a single linked list (source code included)

#define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<string.h> #include <stdlib.h> #include<assert.h> #include<stdbool.h> #define NAME_MAX 100 #define SEX_MAX 10 #define TEL_MAX 15 #define ADDR_MAX 100 typedef struct PersonInfo { char name[NAME_MAX]; char sex[SEX_MAX]; int age; char tel[TEL_MAX]; char addr[ADDR_MAX]; }PeoInfo; typedef struct PersonInfo SLDataType; typedef struct SListNode { SLDataType data; struct SListNode* next; }SLNode; typedef SLNode contact; void InitList(SLNode** phead)//Initialize […]

Include method with filter parameters in EF Core

Summary This article mainly introduces a new feature in EF Core 5.0, that is, the Include method supports delegate parameters with filters, and explains a big pitfall of this feature in actual use. I hope readers will avoid pitfalls in future development. This article uses Dotnet 6.0 and EF Core 7.0. Code and implementation Case […]

Solve include/darknet.h:14:14: fatal error: cuda_runtime.h: No such file or directory under Ubuntu

Table of Contents Solve include/darknet.h:14:14: fatal error: cuda_runtime.h: No such file or directory under Ubuntu 1. Confirm that CUDA is installed correctly Step 1: Download CUDA Toolkit Step 2: Install CUDA Toolkit 2. Add the path to CUDA 3. Install NVIDIA driver Step 1: Execute the following command in the terminal to add the NVIDIA […]

[Data structure] C language, realize address book through dynamic sequence table, source code included

Directory Implement the underlying code sequence table seqlist.h seqlist.c Then implement the contact sequence table contact.h contact.c main function test.c Implement the underlying code sequence table (I wrote this in my previous article) I use it directly here. seqlist.h #pragma once #include <stdio.h> #include “contact.h” typedef struct contactinfo datatype;//Change the data type to the address […]

Mybatis cache, super detailed! Includes: lazy loading, immediate loading, cache, first-level cache, second-level cache, custom cache

Mybatis cache Lazy (lazy) loading and immediate loading Delayed (lazy) loading Initiate queries only when the data is actually used, do not query when not in use, load on demand (also called lazy loading) ? for example: ? When querying class information, there will be many students in each class (assuming there are 100 students […]

How to do graffiti/smear on a picture, and support exporting related trajectory maps (includes online demonstration address)

How to make graffiti on a picture (feature continues to be updated) 1. Supported functions 2. Implementation ideas Q1: How to implement graffiti function on pictures? Q2: How to change the brush color and width function? Q3: How to implement the withdrawal function? Q4: How to implement the function of clearing the canvas? Q5: How […]

[Data Structure] Full analysis of the construction and implementation of dynamic sequence tables that is very easy to understand! (C language implementation) Source code included

This is read_ovo, thank you for seeing me If you don’t understand anything, please comment~ Please point it out if there are any mistakes, thank you sincerely! If it helps you, can you give me a like? Thank you! Directory Foreword 1. Construct a dynamic sequence table 2. Basic operations of sequence tables assert assert […]