-
【功能模块】【操作步骤&问题现象】1、2、【截图信息】【日志信息】(可选,上传日志内容或者附件)
life is but a span 发表于2021-07-16 09:08:52 2021-07-16 09:08:52 最后回复 yd_aabb 2021-07-16 09:09:13
18004 1 -
新建了一个counter里面有个字段"scope": "INTER_APP",咨询一下这个字段在kqi.tbl_counter中存放在哪个字段里面呢。kqi.tbl_counter的全部字段如下:(counter_name, group_name, aggre_id, model_unit_id, counter_label_en, counter_label_ch, counter_expression, counter_expr_tmpsql, counter_desc_en, counter_desc_ch, unique_flag, aggre_levels, exceptionvalue, dynamic_flag, version_flag, drilldown_flag, lastmodifytime, counter_type, isshow, time_type, open_flag, layer_en, layer_ch, algorithm_share_flag, formula_parse_flag, register_type);元数据json:
-
ajax如何实现页面的局部加载,具体如下点击头部即右上角的链接时,页面会根据相应的链接加载新的内容,显示在下方;在中间区域有3栏,当点击1栏中的链接,2栏中会显现相应的内容,点击2栏中的内容,3栏中的内容又会根据2栏的链接来加载显示内容。页面效果如下:js代码如下:12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576$("header a").on("click",function(e){ e.preventDefault(); //阻止事件默认行为 var href = this.href; //记录要加载页面的链接 //更新当前连接状态 $("header a").removeClass("current"); $(this).addClass("current"); var $content = $("#content"); var $container = $("#container"); $container.remove(); $content.load(href + " #container"); //加载页面id = container的内容 }); var times; //times用来存储所有活动的环节时间表 $.ajax({ type:"get", //指定get方式 url:"example.json", async:true, beforeSend: function(jqXHR){ //在浏览器请求JSON数据之前,脚本会检查浏览器是否支持overrideMineType()方法。 //该方法会用来告知服务器应当返回JSON数据。 //当服务器意外配置成返回其他格式的数据时,就可以使用这个方法了 if(jqXHR.overrideMimeType){ jqXHR.overrideMimeType("application/json"); } } }); function loadTimeTable(){//加载example.json文件中加载时间表的数据 $.getJSON( "example.json" ).done(function(data){ //加载成功,值被保存到times中 //console.log(data); times = data; }).fail(function(){ //加载失败 $("#event").html("Sorry!we could not load the timetable at the moment"); }); } loadTimeTable(); //调用函数 //点击活动名称,将该活动的时间加载到中栏 $("#content").on("click","#event a",function(e){ e.preventDefault(); var loc = this.id.toUpperCase(); //保存活动位置的名称 var newContent = ''; //设置展示样式排版 for(var i = 0; i < times[loc].length; i++){ //alert(times[loc][i].time); newContent += '<li><span class="time">' +times[loc][i].time +'</span>'; newContent += '<a href="descriptions.html#" rel="external nofollow" title="' +times[loc][i].title.replace(/ /g,'-')+ '">'; newContent += times[loc][i].title + '</a></li>'; } $("#sessions").html('<ul>'+newContent+'</ul>'); $("#event a").removeClass("current"); //更新活动链接的class属性,借此凸显当前活动 $(this).addClass("current"); $("#details").text(''); //如果第三栏中包含内容,就清空它 }); //点击中栏中的环节是产生相应,它会加载环节的描述信息 $("#content").on("click","#sessions a",function(e){ e.preventDefault(); var fragment = this.href.replace('#',' #'); //更新当前连接状态 $("#details a").removeClass("current"); $(this).addClass("current"); $("#details").load(fragment+this.title); //查找到descriptions.html页面中id对应的部分加载到当前页面 });
-
【功能模块】管理>应用管理>页面资产管理>库【操作步骤&问题现象】1、已经添加了packageinfo.json文件,并写入json数据2、打包文件夹后上传不成功【截图信息】【日志信息】(可选,上传日志内容或者附件)
-
从2.0高版本的环境把工程包导入到低版本的2.0环境,报错:Json解析失败
-
【功能模块】Modelarts模型部署模块。【操作步骤&问题现象】1、Modelarts模型部署为在线服务时,部分依赖包仅在config.json中指定版本信息,出现依赖无法下载现象。【截图信息】【日志信息】(可选,上传日志内容或者附件)
-
求助:串口下发配置失败,并且其json也会被删除,是配置工具问题吗?
-
【功能模块】GatherNd【操作步骤&问题现象】1、编写 算子json文件 op.json如下:[ { "op": "GatherNd", "input_desc": [ { "format": "ND", "shape": [3,17,30], "type": "float16" }, { "format": "ND", "shape": [1530,3], "type": "int32" } ], "output_desc": [ { "format": "ND", "shape": [1530], "type": "float16" } ] } ]2、利用atc 工具转成模型文件atc --singleop=op.json --output=. --soc_version=Ascend310 生成 0_GatherNd_1_2_3_17_30_3_2_1530_3_1_2_1530.om3、在板子上atlas200 上测试算子时间,单位毫秒test 1 cost time = 1.147000 test 2 cost time = 0.907000 test 3 cost time = 0.837000 test 4 cost time = 0.841000 test 5 cost time = 0.839000 test 6 cost time = 0.886000 test 7 cost time = 0.832000 test 8 cost time = 0.833000 test 9 cost time = 0.834000 test 10 cost time = 0.834000 同上面 修改数据大小如下[ { "op": "GatherNd", "input_desc": [ { "format": "ND", "shape": [3,544,960], "type": "float16" }, { "format": "ND", "shape": [1566720,3], "type": "int32" } ], "output_desc": [ { "format": "ND", "shape": [1566720], "type": "float16" } ] } ]耗时,单位毫秒test 1 cost time = 295.242000 test 2 cost time = 295.097000 test 3 cost time = 295.567000 test 4 cost time = 295.306000 test 5 cost time = 295.145000 test 6 cost time = 295.533000 test 7 cost time = 295.582000 test 8 cost time = 295.750000 test 9 cost time = 296.213000 test 10 cost time = 295.924000 这个耗时是正常耗时吗?
-
SDK经常会用到这几种数据流,整理了一下它们之间的关系,以及如何互相转换。protobuf与json互转需要import google.protobuf.json_formatbase64的转换需要import base64以如下protobuf结构为例:message MxpiOsdParams{ uint32 scalorB = 1; uint32 scalorG = 2; uint32 scalorR = 3;}直接参考下图:(绿色背景文字为print()的显示结果)
-
【功能模块】ScatterNdAdd 算子【操作步骤&问题现象】1、在samples中 build.sh编译后,执行 custtom...run2、下面是我自己写的 op.json[ { "op": "ScatterNdAdd", "input_desc": [ { "format": "ND", "shape": [2,3,4], "type": "float32" }, { "format": "ND", "shape": [2,2,2], "type": "int32" }, { "format": "ND", "shape": [2,2,4], "type": "float32" } ], "output_desc": [ { "format": "ND", "shape": [2,3,4], "type": "float32" } ] } ]3、执行 atc --singleop=op.json --output=. --soc_version=Ascend310 后报错ATC run failed, Please check the detail log, Try 'atc --help' for more informationE29999: Inner Error! [SubGraphOpt][PreCompileOp] No default value, get attr value failed.[FUNC:GetAttrValue][FILE:get_attr_by_type.cc][LINE:26] [SubGraphOpt][PreCompileOp] Op [ScatterNdAdd] get bool attr [use_locking] value failed.[FUNC:GetBoolAttrValue][FILE:get_attr_by_type.cc][LINE:86] [SubGraphOpt][PreCompileOp][AssembleInput][Op ScatterNdAdd, type ScatterNdAdd]: failed to feedAttrsToTbeOpInfo.[FUNC:AssembleTbeInfo][FILE:tbe_info_assembler.cc][LINE:1199] [SubGraphOpt][Compile][PreCompSetInfo] AssembleTbeInfo failed.[FUNC:PreCompSetTbeOpInfo][FILE:tbe_op_store_adapter.cc][LINE:222] [SubGraphOpt][Pre-Comp] Set TbeOpInfo Failed.[FUNC:ParallelPreCompileOp][FILE:tbe_op_store_adapter.cc][LINE:266] Call OptimizeFusedGraph failed, ret:-1, engine_name:AIcoreEngine, graph_name:partition0_rank1_new_sub_graph1[FUNC:OptimizeSubGraph][FILE:graph_optimize.cc][LINE:126] subgraph 0 optimize failed[FUNC:OptimizeSubGraphWithMultiThreads][FILE:graph_manager.cc][LINE:767] build graph failed, graph id:0, ret:1343242268[FUNC:BuildModel][FILE:ge_generator.cc][LINE:1117]【截图信息】【日志信息】(可选,上传日志内容或者附件)
-
爬虫分析数据接口,两次请求获取热榜前 100 数据。https://blog.csdn.net/phoenix/web/blog/hotRank?page=0&pageSize=50 https://blog.csdn.net/phoenix/web/blog/hotRank?page=1&pageSize=50数据返回格式:JSON{ "code": 200, "message": "success", "data": [ # 实际数据 ] }分析完毕,开始编码,全套代码可直接使用 requests 库。热榜爬虫这么简单的代码,首先编写一个基础爬虫,获取到数据,然后再对其进行优化。import requests import json for i in range(2): headers = { "user-agent": "Baiduspider" } res = requests.get(f"https://blog.csdn.net/phoenix/web/blog/hotRank?page={i}&pageSize=50", headers=headers) data = res.json() if data["code"] == 200: data = data["data"] with open(f"{i}.json", "w+", encoding="utf-8") as f: f.write(json.dumps(data))运行代码,会在代码目录中生成两个 json 文件,每个文件存在 50 条数据,即热榜所有数据。以上代码合计 12 行,接下来内卷开始,让代码行数变短。缩写变量的声明import requests import json for i in range(2): json_data = requests.get(f"https://blog.csdn.net/phoenix/web/blog/hotRank?page={i}&pageSize=50",headers={"user-agent": "Baiduspider"}).json() if json_data and json_data["code"] == 200: with open(f"{i}.json", "w+", encoding="utf-8") as f: f.write(json.dumps(json_data))进行简单整理,从 12 行降低到 7 行,略有进步。再将代码开头部分的 json 和 requests 合并为一行,代码降低为 6 行。增加生成器代码将循环部分替换为生成器,进行代码再次精简,本步减少代码比较少,只减少 1 行代码。import requests, json for i, data in enumerate([requests.get(f"https://blog.csdn.net/phoenix/web/blog/hotRank?page={i}&pageSize=50",headers={"user-agent": "Baiduspider"}).json() for i in range(2)]): with open(f"{i}.json", "w+", encoding="utf-8") as f: f.write(json.dumps(data))请忽略自动折行代码,目前剩余 4 行代码。继续优化,将折行与 json 模块去除掉。换行也去除import requests for i, data in enumerate([requests.get(f"https://blog.csdn.net/phoenix/web/blog/hotRank?page={i}&pageSize=50", headers={"user-agent": "Baiduspider"}).text for i in range(2)]): with open(f"{i}.json", "w+", encoding="utf-8") as f: f.write(data)按照上述代码整理之后,此时只剩下 3 行代码。这难道是极限了吗?我们就不能写出正常人理解不了的代码吗?1 行代码最终版使用最简单的知识,实现最刺激的效果,为了让代码到最少行数,我写出了下面这个版本。import requests with open("file.json", "a+", encoding="utf-8") as f: [f.write(my_str + "\n") for my_str in [ requests.get(f"https://blog.csdn.net/phoenix/web/blog/hotRank?page={i}&pageSize=50", headers={"user-agent": "Baiduspider"}).text for i in range(2)]]你没看错,除去 模块导入外,只有 1 行代码。这行代码展开之后长成下面的样子,一大长行,而它抓到了热榜 100 数据。with open("file.json", "a+", encoding="utf-8") as f: [f.write(my_str + "\n") for my_str in [requests.get(f"https://blog.csdn.net/phoenix/web/blog/hotRank?page={i}&pageSize=50",headers={"user-agent": "Baiduspider"}).text for i in range(2)]]
-
【操作步骤&问题现象】网上看PG是支撑JSON类型数据的,且查询语句可以用select这样的语句,例如select '[1,2,3]'::json->>2;但是发现GaussDB不支持,请问是否有相应的资料,还是就是不支持这样的语法
-
【功能模块】按照这个连接的教程一步一步走:course/lstm at master · mindspore-ai/course (github.com)完全一样的代码和数据集,在本地运行出现如下报错:【操作步骤&问题现象】我不明白,这个FileWriter不是以字节的形式写入磁盘吗,为什么跟utf8编码有关?【日志信息】(可选,上传日志内容或者附件)见附件ps: 为什么在贵论坛发个求助帖跟写八股文一样?
-
安装k8s之前需要把docker的域名改过来。方法是编辑(或生成)vim /etc/docker/daemon.json这只是一个文本格式的文件,但是,对文件格式的要求非常严格:不能有空格,不能有其他字符,居然还不能缩进!文件格式出错,docker进程重启动报错:root@ecs-385f:~# systemctl status docker.service● docker.service - Docker Application Container Engine Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled) Active: failed (Result: start-limit-hit) since Wed 2021-05-12 15:46:40 CST; 347ms ago Docs: https://docs.docker.com Process: 28720 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE) Main PID: 28720 (code=exited, status=1/FAILURE)May 12 15:46:38 ecs-385f systemd[1]: Failed to start Docker Application Container Engine.May 12 15:46:38 ecs-385f systemd[1]: docker.service: Unit entered failed state.May 12 15:46:38 ecs-385f systemd[1]: docker.service: Failed with result 'exit-code'.May 12 15:46:40 ecs-385f systemd[1]: docker.service: Service hold-off time over, scheduling restart.May 12 15:46:40 ecs-385f systemd[1]: Stopped Docker Application Container Engine.May 12 15:46:40 ecs-385f systemd[1]: docker.service: Start request repeated too quickly.May 12 15:46:40 ecs-385f systemd[1]: Failed to start Docker Application Container Engine.May 12 15:46:40 ecs-385f systemd[1]: docker.service: Unit entered failed state.May 12 15:46:40 ecs-385f systemd[1]: docker.service: Failed with result 'start-limit-hit'.字面指示是容器起不来了,其实跟容器没啥关系,docker进程起不来了。把字符格式清理干净后,故障排除了。root@ecs-385f:~# vim /etc/docker/daemon.json{"exec-opts": ["native.cgroupdriver=systemd"]}
上滑加载中
推荐直播
-
GaussDB管理平台TPOPS,DBA高效运维的一站式解决方案
2024/12/24 周二 16:30-18:00
Leo 华为云数据库DTSE技术布道师
数据库的复杂运维,是否让你感到头疼不已?今天,华为云GaussDB管理平台将彻底来改观!本期直播,我们将深入探索GaussDB管理平台的TPOPS功能,带你感受一键式部署安装的便捷,和智能化运维管理的高效,让复杂的运维、管理变得简单,让简单变得可靠。
回顾中 -
DTT年度收官盛典:华为开发者空间大咖汇,共探云端开发创新
2025/01/08 周三 16:30-18:00
Yawei 华为云开发工具和效率首席专家 Edwin 华为开发者空间产品总监
数字化转型进程持续加速,驱动着技术革新发展,华为开发者空间如何巧妙整合鸿蒙、昇腾、鲲鹏等核心资源,打破平台间的壁垒,实现跨平台协同?在科技迅猛发展的今天,开发者们如何迅速把握机遇,实现高效、创新的技术突破?DTT 年度收官盛典,将与大家共同探索华为开发者空间的创新奥秘。
回顾中
热门标签