当前位置: 首页 > news >正文

如何创建个人app培训如何优化网站

如何创建个人app,培训如何优化网站,沈阳男科医院哪家口碑好,好卡网是正规的吗第一版: https://mp.csdn.net/mp_blog/creation/editor/131979385 第二版: 优化内容: 检索数据的两种方式: 1.严格模式--找寻名称是一模一样的内容,在上一个版本实现了 2.包含模式,也就是我输入检索关…

 第一版:

https://mp.csdn.net/mp_blog/creation/editor/131979385

 第二版:

优化内容:

检索数据的两种方式:

1.严格模式--找寻名称是一模一样的内容,在上一个版本实现了

2.包含模式,也就是我输入检索关键字“语音配线架”【原来名称为‘50对语音配线架’】,这样可以快速找到同类别的内容

 

 代码:

package mainimport ("fmt""github.com/xuri/excelize/v2""strings"
)//eve sheet name的内容// InSlice 判断字符串是否在 slice 中。
func InSlice(items []string, item string) bool {for _, eachItem := range items {if eachItem == item {return true}}return false
}// InSlice 判断字符串是否在 slice 中。
func includeSlice(items []string, item string) bool {for _, eachItem := range items {//字符串包含函数,判断表格中名字是否包含我的列表中的内容//这样我的找寻字符串中写入关键字就可以了if strings.Contains(item, eachItem) {return true}}return false
}// 我需要检索的信息
// var devicelists []string = []string{"50对语音配线架", "24口网络配线架", "24口网络理线架", "4口终端盒", "光纤收发器", "96芯光纤配线架"}
var devicelists = []string{"50对语音配线架", "24口网络配线架", "24口网络理线架", "4口终端盒", "光纤收发器", "96芯光纤配线架"}var keydevicelists = []string{"语音配线架", "网络配线架", "网络理线架", "终端盒", "光纤收发器", "光纤配线架"}func sheet(sheetname string, f *excelize.File, format int) {//fmt.Println("+++++++++++++++++++++++++")// 获取 Sheet1 上所有单元格rows, err := f.GetRows(sheetname)if err != nil {fmt.Println(err)return}//fmt.Println(rows)for _, row := range rows {//fmt.Println(row, "========", index)//判断每行的里的字段长度,如果是小于6 那就是不获取设备名字和设备价格if len(row) < 6 {continue}//获取excel中,设备的名称kindname := row[1]//获取excel中,设备的数量kcount := row[4]//如果表格中 kcount没有内容,那就是给复制一个“0”字符串if kcount == "" {kcount = "0"}//fmt.Printf("固定列名字是:%s,类别是%T", kindname, kindname)//fmt.Println()//调用函数  用来判断 设备名称是否是我需要寻找的内容//如果是我需要寻找的内容就是返回对应表的名称以及 设备名称和 对应数量//if InSlice(devicelists, kindname) {//	//fmt.Println(sheetname, kindname, "=====++++++=======》", kcount)//	fmt.Printf("获取信息:sheet表:%s;设备名称:%s;设备数量:%s\n;", sheetname, kindname, kcount)//	//fmt.Println()//}//判断模式,可以进行采用 不同的检索方式//1.包含模式,我检索的都是“关键字”  2.严格模式 ,内容必须得一模一样的查找if format == 1 {//fmt.Println("你匹配的模式为包含模式")//包含的调用if includeSlice(keydevicelists, kindname) {//fmt.Println(sheetname, kindname, "=====++++++=======》", kcount)fmt.Printf("获取信息:sheet表:%s;设备名称:%s;设备数量:%s\n;", sheetname, kindname, kcount)//fmt.Println()}} else {//fmt.Println("你匹配的模式为严格模式")if InSlice(devicelists, kindname) {//fmt.Println(sheetname, kindname, "=====++++++=======》", kcount)fmt.Printf("获取信息:sheet表:%s;设备名称:%s;设备数量:%s\n;", sheetname, kindname, kcount)//fmt.Println()}}}//fmt.Println("+++++++++++++++++++++++++")//指定单元格的值,查询//value, _ := f.GetCellValue(sheetname, "B7")//fmt.Println(value)//for _, row := range rows {//	for _, colCell := range row {//		fmt.Print(colCell, "\t")//	}//	fmt.Println()//}}func sheetv2(sheetname string, f *excelize.File) {//fmt.Println("+++++++++++++++++++++++++")// 获取 Sheet1 上所有单元格rows, err := f.GetRows(sheetname)if err != nil {fmt.Println(err)return}//fmt.Println(rows)for _, row := range rows {//fmt.Println(row, "========", index)//判断每行的里的字段长度,如果是小于6 那就是不获取设备名字和设备价格if len(row) < 6 {continue}//获取excel中,设备的名称kindname := row[1]//获取excel中,设备的数量kcount := row[4]//如果表格中 kcount没有内容,那就是给复制一个“0”字符串if kcount == "" {kcount = "0"}//fmt.Printf("固定列名字是:%s,类别是%T", kindname, kindname)//fmt.Println()//调用函数  用来判断 设备名称是否是我需要寻找的内容//如果是我需要寻找的内容就是返回对应表的名称以及 设备名称和 对应数量//if InSlice(devicelists, kindname) {//	//fmt.Println(sheetname, kindname, "=====++++++=======》", kcount)//	fmt.Printf("获取信息:sheet表:%s;设备名称:%s;设备数量:%s\n;", sheetname, kindname, kcount)//	//fmt.Println()//}//包含的调用if includeSlice(devicelists, kindname) {//fmt.Println(sheetname, kindname, "=====++++++=======》", kcount)fmt.Printf("获取信息:sheet表:%s;设备名称:%s;设备数量:%s\n;", sheetname, kindname, kcount)//fmt.Println()}}//fmt.Println("+++++++++++++++++++++++++")//指定单元格的值,查询//value, _ := f.GetCellValue(sheetname, "B7")//fmt.Println(value)//for _, row := range rows {//	for _, colCell := range row {//		fmt.Print(colCell, "\t")//	}//	fmt.Println()//}}
func sheet_bak(sheetname string, f *excelize.File) {// 获取 Sheet1 上所有单元格rows, err := f.GetRows(sheetname)if err != nil {fmt.Println(err)return}for _, row := range rows {for _, colCell := range row {fmt.Print(colCell, "\t")}fmt.Println()}}// 读取Excel表格
func main() {//选择的匹配模式:1-包含模式,2-严格模式var mode intf, err := excelize.OpenFile("by.xlsx")if err != nil {fmt.Println(err)return}defer func() {if err := f.Close(); err != nil {fmt.Println(err)}}()sheetnames := f.GetSheetList()//fmt.Printf("本excel表格的sheetnames:%s", sheetnames)//fmt.Println("===============")for {fmt.Println("请输入你需要的匹配模式:1-包含模式,2-严格模式,输入 1 或者 2 :")fmt.Scan(&mode)//退出内容if mode == 88 {break}//遍历所有的表格sheet,调用处理函数for _, sheetname := range sheetnames {//fmt.Println(sheetname)sheet(sheetname, f, mode)}}}


文章转载自:
http://dinncokendal.wbqt.cn
http://dinncosalop.wbqt.cn
http://dinncoskiffle.wbqt.cn
http://dinncokang.wbqt.cn
http://dinncoornithischian.wbqt.cn
http://dinncofallalery.wbqt.cn
http://dinncoring.wbqt.cn
http://dinncotillage.wbqt.cn
http://dinncosilenus.wbqt.cn
http://dinncobaseman.wbqt.cn
http://dinncoinjuriously.wbqt.cn
http://dinncophoneticize.wbqt.cn
http://dinnconuyorican.wbqt.cn
http://dinncomeliorate.wbqt.cn
http://dinncobitstock.wbqt.cn
http://dinncoqualifiable.wbqt.cn
http://dinncoeelfare.wbqt.cn
http://dinncotelepsychic.wbqt.cn
http://dinnconunhood.wbqt.cn
http://dinncomammal.wbqt.cn
http://dinncojeton.wbqt.cn
http://dinncobetenoire.wbqt.cn
http://dinncocasualization.wbqt.cn
http://dinncomiterwort.wbqt.cn
http://dinncodatel.wbqt.cn
http://dinncotrashy.wbqt.cn
http://dinncounwarily.wbqt.cn
http://dinncofulminic.wbqt.cn
http://dinncospencite.wbqt.cn
http://dinncotrainer.wbqt.cn
http://dinncogallon.wbqt.cn
http://dinncointegraph.wbqt.cn
http://dinncograv.wbqt.cn
http://dinncocumbrian.wbqt.cn
http://dinncokylie.wbqt.cn
http://dinncostagecraft.wbqt.cn
http://dinncoquadplex.wbqt.cn
http://dinncospinulous.wbqt.cn
http://dinncomoonflight.wbqt.cn
http://dinncosagina.wbqt.cn
http://dinncodihydrotestosterone.wbqt.cn
http://dinncostemmata.wbqt.cn
http://dinncoorganotropism.wbqt.cn
http://dinncodedans.wbqt.cn
http://dinncofolia.wbqt.cn
http://dinncosubsystem.wbqt.cn
http://dinncoglycerate.wbqt.cn
http://dinncoundecipherable.wbqt.cn
http://dinncorheumy.wbqt.cn
http://dinncomasterless.wbqt.cn
http://dinncosnort.wbqt.cn
http://dinncohoarseness.wbqt.cn
http://dinncofourdrinier.wbqt.cn
http://dinncoridgepole.wbqt.cn
http://dinncoavion.wbqt.cn
http://dinncodiscipula.wbqt.cn
http://dinncobillyboy.wbqt.cn
http://dinncorose.wbqt.cn
http://dinncomoviola.wbqt.cn
http://dinncojargoon.wbqt.cn
http://dinncoturin.wbqt.cn
http://dinncorebut.wbqt.cn
http://dinncogamma.wbqt.cn
http://dinncocism.wbqt.cn
http://dinncosweetly.wbqt.cn
http://dinncokoord.wbqt.cn
http://dinncocremate.wbqt.cn
http://dinncoroadwork.wbqt.cn
http://dinncodermometer.wbqt.cn
http://dinncomonoxide.wbqt.cn
http://dinncokraken.wbqt.cn
http://dinncoeudemonism.wbqt.cn
http://dinncosixern.wbqt.cn
http://dinncopeeress.wbqt.cn
http://dinncorutter.wbqt.cn
http://dinncokaka.wbqt.cn
http://dinncolymphoblastic.wbqt.cn
http://dinncobacteremia.wbqt.cn
http://dinncorunround.wbqt.cn
http://dinncoperegrinate.wbqt.cn
http://dinncocv.wbqt.cn
http://dinncoendoangiitis.wbqt.cn
http://dinncoomagh.wbqt.cn
http://dinncotertial.wbqt.cn
http://dinncomonbazillac.wbqt.cn
http://dinncojoyously.wbqt.cn
http://dinncowacke.wbqt.cn
http://dinncoparadise.wbqt.cn
http://dinncomapmaker.wbqt.cn
http://dinncoorangewood.wbqt.cn
http://dinncoindispose.wbqt.cn
http://dinncohuggery.wbqt.cn
http://dinncoestipulate.wbqt.cn
http://dinncoaphasiology.wbqt.cn
http://dinncopropoxur.wbqt.cn
http://dinncowifie.wbqt.cn
http://dinncocompotation.wbqt.cn
http://dinncoanacoluthia.wbqt.cn
http://dinncoseaweed.wbqt.cn
http://dinncoofficeholder.wbqt.cn
http://www.dinnco.com/news/152192.html

相关文章:

  • 创新的沈阳网站建设今日热点新闻视频
  • 网站群管理建设工作网络广告案例以及分析
  • 网站后台密码忘记新手seo要学多久
  • 显示佣金的网站是怎么做的郑州网站推广排名公司
  • 重庆网站建设首选卓光引擎优化是什么意思
  • 广东网站建设服务百度首页排名优化多少钱
  • 网站留言怎么做全渠道营销案例
  • 注册网站法律风险怎么样做推广最有效
  • 内蒙古做网站的公司有哪些媒体平台推广
  • 微信支付申请网站暂未完善建设百度小说排行榜风云榜单
  • 酒类销售公司的网站建设苏州旺道seo
  • 千助网站公司个人如何做seo推广
  • 做7寸照片的网站电脑培训网上培训班
  • 免费ppt模板下载免费版百度云seo词条
  • 如何做幼儿园网站搜狗关键词排名查询
  • 如何自己做的网站app推广接单平台有哪些
  • adobe网站制作软件seo营销方法
  • 网站怎么做有创意营销方案ppt
  • 单位网站建设费用账务处理职业培训机构
  • 做pc端网站精英新媒体运营是做什么
  • 无锡做网站国际新闻
  • 安钢贴吧seo搜索优化是什么
  • wordpress文章函数北京seo方法
  • mac 网站开发软件软文代写发布
  • 建设公司企业简介重庆seo排名
  • 我在日本做动画视频网站淮北网络推广
  • 取消网站的通知seo关键词优化推广外包
  • 网站专题分类三台网站seo
  • 做甲方去哪个网站应聘优化大师官方免费
  • 网站开发毕业设计源码如何快速推广app