思路 用数组下标作为数字,数组元素记录次数 注意事项 声明数组的时候,如果用 int index[10000]; 会出现不为0的随机数 #include<bits/stdc++.h> using namespace std; /* run this program using the console ...
分类:
其他好文 时间:
2020-06-19 20:47:36
阅读次数:
52
var与let、const 一、var声明的变量会挂载在window上,而let和const声明的变量不会: var a = 100;console.log(a,window.a); // 100 100let b = 10;console.log(b,window.b); // 10 undefi ...
分类:
其他好文 时间:
2020-06-19 20:41:15
阅读次数:
46
什么是跨域? 跨域是指一个域下的文档或脚本试图去请求另一个域下的资源,这里跨域是广义的。 广义的跨域: 1.) 资源跳转: A链接、重定向、表单提交 2.) 资源嵌入: <link>、<script>、<img>、<frame>等dom标签,还有样式中background:url()、@font-f ...
分类:
其他好文 时间:
2020-06-19 17:53:14
阅读次数:
38
【源码部署新版edgex-ui】 在yml文件中注释掉ui如下部分: ui: image: edgexfoundry/docker-edgex-ui-go:0.1.1 ports: - "4000:4000" container_name: edgex-ui-go hostname: edgex-u ...
分类:
Web程序 时间:
2020-06-19 16:25:22
阅读次数:
85
1、 Task task = new Task(() => { MethodInvoker mi = new MethodInvoker(() => { //console.writeline("Hello world"); }); this.BeginInvoke(mi); }); task.St ...
分类:
其他好文 时间:
2020-06-19 14:10:32
阅读次数:
44
定义这么一个js的“关联数组”: var arr = new Array(); arr['school'] = 1; arr['team'] = 2; console.log(JSON.stringify(arr)); 得到的结果: [] 为什么会这样?实在不知道为什么了,但是通过: console ...
分类:
编程语言 时间:
2020-06-19 13:57:52
阅读次数:
47
<button id="button">按我</button> <script> var MacroCommand = function () { return { commandsList: [], add: function (command) { console.log(command); t ...
分类:
其他好文 时间:
2020-06-19 11:45:40
阅读次数:
61
一、添加自定义事件 通过jQuery的bind()或者on()方法 添加自定义事件 如下代码 自定义了一个mychange事件 $("#postionId").on("mychange",function () { console.log(11); validForm.check(false,"#p ...
分类:
Web程序 时间:
2020-06-19 00:46:28
阅读次数:
132
题目:编写控制台程序,输入两个整数将其整除,并使用 try-catch 语句捕获除数为 0 的异常, 并输出异常消息 代码1: 1 static void Main(string[] args) 2 { 3 Console.Write("请输入两个整数,使用\',\'隔开: "); 4 string ...
用下面的例子比较: using System; namespace LearnObject { public class LeiFeng { public void Sweep() { Console.WriteLine("扫地"); } public void Wash() { Console.W ...
分类:
其他好文 时间:
2020-06-18 21:26:39
阅读次数:
55