[记录点滴] 一个解决Lua 随机数生成问题的办法 0x00 摘要 本文是开发中的简略记录,具体涉及知识点有:Lua,随机数。 0x01 背景 Lua语言生成随机数需要用到两个函数: math.randomseed(n) : 用法是 接收一个整数n作为随即序列的种子。 math.random([n ...
分类:
其他好文 时间:
2020-06-24 22:06:21
阅读次数:
87
已剪辑自: https://blog.csdn.net/liangyihuai/article/details/83106584 CountDownLatch和CyclicBarrier的功能看起来很相似,不易区分,有一种谜之的神秘。本文将通过通俗的例子并结合代码讲解两者的使用方法和区别。 Coun ...
分类:
编程语言 时间:
2020-06-24 12:24:30
阅读次数:
47
Tinyrender-Lesson 2 Triangle rasterization and back face culling 原文:https://github.com/ssloy/tinyrenderer/wiki/Lesson-2-Triangle-rasterization-and-bac ...
分类:
其他好文 时间:
2020-06-23 21:05:47
阅读次数:
62
出现问题: impdp 导入时报错sql: impdp xxx/xxx@127.0.0.170/orcl directory=DPDATA dumpfile=20200623data.DMP full=y ; Connected to: Oracle Database 12c Enterprise ...
分类:
数据库 时间:
2020-06-23 15:31:17
阅读次数:
75
Python中的random模块 Python中的random模块用于生成随机数。下面介绍一下random模块中最常用的几个函数。 random.random random.random()用于生成一个0到1的随机符点数: 0 <= n < 1.0 random.uniform random.uni ...
分类:
编程语言 时间:
2020-06-23 13:02:55
阅读次数:
50
def getRandomIndex(n, x): # 索引范围为[0, n),随机选x个不重复,注意replace=False才是不重复,replace=True则有可能重复 index = np.random.choice(np.arange(n), size=x, replace=False) ...
分类:
其他好文 时间:
2020-06-22 23:20:09
阅读次数:
56
Your country has an infinite number of lakes. Initially, all the lakes are empty, but when it rains over the nth lake, the nth lake becomes full of wa ...
分类:
其他好文 时间:
2020-06-22 15:46:01
阅读次数:
58
import pymysql import pandas as pd import uuid import datetime import random conn = pymysql.connect( host = '127.0.0.1', user = 'root', password = '12 ...
分类:
数据库 时间:
2020-06-22 14:40:47
阅读次数:
99
import random def getBaseBigHapppyNumbers(): frontNumbers = set(); backNumbers = set(); while(len(frontNumbers)<5): cur = random.randint(1, 35) frontN ...
分类:
其他好文 时间:
2020-06-22 13:24:29
阅读次数:
60
testCase 某班英语成绩以字典形式存储为:{'LeiLei':90,'kim':88,......},根据成绩高地,计算学生排名。 from faker import Faker from random import randint faker =Faker('zh') #随机构造30个学生名 ...
分类:
编程语言 时间:
2020-06-22 13:12:13
阅读次数:
59