01 2024 档案
摘要:1、冒泡排序 void bubble_sort(int a[], int n)//n为数组a的元素个数 { int i, j, temp; for (j = 0; j < n - 1; j++) for (i = 0; i<n - 1 - j; i++) { if (a[i]>a[i + 1])//
阅读全文
摘要:c/c++ 排序 #include <stdio.h> void swap(int arr[], int i, int j) { int temp = arr[i]; arr[i] = arr[j]; arr[j] = temp; } void heapify(int tree[], int n,
阅读全文
摘要:docker network create -d macvlan --subnet=192.168.1.0/24 --gateway=192.168.1.1 --ip-range=192.168.1.0/24 --ipv6 --subnet=fe00::/64 -o parent=eth0 subn
阅读全文
摘要:cygwin是一个好软件,凝聚了大家很多的心血,在win11下运行的很流畅,远比微软自己搞得那个ubuntu顺手,但它有个小问题,重装系统后,如果原来的cgywin文件夹没有删除的话,你会发现你无法删除它,简直比病毒还要顽固。 找了好久终于在网上找到这段自动删除的bat代码,记录一下: SET DI
阅读全文
摘要:function CreateThread( lpThreadAttributes: Pointer; {安全设置} dwStackSize: DWORD; {堆栈大小} lpStartAddress: TFNThreadStartRoutine; {入口函数} lpParameter: Point
阅读全文
摘要:#include "stdafx.h" #include <iostream> #include <windows.h> using namespace std; DWORD WINAPI Fun(LPVOID lpParamter) { int sum = 0; for (int i = 0; i
阅读全文
摘要:tabT={} tab = {1,2,2,2,3,4,1} function TTT() table.sort(tab) for key,v in pairs(tab) do if tabT[tab[key]] == nil then tabT[tab[key]] = 1 else tabT[tab
阅读全文