C++ Standard Templates (STL) – Type Support (type attributes, is_abstract, is_signed, is_unsigned)

Type attributes A type attribute defines a compile-time template-based structure for querying or modifying the properties of a type. Attempting to specialize a template defined in the header results in undefined behavior, except that std::common_type can be specialized as described. Templates defined in the header file may be instantiated with incomplete types unless otherwise specified, […]

Flutter self-signed certificate

Preface The server in the Flutter project uses a self-signed certificate. If you directly use https request or wss request, a certificate signing error will be reported. HandshakeException: Handshake error in client (OS Error: I/flutter (28959): │ CERTIFICATE_VERIFY_FAILED: unable to get local issuer certificate(handshake.cc:359)) or CERTIFICATE_VERIFY_FAILED: self signed certificate in certificate chain(handshake.cc:354)) Trust self-signed certificates […]

Detailed restoration of one of the reasons why Elasticsearch cluster sharding appears unassigned

Personal homepage: IT Pindao_Big data OLAP system technology stack, Apache Doris, Clickhouse technology-CSDN blog Private chat with bloggers: Join the big data technology discussion group chat to get more big data information. Blogger’s personal B stack address: Brother Bao teaches you about big data’s personal space – Brother Bao teaches you about big data personal […]

[Question Solving] Integer is assigned a constant 1 in auto-boxing, why does == determine true and false (JDK source code, internal buffer)

Table of Contents answer: 1.low and high values in the if statement 2. What is returned in the if block 3.Outside the if statement block Summarize Question code JDK source code related source code The problem comes from the Integer exercise during the lecture The first reaction at that time was false true true There […]

Multi-level cache in microservice architecture should be designed like this!

Thisisacommunitythatmaybeusefultoyou One-to-onecommunication/interviewbrochure/resumeoptimization/jobsearchquestions,welcometojointhe”YudaoRapidDevelopmentPlatform“KnowledgePlanet.ThefollowingissomeinformationprovidedbyPlanet: “ProjectPractice(Video)”:Learnfrombooks,“practice”frompastevents “InternetHighFrequencyInterviewQuestions”:Studyingwithyourresume,springblossoms “ArchitecturexSystemDesign”:Overcomingdifficultiesandmasteringhigh-frequencyinterviewscenarioquestions “AdvancingJavaLearningGuide”:systematiclearning,themainstreamtechnologystackoftheInternet “Must-readJavaSourceCodeColumn”:Knowwhatitisandwhyitisso Thisisanopensourceprojectthatmaybeusefultoyou DomesticStarisa100,000+opensourceproject.Thefront-endincludesmanagementbackend+WeChatapplet,andtheback-endsupportsmonomerandmicroservicearchitecture. FunctionscoverRBACpermissions,SaaSmulti-tenancy,datapermissions,mall,payment,workflow,large-screenreports,WeChatpublicaccount,etc.: Bootaddress:https://gitee.com/zhijiantianya/ruoyi-vue-pro Cloudaddress:https://gitee.com/zhijiantianya/yudao-cloud Videotutorial:https://doc.iocoder.cn Source:Internet Multi-levelcachedesigninmicroservicearchitecture clientcache Applicationlayercaching CDNContentDeliveryNetwork Nginxcachemanagement Servicelayercaching In-processcache Distributedcacheservice Ensurecacheconsistency summary Todaywewilltalkaboutthetopicofcachingandseehowtodesignaneffectivemulti-levelcachearchitectureinamicroserviceenvironment.Itmainlyinvolvesthreeaspects: Client-sidecachingforwebapplications; Applicationlayerstaticresourcecaching; Servicelayermulti-levelcaching. First,let’sexplainthemulti-levelcachedesignofmicroservicearchitecture. Multi-levelcachedesigninmicroservicearchitecture Whenitcomestocaching,everysoftwareengineermustbefamiliarwithit.Itisthemostdirectwaytoimproveperformanceincurrentarchitecturedesign.Herewegiveanexample: Rediscache AssumethattheapplicationstoresrawdatainaMySQLdatabase.Asweallknow,theMySQLdatabasestoresdataontheharddisktopreventlossduetopowerfailure.However,duetothephysicaldesignoftheharddisk,eventhebest-performingenterprise-classSSDharddiskisanorderofmagnitudeworsethantheIOlevelofhigh-speeddevicessuchasmemory.Internetapplicationsrepresentedbye-commercecompaniessuchasTaobaoandJD.comaretypicalscenariosof”morereadingandlesswriting”.Therefore,weneedtoseparatethereadingandwritingofdatainthedesign.Whendataisloaded,itisdirectlyplacedonthediskforprocessing,whilemorethan90%ofthedatareadingoperationsareextractedfromthein-memoryNoSQLdatabaserepresentedbyRedis,andthehighthroughputofthememoryisusedtocompletethedataextractioninstantly.TheroleofRedishereiswhatweoftensaycache. Ofcourse,cachingisnotjustaformofreplacingharddiskswithmemory.Inadistributedarchitecture,cachinghasitsowndesignateachlayer.Let’sexplainitthroughthemulti-levelcachearchitecturediagramofthismicroserviceasthemainline. OverviewofXcachemulti-levelcachearchitecture Thisdiagramcontainsfourlayersfromtoptobottom:Client,applicationlayer,servicelayeranddatalayer. Backendmanagementsystem+userappletimplementedbasedonSpringBoot+MyBatisPlus+Vue&Element,supportingRBACdynamicpermissions,multi-tenancy,datapermissions,workflow,three-partylogin,payment,SMS,mallandotherfunctions Projectaddress:https://github.com/YunaiV/ruoyi-vue-pro Videotutorial:https://doc.iocoder.cn/video/ Clientcache TheXmallclientisabrowser.Atthebrowserlevel,wemainlycachestaticresourcessuchasimages,CSS,JS,andfontsinHTML. browsercache Let’staketheBaiduLogoimageasanexample.BaiducontrolsthevalidityperiodofthestaticimagethroughtheExpiresresponseheaderinHTTP.Expiresrepresentsexpirationtime.ThecurrentBaiduLogoexpirationtimeisFebruary8,2031,9:26:31.Duringthisperiodoftime,thebrowserwillcachetheimagelocallyasafile.Whenyouvisitagain,youwillseetheprompt”fromdiskcache”.Atthistime,thebrowserwillnolongermakeanactualrequesttotheserverandwillreaditdirectlyfromthelocalcomputer.Getcachedimages.BysettingExpiresonthebrowserside,thebandwidthlosscausedbyrepeatedrequestsforstaticresourcescanbegreatlyreduced.Thisisabasicandimportantsettinginhigh-concurrencywebapplications. Backendmanagementsystem+userappletimplementedbasedonSpringCloudAlibaba+Gateway+Nacos+RocketMQ+Vue&Element,supportingRBACdynamicpermissions,multi-tenancy,datapermissions,workflow,three-partylogin,payment,SMS,mallandotherfunctions Projectaddress:https://github.com/YunaiV/yudao-cloud Videotutorial:https://doc.iocoder.cn/video/ Applicationlayercache SowhereisExpiresset?Forthebrowser,itisjustaclientandisonlyresponsibleforreadingtheExpiresresponseheader.Expiresmustbesetattheapplicationlayer,thatis,CDNandNginx. CDNContentDeliveryNetwork ThefullnameofCDNisContentDeliveryNetwork,whichisthecontentdistributionnetwork.ItisthemaintechnicalmeansforthedistributionofstaticresourcesontheInternet. CDNContentDeliveryNetwork Chinaisavastcountry,withthousandsofkilometersfromBeijingtoShanghai.IfalargenumberofShanghaiuserswanttoaccesstheresourcesofserversinBeijingthousandsofmilesawayatthesametime,suchalongcommunicationwillinevitablybringhighdelaysandmoreuncontrollablefactorsaffectingdatatransmission.IfthereissomemechanismthatallowsstaticfilesinBeijingtobecachedonserversinShanghai,Shanghaiuserscanautomaticallyaccessthenearestservertoobtainresources.Thiscangreatlyreducenetworklatencyandimprovesystemavailability.ThedistributedcachingtechnologyjustmentionedistheCDN(contentdistributionnetwork)weoftenmention. Forwide-areaInternetapplications,CDNisalmostanecessaryinfrastructure,whicheffectivelysolvestheproblemsofconcentratedbandwidthoccupationanddatadistribution.Staticresourcessuchasimages,audioandvideo,CSS,andJSinwebpagescanbeobtainedfromthenearestCDNserver. ThecoreofCDNtechnologyis”smartDNS”.SmartDNSwillautomaticallydeterminethenearestaccessCDNnodebasedontheuser’sIPaddress.Let’stakethefollowingfigureasanexample: CDNexecutionprocess […]

uview 1 uni-app form number digit input box has been initialized and assigned, but the verification failed

Background: Initialize rules in onReady onReady() { this.$refs.uForm.setRules(this.rules); }, At the same time: ref, model, rules, and props must be configured. Error reporting When the input box limits the type to number, and the digit type has an initial value and no modification is performed, an error will be reported if submitted directly, and verification […]

LMFLOSS: a new hybrid loss function specifically designed to solve imbalanced medical image classification (with code)

Paper address: https://arxiv.org/pdf/2212.12741.pdf Code address: https://github.com/SanaNazari/LMFLoss 1.What is it? LMFLOSS is a hybrid loss function for imbalanced medical image classification. It is composed of a linear combination of Focal Loss and LDAM Loss and is designed to better handle imbalanced data sets. Focal Loss improves model performance by emphasizing hard-to-classify samples, while LDAM Loss takes […]

SpringBoot_minio sdk uses self-signed https certificate error handling

minio sdk uses self-signed https certificate error handling 1.Problem description 1.1 Error log 1.2 maven dependency configuration 1.3 Current spring MinioClient configuration 2.Problem analysis 3.Problem solving 3.1 Use trusted certificates 3.2 Ignore certificate verification 3.2.1 minio client 3.2.2 minio sdk ignores certificate verification 3.2.2.1 Extension: Supplement minioclient request log 4. Problem summary 5. Appendix 1.Problem […]

[C Language | Keywords] Detailed explanation of 32 keywords in C language (2) – modified type part (auto, signed, unsigned, static, extern, const, register, volatile)

Blog homepage:https://blog.csdn.net/wkd_007 Blog content:Embedded development, Linux, C language, C++, data structure, audio and video Content of this article:Introducing the 32 keywords of the standard C language Golden sayings to share:You must try it if you have the chance. In fact, the cost of trial and error is not high, but the cost of missing out […]