今天是2026年9月15日 第38周 星期二
代人,时大变了。
我们生活在大地上,但我们的梦想超越天空。
更改
跳到导航
跳到搜索
←上一编辑
模块:沙盒/Shinonome Akebono/S
(查看源代码)
2020年7月8日 (三) 21:01的版本
添加597字节
、
2020年7月8日 (三) 21:01
小
Shinonome Akebono移动页面
模块:沙盒/Sm
至
模块:沙盒/Shinonome Akebono/S
,不留重定向
第3行:
第3行:
local getArgs = require('Module:Arguments').getArgs
local getArgs = require('Module:Arguments').getArgs
−
function p.hello(frame)
+
function p.hello
()
+
return "Hello world!"
+
end
+
+
function p.lang
(frame)
local args=getArgs(frame)
local args=getArgs(frame)
−
local
col
=args[1]
+
local
text
=args[1]
−
local
text
=args[2]
+
local
lang
=args[2]
−
return "<
span
style
=
\"color:" .. col .. ";\">"
.. text
.. "</
span>
"
+
local
span=
mw
.
html
.
create('span')
+
:attr('lang',lang)
+
:wikitext(
text
)
+
return
span
+
end
+
+
local function qp(a,b,c)
+
local ans=1
+
local base=a
+
local exp=b
+
while exp
>
0 do
+
if exp%2==1 then
+
ans=ans*base%c
+
end
+
base=base*base%c
+
exp=(exp-(exp%2))/2
+
end
+
return ans
end
end
+
function p.rand(frame)
+
local prime=0x125E591
+
local args=getArgs(frame)
+
local bound=args[1]
+
local time=math.modf(os.time()*math.random())%prime
+
local pert=3254518517%prime
+
pert=qp(qp(pert,time,prime),qp(time,pert,prime),prime)
+
return pert%bound
+
end
return p
return p
Shinonome Akebono
界面管理员
、
管理员
、
上传向导活动编辑者
851
个编辑
导航菜单
个人工具
创建账户
登录
名字空间
模块
讨论
变种
视图
阅读
查看源代码
查看历史
更多
搜索
导航
首页
最近更改
随机页面
沙盒
互助客栈
QQ交流群
方针与指引
工具
上传文件
特殊页面
可打印版本