这是用邻接链表作存储结构的图类源代码,下面是图类的声明部分:structArcNode//弧节点结构{intadjvex;ArcNode*nextarc;};structVexNode//顶点结构{intvexdata;ArcNode*firstarc;};//邻接链表图类的声明。
classGraph{private:staticstringstr;bool*visited;//是否访问标志VexNode*adjlist;//邻接链表数组intn;//已有顶点个数intmax;//可容纳的最大顶点个数voiddfs0(intv0,voidvisit(int&v));voidbfs0(intv0,voidvisit(int&v));public:Graph(intl);//建立一个最大顶点数为l的空图Graph(VexNodeadjl[],intl);//构造一个由adj1表示的顶点个数为l的邻接链表对象Graph(intvex[],intarc[],intn);//以vex[]为顶点集,arc[]表示的邻接矩阵建立图voidinstVex(intdata);//插入顶点voidinstArc(intv1,intv2);//插入边stringdfs(intv0,voidvisit(int&v));//深度优先遍历stringbfs(intv0,voidvisit(int&v));//广度优先遍历staticvoidfunc1(int&v);//遍历时执行的函数staticvoidfunc2(int&v);//遍历时执行的函数staticstringinttostr(intv);};
2024/6/29 17:13:18 13KB 邻接链表
1
//仓库管理员类classadmin{public:admin();private:stringname;};//仓库货架类classshelf{public:shelf();private:adminmen;//管理员stringstoreNo;//仓库编号stringkinds;//商品大类stringshelfNo;//货架号};//electricalclassclassele{public:ele();private:stringname;//商品名doubleprice;//介格shelfsh;//所属货架longcount;//商品数量};//管理(组合类)classmana{public:mana();charfirst_face();//首页voidin_storage();//入库voidout_storage();//出库voidselect_ele();//查询voidselect_name();//按商品名称查询voidselect_price();//按商品价格查询voidselect_kind();//按大类查询voidcall_break();//商品报损private:eleaele;shelfashelf;adminabs;};//电器类默认构造函数ele::ele():sh(){name="xxx";//商品名price=0.0;//介格count=0;//商品数量}////仓库货架类默认构造函数shelf::shelf():men(){storeNo="xxx";//仓库编号kinds="xxx";//商品大类shelfNo="xxx";;//货架号}//仓库管理员类admin::admin(){name="xxx";}//管理类默认构造函数mana::mana():aele(),ashelf(),abs(){}
2024/5/17 13:05:35 10KB 管理系统
1
NetworkSecurity:PrivateCommunicationinaPublicWorld第二版
2024/5/3 11:57:48 97.4MB Network Security
1
在WinForm开发中,在处理大量数据时不免会有耗时较长的操作,如果将这些操作放在主线程里,软件界面会有较长时间的“无响应”,降低了用户体验,常用的解决方式是加上进度条。
实现思路--------------------------------------------------------------------------------使用BackgroundWorker(已经封装好的线程工具)控件在后台线程执行费时的操作,在主线程中打开一个进度条窗体显示进度。
实现步骤--------------------------------------------------------------------------------第0步:创建一个具有进度条的窗体,以显示进度新建窗体ProcessForm,设置属性FormBorderStyle为None,添加一个ProcessBar控件,如下图所示:进度条窗体PrcessBar的Style属性设置为MarQuee。
在ProcessForm添加如下公共属性:?1234567891011121314151617181920212223//////设置提示信息///publicstringMessageInfo{set{this.labelInfor.Text=value;}}//////设置进度条显示值///publicintProcessValue{set{this.progressBar1.Value=value;}}//////设置进度条样式///publicProgressBarStyleProcessStyle{set{this.progressBar1.Style=value;}}第1步:创建进度条管理类ProcessOperator在该类中添加如下字段:?12privateBackgroundWorker_backgroundWorker;//后台线程privateProcessForm_processForm;//进度条窗体添加如下公共属性、方法和事件:?123456789101112131415161718192021222324252627282930#region公共方法、属性、事件//////后台执行的操作///publicActionBackgroundWork{get;set;}//////设置进度条显示的提示信息///publicstringMessageInfo{set{_processForm.MessageInfo=value;}}//////后台任务执行完毕后事件///publiceventEventHandlerBackgroundWorkerCompleted;//////开始执行///publicvoidStart(){_backgroundWorker.RunWorkerAsync();_processForm.ShowDialog();}#endregion其中,属性BackgroundWork可以指向一个无参数的方法,这里(客户端代码)用来指向要在
2024/4/20 19:27:33 34KB Winform 进度条 Background Worker
1
BlockchainconceptsandtheHyperledgertechnologiesarehottopics.Hyperledgerisanopensourceprojecttocreateprivateblockchainapplicationsfordifferentdomainsincludingfinance,banking,supplychain,IoTandmuchmore.ThisbookwillbeaneasyreferencetoexploreandbuildblockchainnetworksusingHyperledgerservices.ThisbookwillstartwithexplainingtheblockchainevolutionandthenproceedtoanoverviewoftechnologieslikeEthereum,R3Corda,Coco,andHyperledger.WewilllearnhowtosetupandlaunchHyperledgerFabricinBluemix.WewilllookintothearchitectureandthecomponentsofHyperledgerFabricwhichareusedtobuildprivateblockchainapplications.LaterwewilldelveintohowwecaninteractwithHyperledgerFabricblockchaintobuildprivatenetworksfromscratchcoveringalltherequiredprinciplessuchaschaincode,smartcontracts,cryptocurrenciesandmuchmoreontheHyperledgernetwork.Bytheendofthisbook,youwillbeabletobuildanddeployyourowndecentralizedapplicationsusingHyperledgeraddressingkeypainpointsencounteredinblockchainlifecycle.
2024/3/30 19:03:26 5.61MB Blockchain
1
题目:java拼图游戏姓名学号指导教师(签名)二○一一年七月十四日java拼图游戏[摘要]• 进一步加深对Java语言的理解和掌握:将所学的JAVA知识运用于实践中。
• 课程设计将理论与实践相结合,提供了一个既动手又动脑,独立实践的机会,锻炼我们的分析解决实际问题的能力,提高学生适应实际,实践编程的能力;• 熟练掌握JAVA语言中图形用户界面程序的编写;大体了解怎样用JAVA来编写小游戏的,增强我们实践能力和创新精神的综合培养。
前言编程思路:本练习因为要制作拼图游戏,所以首先要实现图片的导入。
这是通过getImage()函数来实现的,该函数有两个参数,第一个参数指明图片的路径,第二个参数指明图片的名称。
然后,因为要实现图片摆放的随意性,所以要通过initgame()函数来实现。
Initgame()函数是自写函数,在函数体内,通过调用Math.random()函数产生随机数,用来达到图片位置摆放的随意性和随机性。
最后,因为要实现人机交互.,所以首先要通过一系列函数来实现对鼠标事件的监听和响应,这是通过函数addMouseListener(this)和addMouseMotionListener(this)来完成的。
这样程序会区分用户对鼠标不同的操作,正确执行相应的功能。
//首先是程序实现及注释importjava.awt.*;importjava.applet.*;importjava.awt.event.*;publicclasspintuextendsApplet implementsMouseListener,MouseMotionListener{ privateImagepicture; privateGraphicsbuffer; privateImagepic[]; privateImageoff_pic[]; privateGraphicsoff_buf[]; privateImageoff_screen; privateGraphicsoff_buffer; privateImageoff_drag; privateGraphicsoff_drag_buf; privateintmap[][]; privateintran[]; privateintwidth=0; privateintheight=0; privateintlastx; privateintlasty; privateintlast_downx; privateintlast_downy; privateintstepx; privateintstepy; privatebooleanchoose; privatebooleanclick[][]; privatebooleanm_down; privatebooleanm_drag; privatebooleannot_redraw; privatebooleanable; Fontfont1,font2; //程序的初始化 publicvoidinit() {
2024/3/20 15:44:49 799KB java j2ee 课程设计报告
1
C#.net实现学生成绩管理系统namespace学生成绩管理系统{partialclassFormlogin{//////必需的设计器变量。
///privateSystem.ComponentModel.IContainercomponents=null;//////清理所有正在使用的资源。
//////如果应释放托管资源,为true;
否则为false。
protectedoverridevoidDispose(booldisposing){if(disposing&&(components!=null)){components.Dispose();}base.Dispose(disposing);}#regionWindows窗体设计器生成的代码//////设计器支持所需的方法-不要///使用代码编辑器修改此方法的内容。
///privatevoidInitializeComponent(){this.labeluser=newSystem.Windows.Forms.Label();this.textBoxuser=newSystem.Windows.Forms.TextBox();this.labelcode=newSystem.Windows.Forms.Label();this.textBoxcode=newSystem.Windows.Forms.TextBox();this.buttonin=newSystem.Windows.Forms.Button();this.buttonout=newSystem.Windows.Forms.Button();this.SuspendLayout();////labeluser//this.labeluser.Font=newSystem.Drawing.Font("宋体",10.5F,System.Drawing.FontStyle.Regular,System.Drawing.GraphicsUnit.Point,((byte)(134)));this.labeluser.Location=newSystem.Drawing.Point(31,50);this.labeluser.Name="labeluser";this.labeluser.Size=newSystem.Drawing.Size(55,26);this.labeluser.TabIndex=0;this.labeluser.Text="用户名";this.labeluser.TextAlign=System.Drawing.ContentAlignment.MiddleCenter;////textBoxuser//this.textBoxuser.Location=newSystem.Drawing.Point(126,55);this.textBoxuser.Name="textBoxuser";this.textBoxuser.Size=newSystem.Drawing.S
2024/3/13 12:24:54 257KB 学生成绩管理系统(C#)
1
WET(Windows事件跟踪)库该库的目的是使用仅两行用于集成器的代码来挂接Windows上的各种事件跟踪事件。
要求NET5Windows7SP1以上安装包装经理Install-PackageWET.lib-Version0.2.0.NETCLIdotnetaddpackageWET.lib--version0.2.0用法DLL加载挂钩要在每个DLL加载上获取事件挂钩,只需添加一个NuGet参考和以下代码:varmonitor=newETWMonitor();monitor.OnImageLoad+=Monitor_OnImageLoad;privatevoidMonitor_OnImageLoad(objectsender,lib.MonitorItems.ImageLoadMonitorIteme){
2024/3/12 12:31:39 12KB infosec etw windows-event-tracing C#
1
AndroidSM2、SM3、SM4算法支持ServiceProvider及证书制作软件包国密算法JCAJCEServiceProvider,适应版本Android4.2.2~7.0支持SM2的KeyFactory、KeyPairGenerator、Cipher、Signature、X.509CertificateFactory接口支持SM3的MessageDigest接口、SM3withSM2混合算法支持SM4的Cipher、KeyFactory、KeyGenerator、SecretKey接口、相关算法CMAC-SM4、Poly1305-SM4增加java.security.PublicKey的子类SM2PublicKey增加java.security.PrivateKey的子类SM2PrivateKey全功能支持SM3withSM2算法的X.509证书结构体解释与密码运算支持BKS、PKCS#12KeyStore生成、解释、验算X.509v1/v3证书,签名算法支持SM3withSM2、主流RSA、DSA、ECDSA....生成、解释、验算PKCS#10证书申请,签名算法支持SM3withSM2、主流RSA、DSA、ECDSA....***无须打包BouncyCastle支持库,体积小、节约内存***请参阅testSM.java、testCERT.java文件列表:1、AndroidSM.jar--SM2、SM3、SM4算法/证书支持的JCA/JCEServiceProvider类库2、AndroidCRT.jar--X.509数字证书/PKCS#10证书申请相关类库3、bc422.jar--BouncyCastle加密库,Android4.2.2内置版本(由真机导出dex文件转换而得,仅用于编译时选用,勿打包到apk文件中)4、testSM.java--SM2、SM3、SM4算法相关类引用范例5、testCERT.java--X.509数字证书/PKCS#10证书申请相关类引用范例6、readme.txt--本文因条件及精力限制,各类、方法的实现未经严格彻底的测试,不宜用于商业用途软件的开发。
如欲将本开发包发布、上传、拷贝、共享等,务必保持其内容完整性(包括本文)如有需要帮助或者索取源码,请联系suntongo@qq.com,suntongo@hotmail.com
2024/3/2 12:48:53 974KB Android SM2 SM3 SM
1
实验七Java多线程一、实验目的:熟悉利用Thread类建立多线程方法。
熟悉利用Thread接口建立多线程方法。
二、实验内容:1.阅读下列程序,分析并上机检验其功能。
classDelayThreadexendsThread{privatestaticintcount=0;privateintno;privateintdelay;publicDelayThread(){count++;no=count;}publicvoidrun(){try{for(inti=0;i<10;i++){delay=(int)(Math.random()*5000);sleep(delay);System.out.println(“Thread”+no+”withadelay”+delay);}}catch(InterruptedExceptione){}}}publicclassMyThread{publicstaticvoidmain(Stringargs[]){DelayThreadthread1=newDelayThread();DelayThreadthread2=newDelayThread();thread1.start();thread2.start();try{Thread.sleep(1000);}catch(InterruptedExceptione){System.out.println(“Threadwrong”);}}}2.讲上列程序利用Runnable接口改写,并上机检验。
3.利用多线程编写一个模拟时钟(AWT程序、Runnable接口),有时/分/秒针编写一个应用程序,创建三个线程分别显示各自的时间。
三、实验要求:1.通过实验掌握Thread、Runnable使用方法;
2.程序必须能够实现多线程;
3.程序必须能够完成题目要求;
4.写出实验报告。
四、实验步骤:首先分析程序功能,再通过上机运行验证自己的分析,从而掌握通过Thread类建立多线程的方法。
通过将扩展Thread类建立多线程的方法改为利用Runnable接口的方法,掌握通过Runnable接口建立多线程的方法。
2024/2/26 3:55:02 2KB JAVA
1
共 89 条记录 首页 上一页 下一页 尾页
在日常工作中,钉钉打卡成了我生活中不可或缺的一部分。然而,有时候这个看似简单的任务却给我带来了不少烦恼。 每天早晚,我总是得牢记打开钉钉应用,点击"工作台",再找到"考勤打卡"进行签到。有时候因为工作忙碌,会忘记打卡,导致考勤异常,影响当月的工作评价。而且,由于我使用的是苹果手机,有时候系统更新后,钉钉的某些功能会出现异常,使得打卡变得更加麻烦。 另外,我的家人使用的是安卓手机,他们也经常抱怨钉钉打卡的繁琐。尤其是对于那些不太熟悉手机操作的长辈来说,每次打卡都是一次挑战。他们总是担心自己会操作失误,导致打卡失败。 为了解决这些烦恼,我开始思考是否可以通过编写一个全自动化脚本来实现钉钉打卡。经过一段时间的摸索和学习,我终于成功编写出了一个适用于苹果和安卓系统的钉钉打卡脚本。
2024-04-09 15:03 15KB 钉钉 钉钉打卡