一:复杂类型说明 1.int p //这是一个普通的整型变量 2.int *p //这是一个普通指针 3.int p[3] //这是一个普通数组 4.int *p[3] //定义了一个三维数组,其中的每个元素p[0]、p[1]、p[2]都是指向int变量的指针 5.int(*p)[3]; //定义了 ...
分类:
编程语言 时间:
2021-07-02 15:39:25
阅读次数:
0
linux线程私有数据 TSD 进程内的所有线程共享进程的数据空间,所以全局变量为所有线程共有。在某些场景下,线程需要保存自己的私有数据,这时可以创建线程私有数据(Thread-specific Data)TSD来解决。在线程内部,私有数据可以被线程的各个接口访问,但对其他线程屏蔽。 线程私有数据采 ...
分类:
编程语言 时间:
2021-07-02 15:35:15
阅读次数:
0
方法1:通过eval var a = 5; for (var i = 1; i <= a; i++) { eval("var a" + i + "=" + i); } alert(a1); 注意 必须是 var 声明 let 和 const 会报错 方法2: 连续声明 var a,b,c,d,e,f ...
分类:
Web程序 时间:
2021-07-01 17:24:23
阅读次数:
0
import lombok.*; /** * @author: Small sunshine * @Description: * @date: 2021/6/30 8:05 下午 */ public class SortTree { public static void main(String[] ...
分类:
其他好文 时间:
2021-07-01 17:04:50
阅读次数:
0
什么时候使用const? 当我们修饰的标识符不希望被别人更改的话(再次赋值),那么我们就可以使用const来修饰属性保证数据的安全性,但是建议: ES6 开发时。优先用const,要改变的变量用let即可。 C/C++ 是用来定义常量的. 使用特点: 1. 当定义的时候 记得一定要去赋值,而且只能赋 ...
分类:
其他好文 时间:
2021-07-01 16:55:15
阅读次数:
0
changeData (data) { const arr = [] if (data.length !== 0) { data.forEach(item => { const obj = {} obj.id = item.path obj.label = item.name if (item.ch ...
分类:
其他好文 时间:
2021-07-01 16:42:14
阅读次数:
0
原生代码实现: <template id="userCardTemplate"> <style>...</style> <img class="image"> <div class="container"> <p class="name"></p> <p class="email"></p> <bu ...
分类:
Web程序 时间:
2021-06-30 18:42:37
阅读次数:
0
指针函数 #include <stdio.h> #define uint8 unsigned char #define uint16 unsigned short #define uint32 unsigned int uint8 get_device_type_flash() { printf(" ...
分类:
编程语言 时间:
2021-06-30 18:21:24
阅读次数:
0
1. 长度最小的子数组 20210629晚 来源链接:leetCode:209 确定快慢指针移动的策略 点击查看代码 var minSubArrayLen = function(target, nums) { let slow = 0; let fast = 0; let sum = 0; let ...
分类:
编程语言 时间:
2021-06-30 18:11:57
阅读次数:
0
链式与顺序结构的最大区别在于,插入或删除操作需要移动大量元素。 链表类型:单链表,循环链表,双向链表。 单链表的组成:每个数据元素内包括两个域:数据域和指针域。 单链表的创建方式有两种:一种是头插法和尾插法。 #include <stdio.h> #include <stdlib.h> typede ...
分类:
其他好文 时间:
2021-06-30 18:07:18
阅读次数:
0