#引言 原子操作是指不会被线程调度机制打断的操作;这种操作一旦开始,就一直运行到结束,中间不会有任何 context switch (切换到另一个线程)。通常所说的原子操作包括对非long和double型的primitive进行赋值,以及返回这两者之外的primitive。之所以要把它们排除在外是因 ...
分类:
编程语言 时间:
2021-05-24 16:35:44
阅读次数:
0
Java— ==、!=和equals区别 1、==和!= ==和!=适用于所有对象,==表示是否相等,!=表示是否不相等,结果都为布尔值,true或false。 1 public class test { 2 public static void main(String[] args) { 3 In ...
分类:
其他好文 时间:
2021-05-24 16:12:34
阅读次数:
0
// 1 Number.EPSILON 是 js 表示最小精度 // console.log(Number.EPSILON); // 2.220446049250313e-16 // console.log(0.1 + 0.2); // 0.30000000000000004 // // 判断两个数 ...
分类:
其他好文 时间:
2021-05-24 15:45:29
阅读次数:
0
f = open(r'data6_1.txt') f1=open('data6_2.txt','w') a = list(f) a.sort(key=lambda x : x[8:]) a.reverse() for i in a: i=i.strip('\n') f1.write(''.join( ...
分类:
其他好文 时间:
2021-05-24 14:43:52
阅读次数:
0
Given a constant K and a singly linked list L, you are supposed to reverse the links of every K elements on L. For example, given L being 1→2→3→4→5→6, ...
分类:
其他好文 时间:
2021-05-24 13:17:05
阅读次数:
0
简介 简单题, 按照正常人的思路即可 code C++代码写复杂了, 应该, 补0的话可以省去判断谁是长字符串谁是短字符串 class Solution { public: string addStrings(string num1, string num2) { reverse(num1.begi ...
分类:
其他好文 时间:
2021-05-24 12:50:46
阅读次数:
0
准备的model: 1 public class User implements Serializable{ 2 private Integer id; 3 private String name; 4 5 //保存一对多查询结果 6 private List<Account> accounts; ...
分类:
其他好文 时间:
2021-05-24 10:31:57
阅读次数:
0
思路如下,使用栈,每次把当前节点入栈,然后右子节点入栈,左子节点入栈。 代码如下: import java.util.*; public class Solution { ArrayList<Integer> list = new ArrayList<Integer>(); public Array ...
分类:
移动开发 时间:
2021-05-24 10:30:36
阅读次数:
0
题目来源:力扣(LeetCode) 链接:https://leetcode-cn.com/problems/roman-to-integer/ 难度:简单 罗马数字包含以下七种字符: I, V, X, L,C,D 和 M。 字符 数值 I 1 V 5 X 10 L 50 C 100 D 500 M ...
分类:
其他好文 时间:
2021-05-24 10:13:13
阅读次数:
0
1. join() 功能:将数组中所有元素都转化为字符串并连接在一起。 2. reverse() 功能:将数组中的元素颠倒顺序。 3. concat() 功能:数组拼接的功能 ,返回新数组,原数组不受影响。 4. slice() 截取数组生成新数组,原数组不受影响。 返回的数组包含第一个参数指定的位 ...
分类:
编程语言 时间:
2021-05-24 09:33:41
阅读次数:
0