如何具备阅读JAVA JDK虚拟机源码能力
源码位置https://github.com/openjdk/jdk
核心实现源码[部分截图]

/** Copyright (c) 1995, 2024, Oracle and/or its affiliates. All rights reserved.* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.** This code is free software; you can redistribute it and/or modify it* under the terms of the GNU General Public License version 2 only, as* published by the Free Software Foundation. Oracle designates this* particular file as subject to the "Classpath" exception as provided* by Oracle in the LICENSE file that accompanied this code.** This code is distributed in the hope that it will be useful, but WITHOUT* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License* version 2 for more details (a copy is included in the LICENSE file that* accompanied this code).** You should have received a copy of the GNU General Public License version* 2 along with this work; if not, write to the Free Software Foundation,* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.** Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA* or visit www.oracle.com if you need additional information or have any* questions.*//** This file contains the main entry point into the launcher code* this is the only file which will be repeatedly compiled by other* tools. The rest of the files will be linked in.*/#include "defines.h"#include "jli_util.h"#include "jni.h"/** Entry point.*/#ifdef JAVAWchar **__initenv;int WINAPIWinMain(HINSTANCE inst, HINSTANCE previnst, LPSTR cmdline, int cmdshow){int margc;char** margv;int jargc;char** jargv;const jboolean const_javaw = JNI_TRUE;__initenv = _environ;#else /* JAVAW */JNIEXPORT intmain(int argc, char **argv){int margc;char** margv;int jargc;char** jargv;const jboolean const_javaw = JNI_FALSE;#endif /* JAVAW */{int i, main_jargc, extra_jargc;JLI_List list;main_jargc = (sizeof(const_jargs) / sizeof(char *)) > 1? sizeof(const_jargs) / sizeof(char *): 0; // ignore the null terminator indexextra_jargc = (sizeof(const_extra_jargs) / sizeof(char *)) > 1? sizeof(const_extra_jargs) / sizeof(char *): 0; // ignore the null terminator indexif (main_jargc > 0 && extra_jargc > 0) { // combine extra java argsjargc = main_jargc + extra_jargc;list = JLI_List_new(jargc + 1);for (i = 0 ; i < extra_jargc; i++) {JLI_List_add(list, JLI_StringDup(const_extra_jargs[i]));}for (i = 0 ; i < main_jargc ; i++) {JLI_List_add(list, JLI_StringDup(const_jargs[i]));}// terminate the listJLI_List_add(list, NULL);jargv = list->elements;} else if (extra_jargc > 0) { // should never happenfprintf(stderr, "EXTRA_JAVA_ARGS defined without JAVA_ARGS");abort();} else { // no extra args, business as usualjargc = main_jargc;jargv = (char **) const_jargs;}}JLI_InitArgProcessing(jargc > 0, const_disable_argfile);#ifdef _WIN32{int i = 0;if (getenv(JLDEBUG_ENV_ENTRY) != NULL) {printf("Windows original main args:\n");for (i = 0 ; i < __argc ; i++) {printf("wwwd_args[%d] = %s\n", i, __argv[i]);}}}// Obtain the command line in UTF-16, then convert it to ANSI code page// without the "best-fit" optionLPWSTR wcCmdline = GetCommandLineW();int mbSize = WideCharToMultiByte(CP_ACP,WC_NO_BEST_FIT_CHARS | WC_COMPOSITECHECK | WC_DEFAULTCHAR,wcCmdline, -1, NULL, 0, NULL, NULL);// If the call to WideCharToMultiByte() fails, it returns 0, which// will then make the following JLI_MemAlloc() to issue exit(1)LPSTR mbCmdline = JLI_MemAlloc(mbSize);if (WideCharToMultiByte(CP_ACP, WC_NO_BEST_FIT_CHARS | WC_COMPOSITECHECK | WC_DEFAULTCHAR,wcCmdline, -1, mbCmdline, mbSize, NULL, NULL) == 0) {perror("command line encoding conversion failure");exit(1);}JLI_CmdToArgs(mbCmdline);JLI_MemFree(mbCmdline);margc = JLI_GetStdArgc();// add one more to mark the endmargv = (char **)JLI_MemAlloc((margc + 1) * (sizeof(char *)));{int i = 0;StdArg *stdargs = JLI_GetStdArgs();for (i = 0 ; i < margc ; i++) {margv[i] = stdargs[i].arg;}margv[i] = NULL;}#else /* *NIXES */{// accommodate the NULL at the endJLI_List args = JLI_List_new(argc + 1);int i = 0;// Add first arg, which is the app nameJLI_List_add(args, JLI_StringDup(argv[0]));// Append JDK_JAVA_OPTIONSif (JLI_AddArgsFromEnvVar(args, JDK_JAVA_OPTIONS)) {// JLI_SetTraceLauncher is not called yet// Show _JAVA_OPTIONS content along with JDK_JAVA_OPTIONS to aid diagnosisif (getenv(JLDEBUG_ENV_ENTRY)) {char *tmp = getenv("_JAVA_OPTIONS");if (NULL != tmp) {JLI_ReportMessage(ARG_INFO_ENVVAR, "_JAVA_OPTIONS", tmp);}}}// Iterate the rest of command linefor (i = 1; i < argc; i++) {JLI_List argsInFile = JLI_PreprocessArg(argv[i], JNI_TRUE);if (NULL == argsInFile) {JLI_List_add(args, JLI_StringDup(argv[i]));} else {int cnt, idx;cnt = argsInFile->size;for (idx = 0; idx < cnt; idx++) {JLI_List_add(args, argsInFile->elements[idx]);}// Shallow free, we reuse the string to avoid copyJLI_MemFree(argsInFile->elements);JLI_MemFree(argsInFile);}}margc = args->size;// add the NULL pointer at argv[argc]JLI_List_add(args, NULL);margv = args->elements;}#endif /* WIN32 */return JLI_Launch(margc, margv,jargc, (const char**) jargv,0, NULL,VERSION_STRING,DOT_VERSION,(const_progname != NULL) ? const_progname : *margv,(const_launcher != NULL) ? const_launcher : *margv,jargc > 0,const_cpwildcard, const_javaw, 0);}

intCallJavaMainInNewThread(jlong stack_size, void* args) {int rslt;pthread_t tid;pthread_attr_t attr;pthread_attr_init(&attr);pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);size_t adjusted_stack_size;if (stack_size > 0) {if (pthread_attr_setstacksize(&attr, stack_size) == EINVAL) {// System may require stack size to be multiple of page size// Retry with adjusted valueadjusted_stack_size = adjustStackSize(stack_size);if (adjusted_stack_size != (size_t) stack_size) {pthread_attr_setstacksize(&attr, adjusted_stack_size);}}}pthread_attr_setguardsize(&attr, 0); // no pthread guard page on java threadsif (pthread_create(&tid, &attr, ThreadJavaMain, args) == 0) {void* tmp;pthread_join(tid, &tmp);rslt = (int)(intptr_t)tmp;} else {/** Continue execution in current thread if for some reason (e.g. out of* memory/LWP) a new thread can't be created. This will likely fail* later in JavaMain as JNI_CreateJavaVM needs to create quite a* few new threads, anyway, just give it a try..*/rslt = JavaMain(args);}pthread_attr_destroy(&attr);return rslt;}
## Copyright (c) 2004, 2024, Oracle and/or its affiliates. All rights reserved.# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.## This code is free software; you can redistribute it and/or modify it# under the terms of the GNU General Public License version 2 only, as# published by the Free Software Foundation.## This code is distributed in the hope that it will be useful, but WITHOUT# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License# version 2 for more details (a copy is included in the LICENSE file that# accompanied this code).## You should have received a copy of the GNU General Public License version# 2 along with this work; if not, write to the Free Software Foundation,# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.## Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA# or visit www.oracle.com if you need additional information or have any# questions.##include "defs.S.inc"# NOTE WELL! The _Copy functions are called directly# from server-compiler-generated code via CallLeafNoFP,# which means that they *must* either not use floating# point or use it in the same manner as does the server# compiler..text.align 16DECLARE_FUNC(SpinPause):repnopmovq $1, %raxret# Support for void Copy::arrayof_conjoint_bytes(void* from,# void* to,# size_t count)# rdi - from# rsi - to# rdx - count, treated as ssize_t#.p2align 4,,15DECLARE_FUNC(_Copy_arrayof_conjoint_bytes):movq %rdx,%r8 # byte countshrq $3,%rdx # qword countcmpq %rdi,%rsileaq -1(%rdi,%r8,1),%rax # from + bcount*1 - 1jbe acb_CopyRightcmpq %rax,%rsijbe acb_CopyLeftacb_CopyRight:leaq -8(%rdi,%rdx,8),%rax # from + qcount*8 - 8leaq -8(%rsi,%rdx,8),%rcx # to + qcount*8 - 8negq %rdxjmp 7f.p2align 4,,151: movq 8(%rax,%rdx,8),%rsimovq %rsi,8(%rcx,%rdx,8)addq $1,%rdxjnz 1b2: testq $4,%r8 # check for trailing dwordjz 3fmovl 8(%rax),%esi # copy trailing dwordmovl %esi,8(%rcx)addq $4,%raxaddq $4,%rcx # original %rsi is trashed, so we# can't use it as a base register3: testq $2,%r8 # check for trailing wordjz 4fmovw 8(%rax),%si # copy trailing wordmovw %si,8(%rcx)addq $2,%rcx4: testq $1,%r8 # check for trailing bytejz 5fmovb -1(%rdi,%r8,1),%al # copy trailing bytemovb %al,8(%rcx)5: ret.p2align 4,,156: movq -24(%rax,%rdx,8),%rsimovq %rsi,-24(%rcx,%rdx,8)movq -16(%rax,%rdx,8),%rsimovq %rsi,-16(%rcx,%rdx,8)movq -8(%rax,%rdx,8),%rsimovq %rsi,-8(%rcx,%rdx,8)movq (%rax,%rdx,8),%rsimovq %rsi,(%rcx,%rdx,8)7: addq $4,%rdxjle 6bsubq $4,%rdxjl 1bjmp 2bacb_CopyLeft:testq $1,%r8 # check for trailing bytejz 1fmovb -1(%rdi,%r8,1),%cl # copy trailing bytemovb %cl,-1(%rsi,%r8,1)subq $1,%r8 # adjust for possible trailing word1: testq $2,%r8 # check for trailing wordjz 2fmovw -2(%rdi,%r8,1),%cx # copy trailing wordmovw %cx,-2(%rsi,%r8,1)2: testq $4,%r8 # check for trailing dwordjz 5fmovl (%rdi,%rdx,8),%ecx # copy trailing dwordmovl %ecx,(%rsi,%rdx,8)jmp 5f.p2align 4,,153: movq -8(%rdi,%rdx,8),%rcxmovq %rcx,-8(%rsi,%rdx,8)subq $1,%rdxjnz 3bret.p2align 4,,154: movq 24(%rdi,%rdx,8),%rcxmovq %rcx,24(%rsi,%rdx,8)movq 16(%rdi,%rdx,8),%rcxmovq %rcx,16(%rsi,%rdx,8)movq 8(%rdi,%rdx,8),%rcxmovq %rcx,8(%rsi,%rdx,8)movq (%rdi,%rdx,8),%rcxmovq %rcx,(%rsi,%rdx,8)5: subq $4,%rdxjge 4baddq $4,%rdxjg 3bret# Support for void Copy::arrayof_conjoint_jshorts(void* from,# void* to,# size_t count)# Equivalent to# conjoint_jshorts_atomic## If 'from' and/or 'to' are aligned on 4- or 2-byte boundaries, we# let the hardware handle it. The tow or four words within dwords# or qwords that span cache line boundaries will still be loaded# and stored atomically.## rdi - from# rsi - to# rdx - count, treated as ssize_t#.p2align 4,,15DECLARE_FUNC(_Copy_arrayof_conjoint_jshorts):DECLARE_FUNC(_Copy_conjoint_jshorts_atomic):movq %rdx,%r8 # word countshrq $2,%rdx # qword countcmpq %rdi,%rsileaq -2(%rdi,%r8,2),%rax # from + wcount*2 - 2jbe acs_CopyRightcmpq %rax,%rsijbe acs_CopyLeftacs_CopyRight:leaq -8(%rdi,%rdx,8),%rax # from + qcount*8 - 8leaq -8(%rsi,%rdx,8),%rcx # to + qcount*8 - 8negq %rdxjmp 6f1: movq 8(%rax,%rdx,8),%rsimovq %rsi,8(%rcx,%rdx,8)addq $1,%rdxjnz 1b2: testq $2,%r8 # check for trailing dwordjz 3fmovl 8(%rax),%esi # copy trailing dwordmovl %esi,8(%rcx)addq $4,%rcx # original %rsi is trashed, so we# can't use it as a base register3: testq $1,%r8 # check for trailing wordjz 4fmovw -2(%rdi,%r8,2),%si # copy trailing wordmovw %si,8(%rcx)4: ret.p2align 4,,155: movq -24(%rax,%rdx,8),%rsimovq %rsi,-24(%rcx,%rdx,8)movq -16(%rax,%rdx,8),%rsimovq %rsi,-16(%rcx,%rdx,8)movq -8(%rax,%rdx,8),%rsimovq %rsi,-8(%rcx,%rdx,8)movq (%rax,%rdx,8),%rsimovq %rsi,(%rcx,%rdx,8)6: addq $4,%rdxjle 5bsubq $4,%rdxjl 1bjmp 2bacs_CopyLeft:testq $1,%r8 # check for trailing wordjz 1fmovw -2(%rdi,%r8,2),%cx # copy trailing wordmovw %cx,-2(%rsi,%r8,2)1: testq $2,%r8 # check for trailing dwordjz 4fmovl (%rdi,%rdx,8),%ecx # copy trailing dwordmovl %ecx,(%rsi,%rdx,8)jmp 4f2: movq -8(%rdi,%rdx,8),%rcxmovq %rcx,-8(%rsi,%rdx,8)subq $1,%rdxjnz 2bret.p2align 4,,153: movq 24(%rdi,%rdx,8),%rcxmovq %rcx,24(%rsi,%rdx,8)movq 16(%rdi,%rdx,8),%rcxmovq %rcx,16(%rsi,%rdx,8)movq 8(%rdi,%rdx,8),%rcxmovq %rcx,8(%rsi,%rdx,8)movq (%rdi,%rdx,8),%rcxmovq %rcx,(%rsi,%rdx,8)4: subq $4,%rdxjge 3baddq $4,%rdxjg 2bret# Support for void Copy::arrayof_conjoint_jints(jint* from,# jint* to,# size_t count)# Equivalent to# conjoint_jints_atomic## If 'from' and/or 'to' are aligned on 4-byte boundaries, we let# the hardware handle it. The two dwords within qwords that span# cache line boundaries will still be loaded and stored atomically.## rdi - from# rsi - to# rdx - count, treated as ssize_t#.p2align 4,,15DECLARE_FUNC(_Copy_arrayof_conjoint_jints):DECLARE_FUNC(_Copy_conjoint_jints_atomic):movq %rdx,%r8 # dword countshrq %rdx # qword countcmpq %rdi,%rsileaq -4(%rdi,%r8,4),%rax # from + dcount*4 - 4jbe aci_CopyRightcmpq %rax,%rsijbe aci_CopyLeftaci_CopyRight:leaq -8(%rdi,%rdx,8),%rax # from + qcount*8 - 8leaq -8(%rsi,%rdx,8),%rcx # to + qcount*8 - 8negq %rdxjmp 5f.p2align 4,,151: movq 8(%rax,%rdx,8),%rsimovq %rsi,8(%rcx,%rdx,8)addq $1,%rdxjnz 1b2: testq $1,%r8 # check for trailing dwordjz 3fmovl 8(%rax),%esi # copy trailing dwordmovl %esi,8(%rcx)3: ret.p2align 4,,154: movq -24(%rax,%rdx,8),%rsimovq %rsi,-24(%rcx,%rdx,8)movq -16(%rax,%rdx,8),%rsimovq %rsi,-16(%rcx,%rdx,8)movq -8(%rax,%rdx,8),%rsimovq %rsi,-8(%rcx,%rdx,8)movq (%rax,%rdx,8),%rsimovq %rsi,(%rcx,%rdx,8)5: addq $4,%rdxjle 4bsubq $4,%rdxjl 1bjmp 2baci_CopyLeft:testq $1,%r8 # check for trailing dwordjz 3fmovl -4(%rdi,%r8,4),%ecx # copy trailing dwordmovl %ecx,-4(%rsi,%r8,4)jmp 3f1: movq -8(%rdi,%rdx,8),%rcxmovq %rcx,-8(%rsi,%rdx,8)subq $1,%rdxjnz 1bret.p2align 4,,152: movq 24(%rdi,%rdx,8),%rcxmovq %rcx,24(%rsi,%rdx,8)movq 16(%rdi,%rdx,8),%rcxmovq %rcx,16(%rsi,%rdx,8)movq 8(%rdi,%rdx,8),%rcxmovq %rcx,8(%rsi,%rdx,8)movq (%rdi,%rdx,8),%rcxmovq %rcx,(%rsi,%rdx,8)3: subq $4,%rdxjge 2baddq $4,%rdxjg 1bret# Support for void Copy::arrayof_conjoint_jlongs(jlong* from,# jlong* to,# size_t count)# Equivalent to# conjoint_jlongs_atomic# arrayof_conjoint_oops# conjoint_oops_atomic## rdi - from# rsi - to# rdx - count, treated as ssize_t#.p2align 4,,15DECLARE_FUNC(_Copy_arrayof_conjoint_jlongs):DECLARE_FUNC(_Copy_conjoint_jlongs_atomic):cmpq %rdi,%rsileaq -8(%rdi,%rdx,8),%rax # from + count*8 - 8jbe acl_CopyRightcmpq %rax,%rsijbe acl_CopyLeftacl_CopyRight:leaq -8(%rsi,%rdx,8),%rcx # to + count*8 - 8negq %rdxjmp 3f1: movq 8(%rax,%rdx,8),%rsimovq %rsi,8(%rcx,%rdx,8)addq $1,%rdxjnz 1bret.p2align 4,,152: movq -24(%rax,%rdx,8),%rsimovq %rsi,-24(%rcx,%rdx,8)movq -16(%rax,%rdx,8),%rsimovq %rsi,-16(%rcx,%rdx,8)movq -8(%rax,%rdx,8),%rsimovq %rsi,-8(%rcx,%rdx,8)movq (%rax,%rdx,8),%rsimovq %rsi,(%rcx,%rdx,8)3: addq $4,%rdxjle 2bsubq $4,%rdxjl 1bret4: movq -8(%rdi,%rdx,8),%rcxmovq %rcx,-8(%rsi,%rdx,8)subq $1,%rdxjnz 4bret.p2align 4,,155: movq 24(%rdi,%rdx,8),%rcxmovq %rcx,24(%rsi,%rdx,8)movq 16(%rdi,%rdx,8),%rcxmovq %rcx,16(%rsi,%rdx,8)movq 8(%rdi,%rdx,8),%rcxmovq %rcx,8(%rsi,%rdx,8)movq (%rdi,%rdx,8),%rcxmovq %rcx,(%rsi,%rdx,8)acl_CopyLeft:subq $4,%rdxjge 5baddq $4,%rdxjg 4bret


JAVA JDK的源码是C,C++,ASM实现,其中编译原理,算法,数据结构,JIT等技术点知识已经融入到代码里。




通过学习《程序员内功修炼》《编译器实现》《github c语言大型开源项目源码吸收转化实践》这3门课程足以。


https://beifengisnil.github.io/
talk is cheap, show me the code
这个code里面欧美程序员已经将编译原理,算法,数据结构,操作系统,数学,工程,AI等不计其数的知识体系已经融入实现到代码里,并且持续用了几十年,这些code是面向全球用户市场的,且具有强大的技术经济价值,创新能力,市场开发能力,这几十年的编译原理,算法,数学,工程,AI等知识早就code等着你去吸收转化。
code已经给你show了,就看你有没有一套系统的方法去吸收,这3门课程主要传授的是一套系统的方法去获取和运用各种技术知识,而不是教你一门技术,技术是会过时的。
相关文章:
如何具备阅读JAVA JDK虚拟机源码能力
源码位置https://github.com/openjdk/jdk 核心实现源码[部分截图] /* * Copyright (c) 1995, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistr…...
Python | Leetcode Python题解之第514题自由之路
题目: 题解: Test "godding" target "d"i 0left i lc 0 right i rc 0while Test[left] ! target:left - 1lc 1if left -1:left len(Test) - 1while Test[right] ! target:right 1rc 1if right len(Test):right 0prin…...
Docker 镜像下载问题及解决办法
Docker 镜像下载问题及解决办法 我在杂乱的、破旧的村庄寂寞地走过漫长的雨季,将我年少的眼光从晦暗的日子里打捞出来的是一棵棵开花的树,它们以一串串卓然不俗的花擦明了我的眼睛,也洗净了我的灵魂。 引言 在使用 Docker 时,用户…...
2分钟搞定 HarmonyOs Next创建模拟器
官方文档参考链接: 创建模拟器-管理模拟器-使用模拟器运行应用/服务-应用/服务运行-DevEco Studio - 华为HarmonyOS开发者https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/ide-emulator-create-V5 1. 首先打开Device Manager 2. 进入这个界面后…...
方形件排样优化与订单组批问题探析
方形件排样优化与订单组批问题是计算复杂度很高的组合优化问题,在工业工程中有很广泛的应用背景。为实现个性化定制生产模式,企业会选择订单组批的方式,继而通过排样优化实现批量切割,加工完成后再按照不同客户需求进行分拣&#…...
vue3组件通信--自定义事件
自定义事件是典型的子传父的方法。 为什么叫自定义事件呢?是因为我们用sendToy"getToy"这种格式写,很显然,在DOM中,没有叫sendToy的事件。 父组件FatherComponent.vue: <script setup> import ChildComponent fr…...
ubuntu 安装k3s
配置hostname的方法为 hostnamectl set-hostname k3sserver hostnamectlsudo apt-get update && sudo apt-get upgrade -y sudo apt-get install -y curl#手动下载v1.31.1k3s1 https://github.com/k3s-io/k3s/releases/tag/v1.31.1%2Bk3s1 #将k3s-airgap-images-amd64…...
SQL CHECK 约束:确保数据完整性的关键
SQL CHECK 约束:确保数据完整性的关键 在数据库管理中,确保数据的完整性和准确性是至关重要的。SQL(Structured Query Language)提供了多种约束条件来帮助实现这一目标,其中之一就是 CHECK 约束。本文将深入探讨 SQL CHECK 约束的概念、用法和优势,并展示如何在不同的数…...
C++ | Leetcode C++题解之第502题IPO
题目: 题解: typedef pair<int,int> pii;class Solution { public:int findMaximizedCapital(int k, int w, vector<int>& profits, vector<int>& capital) {int n profits.size();int curr 0;priority_queue<int, vect…...
《虚拟现实的边界:探索虚拟世界的未来可能》
内容概要 在虚拟现实(VR)技术的浪潮中,我们见证了其从实验室的奇想逐渐走向日常生活的非凡旅程。技术发展的背后是不断突破的创新,早期的设备虽然笨重,但如今却趋向精致、轻巧,用户体验显著提升。想象一下…...
Rust教程
2024 Rust现代实用教程:1.1Rust简介与安装更新––2024 Rust现代实用教程:1.2编译器与包管理工具以及开发环境–––––––––––...
测试代理IP的有效性和可用性
使用代理IP的有效性和可用性直接关系到用户的工作效率,尤其是在进行数据抓取、网络爬虫和保护个人隐私等场景中。 一、测试代理IP的必要性 代理IP的可用性测试是确保代理服务正常运行的重要步骤。测试代理IP的必要性主要体现在以下几个方面: 提升工作…...
散列表:为什么经常把散列表和链表放在一起使用?
散列表:为什么经常把散列表和链表放在一起使用? 在计算机科学中,散列表(哈希表)和链表是两种常见的数据结构。你可能会好奇,为什么它们经常被放在一起使用呢?让我们一起来深入探讨这个问题。 一、散列表的特点 散列表是一种根据关键码值(Key value)而直接进行访问的…...
计算机网络:网络层 —— IPv4 地址与 MAC 地址 | ARP 协议
文章目录 IPv4地址与MAC地址的封装位置IPv4地址与MAC地址的关系地址解析协议ARP工作原理ARP高速缓存表 IPv4地址与MAC地址的封装位置 在数据传输过程中,每一层都会添加自己的头部信息,最终形成完整的数据包。具体来说: 应用层生成的应用程序…...
PMP--一、二、三模、冲刺、必刷--分类--10.沟通管理--技巧--文化意识
文章目录 技巧一模10.沟通管理--1.规划沟通管理--文化意识--军事背景和非军事背景人员有文化差异文化意识:题干关键词 “两拨人的背景不同、文化差异、风格差异”。5、 [单选] 项目团队由前军事和非军事小组成员组成。没有军事背景的团队成员认为前军事团队成员在他…...
FileReader和FileWriter
FileReader 使用read()方法读取单个字符,下面是如何修改使程序性能更好的过程。 第一种:处理异常方式为throws Testpublic void test() throws IOException {//读取hello.txt,并显示内容// 创建文件对象File file new File("hello.txt…...
【UE5】将2D切片图渲染为体积纹理,最终实现使用RT实时绘制体积纹理【第六篇-阶段总结篇】
因为马上就要进入下一个阶段,制作动态编辑体积纹理的模块。 但在这之前,要在这一章做最后一些整理。 首先,我们完成没完成的部分。其次,最后整理一下图表。最后,本文附上正在用的贴图 完善Shader 还记得我们之前注…...
地球村上一些可能有助于赚钱的20个思维方式
地球村上一些可能有助于赚钱的20个思维方式: 1. 目标导向思维:明确自己的财务目标,并制定详细、可执行的计划来逐步实现。 2. 创新思维:不断寻求新的商业机会和独特的解决方案,以在竞争激烈的市场中脱颖而出。 3. 价值…...
0基础入门matlab
目录 一、命令 二、变量命名 三、数据类型 数字 字符和字符串 矩阵 rand、randi和randn的区别? 元胞数组和结构体 MAGIC 结构体 四、矩阵构造、四则运算、矩阵下标 五、MATLAB逻辑与流程控制 六、MATLAB绘图 二维平面绘图 三维平面绘图 导出图片 内…...
【前端】实操tips集合
1. 关闭vue中组件名字的多词校验 (1) package.json文件中修改eslint配置 "eslintConfig": {"rules": {"vue/multi-word-component-names":"off" }}, (2).eslintrc.js或者.eslintrc配置文件中进行配置 modu…...
多云管理“拦路虎”:深入解析网络互联、身份同步与成本可视化的技术复杂度
一、引言:多云环境的技术复杂性本质 企业采用多云策略已从技术选型升维至生存刚需。当业务系统分散部署在多个云平台时,基础设施的技术债呈现指数级积累。网络连接、身份认证、成本管理这三大核心挑战相互嵌套:跨云网络构建数据…...
基于服务器使用 apt 安装、配置 Nginx
🧾 一、查看可安装的 Nginx 版本 首先,你可以运行以下命令查看可用版本: apt-cache madison nginx-core输出示例: nginx-core | 1.18.0-6ubuntu14.6 | http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages ng…...
DIY|Mac 搭建 ESP-IDF 开发环境及编译小智 AI
前一阵子在百度 AI 开发者大会上,看到基于小智 AI DIY 玩具的演示,感觉有点意思,想着自己也来试试。 如果只是想烧录现成的固件,乐鑫官方除了提供了 Windows 版本的 Flash 下载工具 之外,还提供了基于网页版的 ESP LA…...
数据链路层的主要功能是什么
数据链路层(OSI模型第2层)的核心功能是在相邻网络节点(如交换机、主机)间提供可靠的数据帧传输服务,主要职责包括: 🔑 核心功能详解: 帧封装与解封装 封装: 将网络层下发…...
C++八股 —— 单例模式
文章目录 1. 基本概念2. 设计要点3. 实现方式4. 详解懒汉模式 1. 基本概念 线程安全(Thread Safety) 线程安全是指在多线程环境下,某个函数、类或代码片段能够被多个线程同时调用时,仍能保证数据的一致性和逻辑的正确性…...
springboot整合VUE之在线教育管理系统简介
可以学习到的技能 学会常用技术栈的使用 独立开发项目 学会前端的开发流程 学会后端的开发流程 学会数据库的设计 学会前后端接口调用方式 学会多模块之间的关联 学会数据的处理 适用人群 在校学生,小白用户,想学习知识的 有点基础,想要通过项…...
七、数据库的完整性
七、数据库的完整性 主要内容 7.1 数据库的完整性概述 7.2 实体完整性 7.3 参照完整性 7.4 用户定义的完整性 7.5 触发器 7.6 SQL Server中数据库完整性的实现 7.7 小结 7.1 数据库的完整性概述 数据库完整性的含义 正确性 指数据的合法性 有效性 指数据是否属于所定…...
Webpack性能优化:构建速度与体积优化策略
一、构建速度优化 1、升级Webpack和Node.js 优化效果:Webpack 4比Webpack 3构建时间降低60%-98%。原因: V8引擎优化(for of替代forEach、Map/Set替代Object)。默认使用更快的md4哈希算法。AST直接从Loa…...
【MATLAB代码】基于最大相关熵准则(MCC)的三维鲁棒卡尔曼滤波算法(MCC-KF),附源代码|订阅专栏后可直接查看
文章所述的代码实现了基于最大相关熵准则(MCC)的三维鲁棒卡尔曼滤波算法(MCC-KF),针对传感器观测数据中存在的脉冲型异常噪声问题,通过非线性加权机制提升滤波器的抗干扰能力。代码通过对比传统KF与MCC-KF在含异常值场景下的表现,验证了后者在状态估计鲁棒性方面的显著优…...
pikachu靶场通关笔记19 SQL注入02-字符型注入(GET)
目录 一、SQL注入 二、字符型SQL注入 三、字符型注入与数字型注入 四、源码分析 五、渗透实战 1、渗透准备 2、SQL注入探测 (1)输入单引号 (2)万能注入语句 3、获取回显列orderby 4、获取数据库名database 5、获取表名…...
