孕妇做无创是检查什么| 养膘是什么意思| 排卵期出血是什么原因引起的| 轻度脑萎缩是什么意思| 梦见大火烧山是什么意思| ads是什么| 思源名字的寓意是什么| 吃什么可以抗衰老| 直肠炎是什么原因引起的| 冉是什么意思| 鸭子什么时候下蛋| 角加斗念什么| rcc是什么意思| 屁股疼挂什么科室| 假正经是什么意思| 何方珠宝是什么档次| 频发房性早搏是什么意思| 悠悠岁月什么意思| 人肉什么味道| 小便很黄是什么原因| 吃什么能减肥| 神仙眷侣是什么意思| 吃什么吐什么喝水都吐怎么办| 梦见很多苍蝇是什么意思| 知柏地黄丸有什么功效| 黑枸杞泡水喝有什么作用和功效| 立刀旁的字和什么有关| 胆黄素高是怎么回事有什么危害| 班禅是什么意思| 磁共振检查什么| 酒蒙子是什么意思| 梦见吃核桃是什么意思| 什么是气质| 什么时候种玉米| 不甘心是什么意思| 1208是什么星座| 抽血血液偏黑什么原因| 成年人改名字需要什么手续| 斑秃是什么原因引起的| 6月7日是什么星座| 海参是什么动物| 胃子老是胀气是什么原因| 什么花能吃| 毛囊炎用什么药膏| npc是什么意思啊| 处女和什么座最配对| 外阴白斑擦什么药| 春天开什么花| 慢热型是什么意思| 女人矜持是什么意思| 诬赖是什么意思| 怀孕初期怕冷是什么原因| 呃是什么意思| 胃痛吃什么药效果最好| 一什么红枣| 桃胶有什么功效| 蛋白石是什么| 风水宝地是什么生肖| 肠道易激惹综合征的症状是什么| 伤风流鼻涕吃什么药好| 双肺纹理增粗是什么意思| 口是心非是什么生肖| 黄芪泡水喝有什么功效| 92是什么| 皮癣是什么原因引起的| 吃什么会变丑脑筋急转弯| ipo过会是什么意思| 梦见海水是什么意思| 验大便能查出什么| 田野是什么意思| 什么是钾肥| 倒模是什么| 小孩吃什么有营养| 肾病什么东西不能吃| lm是什么品牌| 吃什么| 含锶矿泉水有什么好处| ti是什么意思| 高级别上皮内瘤变是什么意思| 蛇字五行属什么| 九十岁老人称什么| 哦吼是什么意思| 无关风月是什么意思| 儿童热伤风吃什么药| 恩替卡韦片是什么药| 什么是鸡奸| 茄子把有什么功效| 孩子是ab型父母是什么血型| 尿分叉吃什么药能治好| 头皮痒用什么洗头好| 二月是什么星座| 古代人用什么刷牙| 七月22号是什么星座| 伤口用什么消毒| 爱是什么歌曲| 莫西莫西是什么意思| 返图是什么意思| 星字属于五行属什么| 脑震荡什么症状| 共鸣是什么意思| 险象环生是什么意思| 儿童过敏性结膜炎用什么眼药水| 常吃海带有什么好处| 二尖瓣微量反流什么意思| 蛋白粉什么时候吃最好| 骨肉相连是什么肉| 五月初五是什么星座| 感冒冒虚汗是什么原因| 耳道炎是什么原因引起的| 日落西山是什么生肖| 老三篇是什么意思| 狮子座女和什么座最配| 卫校学什么专业最好| 金字旁土念什么字| 子宫附件彩超检查什么| 有什么无什么的成语| 孕妇能吃什么水果最好| 生肖鼠和什么生肖相冲| 一九七二年属什么生肖| 志字五行属什么| 总恶心是什么病的前兆| 形同陌路是什么意思| 脚趾甲凹凸不平是什么原因| 耳鸣用什么药治疗效果最好| 补血吃什么最好最快| 左侧后背疼是什么原因男性| zero是什么牌子| 奄奄一息的息是什么意思| 埋线有什么好处和坏处| 猛虎下山是什么生肖| 骁字五行属什么| 天下无不是的父母是什么意思| 瓜子脸剪什么发型好看| 阴血亏虚吃什么中成药| xswl是什么意思| 拉屎是绿色的是什么原因| 不景气是什么意思| 肠胃痉挛吃什么药| 日仄念什么| 甲状腺有什么症状| 什么的生活| 小麦什么时候播种| pn医学上是什么意思| 罗汉果有什么作用| 米干是什么| 5月19号是什么星座| 江米是什么米| 梦见把头发剪短了是什么意思| 什么血型| 鸡肚是什么部位| 养尊处优什么意思| 陪跑什么意思| 浪琴名匠系列什么档次| 书是什么排比句| 食人鱼的天敌是什么| 摧枯拉朽是什么意思| 桃符指的是什么| 有料是什么意思| 人流需要准备什么东西| 叛逆期是什么意思| 电头是什么| 高血压喝什么茶好| 太阳黑子是什么东西| elaine是什么意思| 易蒙停是什么药| 验孕棒ct分别代表什么| 什么叫包皮过长| 偏头痛什么原因引起的| 处是什么结构| 人巨细胞病毒是什么病| 视网膜为什么会脱落| 多愁善感什么意思| 宰相和丞相有什么区别| 相知相惜是什么意思| 吃什么能生精和提高精子质量| 小姑娘月经推迟不来什么原因| 夜不能寐什么意思| 蓝色配什么色好看| 6月份能种什么菜| 处女男和什么星座最配| 手掌发麻是什么原因| 9月12号是什么星座| 木加石读什么| 霉菌性阴道炎是什么引起的| 鲨鱼是什么动物| 中药木香的功效与作用是什么| 什么品牌的| 先天性聋哑病属于什么遗传病| 七月有什么节日| 嘴唇起泡是什么原因引起的| 弹力棉是什么面料| 环比是什么| 人类什么时候出现的| 产妇刚生完孩子适合吃什么| 菲拉格慕属于什么档次| 生理盐水有什么作用| 十一月三号是什么星座| 肾不好会出现什么症状| 间接胆红素高说明什么| mt指什么| 耳朵嗡嗡响吃什么药| 今天生肖冲什么| 鼻塞流清鼻涕吃什么药| 戾什么意思| 巴掌是什么意思| 12月22号是什么星座| europe是什么意思| 焦虑吃什么药| 昙花有什么功效与作用| 什么是平行世界| 名媛什么意思| 骨量减少是什么意思| 闰六月给父母买什么| 幽门螺杆菌吃什么药最好| 桜什么意思| 10月12是什么星座| 2018年属什么生肖| 818是什么星座| 健脾祛湿吃什么药效果最好| 什么时候血压最高| 胃不好吃什么水果好| 10月19是什么星座| 结肠炎吃什么药| 感悟是什么意思| 七月八日是什么星座| 臭鼬是什么动物| 唐三彩是什么意思| 妇科臭氧治疗是什么| 子宫内膜厚是什么原因| pr医学上是什么意思| 排骨炖什么| 鹦鹉拉肚子吃什么药| raf是什么意思| 口周皮炎用什么药膏| 尿频尿急吃什么药| 外耳道炎用什么药| 参透是什么意思| 什么叫通勤| 生命的本质是什么| 羊内腰和外腰分别是什么| 梦见手机摔碎了是什么意思| 基因突变发生在什么时期| 什么叫个性强| 吃香蕉有什么好处| 异化是什么意思| 剪头发叫什么手术| 1129什么星座| 什么人不能爬泰山| 海螺不能和什么一起吃| 碳水化合物是什么| 原发性和继发性是什么意思| 玫瑰花泡水喝有什么功效| 茉莉龙珠是什么茶| 标准偏差是什么意思| 屎特别臭是什么原因| 挚友是什么意思| 九二年属什么生肖| 孕囊小是什么原因| 产后42天复查挂什么科| 暖气是什么意思| 臭屁多是什么原因| 为什么睡不醒| 登革热是什么病| 6月28是什么星座| 百度Zum Inhalt springen

《龙之丘》绿色度测评报告

Aus Wikipedia
百度 去年8月份,简在自己的宝马车里因酒驾而被捕;今年3月,就在刚刚购买了奔驰车一周后,她又因为酒驾而遭到了18个月的开车禁令。

Die Dokumentation für dieses Modul kann unter Modul:TableTools/Doku erstellt werden

--[[
------------------------------------------------------------------------------------
--                               TableTools                                       --
--                                                                                --
-- This module includes a number of functions for dealing with Lua tables.        --
-- It is a meta-module, meant to be called from other Lua modules, and should     --
-- not be called directly from #invoke.                                           --
------------------------------------------------------------------------------------
--]]

local libraryUtil = require('libraryUtil')

local p = {}

-- Define often-used variables and functions.
local floor = math.floor
local infinity = math.huge
local checkType = libraryUtil.checkType
local checkTypeMulti = libraryUtil.checkTypeMulti

--[[
------------------------------------------------------------------------------------
-- isPositiveInteger
--
-- This function returns true if the given value is a positive integer, and false
-- if not. Although it doesn't operate on tables, it is included here as it is
-- useful for determining whether a given table key is in the array part or the
-- hash part of a table.
------------------------------------------------------------------------------------
--]]
function p.isPositiveInteger(v)
	if type(v) == 'number' and v >= 1 and floor(v) == v and v < infinity then
		return true
	else
		return false
	end
end

--[[
------------------------------------------------------------------------------------
-- isNan
--
-- This function returns true if the given number is a NaN value, and false
-- if not. Although it doesn't operate on tables, it is included here as it is
-- useful for determining whether a value can be a valid table key. Lua will
-- generate an error if a NaN is used as a table key.
------------------------------------------------------------------------------------
--]]
function p.isNan(v)
	if type(v) == 'number' and tostring(v) == '-nan' then
		return true
	else
		return false
	end
end

--[[
------------------------------------------------------------------------------------
-- shallowClone
--
-- This returns a clone of a table. The value returned is a new table, but all
-- subtables and functions are shared. Metamethods are respected, but the returned
-- table will have no metatable of its own.
------------------------------------------------------------------------------------
--]]
function p.shallowClone(t)
	local ret = {}
	for k, v in pairs(t) do
		ret[k] = v
	end
	return ret
end

--[[
------------------------------------------------------------------------------------
-- removeDuplicates
--
-- This removes duplicate values from an array. Non-positive-integer keys are
-- ignored. The earliest value is kept, and all subsequent duplicate values are
-- removed, but otherwise the array order is unchanged.
------------------------------------------------------------------------------------
--]]
function p.removeDuplicates(t)
	checkType('removeDuplicates', 1, t, 'table')
	local isNan = p.isNan
	local ret, exists = {}, {}
	for i, v in ipairs(t) do
		if isNan(v) then
			-- NaNs can't be table keys, and they are also unique, so we don't need to check existence.
			ret[#ret + 1] = v
		else
			if not exists[v] then
				ret[#ret + 1] = v
				exists[v] = true
			end
		end	
	end
	return ret
end			

--[[
------------------------------------------------------------------------------------
-- numKeys
--
-- This takes a table and returns an array containing the numbers of any numerical
-- keys that have non-nil values, sorted in numerical order.
------------------------------------------------------------------------------------
--]]
function p.numKeys(t)
	checkType('numKeys', 1, t, 'table')
	local isPositiveInteger = p.isPositiveInteger
	local nums = {}
	for k, v in pairs(t) do
		if isPositiveInteger(k) then
			nums[#nums + 1] = k
		end
	end
	table.sort(nums)
	return nums
end

--[[
------------------------------------------------------------------------------------
-- affixNums
--
-- This takes a table and returns an array containing the numbers of keys with the
-- specified prefix and suffix. For example, for the table
-- {a1 = 'foo', a3 = 'bar', a6 = 'baz'} and the prefix "a", affixNums will
-- return {1, 3, 6}.
------------------------------------------------------------------------------------
--]]
function p.affixNums(t, prefix, suffix)
	checkType('affixNums', 1, t, 'table')
	checkType('affixNums', 2, prefix, 'string', true)
	checkType('affixNums', 3, suffix, 'string', true)

	local function cleanPattern(s)
		-- Cleans a pattern so that the magic characters ()%.[]*+-?^$ are interpreted literally.
		s = s:gsub('([%(%)%%%.%[%]%*%+%-%?%^%$])', '%%%1')
		return s
	end

	prefix = prefix or ''
	suffix = suffix or ''
	prefix = cleanPattern(prefix)
	suffix = cleanPattern(suffix)
	local pattern = '^' .. prefix .. '([1-9]%d*)' .. suffix .. '$'

	local nums = {}
	for k, v in pairs(t) do
		if type(k) == 'string' then			
			local num = mw.ustring.match(k, pattern)
			if num then
				nums[#nums + 1] = tonumber(num)
			end
		end
	end
	table.sort(nums)
	return nums
end

--[[
------------------------------------------------------------------------------------
-- numData
--
-- Given a table with keys like ("foo1", "bar1", "foo2", "baz2"), returns a table
-- of subtables in the format 
-- { [1] = {foo = 'text', bar = 'text'}, [2] = {foo = 'text', baz = 'text'} }
-- Keys that don't end with an integer are stored in a subtable named "other".
-- The compress option compresses the table so that it can be iterated over with
-- ipairs.
------------------------------------------------------------------------------------
--]]
function p.numData(t, compress)
	checkType('numData', 1, t, 'table')
	checkType('numData', 2, compress, 'boolean', true)
	local ret = {}
	for k, v in pairs(t) do
		local prefix, num = mw.ustring.match(tostring(k), '^([^0-9]*)([1-9][0-9]*)$')
		if num then
			num = tonumber(num)
			local subtable = ret[num] or {}
			if prefix == '' then
				-- Positional parameters match the blank string; put them at the start of the subtable instead.
				prefix = 1
			end
			subtable[prefix] = v
			ret[num] = subtable
		else
			local subtable = ret.other or {}
			subtable[k] = v
			ret.other = subtable
		end
	end
	if compress then
		local other = ret.other
		ret = p.compressSparseArray(ret)
		ret.other = other
	end
	return ret
end

--[[
------------------------------------------------------------------------------------
-- compressSparseArray
--
-- This takes an array with one or more nil values, and removes the nil values
-- while preserving the order, so that the array can be safely traversed with
-- ipairs.
------------------------------------------------------------------------------------
--]]
function p.compressSparseArray(t)
	checkType('compressSparseArray', 1, t, 'table')
	local ret = {}
	local nums = p.numKeys(t)
	for _, num in ipairs(nums) do
		ret[#ret + 1] = t[num]
	end
	return ret
end

--[[
------------------------------------------------------------------------------------
-- sparseIpairs
--
-- This is an iterator for sparse arrays. It can be used like ipairs, but can
-- handle nil values.
------------------------------------------------------------------------------------
--]]
function p.sparseIpairs(t)
	checkType('sparseIpairs', 1, t, 'table')
	local nums = p.numKeys(t)
	local i = 0
	local lim = #nums
	return function ()
		i = i + 1
		if i <= lim then
			local key = nums[i]
			return key, t[key]
		else
			return nil, nil
		end
	end
end

--[[
------------------------------------------------------------------------------------
-- size
--
-- This returns the size of a key/value pair table. It will also work on arrays,
-- but for arrays it is more efficient to use the # operator.
------------------------------------------------------------------------------------
--]]

function p.size(t)
	checkType('size', 1, t, 'table')
	local i = 0
	for k in pairs(t) do
		i = i + 1
	end
	return i
end


local function defaultKeySort(item1, item2)
	-- "number" < "string", so numbers will be sorted before strings.
	local type1, type2 = type(item1), type(item2)
	if type1 ~= type2 then
		return type1 < type2
	else -- This will fail with table, boolean, function.
		return item1 < item2
	end
end

--[[
	Returns a list of the keys in a table, sorted using either a default
	comparison function or a custom keySort function.
]]
function p.keysToList(t, keySort, checked)
	if not checked then
		checkType('keysToList', 1, t, 'table')
		checkTypeMulti('keysToList', 2, keySort, { 'function', 'boolean', 'nil' })
	end
	
	local list = {}
	local index = 1
	for key, value in pairs(t) do
		list[index] = key
		index = index + 1
	end
	
	if keySort ~= false then
		keySort = type(keySort) == 'function' and keySort or defaultKeySort
		
		table.sort(list, keySort)
	end
	
	return list
end

--[[
	Iterates through a table, with the keys sorted using the keysToList function.
	If there are only numerical keys, sparseIpairs is probably more efficient.
]]
function p.sortedPairs(t, keySort)
	checkType('sortedPairs', 1, t, 'table')
	checkType('sortedPairs', 2, keySort, 'function', true)
	
	local list = p.keysToList(t, keySort, true)
	
	local i = 0
	return function()
		i = i + 1
		local key = list[i]
		if key ~= nil then
			return key, t[key]
		else
			return nil, nil
		end
	end
end

--[[
	Returns true if all keys in the table are consecutive integers starting at 1.
--]]
function p.isArray(t)
	checkType("isArray", 1, t, "table")
	
	local i = 0
	for k, v in pairs(t) do
		i = i + 1
		if t[i] == nil then
			return false
		end
	end
	return true
end

-- { "a", "b", "c" } -> { a = 1, b = 2, c = 3 }
function p.invert(array)
	checkType("invert", 1, array, "table")
	
	local map = {}
	for i, v in ipairs(array) do
		map[v] = i
	end
	
	return map
end

--[[
	{ "a", "b", "c" } -> { ["a"] = true, ["b"] = true, ["c"] = true }
--]]
function p.listToSet(t)
	checkType("listToSet", 1, t, "table")
	
	local set = {}
	for _, item in ipairs(t) do
		set[item] = true
	end
	
	return set
end

--[[
	Recursive deep copy function.
	Preserves identities of subtables.
	
]]
local function _deepCopy(orig, includeMetatable, already_seen)
	-- Stores copies of tables indexed by the original table.
	already_seen = already_seen or {}
	
	local copy = already_seen[orig]
	if copy ~= nil then
		return copy
	end
	
	if type(orig) == 'table' then
		copy = {}
		for orig_key, orig_value in pairs(orig) do
			copy[deepcopy(orig_key, includeMetatable, already_seen)] = deepcopy(orig_value, includeMetatable, already_seen)
		end
		already_seen[orig] = copy
		
		if includeMetatable then
			local mt = getmetatable(orig)
			if mt ~= nil then
				local mt_copy = deepcopy(mt, includeMetatable, already_seen)
				setmetatable(copy, mt_copy)
				already_seen[mt] = mt_copy
			end
		end
	else -- number, string, boolean, etc
		copy = orig
	end
	return copy
end

function p.deepCopy(orig, noMetatable, already_seen)
	checkType("deepCopy", 3, already_seen, "table", true)
	
	return _deepCopy(orig, not noMetatable, already_seen)
end

--[[
	Concatenates all values in the table that are indexed by a number, in order.
	sparseConcat{ a, nil, c, d }  =>  "acd"
	sparseConcat{ nil, b, c, d }  =>  "bcd"
]]
function p.sparseConcat(t, sep, i, j)
	local list = {}
	
	local list_i = 0
	for _, v in p.sparseIpairs(t) do
		list_i = list_i + 1
		list[list_i] = v
	end
	
	return table.concat(list, sep, i, j)
end

--[[
-- This returns the length of a table, or the first integer key n counting from
-- 1 such that t[n + 1] is nil. It is similar to the operator #, but may return
-- a different value when there are gaps in the array portion of the table.
-- Intended to be used on data loaded with mw.loadData. For other tables, use #.
-- Note: #frame.args in frame object always be set to 0, regardless of 
-- the number of unnamed template parameters, so use this function for
-- frame.args.
--]]
function p.length(t)
	local i = 1
	while t[i] ~= nil do
		i = i + 1
	end
	return i - 1
end

function p.inArray(arr, valueToFind)
	checkType("inArray", 1, arr, "table")
	
	-- if valueToFind is nil, error?
	
	for _, v in ipairs(arr) do
		if v == valueToFind then
			return true
		end
	end
	
	return false
end

return p
智齿为什么叫智齿 犯月是什么意思 西晋之后是什么朝代 尿不干净有余尿是什么原因 牙龈肿痛用什么药好得快
人流是什么意思 头皮发麻什么原因 脾胃虚寒吃什么 66年出生属什么生肖 耳朵发烫是什么原因
梦见捡手机是什么意思 英雄难过美人关是什么意思 阴虚什么症状 老人嗜睡是什么征兆 肾气不固吃什么中成药
fnh是什么病 食物链是什么意思 茶卡是什么意思 矽肺是什么意思 豆瓣酱可以做什么菜
体内湿气重是什么原因造成的xinjiangjialails.com 朋友是什么意思hcv9jop1ns5r.cn 外伤用什么消炎药dayuxmw.com 洗面奶什么牌子好hcv8jop5ns3r.cn 智齿是什么样的hcv8jop8ns0r.cn
脚趾痒用什么药hcv7jop5ns6r.cn 母亲属虎孩子属什么好hcv9jop5ns0r.cn 洋姜有什么功效与作用hcv8jop3ns7r.cn 梦见着火了是什么意思hcv8jop6ns7r.cn 指甲花学名叫什么hcv8jop1ns6r.cn
cos是什么hcv9jop5ns7r.cn 哈乐是什么药hcv9jop1ns8r.cn 录取通知书是什么生肖hcv9jop0ns7r.cn 双飞是什么意思cj623037.com 月经前几天是什么期aiwuzhiyu.com
11月25日是什么星座hcv7jop6ns9r.cn 大腿外侧麻木是什么原因hcv8jop7ns9r.cn 分娩是什么意思啊hcv8jop9ns3r.cn 老虎下山下一句是什么hcv9jop5ns5r.cn 你掀起波澜抛弃了我是什么歌hcv8jop7ns6r.cn
百度