Lua5.3 random函数的interval is empty错误 问题记录:math.random函数使用中报错 “interval is empty” 解决方法:math.random的两个参数中,第一个参数 ≤ 第二个参数。 luaL_argcheck(L, low <= up, 1, " ...
分类:
其他好文 时间:
2020-09-18 17:21:14
阅读次数:
58
1046 Shortest Distance (20分) #include<stdio.h> #include<iostream> using namespace std; int main() { int length[100100]; int n,n2,num=0; int c1,c2; sca ...
分类:
其他好文 时间:
2020-09-18 03:18:51
阅读次数:
29
写在前面 在Java中提供了synchronized关键字来保证只有一个线程能够访问同步代码块。既然已经提供了synchronized关键字,那为何在Java的SDK包中,还会提供Lock接口呢?这是不是重复造轮子,多此一举呢?今天,我们就一起来探讨下这个问题。 再造轮子? 既然JVM中提供了syn ...
分类:
编程语言 时间:
2020-09-18 02:25:58
阅读次数:
29
Given an array nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k num ...
with temp(id,name,curlevel,hasChild) as ( --初始查询 select id,name,1 curlevel,1 hasChild from tabName pc with(nolock) where Disabled = 0 and ParentId is ...
分类:
数据库 时间:
2020-09-18 01:13:23
阅读次数:
31
根据选定的单、多行会计凭证进行审批,双击单个会计凭证跳转会计订单明细。将审批的凭证记录在一张自定义表中 *& * *& Report ZFI_SP *& *& * *&参考FB03.ZFIT04 *& *& * REPORT zfi_sp. TYPE-POOLS:slis,icon. TABLES: ...
分类:
其他好文 时间:
2020-09-18 01:05:01
阅读次数:
32
算法 设置一个进位值carry,初始carry的值为1,从数组的最后开始向前遍历遍历 数组当前遍历到的元素加carry,新的carry是这个和除以10,数组当前位置新的值是这个和对10求余 遍历完整个数组以后: 如果carry等于1,那么就在数组的最前面加一个元素1 如果carry不等于1,那么就直 ...
分类:
其他好文 时间:
2020-09-18 01:02:58
阅读次数:
32
int numIdenticalPairs(int* nums, int numsSize){ int hash[101] = {0}; int ret = 0; for(int i = 0; i < numsSize; i++) { hash[nums[i]]++; ret += hash[num ...
分类:
其他好文 时间:
2020-09-18 00:54:43
阅读次数:
30
def num(): for i in range(1,4): print(i,"发送出去") a = yield i print(a,"接受外部参数") i = num() nu = i.__next__() print(nu,"接收迭代参数") while True: try: print(nu ...
分类:
编程语言 时间:
2020-09-18 00:53:08
阅读次数:
38
类型转化 低 >高 byte,short,char->int->long->float->double 强制装换 高-->低 自动装换 低-->高 变量作用域 类变量:方法外面,类里面,static修饰。 实例变量:方法外面,类里面。 局部变量:定义在方法里面。 ...
分类:
其他好文 时间:
2020-09-18 00:47:40
阅读次数:
24