• 2024-07-02lenses and apertures
    lensesandaperturesPhotoDemonstrationDepthoffieldDepthoffield(DoF)isoneofthemostimportantconceptsinphotography.ManyphotographersknowthatyoucancontrolDoFbyadjustingaperture.Depthoffieldisthedistancebetweentheclosest
  • 2024-06-16Linux - set
     zzh@ZZHPC:~$helpsetset:set[-abefhkmnptuvxBCHP][-ooption-name][--][arg...]Setorunsetvaluesofshelloptionsandpositionalparameters.Changethevalueofshellattributesandpositionalparameters,ordisplaythenamesan
  • 2024-06-13Python实现:查找文本文件中重复的汉字
    查找文本文件中重复的汉字,找到在所在行号文本文件格式大小多少前后左……text.pyimportosimportrelist=[]same=0total=0index=[]withopen("1.txt","r",encoding="utf-8")asf:forlineinf.readlines():line=line.strip('\n
  • 2024-06-05100. Same Tree
    Giventherootsoftwobinarytreespandq,writeafunctiontocheckiftheyarethesameornot.Twobinarytreesareconsideredthesameiftheyarestructurallyidentical,andthenodeshavethesamevalue.Example1:Input:p=[1,2,3],q=[1,2
  • 2024-05-30CF1593D2. Half of Same
    题目链接:HalfofSame-洛谷|计算机科学教育新生态(luogu.com.cn)WA代码:#include<bits/stdc++.h>usingnamespacestd;#defineMAX44constintN=2e6+6;intarr[MAX];intcnt_1[N];//记录每个数出现的次数intcnt_2[N];//记录每个因数intmain(){intt;c
  • 2024-05-29css12 CSS HEX Colors
    https://www.w3schools.com/css/css_colors_hex.aspAhexadecimalcolorisspecifiedwith:#RRGGBB,wheretheRR(red),GG(green)andBB(blue)hexadecimalintegersspecifythecomponentsofthecolor.HEXValueInCSS,acolorcanbespecifiedusingahex
  • 2024-05-29error Conflict: Multiple assets emit different content to the same filename index.html ERROR in Co
    ERRORFailedtocompilewith1error20:32:04errorConflict:Multipleassetsemitdifferentcontenttothesamefilenameindex.htmlERRORinConflict:Multipleassetsemitdif
  • 2024-05-25Tensors of the same index must be on the same device and the same dtype except `step` tensors that c
    避免使用 torch.set_default_dtype(torch.float64) 可以尝试采用model.Double或者model.to(torch.Double)m=torch().to(device).to(torch.float64)     参考:Tensorsofthesameindexmustbeonthesamedeviceandthesamedtypeexcept`step`t
  • 2024-05-10lesson3
    单词archeologistn考古学家biology/geology/psychology/physiologyprosperousadj经济繁荣的prosperityn繁荣wewillkeeptheprosperityandstabilityoftheHongKongprosperv繁荣thrive/flourishAcompanycantprosper/thrivewithoutinvestmentstoreyn
  • 2024-04-10原语笔记:IDDR和ODDR
    IDDR IDDR的工作模式OPPOSITE_EDGE SAME_EDGEModeSAME_EDGE_PIPELINEDMode    参考使用:generategenvari;for(i=0;i<4;i=i+1)begin:iddr_blockIDDR#(.DDR_CLK_EDGE("SAME_EDGE_PIPELINED"),//"OPP
  • 2024-04-09SqlBulkCopy批量插入数据
    privatevoiduiButton1_Click(objectsender,EventArgse){DataTabledt=newDataTable();dt.Columns.Add("CreateBy",typeof(System.Int64));dt.Columns.Add("CreateTime",typeof(System.Dat
  • 2024-04-03集合
    python通过集合元素找出两个班重名人姓名#使用并集求两个班重名学生的实现#首先输入学生数量num1=int(input('输入班级1的学生数量'))#创建一个空集合class1=set()#使用循环循环录入学生名字foriinrange(0,num1):name=input('请输入第%d名学生的姓名'%(i+1))
  • 2024-03-30深度学习-卷积神经网络--Unet训练推理-60
    目录网络结构importtensorflowastfimportosimportsysimportnumpyasnpfromtqdmimporttqdmfromitertoolsimportchainfromskimage.ioimportimread,imshowfromskimage.transformimportresizeimportrandomimportmatplotlib.pyplotaspltpri
  • 2024-02-18Go语言指南练习:等价二叉查找树
    题目:不同二叉树的叶节点上可以保存相同的值序列。例如,以下两个二叉树都保存了序列1,1,2,3,5,8,13。在大多数语言中,检查两个二叉树是否保存了相同序列的函数都相当复杂。我们将使用Go的并发和信道来编写一个简单的解法。本例使用了tree包,它定义了类型:typeTreestruct{Lef
  • 2024-02-12both methods have same erasure, yet neither overrides the other
    泛型,作为JDK5时代引入的”语法糖“,在编译的时候是会被抹除的,换言之,specialSort(List<Dog>)和specialSort(List<Apple>)在编译时都会变成specialSort(List),因此不符合重载的原则(变量名相同、参数类型或数量不同)。参考:https://blog.csdn.net/m0_37676618/article/details/106714182
  • 2024-02-05list assign in python
    ListAssignwithdifferentstrategiesinPythonHereisacodeblockdefrun_infer(self,g_blocks:List[TraceBlock],max_o_num:int=THREADS_NUM)->Iterable[B_PAIRS]:self.model.eval()_g_blocks=[*g_blocks]_default_inst=ArmInst(opcod
  • 2024-01-182024-01-17
    所谓滑动窗口就是不断移动子序列的起始位置和终止位置,从而得到我们想要的结果。Integer.MAX_VALUE表示int数据类型的最大取值数:2147483647Integer.MIN_VALUE表示int数据类型的最小取值数:-2147483648力扣-滑动窗口-904:找出至多包含两种元素的最长子串,返回其长度classSolutio
  • 2024-01-09Geometry Continuity & Zebra Stripes
    斑马线分析曲面连续性。ContinuitydescriptionsAcurveorsurfacecanbedescribedashavingGn continuity, nG0:Thecurvestouchatthejoinpoint(position).G1:Thecurvesalsoshareacommontangentdirectionatthejoinpoint(tangen
  • 2024-01-05Geometry Continuity & Zebra Stripes
    ContinuitydescriptionsAcurveorsurfacecanbedescribedashavingGn continuity, n beingtheincreasingmeasureofsmoothness.Considerthesegmentseithersideofapointonacurve:G0:Thecurvestouchatthejoinpoint(position).G1:Thecurves
  • 2023-12-27人工智能大模型原理与应用实战:从UNet到Mask RCNN
    1.背景介绍人工智能(ArtificialIntelligence,AI)是一门研究如何让计算机自主地完成人类任务的学科。在过去的几十年里,人工智能主要关注于规则引擎和知识表示。然而,随着数据量的增加和计算能力的提高,深度学习(DeepLearning)成为人工智能领域的一个热门话题。深度学习是一种通过神经网
  • 2023-12-10Linux 笔记
    Whatdoes"{};"meaninthefindcommand?Ifyourun find with exec, {} expandstothefilenameofeachfileordirectoryfoundwith find (sothat ls inyourexamplegetseveryfoundfilenameasanargument-notethatitcalls ls orwhatevero
  • 2023-12-05Go - two bcrypt hashes of the same password are NOT equal
     packagemainimport("fmt""golang.org/x/crypto/bcrypt")funcmain(){password:="abcdef"hashedPassword1,_:=bcrypt.GenerateFromPassword([]byte(password),bcrypt.DefaultCost)fmt.Println(strin
  • 2023-12-02New Type Functions/Utilities for Dealing with Ranges in C++20
    GenericTypesofRanges  类型萃取从字面意思上来说其实就是帮助我们挑选某个对象的类型,筛选特定的对象来做特定的事。可以先来回顾一下以前的写法。#include<vector>#include<iterator>intmain(){std::vectorv{1,2,3};usingiterator_type=std::vecto
  • 2023-11-12Specific Measure of Soil Erosion
     Soilerosionisanongoingthreattomultipleindustriestoday.Oncesoilerodes,itbecomesdifficulttorestorethatlandareatoitsformerproductionlevels.Withsomesimplesoilerosionpreventionmethodsinplace,itispossibletocontroloreve
  • 2023-11-10当devserver的changeOrigin没用,后端还用了same-origin!就这么处理
    changeOrigin:true,pathRewrite:{['^/'+process.env.VUE_APP_BASE_API]:''},headers:{//改写Origin,注意结尾不含/Origin:"http://112.28.109.249:9997",//改写RefererReferer:"http://112.28.109.249:9997/",Host:"112.28