<script type="text/javascript">
// 第一个参数为你想生成的固定的文字开头比如: 网友xxxxx
// 第二个为你想生成出固定开头文字外的随机长度
let random = (prefix = "", randomLength = 7) => {
// 兼容更低版本的默认值写法
prefix === undefined ? prefix = "" : prefix;
randomLength === undefined ? randomLength = 8 : randomLength;
// 设置随机用户名
// 用户名随机词典数组
let nameArr = [
[1, 2, 3, 4, 5, 6, 7, 8, 9, 0],
["a", "b", "c", "d", "e", "f", "g", "h", "i", "g", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]
]
// 随机名字字符串
let name = prefix;
// 循环遍历从用户词典中随机抽出一个
for (var i = 0; i < randomLength; i++) {
// 随机生成index
let index = Math.floor(Math.random() * 2);
let zm = nameArr[index][Math.floor(Math.random() * nameArr[index].length)];
// 如果随机出的是英文字母
if (index === 1) {
// 则百分之50的概率变为大写
if (Math.floor(Math.random() * 2) === 1) {
zm = zm.toUpperCase();
}
}
// 拼接进名字变量中
name += zm;
}
// 将随机生成的名字返回
return name;
}
console.log(random("网友"));
</script> 网友回复
有没有不依赖embedding向量的RAG技术?
有没有支持实时打断语音通话并后台帮你执行任何的ai模型?
开源ai大模型文件格式GGUF、MLX、Safetensors、 ONNX 有什么区别?
出海挣钱支付收款PayPal、Wise 、PingPong、Stripe如何选择?
如何实现类似google的图片隐形水印添加和识别技术?
linux上如何运行任意windows程序?
ai能写出比黑客还厉害的零日漏洞等攻击工具攻击任意软件系统工程?
js如何获取浏览器的音频上下文指纹、Canvas指纹、WebGL渲染特征?
为啥ai开始抛弃markdown文本,重新偏好html文本了?
网站有没有办法鉴别访问请求是由ai操控chrome-devtools-mcp发出的?


