月经量突然减少是什么原因| 头发粗硬是什么原因| 马杀鸡是什么意思| 大便为什么是黑色的是什么原因| 大豆磷脂是什么| 黄瓜为什么苦| 头皮屑特别多是什么原因| 益生元和益生菌有什么区别| 性交是什么| 到是什么意思| 番茄可以做什么菜| 窦性心律逆钟向转位是什么意思| 孤单是什么意思| 的作用是什么| 膝盖酸是什么原因| 皮夹克是什么意思| 七八年属什么生肖| 乳腺癌三期是什么意思| 什么能力| 杨梅不能和什么一起吃| 人为什么会有狐臭| 红枣什么时候吃最好| 二月二十三日是什么星座| 漠视是什么意思| 早晨起来嘴苦是什么原因| 五行什么克金| 梦到好多小蛇是什么意思| 鸟为什么会飞| 类风湿不能吃什么食物| 睡觉时间长是什么原因| 2.18是什么星座| 额头长痘痘是什么原因怎么调理| 普通感冒吃什么药| 间奏是什么意思| 指甲变形是什么原因| 逝者如斯夫是什么意思| 棋逢对手下一句是什么| 布洛芬的副作用是什么| 头发痒是什么原因| pdd是什么意思| 水生什么五行| 打鼾是什么原因引起的| 什么时候去西藏旅游最好| 熊是什么意思| 朝秦暮楚是什么意思| 面部神经吃什么药| 团是什么结构| 绿杨春属于什么茶| 本命年有什么说法| 海豹油有什么作用| 什么叫跨境电商| 结晶高是什么原因| 纪委是干什么的| 三七粉主治什么| 野兽是什么生肖| 鼻子两侧挤出来的白色东西是什么| 红酒是什么味道| 处女座后面是什么星座| 湿热喝什么茶可以调理| 梦见被雷劈什么意思| 为什么一照相脸就歪了| 贤者模式是什么意思| 南通在江苏什么位置| 处女和什么座最配对| 大马士革是什么意思| 过年吃什么| 天下乌鸦一般黑是什么意思| 多囊卵巢综合症是什么| 一什么云彩| 松脂是什么| 梦见自己怀孕生孩子是什么意思| 乳腺点状钙化是什么意思| 巧夺天工什么意思| 农历五月十八是什么日子| 向晚的意思是什么| 茯苓是什么| 班长是什么军衔| 老鼠最怕什么东西| 心绞痛什么症状| 羞耻是什么意思| 2月1号是什么星座| pvd是什么材料| 幽门螺旋杆菌感染有什么症状| 晚上睡不着白天睡不醒是什么原因| 胆管炎吃什么药| 丹宁蓝是什么颜色| 甲亢属于什么科室| 女人喜欢什么样的男人| 过氧化氢弱阳性什么意思| 阴性和阳性是什么意思| 肚子不饿是什么原因| 八爪鱼是什么| 女红是什么意思| ein是什么意思| 头发干枯毛躁用什么洗发水| 安徒生被誉为什么| 色达在四川什么地方| 劳苦功高是什么意思| 尖牙什么时候换| 吃什么可以让子宫内膜变薄| 性格什么意思| 脂肪肝应注意什么| 吃什么掉秤快| 儿童咽峡炎吃什么药| 湛蓝是什么颜色| 酒精过敏是什么症状| 协警是干什么的| 4月10号什么星座| 百合为什么是苦的| 乙肝小二阳是什么意思| 2022年属虎的是什么命| 直肠炎是什么原因引起的| 七月三十是什么星座| 什么外之什么| 夏枯草是什么| 渡人是什么意思| 最好的避孕方法是什么| 农历六月初六是什么星座| 前列腺炎吃什么中成药| 四大是什么| 贻笑大方什么意思| 女性膀胱炎是什么症状| 欧诗漫是个什么档次| 吃什么会变丑脑筋急转弯| 知了猴什么时候出土| 铠字五行属什么| 委曲求全是什么生肖| 儿童节吃什么| ctp是什么| 锐字五行属什么| 历法是什么意思| 谭字五行属什么| 金色搭配什么颜色好看| 政协委员是什么级别| 反酸水是什么原因| g6pd是什么意思| 月桂酰两性基乙酸钠是什么| 人体自由基是什么| 食色性也什么意思| 动不动就出汗是什么原因| 艾滋病是一种什么病| 类风湿要吃什么药| 禾加农是什么字| iphone的i是什么意思| 骨髓瘤是什么原因引起的| 什么叫根管治疗| 小孩便秘是什么原因引起的| 紫苏有什么作用与功效| 肚子胀气吃什么药| 紫癜是一种什么病严重吗| 女性尿道出血是什么原因引起的| bae什么意思| tfboys什么意思| 三点水一个条读什么| 尿酸高可以吃什么| 蝙蝠属于什么动物| 吃什么补充黄体酮| 精神病是什么意思| 我还是什么| 这是什么英语| 学是什么偏旁| 来福是什么意思| 感冒低烧吃什么药| 晚上8点是什么时辰| 孕妇梦见棺材是什么征兆| 什么是什么的摇篮| 藏海花是什么花| 白蛇是什么蛇| 素鸡是什么做的| 海蜇是什么动物| 为什么射出的精子里有淡红色| 嗜睡是什么症状| 甘露是什么| 体毛旺盛是什么原因| 肺静脉流的是什么血| 手串19颗代表什么意思| 芙蓉是什么| 喉咙有白点是什么原因| 眩晕挂什么科室| 为什么人一瘦就会漂亮| 丰衣足食是什么生肖| 怀孕血压高对胎儿有什么影响| 肚子腹泻是什么原因| 水瓶女和什么星座最配| 阴超能检查出什么| 发改委是管什么的| 喝栀子茶有什么好处| 女司机为什么开不好车| 陶氏腔积液是什么意思| 补气血吃什么药| 咽拭子是检查什么的| 0tc是什么意思| 眼角发痒用什么眼药水| 老花镜是什么镜| 取环后应该注意什么| 小孩拉肚子吃什么药效果好| 穴位是什么| 青光眼用什么眼药水| 败血症是什么病| 幽门螺杆菌什么药最好| 季度是什么意思| 生水是什么意思| 排骨是什么肉| 寒食节是什么意思| 神经内科和神经外科有什么区别| 牙龈上火是什么原因引起的| 角的大小和什么有关| 如意丹的作用是什么| 女性生活疼痛什么原因| 两个月没有来月经了是什么原因| alk是什么意思| 甘少一横读什么| 鱿鱼是什么动物| 同型半胱氨酸高吃什么| 活检是什么检查| 牙龈出血缺什么维生素| 什么样的人| gigi是什么意思| 站桩有什么好处| 肠癌吃什么药| 责成是什么意思| 高危性行为是什么| 液体套是什么| 什么叫做红颜知己| 尿胆原阳性是什么意思| 什么是翻新机| 2013属什么生肖| 脖子上长小肉粒是什么| 坐月子可以吃什么零食| 办理护照需要什么资料| 孽缘什么意思| 皮革是什么材质| 尿量少是什么原因| 笔名什么意思| 头发五行属什么| 查胆固醇挂什么科| 瘴气是什么| 北京五行属什么| 低血压吃什么可以补| 下眼睑红肿是什么原因| 凝血五项是检查什么病| 小孩几天不大便是什么原因怎么办| 八月一日是什么节日| 火焰山为什么这么热| 第二性征是什么意思| 什么的枝干| 腋臭去医院挂什么科| 窦性心动过速是什么意思| 4月26日是什么星座| 神经损伤是什么症状| 吴亦凡什么学历| 汗管瘤什么原因造成| 半夜胎动频繁是什么原因| mpa是什么意思| 复方木尼孜其颗粒治什么病| 什么是纯净物| 猪肝色是什么颜色| 负离子什么意思| 什么药治便秘最好最快| 猫传腹是什么病| 氯气是什么颜色| 女人左手断掌什么命运| 周瑜和诸葛亮是什么关系| 1948年是什么年| 百度Jump to content

上饶市第四届人民代表大会第二次会议 关于上饶

Mai Wikipedia
百度 而下半场,忍无可忍的里皮就选择将半场梦游的王燊超换下场,或许正如银狐赛后所暗示的那样,像王燊超本场表现出来的斗志,真的会让里皮考虑对他永不叙用了。

Documentation for this module may be created at Module:TableTools/doc

--[[
------------------------------------------------------------------------------------
--                               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
屁为什么是臭的 深喉是什么感觉 什么是普世价值 自强不息的息是什么意思 阴虚便秘吃什么中成药
女性下面长什么样 造诣是什么意思 肛裂涂什么药膏能愈合 傻缺什么意思 猫咪感冒吃什么药
恐龙为什么叫恐龙 低压高什么原因 欲情故纵什么意思 醪糟发酸是什么原因 四大发明有什么
9月21日是什么星座 laurel是什么牌子 皮肤炎症用什么药 胃上面是什么器官 儿童抽动症看什么科
南京有什么特产可以带回家hcv8jop5ns2r.cn 激素六项都是查什么hanqikai.com 今天过生日是什么星座imcecn.com 关节疼挂什么科hcv8jop4ns3r.cn 莲子心泡水喝有什么功效和作用hcv7jop6ns8r.cn
腱鞘囊肿是什么原因引起的wmyky.com 惺惺相惜什么意思hcv9jop5ns3r.cn 什么水果可以美白0297y7.com 舌尖发麻是什么病的前兆gangsutong.com 玫瑰疹是什么病cj623037.com
什么是甲减有什么症状hcv8jop4ns4r.cn 外甥是什么关系hcv9jop4ns8r.cn 还是什么意思hcv9jop4ns8r.cn 一个三点水一个及念什么hcv7jop6ns5r.cn 晚上睡觉流口水是什么原因xinjiangjialails.com
看脱发应该挂什么科hcv9jop6ns9r.cn 细菌性阴道炎用什么洗液jasonfriends.com birads3类是什么意思creativexi.com 茅台酒为什么这么贵hcv7jop9ns2r.cn 补肾吃什么东西效果最好hcv8jop9ns1r.cn
百度