clang:在 Win10 上编译 MIDI 音乐程序(二)

先从 Microsoft C++ Build Tools - Visual Studio

下载 1.73GB 安装 "Microsoft C++ Build Tools“

访问 Swift.org - Download Swift
找到 Windows 10:x86_64
下载 swift-5.10-RELEASE-windows10.exe  大约490MB
建议安装在 D:\Swift\ ,安装后大约占2.56GB

简单来说,Clang是一个编译器,目前用来编译C、C++、Objective-C语言。

where clang
D:\Swift\Toolchains\5.10.0+Asserts\usr\bin\clang.exe

cd D:\Swift\testc

短笛伴奏《祝你生日快乐》,编辑  happy_birthday_2u.cpp  如下

#include <iostream>
#include <windows.h>  
#include <mmsystem.h>
#pragma comment(lib,"winmm.lib")
using namespace std;

enum Scale  // 音阶参数
{
    Rest = 0, C8 = 108, B7 = 107, A7s = 106, A7 = 105, G7s = 104, G7 = 103, F7s = 102, F7 = 101, E7 = 100,
    D7s = 99, D7 = 98, C7s = 97, C7 = 96, B6 = 95, A6s = 94, A6 = 93, G6s = 92, G6 = 91, F6s = 90, F6 = 89,
    E6 = 88, D6s = 87, D6 = 86, C6s = 85, C6 = 84, B5 = 83, A5s = 82, A5 = 81, G5s = 80, G5 = 79, F5s = 78,
    F5 = 77, E5 = 76, D5s = 75, D5 = 74, C5s = 73, C5 = 72, B4 = 71, A4s = 70, A4 = 69, G4s = 68, G4 = 67,
    F4s = 66, F4 = 65, E4 = 64, D4s = 63, D4 = 62, C4s = 61, C4 = 60, B3 = 59, A3s = 58, A3 = 57, G3s = 56,
    G3 = 55, F3s = 54, F3 = 53, E3 = 52, D3s = 51, D3 = 50, C3s = 49, C3 = 48, B2 = 47, A2s = 46, A2 = 45,
    G2s = 44, G2 = 43, F2s = 42, F2 = 41, E2 = 40, D2s = 39, D2 = 38, C2s = 37, C2 = 36, B1 = 35, A1s = 34,
    A1 = 33, G1s = 32, G1 = 31, F1s = 30, F1 = 29, E1 = 28, D1s = 27, D1 = 26, C1s = 25, C1 = 24, B0 = 23,
    A0s = 22, A0 = 21
};
enum Voice // F大调
{
    H1 = F2, H2 = G2, H3 = A2, H4 = B2, H5 = C3, H6 = D3, H7 = E3,
    J1 = F3, J2 = G3, J3 = A3, J4 = B3, J5 = C4, J6 = D4, J7 = E4,
    K1 = F4, K2 = G4, K3 = A4, K4 = B4, K5 = C5, K6 = D5, K7 = E5,
    L1 = F5, L2 = G5, L3 = A5, L4 = B5, L5 = C6, L6 = D6, L7 = E6,
    LOW_SPEED = 500, MIDDLE_SPEED = 400, HIGH_SPEED = 300,
    _ = 0xFF
};
// score: Happy birthday to you
int hb2u[] = {
    J5,J5,J6,J5,K1,J7,
    J5,J5,J6,J5,K2,K1,
    J5,J5,K5,K3,K1,J7,J6,
    K4,K4,K3,K1,K2,K1,
};
// 时长数组 MIDDLE_SPEED
int shichang[] = {
    400,400,800,800,800,1600,
    400,400,800,800,800,1600,
    400,400,800,800,800,800,800,
    600,200,800,800,800,2000,
};
// 力度
int lidu[] = {
    1,0,0,2,0,0,
    1,0,0,2,0,0,
    1,0,0,2,1,0,0,
    2,2,0,0,2,1,
};
// 演奏歌曲《祝你生日快乐》
void happy_birthday()
{
    HMIDIOUT handle;
    midiOutOpen(&handle, 0, 0, 0, CALLBACK_NULL); // 打开midi设备
    midiOutShortMsg(handle, 72 << 8 | 0xC2); // 设置通道2的乐器为 72:短笛
    unsigned char sd = 0x90 | (2 & 0x0F); // statusByte: 0为声道
    unsigned short note = 0;    //音符编号
    unsigned short v = 120; // velocity 力度值,范围通常在0-127
    int n = sizeof(lidu) / sizeof(lidu[0]); 
    cout <<"n= " << n << endl;
    for (int i=0; i < n; i++) {
        note = hb2u[i];
        if (lidu[i] ==0) v = 40;
        else if(lidu[i] ==1) v = 80;
        else if (lidu[i] ==2) v = 120;
    
        unsigned long noteOnMsg = (((unsigned long)v <<16) | (((unsigned long)note) <<8) | (unsigned long)sd);
        midiOutShortMsg(handle, noteOnMsg); // 发送MIDI消息
        Sleep(shichang[i]); // 停顿,给音节演奏的时间
        midiOutShortMsg(handle, 0x7BB2); // 停止通道2上的演奏
    }
    midiOutShortMsg(handle, 0x7BB2); // 停止通道2上的演奏
    midiOutClose(handle); // 关闭midi设备
}

int main()
{
    happy_birthday();
    return 0;
}

编译  clang happy_birthday_2u.cpp -o happy_birthday_2u.exe

运行  happy_birthday_2u.exe


钢琴伴奏《祝你生日快乐》,编辑  happy_birthday_2y.cpp  如下

#include <iostream>
#include <windows.h>  
#include <mmsystem.h>
#pragma comment(lib,"winmm.lib")
using namespace std;

enum Scale  // 音阶参数
{
    Rest = 0, C8 = 108, B7 = 107, A7s = 106, A7 = 105, G7s = 104, G7 = 103, F7s = 102, F7 = 101, E7 = 100,
    D7s = 99, D7 = 98, C7s = 97, C7 = 96, B6 = 95, A6s = 94, A6 = 93, G6s = 92, G6 = 91, F6s = 90, F6 = 89,
    E6 = 88, D6s = 87, D6 = 86, C6s = 85, C6 = 84, B5 = 83, A5s = 82, A5 = 81, G5s = 80, G5 = 79, F5s = 78,
    F5 = 77, E5 = 76, D5s = 75, D5 = 74, C5s = 73, C5 = 72, B4 = 71, A4s = 70, A4 = 69, G4s = 68, G4 = 67,
    F4s = 66, F4 = 65, E4 = 64, D4s = 63, D4 = 62, C4s = 61, C4 = 60, B3 = 59, A3s = 58, A3 = 57, G3s = 56,
    G3 = 55, F3s = 54, F3 = 53, E3 = 52, D3s = 51, D3 = 50, C3s = 49, C3 = 48, B2 = 47, A2s = 46, A2 = 45,
    G2s = 44, G2 = 43, F2s = 42, F2 = 41, E2 = 40, D2s = 39, D2 = 38, C2s = 37, C2 = 36, B1 = 35, A1s = 34,
    A1 = 33, G1s = 32, G1 = 31, F1s = 30, F1 = 29, E1 = 28, D1s = 27, D1 = 26, C1s = 25, C1 = 24, B0 = 23,
    A0s = 22, A0 = 21
};
enum Voice // F大调
{
    H1 = F2, H2 = G2, H3 = A2, H4 = B2, H5 = C3, H6 = D3, H7 = E3,
    J1 = F3, J2 = G3, J3 = A3, J4 = B3, J5 = C4, J6 = D4, J7 = E4,
    K1 = F4, K2 = G4, K3 = A4, K4 = B4, K5 = C5, K6 = D5, K7 = E5,
    L1 = F5, L2 = G5, L3 = A5, L4 = B5, L5 = C6, L6 = D6, L7 = E6,
    LOW_SPEED = 500, MIDDLE_SPEED = 400, HIGH_SPEED = 300,
    _ = 0xFF
};
// score: Happy birthday to you
int hb2u[] = {
    J5,J5,J6,J5,K1,J7,
    J5,J5,J6,J5,K2,K1,
    J5,J5,K5,K3,K1,J7,J6,
    K4,K4,K3,K1,K2,K1,
};
// 时长数组 MIDDLE_SPEED
int shichang[] = {
    400,400,800,800,800,1600,
    400,400,800,800,800,1600,
    400,400,800,800,800,800,800,
    600,200,800,800,800,2000,
};
// 力度
int lidu[] = {
    1,0,0,2,0,0,
    1,0,0,2,0,0,
    1,0,0,2,1,0,0,
    2,2,0,0,2,1,
};
// 演奏歌曲《祝你生日快乐》
void happy_birthday()
{
    HMIDIOUT handle;
    midiOutOpen(&handle, 0, 0, 0, CALLBACK_NULL);
    midiOutShortMsg(handle, 0 << 8 | 0xC0); // 设置通道0的乐器为 大钢琴
    unsigned short note = 0;    // 音符编号
    unsigned short v = 100; // velocity 力度值,范围通常在0-127
    unsigned char sd = 0x90 | (0 & 0x0F);// statusByte: 0为声道
    int n = sizeof(lidu) / sizeof(lidu[0]); 
    cout <<"n= " << n << endl;
    for (int i=0; i < n; i++) {
        note = hb2u[i];
        if (lidu[i] ==0) v = 50;
        else if(lidu[i] ==1) v = 80;
        else if (lidu[i] ==2) v = 127;

        // 组合3个字节的消息到一个DWORD值
        unsigned long noteOnMsg = (((unsigned long)v <<16) | (((unsigned long)note) <<8) | (unsigned long)sd);
        // 发送MIDI消息
        midiOutShortMsg(handle, noteOnMsg);
        Sleep(shichang[i]); // 停顿,给音节演奏的时间
        midiOutShortMsg(handle, 0x7BB0); // 停止通道0上的演奏
    }
    midiOutClose(handle);
}

int main()
{
    happy_birthday();
    return 0;
}

编译  clang happy_birthday_2y.cpp -o happy_birthday_2y.exe

运行  happy_birthday_2y.exe


命令行参数化 乐器伴奏《祝你生日快乐》,编辑  happy_birthday_to.cpp  如下

#include <iostream>
#include <windows.h>  
#include <mmsystem.h>
#pragma comment(lib,"winmm.lib")
using namespace std;

enum Scale  // 音阶参数
{
    Rest = 0, C8 = 108, B7 = 107, A7s = 106, A7 = 105, G7s = 104, G7 = 103, F7s = 102, F7 = 101, E7 = 100,
    D7s = 99, D7 = 98, C7s = 97, C7 = 96, B6 = 95, A6s = 94, A6 = 93, G6s = 92, G6 = 91, F6s = 90, F6 = 89,
    E6 = 88, D6s = 87, D6 = 86, C6s = 85, C6 = 84, B5 = 83, A5s = 82, A5 = 81, G5s = 80, G5 = 79, F5s = 78,
    F5 = 77, E5 = 76, D5s = 75, D5 = 74, C5s = 73, C5 = 72, B4 = 71, A4s = 70, A4 = 69, G4s = 68, G4 = 67,
    F4s = 66, F4 = 65, E4 = 64, D4s = 63, D4 = 62, C4s = 61, C4 = 60, B3 = 59, A3s = 58, A3 = 57, G3s = 56,
    G3 = 55, F3s = 54, F3 = 53, E3 = 52, D3s = 51, D3 = 50, C3s = 49, C3 = 48, B2 = 47, A2s = 46, A2 = 45,
    G2s = 44, G2 = 43, F2s = 42, F2 = 41, E2 = 40, D2s = 39, D2 = 38, C2s = 37, C2 = 36, B1 = 35, A1s = 34,
    A1 = 33, G1s = 32, G1 = 31, F1s = 30, F1 = 29, E1 = 28, D1s = 27, D1 = 26, C1s = 25, C1 = 24, B0 = 23,
    A0s = 22, A0 = 21
};
enum Voice // F大调
{
    H1 = F2, H2 = G2, H3 = A2, H4 = B2, H5 = C3, H6 = D3, H7 = E3,
    J1 = F3, J2 = G3, J3 = A3, J4 = B3, J5 = C4, J6 = D4, J7 = E4,
    K1 = F4, K2 = G4, K3 = A4, K4 = B4, K5 = C5, K6 = D5, K7 = E5,
    L1 = F5, L2 = G5, L3 = A5, L4 = B5, L5 = C6, L6 = D6, L7 = E6,
    LOW_SPEED = 500, MIDDLE_SPEED = 400, HIGH_SPEED = 300,
    _ = 0xFF
};
// score: Happy birthday to you
int hb2u[] = {
    J5,J5,J6,J5,K1,J7,
    J5,J5,J6,J5,K2,K1,
    J5,J5,K5,K3,K1,J7,J6,
    K4,K4,K3,K1,K2,K1,
};
// 时长数组 MIDDLE_SPEED
int shichang[] = {
    400,400,800,800,800,1600,
    400,400,800,800,800,1600,
    400,400,800,800,800,800,800,
    600,200,800,800,800,2000,
};
// 力度
int lidu[] = {
    1,0,0,2,0,0,
    1,0,0,2,0,0,
    1,0,0,2,1,0,0,
    2,2,0,0,2,1,
};
// 演奏歌曲《祝你生日快乐》
void happy_birthday(int yinse)
{
    HMIDIOUT handle;
    midiOutOpen(&handle, 0, 0, 0, CALLBACK_NULL);
    midiOutShortMsg(handle, yinse << 8 | 0xC1); // 设置通道1的乐器
    unsigned short note = 0;    // 音符编号
    unsigned short v = 100; // velocity 力度值,范围通常在0-127
    unsigned char sd = 0x90 | (1 & 0x0F);// statusByte: 0为声道
    int n = sizeof(lidu) / sizeof(lidu[0]); 
    cout <<"n= " << n << endl;
    for (int i=0; i < n; i++) {
        note = hb2u[i];
        if (lidu[i] ==0) v = 50;
        else if(lidu[i] ==1) v = 80;
        else if (lidu[i] ==2) v = 127;

        // 组合3个字节的消息到一个DWORD值
        unsigned long noteOnMsg = (((unsigned long)v <<16) | (((unsigned long)note) <<8) | (unsigned long)sd);
        // 发送MIDI消息
        midiOutShortMsg(handle, noteOnMsg);
        Sleep(shichang[i]); // 停顿,给音节演奏的时间
        midiOutShortMsg(handle, 0x7BB1); // 停止通道1上的演奏
    }
    midiOutClose(handle);
}

int main(int argc,char *argv[])
{
  if (argc > 1){
    int n = atoi(argv[1]);
    if (0<=n && n<128) happy_birthday(n);
    else cout << " 0<=n and n<128 ";
  } else {
    cout << " usage: happy_birthday_to n ";
  }
    
    return 0;
}

编译  clang happy_birthday_to.cpp -o happy_birthday_to.exe

# 乐器 26:电吉他 爵士
运行  happy_birthday_to.exe 26
# 乐器  40:小提琴
运行  happy_birthday_to  40
# 乐器  42:大提琴
运行  happy_birthday_to  42
# 乐器 65:中音萨克斯风
运行  happy_birthday_to 65


参阅:C语言midi编程钢琴演奏

音色表

/*
    General MIDI Level 1 旋律乐器对照表
    Note: 只向某个MIDI通道发送Program Change命令设置乐器,是不能发音的, 
          想要发音,还必须发出On开音符指令;有些乐器(笛)开始播放后,
          如果不发Off关音符指令,会持续发音很长时间.
*/
//Piano        1-8              键盘乐器             define = MIDI GM1列表序号 - 1
#define Acoustic_Grand_Piano    0       //平台钢琴
#define Bright_Acoustic_Piano   1       //亮音钢琴
#define Electric_Grand_Piano    2       //电钢琴
#define Honky_tonk_Piano        3       //酒吧钢琴
#define Electric_Piano_1        4       //电钢琴1
#define Electric_Piano_2        5       //电钢琴2
#define Harpsichord             6       //羽管键琴
#define Clavi                   7       //电翼琴
//Chromatic Percussion   9-16	固定音高敲击乐器     
#define Celesta                 8       //钢片琴
#define Glockenspiel            9       //钟琴
#define Music_Box               10      //音乐盒
#define Vibraphone              11      //颤音琴
#define Marimba                 12      //马林巴琴
#define Xylophone               13      //木琴
#define Tubular_Bells           14      //管钟
#define Dulcimer                15      //洋琴
//Organ         17-24	        风琴
#define Drawbar_Organ           16      //音栓风琴
#define Percussive_Organ        17      //敲击风琴
#define Rock_Organ              18      //摇滚风琴
#define Church_Organ            19      //教堂管风琴
#define Reed_Organ              20      //簧风琴
#define Accordion               21      //手风琴
#define Harmonica               22      //口琴
#define Tango_Accordion         23      //探戈手风琴
//Guitar        25-32	        吉他
#define Acoustic_Guitar_nylon   24      //木吉他 尼龙弦
#define Acoustic_Guitar_steel   25      //木吉他 钢弦
#define Electric_Guitar_jazz    26      //电吉他 爵士
#define Electric_Guitar_clean   27      //电吉他 原音
#define Electric_Guitar_muted   28      //电吉他 闷音
#define Overdriven_Guitar       29      //电吉他 破音
#define Distortion_Guitar       30      //电吉他 失真
#define Guitar_harmonics        31      //吉他泛音
//Bass          33-40	        贝斯
#define Acoustic_Bass           32      //民谣贝司
#define Electric_Bass_finger    33      //电贝司 指奏
#define Electric_Bass_pick      34      //电贝司 拨奏
#define Fretless_Bass           35      //无格贝斯
#define Slap_Bass_1             36      //捶钩贝斯1
#define Slap_Bass_2             37      //捶钩贝斯2
#define Synth_Bass_1            38      //合成贝司1
#define Synth_Bass_2            39      //合成贝司2
//Strings       41-48	        弦乐器
#define Violin                  40      //小提琴
#define Viola                   41      //中提琴
#define Cello                   42      //大提琴
#define Contrabass              43      //低音大提琴
#define Tremolo_Strings         44      //颤弓弦乐
#define Pizzicato_Strings       45      //弹拨弦乐
#define Orchestral_Harp         46      //竖琴
#define Timpani                 47      //定音鼓
//Ensemble      49-56	        合奏
#define String_Ensemble_1       48      //弦乐合奏1
#define String_Ensemble_2       49      //弦乐合奏2
#define SynthStrings_1          50      //合成弦乐1
#define SynthStrings_2          51      //合成弦乐2
#define Choir_Aahs              52      //人声“啊”
#define Voice_Oohs              53      //人声“喔”
#define Synth_Voice             54      //合成人声
#define Orchestra_Hit           55      //交响打击乐
//Brass         57-64	        铜管乐器
#define Trumpet                 56      //小号
#define Trombone                57      //长号
#define Tuba                    58      //大号
#define Muted_Trumpet           59      //闷音小号
#define French_Horn             60      //圆号/法国号
#define Brass_Section           61      //铜管乐
#define SynthBrass_1            62      //合成铜管1
#define SynthBrass_2            63      //合成铜管2
Reed          65-72	        簧乐器
#define Soprano_Sax             64      //高音萨克斯风
#define Alto_Sax                65      //中音萨克斯风
#define Tenor_Sax               66      //次中音萨克斯风
#define Baritone_Sax            67      //上低音萨克斯风
#define Oboe                    68      //双簧管
#define English_Horn            69      //英国管
#define Bassoon                 70      //低音管
#define Clarinet                71      //单簧管
//Pipe          73-80	        吹管乐器
#define Piccolo                 72      //短笛
#define Flute                   73      //长笛
#define Recorder                74      //直笛
#define Pan_Flute               75      //排笛
#define Blown_Bottle            76      //瓶笛
#define Shakuhachi              77      //尺八
#define Whistle                 78      //哨子
#define Ocarina                 79      //陶笛
//Synth Lead    81-88	        合成音主旋律
#define Lead_1_square           80      //方波
#define Lead_2_sawtooth         81      //锯齿波
#define Lead_3_calliope         82      //汽笛风琴
#define Lead_4_chiff            83      //合成吹管
#define Lead_5_charang          84      //合成电吉他
#define Lead_6_voice            85      //人生键盘
#define Lead_7_fifths           86      //五度音
#define Lead_8_bass_lead        87      //贝司吉他合奏
//Synth Pad     89-96	        合成音和弦衬底
#define Pad_1_new age           88      //新世纪
#define Pad_2_warm              89      //温暖
#define Pad_3_polysynth         90      //多重和音
#define Pad_4_choir             91      //人生合唱
#define Pad_5_bowed             92      //玻璃
#define Pad_6_metallic          93      //金属
#define Pad_7_halo              94      //光华
#define Pad_8_sweep             95      //扫掠
//Synth Effects 97-104	        合成音效果
#define FX_1_rain               96      //雨
#define FX_2_soundtrack         97      //电影音效
#define FX_3_crystal            98      //水晶
#define FX_4_atmosphere         99      //气氛
#define FX_5_brightness         100     //明亮
#define FX_6_goblins            101     //魅影
#define FX_7_echoes             102     //回音
#define FX_8_sci_fi             103     //科幻
//Ethnic        105-112	        民族乐器
#define Sitar                   104     //西塔琴
#define Banjo                   105     //五弦琴/斑鸠琴
#define Shamisen                106     //三味线
#define Koto                    107     //十三弦琴/古筝
#define Kalimba                 108     //卡林巴铁片琴
#define Bag_pipe                109     //苏格兰风琴
#define Fiddle                  110     //古提琴
#define Shanai                  111     //獸笛,类似唢呐
//Percussive    113-120	        打击乐器
#define Tinkle_Bell             112     //叮铛铃
#define Agogo                   113     //阿哥哥鼓
#define Steel_Drums             114     //钢鼓
#define Woodblock               115     //木鱼
#define Taiko_Drum              116     //太鼓
#define Melodic_Tom             117     //定音铜鼓
#define Synth_Drum              118     //合成股
#define Reverse_Cymbal          119     //逆转钹声
//Sound Effects 121-128	        特殊音效
#define Guitar_Fret_Noise       120     //吉他滑弦杂声
#define Breath_Noise            121     //呼吸杂声
#define Seashore                122     //海岸
#define Bird_Tweet              123     //鸟鸣
#define Telephone_Ring          124     //电话铃声
#define Helicopter              125     //直升机
#define Applause                126     //拍手
#define Gunshot                 127     //枪声

音码表

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/614320.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

VPN方案和特点

VPN方案和特点 VPN&#xff0c;或者称为虚拟专用网络&#xff0c;是一种保护你的在线安全和隐私的技术。它可以创建一个加密的连接&#xff0c;使你的在线活动对其他人不可见。以下是一些常见的VPN协议和它们的特点&#xff1a; 开放VPN (OpenVPN)&#xff1a;这是一种极为可…

【京东电商API接口】 | 京东某商品销量数据分析可视化

Python当打之年 当打之年&#xff0c;专注于各领域Python技术&#xff0c;量的积累&#xff0c;质的飞跃。后台回复&#xff1a;【可视化项目源码】可获取可视化系列文章源码和数据 本期将利用Python分析「京东商品数据接口」&#xff0c;希望对大家有所帮助&#xff0c;如有疑…

BGP第二篇(bgp邻居状态及影响邻居建立的因素)

1、bgp邻居状态 BGP对等体的交互过程中存在6种状态机&#xff1a; 空闲&#xff08;Idle&#xff09; 连接&#xff08;Connect&#xff09; 活跃 &#xff08;Active&#xff09; Open报文已发送&#xff08;OpenSent&#xff09; Open报文已确认&#xff08;OpenConfirm&…

autodl 上 使用 LLaMA-Factory 微调 中文版 llama3

autodl 上 使用 LLaMA-Factory 微调 中文版 llama3 环境准备创建虚拟环境下载微调工具 LLaMA-Factory下载 llama3-8B开始微调测试微调结果模型合并后导出vllm 加速推理 环境准备 autodl 服务器&#xff1a; https://www.autodl.com/console/homepage/personal 基本上充 5 块钱…

前端框架-echarts

Echarts 项目中要使用到echarts框架&#xff0c;从零开始在csdn上记笔记。 这是一个基础的代码&#xff0c;小白入门看一下 <!DOCTYPE html> <html lang"en"> <head><meta charset"UTF-8"><meta name"viewport" co…

什么可以替代iframe?

网页嵌套中&#xff0c;iframe曾几何时不可一世&#xff0c;没有其他更好的选择&#xff01; iframe即内联框架&#xff0c;作为网页设计中的一种技术&#xff0c;允许在一个网页内部嵌套另一个独立的HTML文档。尽管它在某些场景下提供了便利&#xff0c;但也存在多方面的缺陷…

可视化实验三 Matplotlib库绘图及时变数据可视化

1.1 任务一 1.1.1 恢复默认配置 #绘图风格&#xff0c;恢复默认配置 plt.rcParams.update(plt.rcParamsDefault)#恢复默认配置 或者 plt.rcdefaults() 1.1.2 汉字和负号的设置 import matplotlib.pyplot as plt plt.rcParams["font.sans-serif"]"SimH…

表格内容高效拆分,自定义行数随心所欲,让数据处理更高效!

在信息化社会的今天&#xff0c;表格成为了我们处理数据、整理信息的重要工具。然而&#xff0c;当表格内容过于庞大时&#xff0c;如何高效地拆分表格内容成为了摆在我们面前的一大难题。传统的拆分方法往往耗时耗力&#xff0c;且难以满足我们个性化的需求。 首先&#xff0…

数据中台:企业数字化转型的桥梁_光点科技

在数字化日益深入企业核心运营的今天&#xff0c;数据中台作为一个关键的信息化架构&#xff0c;正逐渐崭露头角&#xff0c;成为连接企业各部门、优化数据管理和推动业务创新的重要桥梁。 一、数据中台&#xff1a;连接与整合的桥梁 数据中台的核心作用在于连接与整合。传统的…

Python快速入门-零基础也能掌握的编程技巧,基础方法和API整理

目录 前言 数据结构 数字 数学运算 随机数 字符串 列表 元组 字典 面向对象 JSON 文件操作 扩展 制作一个简易时钟 前言 环境什么就不在赘述&#xff0c;可以参考其他文章&#xff0c;也可以在线运行 CSDN在线运行地址&#xff1a;InsCode - 让你的灵感立刻落地…

4G,5G执法记录仪人脸识别、人脸比对使用说明

4G/5G执法记录仪或4G/5G智能安全帽&#xff0c;做前端人脸识别、人脸比对&#xff0c;采用了上市公司的成熟的人脸识别算法&#xff0c;需要支付LICENSE给算法公司&#xff0c;理论上前端设备支持30K的人脸库&#xff08;受设备运行内存限制&#xff09;。 4G/5G执法记录仪侧要…

docker私有仓库registry

简介 Docker私有仓库的Registry是一个服务&#xff0c;主要用于存储、管理和分发Docker镜像。具体来说&#xff0c;Registry的功能包括&#xff1a; 存储镜像&#xff1a;Registry提供一个集中的地方来存储Docker镜像&#xff0c;包括镜像的层次结构和元数据。 版本控制&…

基于 LlaMA 3 + LangGraph 在windows本地部署大模型 (三)

基于 LlaMA 3 LangGraph 在windows本地部署大模型 &#xff08;三&#xff09; 大家继续看 https://lilianweng.github.io/posts/2023-06-23-agent/的文档内容 第二部分&#xff1a;内存 记忆的类型 记忆可以定义为用于获取、存储、保留以及随后检索信息的过程。人脑中有多…

C语言(指针)4

Hi~&#xff01;这里是奋斗的小羊&#xff0c;很荣幸各位能阅读我的文章&#xff0c;诚请评论指点&#xff0c;关注收藏&#xff0c;欢迎欢迎~~ &#x1f4a5;个人主页&#xff1a;小羊在奋斗 &#x1f4a5;所属专栏&#xff1a;C语言 本系列文章为个人学习笔记&#x…

瑞的创作纪念日(128天)

&#x1f64a; 前言&#xff1a;我是阿瑞&#xff0c;一个热爱技术、喜欢教学、对编程充满热情、痴迷于代码世界、喜欢研读源码、尝试自研开发框架的探索者。今天&#xff0c;与大家分享一个特别的纪念日——我的 CSDN 技术博客创作第 128 天的纪念日 机缘 我接触 CSDN 是因为 …

零基础HTML教程(32)--HTML5语义化标签

文章目录 1. div时代2. div的缺点3. 语义化标签4. 语义化标签有哪些5. 实战演练6. 小结 1. div时代 我是2009年开始学习网页开发的&#xff0c;那时候HTML里面到处是div。 这么说吧&#xff0c;那时候div就是网页的骨架&#xff0c;支撑着网页的主结构。 2. div的缺点 div作…

硬件 - TL431计算

文章目录 1 . 概要2 . TL431内部3 . TL431应用电路4 . TL431计算5 . 小结 【全文大纲】 : https://blog.csdn.net/Engineer_LU/article/details/135149485 1 . 概要 1 . TL431常用于通过外围电阻R1,R2设置输出一个目标电压 2 . TL431内部 3 . TL431应用电路 1 . R1 1K&#xf…

Mac IDEA 自动补全mybatis sql语句

导航 Mac IDEA 自动补全mybatis sql语句一、点击IDEA 右侧Database选项二、选择添加对应数据库三、输入数据库信息和方案四、输入数据库信息和方案五、成功 Mac IDEA 自动补全mybatis sql语句 背景&#xff1a; 想在Mapper中&#xff0c;能够实现自动检索数据库表和对应的字段…

40道 Nginx 高频面试题

Nginx 是一款轻量级的 Web 服务器、反向代理服务器&#xff0c;由于它的内存占用少&#xff0c;启动极快&#xff0c;高并发能力强&#xff0c;在互联网项目中广泛应用。那么关于 Nginx 的核心面试题有哪些呢&#xff1f;今天给大家整理了40道Nginx 高频面试题&#xff0c;最近…

ITMS-91053: Missing API declaration

1. 添加PrivacyInfo.xcprivacy File → New → File → App Privacy 2. 格式 3. 已知对应关系 NSPrivacyAccessedAPICategoryFileTimestamp 3B52.1: Files provided to app by user, per documentation&#xff1a;File Timestamp NSPrivacyAccessedAPICategoryDiskSpace …