58怎么做自己的网站/抖音搜索引擎推广
一个普通的窗体应用,6个button
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using MsWord = Microsoft.Office.Interop.Word;
using Microsoft.Office.Interop.Word;
using System.IO;
using Spire.Doc;
using Spire.Doc.Documents;
using Spire.Doc.Fields;namespace wordcomtest
{public partial class Form1 : Form{public Form1(){InitializeComponent();}private void Form1_Load(object sender, EventArgs e){}public static class common{public static MsWord.Application oWordApplic;//a reference to Wordapplicationpublic static MsWord.Document oDoc;//a reference to thedocumentpublic static string doc_file_name = Directory.GetCurrentDirectory() + @"\content.doc";}private void button1_Click(object sender, EventArgs e){try{if (File.Exists(common.doc_file_name)){File.Delete(common.doc_file_name);}common.oWordApplic = new MsWord.Application();object missing = System.Reflection.Missing.Value;}catch (Exception e2){MessageBox.Show(e2.Message);}try{ }catch (Exception e2){MessageBox.Show(e2.Message);}}private void button2_Click(object sender, EventArgs e){try{MsWord.Range curRange;object curTxt;int curSectionNum = 1;common.oDoc = common.oWordApplic.Documents.Add();common.oDoc.Activate();//Console.WriteLine(" 正在生成文档小节");object section_nextPage = MsWord.WdBreakType.wdSectionBreakNextPage;object page_break = MsWord.WdBreakType.wdPageBreak;//添加三个分节符,共四个小节for (int si = 0; si < 2; si++){common.oDoc.Paragraphs[1].Range.InsertParagraphAfter();common.oDoc.Paragraphs[1].Range.InsertBreak(ref section_nextPage);}}catch (Exception e2){MessageBox.Show(e2.Message);}}private void button3_Click(object sender, EventArgs e){try{int curSectionNum = 1;var curRange = common.oDoc.Sections[curSectionNum].Range.Paragraphs[1].Range;curRange.Select();string one_str, key_word;//摘要的文本来自 abstract.txt 文本文件StreamReader file_abstract = new StreamReader("abstract.txt");common.oWordApplic.Options.Overtype = false;//overtype 改写模式MsWord.Selection currentSelection = common.oWordApplic.Selection;if (currentSelection.Type == MsWord.WdSelectionType.wdSelectionNormal){one_str = file_abstract.ReadLine();//读入题目currentSelection.TypeText(one_str);currentSelection.TypeParagraph(); //添加段落标记currentSelection.TypeText(" 摘要");//写入" 摘要" 二字currentSelection.TypeParagraph(); //添加段落标记key_word = file_abstract.ReadLine();//读入题目one_str = file_abstract.ReadLine();//读入段落文本while (one_str != null){currentSelection.TypeText(one_str);currentSelection.TypeParagraph(); //添加段落标记one_str = file_abstract.ReadLine();}currentSelection.TypeText(" 关键字:");currentSelection.TypeText(key_word);currentSelection.TypeParagraph(); //添加段落标记}file_abstract.Close();}catch (Exception e2){MessageBox.Show(e2.Message);}}private void button4_Click(object sender, EventArgs e){try{int curSectionNum = 3;common.oDoc.Sections[curSectionNum].Range.Paragraphs[1].Range.Select();Range curRange = common.oDoc.Sections[curSectionNum].Range.Paragraphs[1].Range;Console.WriteLine(" 正在设置标题样式");object wdFontSizeIndex;wdFontSizeIndex = 14;//此序号在 word 中的编号是格式 > 显示格式 > 样式和格式 > 显示//14 即是标题一一级标题:三号黑体。common.oWordApplic.ActiveDocument.Styles.get_Item(ref wdFontSizeIndex).ParagraphFormat.Alignment =MsWord.WdParagraphAlignment.wdAlignParagraphCenter;common.oWordApplic.ActiveDocument.Styles.get_Item(ref wdFontSizeIndex).Font.Name = " 黑体";common.oWordApplic.ActiveDocument.Styles.get_Item(ref wdFontSizeIndex).Font.Size = 16;//三号wdFontSizeIndex = 15;//15 即是标题二二级标题:小三号黑体。common.oWordApplic.ActiveDocument.Styles.get_Item(ref wdFontSizeIndex).Font.Name = " 黑体";common.oWordApplic.ActiveDocument.Styles.get_Item(ref wdFontSizeIndex).Font.Size = 15;//小三//用指定的标题来设定文本格式object Style1 = MsWord.WdBuiltinStyle.wdStyleHeading1;//一级标题:三号黑体。object Style2 = MsWord.WdBuiltinStyle.wdStyleHeading2;//二级标题:小三号黑体。common.oDoc.Sections[curSectionNum].Range.Select();var currentSelection = common.oWordApplic.Selection;//读入第一章文本信息StreamReader file_content = new StreamReader("content.txt");var one_str = file_content.ReadLine();//一级标题currentSelection.TypeText(one_str);currentSelection.TypeParagraph(); //添加段落标记one_str = file_content.ReadLine();//二级标题currentSelection.TypeText(one_str);currentSelection.TypeParagraph(); //添加段落标记one_str = file_content.ReadLine();//正文while (one_str != null){currentSelection.TypeText(one_str);currentSelection.TypeParagraph(); //添加段落标记one_str = file_content.ReadLine();//正文}file_content.Close();//段落的对齐方式curRange = common.oDoc.Sections[curSectionNum].Range.Paragraphs[1].Range;curRange.set_Style(ref Style1);common.oDoc.Sections[curSectionNum].Range.Paragraphs[1].Alignment =MsWord.WdParagraphAlignment.wdAlignParagraphCenter;curRange = common.oDoc.Sections[curSectionNum].Range.Paragraphs[2].Range;curRange.set_Style(ref Style2);//第一章正文文本格式for (int i = 3; i < common.oDoc.Sections[curSectionNum].Range.Paragraphs.Count; i++){curRange = common.oDoc.Sections[curSectionNum].Range.Paragraphs[i].Range;curRange.Select();curRange.Font.Name = " 宋体";curRange.Font.Size = 12;common.oDoc.Sections[curSectionNum].Range.Paragraphs[i].LineSpacingRule =MsWord.WdLineSpacing.wdLineSpaceMultiple;//多倍行距,1.25 倍,这里的浮点值是以 point 为单位的,不是行距的倍数common.oDoc.Sections[curSectionNum].Range.Paragraphs[i].LineSpacing = 15f;common.oDoc.Sections[curSectionNum].Range.Paragraphs[i].IndentFirstLineCharWidth(2);}}catch (Exception e2){MessageBox.Show(e2.Message);}}private void button5_Click(object sender, EventArgs e){try{object missing = System.Reflection.Missing.Value;//设置页脚 section 1 摘要int curSectionNum = 1;common.oDoc.Sections[curSectionNum].Range.Select();//进入页脚视图common.oWordApplic.ActiveWindow.ActivePane.View.SeekView =MsWord.WdSeekView.wdSeekCurrentPageFooter;common.oDoc.Sections[curSectionNum].Headers[MsWord.WdHeaderFooterIndex.wdHeaderFooterPrimary].Range.Borders[MsWord.WdBorderType.wdBorderBottom].LineStyle =MsWord.WdLineStyle.wdLineStyleNone;common.oWordApplic.Selection.HeaderFooter.PageNumbers.RestartNumberingAtSection = true;common.oWordApplic.Selection.HeaderFooter.PageNumbers.NumberStyle= MsWord.WdPageNumberStyle.wdPageNumberStyleUppercaseRoman;common.oWordApplic.Selection.HeaderFooter.PageNumbers.StartingNumber = 1;//切换到文档common.oWordApplic.ActiveWindow.ActivePane.View.SeekView =MsWord.WdSeekView.wdSeekMainDocument;//Console.WriteLine(" 正在设置第二节目录页眉内容");//设置页脚 section 2 目录curSectionNum = 2;common.oDoc.Sections[curSectionNum].Range.Select();//进入页脚视图common.oWordApplic.ActiveWindow.ActivePane.View.SeekView =MsWord.WdSeekView.wdSeekCurrentPageFooter;common.oDoc.Sections[curSectionNum].Headers[MsWord.WdHeaderFooterIndex.wdHeaderFooterPrimary].Range.Borders[MsWord.WdBorderType.wdBorderBottom].LineStyle =MsWord.WdLineStyle.wdLineStyleNone;common.oWordApplic.Selection.HeaderFooter.PageNumbers.RestartNumberingAtSection = false;common.oWordApplic.Selection.HeaderFooter.PageNumbers.NumberStyle= MsWord.WdPageNumberStyle.wdPageNumberStyleUppercaseRoman;//oWordApplic.Selection.HeaderFooter.PageNumbers.StartingNumber = 1;//切换到文档common.oWordApplic.ActiveWindow.ActivePane.View.SeekView =MsWord.WdSeekView.wdSeekMainDocument;//第一章页眉页码设置curSectionNum = 3;common.oDoc.Sections[curSectionNum].Range.Select();//切换入页脚视图common.oWordApplic.ActiveWindow.ActivePane.View.SeekView =MsWord.WdSeekView.wdSeekCurrentPageFooter;var currentSelection = common.oWordApplic.Selection;var curRange = currentSelection.Range;//本节页码不续上节common.oWordApplic.Selection.HeaderFooter.PageNumbers.RestartNumberingAtSection = true;//页码格式为阿拉伯common.oWordApplic.Selection.HeaderFooter.PageNumbers.NumberStyle= MsWord.WdPageNumberStyle.wdPageNumberStyleArabic;//起如页码为 1common.oWordApplic.Selection.HeaderFooter.PageNumbers.StartingNumber = 1;//添加页码域object fieldpage = MsWord.WdFieldType.wdFieldPage;common.oWordApplic.Selection.Fields.Add(common.oWordApplic.Selection.Range,ref fieldpage, ref missing, ref missing);//居中对齐common.oWordApplic.Selection.ParagraphFormat.Alignment =MsWord.WdParagraphAlignment.wdAlignParagraphCenter;//本小节不链接到上一节common.oDoc.Sections[curSectionNum].Headers[Microsoft.Office.Interop.Word.WdHeaderFooterIndex.wdHeaderFooterPrimary].LinkToPrevious = false;//切换入正文视图common.oWordApplic.ActiveWindow.ActivePane.View.SeekView =MsWord.WdSeekView.wdSeekMainDocument;}catch (Exception e2){MessageBox.Show(e2.Message);}}private void button6_Click(object sender, EventArgs e){try{//common.oDoc.Fields[1].Update();//保存文档//Console.WriteLine(" 正在保存 Word 文档");//string doc_file_name = Directory.GetCurrentDirectory() + @"\content.doc";object fileName;fileName = common.doc_file_name;common.oDoc.SaveAs(ref fileName);common.oDoc.Close();//释放 COM 资源System.Runtime.InteropServices.Marshal.ReleaseComObject(common.oDoc);common.oDoc = null;common.oWordApplic.Quit();System.Runtime.InteropServices.Marshal.ReleaseComObject(common.oWordApplic);common.oWordApplic = null;Spire.Doc.Document document = new Spire.Doc.Document(@"content.doc");Spire.Doc.Section section = document.AddSection();Spire.Doc.HeaderFooter footer = document.Sections[0].HeadersFooters.Footer;//Add text and image to the footerSpire.Doc.Documents.Paragraph paragraph = footer.AddParagraph();DocPicture footerImage = paragraph.AppendPicture(Image.FromFile("whu.png"));TextRange TR = paragraph.AppendText("Supported and Hosted by the non-profit Wikimedia Foundation.");//Format the text and imageparagraph.Format.HorizontalAlignment = Spire.Doc.Documents.HorizontalAlignment.Left;TR.CharacterFormat.FontName = "Calibri";TR.CharacterFormat.Bold = true;//添加一个Shape,并设置其大小和样式Spire.Doc.Documents.Paragraph paragraph1 = section.AddParagraph();ShapeObject shape = paragraph1.AppendShape(240, 60, ShapeType.TextWave);//设置shape的位置shape.VerticalPosition = 80;shape.HorizontalPosition = 100;//写入艺术字文本和设置斜体shape.WordArt.Text = "艺术字效果";shape.WordArt.Italic = true;//设置文字填充样式shape.FillColor = System.Drawing.Color.Red;shape.StrokeColor = System.Drawing.Color.Gray;// Save the document and launch to see the outputSpire.Doc.Documents.Paragraph paragraph2 = document.Sections[0].Paragraphs[2];Spire.Doc.Fields.Footnote footnote = paragraph2.AppendFootnote(FootnoteType.Footnote);DocumentObject obj = null;for (int i = 0; i < paragraph.ChildObjects.Count; i++){obj = paragraph.ChildObjects[i];if (obj.DocumentObjectType == DocumentObjectType.TextRange){TextRange textRange = obj as TextRange;if (textRange.Text == "推箱子"){//为添加脚注的字符串设置加粗格式textRange.CharacterFormat.Bold = true;//插入脚注paragraph.ChildObjects.Insert(i + 1, footnote);break;}}}TextRange text = footnote.TextBody.AddParagraph().AppendText("推箱子是一款来自日本的古老游戏,其设计目的是训练人的逻辑思维能力。游戏场景一般是设定在空间狭小的仓库中,要求把箱子摆放到指定位置。这就要求玩家巧妙的运用有限的空间和通道,合理的安排箱子的位置和移动次序才可能完成任务。");text.CharacterFormat.FontName = "Arial Black";text.CharacterFormat.FontSize = 9;text.CharacterFormat.TextColor = Color.DarkGray;footnote.MarkerCharacterFormat.FontName = "Calibri";footnote.MarkerCharacterFormat.FontSize = 12;footnote.MarkerCharacterFormat.Bold = true;footnote.MarkerCharacterFormat.TextColor = Color.DarkGreen;document.SaveToFile("content.doc", FileFormat.Doc);//System.Diagnostics.Process.Start("text.docx");}catch (Exception e2){MessageBox.Show(e2.Message);}}}
}
添加com引用

在程序代码源文件中添加命名空间支持:
using MsWord=Microsoft.Office.Interop.Word;
检测到旧的 word 文 档后删除旧文档。
string doc_file_name = Directory.GetCurrentDirectory() + @"\content.doc";
if (File.Exists(doc_file_name))
{
File.Delete(doc_file_name);
}
oWordApplic = new MsWord.Application();
object missing = System.Reflection.Missing.Value;
创建 Word 文档的小节
分节符在 Word 文档中是用来生成小节的控制符,每小节的页眉页脚的内容,页码格式等保持一致。本项目生成的 Word 文档要求有不同的页码格式和页眉内容,首先插入 4 个分节符获得 5 个小节,第 1 小节是摘要内容,第 2 小节是目录,第 3 小节是第一章,第 4 小节是表 格,第 5 小节是图片。第 1, 、 2 小节的页码是大写罗马数字,第 3 、 4 、 5 小节的页码是阿拉伯 数字,且起始页码为 1 。
MsWord.Range curRange;
object curTxt;
int curSectionNum = 1;
oDoc = oWordApplic.Documents.Add(ref missing, ref missing, ref missing, ref missing);
oDoc.Activate();
Console.WriteLine(" 正在生成文档小节");
object section_nextPage = MsWord.WdBreakType.wdSectionBreakNextPage;
object page_break = MsWord.WdBreakType.wdPageBreak;
//添加三个分节符,共四个小节
for (int si = 0; si < 4; si++)
{
oDoc.Paragraphs[1].Range.InsertParagraphAfter();
oDoc.Paragraphs[1].Range.InsertBreak(ref section_nextPage);}
相关文章:

使用com组件编辑word
一个普通的窗体应用,6个button using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; u…...

国产Euler(欧拉)系统安装docker
国产的真™难用呀 生态又差还不开源 血泪经验 解压Docker安装包。 tar zxf docker-19.03.10.tgz 将解压后目录中的文件移动到“/usr/bin”下。 cp docker/* /usr/bin配置docker.service文件。 编辑docker.service文件。 vim /usr/lib/systemd/system/docker.service添加以…...

Linux 进程控制
文章目录 进程创建进程终止进程结果wait函数waitpid函数status参数 进程替换进程替换原理进程替换函数 补充/拓展 进程创建 fork函数 #include <unistd.h>pid_t fork(void);函数返回值: 在父进程中,fork函数返回子进程的进程ID(PID&…...

[ Linux Audio 篇 ] 音频开发入门基础知识
在短视频兴起的背景下,音视频开发越来越受到重视。接下来将为大家介绍音频开发者入门知识,帮助读者快速了解这个领域。 轻柔的音乐、程序员有节奏感的键盘声、嗡嗡的发动机、刺耳的手提钻……这些声音是如何产生的呢?又是如何传到我们耳中的…...

关于高校电子邮件系统开通双因素认证的经验分享-以清华大学为例
清华大学信息化技术中心 马云龙 作者简介: 马云龙,男,清华大学信息化技术中心高级工程师;Coremail管理员社区大咖嘉宾 深耕高校计算机网络/信息化/网络安全岗位20年,对大规模计算机网络及信息系统规划,开发/建设,运维有深刻体会。 目前,越来越多的高校/企业/政府机关…...

「Swift」类淘宝商品瀑布流展示
前言:需要做一个类似于淘宝商品页面的瀑布流展示 结构分析: ps:图片来源 思路分析: 该瀑布流主要还是基于UICollectionView进行展示,只是在cell展示的UICollectionViewFlowLayout需要进行相应调整和自定义ÿ…...

道可云会展元宇宙平台全新升级,打造3D沉浸式展会新模式
随着VR虚拟现实、人工智能、虚拟数字人等元宇宙技术的快速发展,各个行业正试图通过元宇宙技术寻求新的发展突破口,会展行业也不例外。会展作为经贸领域的重要产业形态,越来越多的企业和组织开始寻求通过元宇宙技术为展会赋能,以满…...

Ant Design Pro初始化报错
今天按照官网步骤初始化项目,第一次报错 fatal: unable to access https://github.com/ant-design/ant-design-pro/: SSL certificate problem: unable to get local issuer certificate 致命:无法访问https://github.com/ant-design/ant-design-pro/&…...

第16届中国R会议暨2023X-AGI大会开幕,和鲸科技分享ModelOps在数据科学平台中的实践与应用
11月25日,第 16 届中国 R 会议暨 2023 X-AGI 大会在在中国人民大学逸夫会堂拉开帷幕,本次会议由中国人民大学统计学院、中国人民大学应用统计科学研究中心、统计之都、原灵科技和中国商业统计学会人工智能分会(筹)主办,…...

❀My学习Linux命令小记录(12)❀
目录 ❀My学习Linux命令小记录(12)❀ 46.arp指令 47.tcpdump指令 48.chmod指令 49.chown指令 50.bash调用脚本指令 shell介绍 shell脚本的组成部分 脚本执行方式 检查脚本语法 bash之变量 变量的种类:根据生效的范围不同来区分 …...

MySQL学习day05
DCL(Data Control Language)数据控制语言学习 作用:用来创建数据库用户、控制数据库的访问权限 1)查询用户: use mysql; select * from user; 2)创建用户: create user 用户名主机名 identifi…...

JAVA面试题7
1.Java中的ClassLoader是什么? 它有什么作用? 答案:ClassLoader是一种加载Java类文件的机制,可以从不同的来源加载类文件,如本地文件系统、网络等。ClassLoader可以帮助实现模块化开发和动态加载类等功能。 2.什么是J…...

好用免费的AI换脸5个工具
在当今社会的发展中,人工智能(Artificial Intelligence, AI)扮演着关键的角色,其应用领域不断扩展。作为AI的一个分支,换脸技术近年来备受欢迎。这项技术使得将一个人的面部特征迁移到另一个人的照片或视频成为可能。除…...

【Linux】公网远程访问AMH服务器管理面板
目录 1. Linux 安装AMH 面板2. 本地访问AMH 面板3. Linux安装Cpolar4. 配置AMH面板公网地址5. 远程访问AMH面板6. 固定AMH面板公网地址 AMH 是一款基于 Linux 系统的服务器管理面板,它提供了一系列的功能,包括网站管理、FTP 管理、数据库管理、DNS 管理、…...

随笔-这都是命吗
我与鹏哥、小付有个小群,前几天,鹏哥在群里发了一个图,是他那个城市准备扶持的高新产业,有元宇宙、量子信息、生物制药、人工智能什么的。 先前的时候鹏哥给我说过,当地准备了六百多亩地,准备发展高新产业…...

优化网站性能,从容谈CDN加速的部署与运维
随着互联网的迅猛发展,网站的性能优化成为网站运维工作中不可或缺的一环。其中,CDN(Content Delivery Network)加速技术因其在全球范围内提供快速、可靠的内容分发而备受关注。本文将从一个网站运维的角度出发,深入探讨…...

JavaScript-事件
事件 事件流 指的是事件完整执行过程中的流动路径 两个阶段: 捕获阶段:从大到小冒泡阶段:从小到大 实际开发中都是使用事件冒泡为主 事件捕获 从DOM的根元素开始取执行对应的事件(从外到里) document.addEventLis…...

linux的磁盘管理
Linux 提供了多种工具和技术来进行磁盘管理。下面是对 Linux 磁盘管理的详细解释: 磁盘和分区: 磁盘(硬盘):Linux 系统中的磁盘通常是通过 SATA、SCSI、NVMe 等接口连接的物理硬盘。可以使用工具如 lsblk、fdisk、pa…...

qt-C++笔记之主线程中使用异步逻辑来处理ROS事件循环和Qt事件循环解决相互阻塞的问题
qt-C笔记之主线程中使用异步逻辑来处理ROS事件循环和Qt事件循环解决相互阻塞的问题 code review! 文章目录 qt-C笔记之主线程中使用异步逻辑来处理ROS事件循环和Qt事件循环解决相互阻塞的问题1.Qt的app.exec()详解2.ros::spin()详解3.ros::AsyncSpinner详解4.主线程中结合使用…...

【Docker】从零开始:18.使用Dockerfile构造自己的KingbaseES数据库镜像
【Docker】从零开始:17.使用Dockerfile构造自己的数据库镜像 新建一个自定义目录并创建Dockerfile文件上传需要的文件到自定义目录下注意docker-circle-init.sh文件内容password 内容 开始打包注意打包完成后执行 尝试用工具连接数据库 kingbase.tar.gz 包过大我就上…...

YOLOv8独家改进《全网无重复 YOLOv8专属打造》感知聚合SERDet检测头:简单高效涨点,即插即用|检测头新颖改进
💡本篇内容:YOLOv8独家改进《全网无重复,YOLOv8专属》感知聚合SERDet检测头:高效涨点,即插即用|检测头新颖改进 💡🚀🚀🚀本博客 YOLO系列 + 全新原创感知聚合SERDet检测头 改进创新点改进源代码改进 适用于 YOLOv8 按步骤操作运行改进后的代码即可,附改进源代…...

Android Studio中Flutter项目找不到Android真机设备解决方法
起因:创建正常Android项目可以运行在真机设备上,创建flutter项目就找寻不到Android真机设备。 1:在flutter sdk安装目录按下Shift和鼠标右键,打开Powershell窗口 2:输入以下,然后回车 flutter config --…...

Vue 静态渲染 v-pre
v-pre 指令:用于阻止 Vue 解析这个标签,直接渲染到页面中。 语法格式: <div v-pre> {{ 数据 }} </div> 基础使用: <template><h3>静态渲染 v-pre</h3><p v-pre>静态渲染:{{ n…...

C语言基础概念考查备忘 - 标识符、关键字、预定义标识符、语法检查、语义检查 ... 左值、右值、对象、副作用、未定义行为、sizeof是什么等等
什么是标识符、关键字和预定义标识符?三者有何区别? 当谈论C语言中的标识符、关键字和预定义标识符时,让我们从每个概念的基础开始。 标识符(Identifiers): 标识符是用来给变量、函数、类型等命名的。在…...

插件原理与开发
插件原理与开发 在 Mybatis总体执行流程 一文中简单的介绍了插件的初始化过程,本文将从源码的角度介绍一下mybatis的插件原理与简单开发实战。 插件原理 插件的注册和管理是通过InterceptorChain进行的,在创建Executor、StatementHandler、ParameterH…...

Git 分支合并时 Merge, Rebase, Squash 的使用场景
前言 Git 的分支设计大大提升了并行开发的能力,但相应的,也就要解决如何进行分支合并。毕竟分久必合,最终还是要把大家的工作合并起来,进行统一发布的。在合并时,通常有三种操作: Merge commitsRebaseSqu…...

第5节:Vue3 JavaScript 表达式
在 Vue3 中,JavaScript 表达式的使用方式与 Vue2 有所不同。 在 Vue3 中,你可以使用 v-bind 指令来绑定 JavaScript 表达式。例如: <template><div>{{ count }}</div> </template><script> import { ref } f…...

StarRocks 存算分离最佳实践,让降本增效更简单
StarRocks 存算分离自版本 3.0.0 开放使用,已经历过多个大版本迭代,在众多客户生产环境中得到验证。但在用户使用过程中也反馈了一些问题,大多源自对新能力不够熟悉导致无法达到最佳效果。因而,本文提供 StarRocks 存算分离最佳实…...

虚拟网络技术:bond技术
网卡bond也称为网卡捆绑,就是将两个或者更多的物理网卡绑定成一个虚拟网卡。 bond的作用: 1.提高网卡的吞吐量 2.增加网络的高可用,实现负载均衡。 一、bond简介 bond技术即bonding,能将多块物理网卡绑定到一块虚拟网卡上&…...

【Android】解决安卓中并不存在ActivityMainBinding
安卓中并不存在ActivityMainBinding这个类,这个类是在XML布局的最外层加入就会自动生成。但是你在最后绑定主布局时会报错获取不到根节点getRoot(). 最好的办法就是,删除原来的最外层节点,再重新添加,感觉是因为复制时并没有让系…...