一个金字旁一个本念什么| 夏天喝什么茶比较好| 痛风吃什么蔬菜| 黑玫瑰代表什么| u盾是什么| 李健为什么退出水木年华| 肝实质回声欠均匀是什么意思| 月亮五行属什么| 身痒是什么原因引起的| 大是大非是什么意思| 青黛是什么意思| 走仕途是什么意思| 燕窝有什么功效和作用| 为什么同房后小腹疼痛| 十一月七号是什么星座| 心率过慢有什么危害| 东字五行属什么| 胚芽是什么意思| 脚心疼痛是什么原因引起的| 葡萄球菌感染是什么原因引起的| 副县级是什么级别| 膀胱炎是什么症状| 梦见死猪是什么意思| 丙寅五行属什么| 梦见自己手机丢了是什么意思| 什么情况下需要打狂犬疫苗| 2011年是什么生肖| 什么蔬菜| 老年痴呆挂什么科| 一开车就犯困是什么原因| 95年属于什么生肖| 睡觉起来脸肿是什么原因引起的| 甲醇和乙醇有什么区别| 人为什么要火化| 八面玲珑是什么数字| 什么可当| 睡不着有什么好办法吗| 一个合一个页读什么| 奡是什么意思| 消炎药是什么药| 占有欲是什么意思| 壁虎怕什么| 羊肉和什么相克| 长目飞耳是什么动物| y3是什么牌子| 梦到好多蛇是什么意思| 积什么成什么| 人为什么会起鸡皮疙瘩| 10月30日什么星座| 12月出生的是什么星座| 什么牌子的冰箱好用又省电| electrolux是什么牌子| 来月经前有什么症状| 尿碘是检查什么的| 梦见大蜈蚣是什么预兆| 为什么会呼吸性碱中毒| 鲁班发明了什么| 永加一个日念什么| 猪肝色是什么颜色| 乙肝属于什么科| 秋分是什么意思| 牛肉排酸是什么意思| 淋巴结清扫是什么意思| 游泳要带什么东西| 黄体期是什么意思| 喉咙痰多是什么原因造成的| 公历和农历有什么区别| 林是什么生肖| 发热挂什么科| 岩茶是什么茶类| 泡茶用什么杯子最好| 血管堵塞有什么症状| 淋巴门结构可见是什么意思| 不怕流氓什么就怕流氓有文化| 膝盖不舒服挂什么科| 化疗能吃什么水果| 比目鱼又叫什么鱼| 人流后什么时候来月经| inf是什么意思| 头晕呕吐吃什么药| 软蛋是什么意思| 安利是什么意思| 耳呜吃什么药最好| 一什么尺子| 为什么一吃辣的就拉肚子| 圣母什么意思| 细胞是什么| 为什么会上火| 假体是什么| 富察氏是什么旗| 880什么意思| 多吃火龙果有什么好处和坏处| 没收个人全部财产是什么意思| 为什么肚子老是胀气| 李白号称什么| 体内湿气重吃什么食物| 看睾丸去医院挂什么科| 亭亭净植的亭亭是什么意思| 睡觉趴着睡是什么原因| 程门立雪是什么生肖| 玄武岩属于什么岩石| 手上的三条线分别代表什么| 冬枣不能和什么一起吃| 脸色发黑是什么原因| 屿是什么意思| 黄体中期是什么意思| 簋是什么| 夏天煲什么汤好| 最高的山是什么山| 手背发麻是什么原因| 五味子有什么功效| 菠萝蜜什么季节最好吃| 肝火旺盛吃什么| 月经期不能吃什么水果| 中学为体西学为用是什么意思| 白蚁长什么样| au是什么意思| py是什么意思| 九月六号是什么星座| 右脸有痣代表什么| 理想血压是什么意思| 墨西哥说什么语言| 等离子是什么| 撤退性出血什么意思| i是什么| 42是什么意思| ped是什么意思| 棕色裤子搭配什么颜色上衣| 古惑仔为什么不拍了| 斥巨资是什么意思| 柳絮吃了有什么好处| 什么手机拍照效果最好| 背部疼痛挂什么科| 机智如你是什么意思| 为什么油耳朵就有狐臭| 全棉和纯棉有什么区别| 75年属什么的生肖| 心脏疼是什么感觉| 脆皖鱼是什么鱼| 熙熙攘攘是什么意思| 左室舒张功能减退是什么意思| 今年是什么| 直击是什么意思| 肝腹水是什么症状| 餐后血糖高是什么原因| 甘草不能和什么一起吃| 肝内胆管轻度扩张是什么意思| 畸形是什么意思| 卵黄囊是什么意思| 直爽是什么意思| 红烧肉是什么菜系| 老烂腿用什么药最好| 失眠吃什么中药| 什么鸟好养又与人亲近| 弱酸性是什么意思| 奥美拉唑什么时候吃最好| 嘴唇有黑斑是什么病| 心脏病是什么原因引起的| 肌肉萎缩吃什么药| 尿频看什么科| 什么言什么色| 什么颜色不显黑| hbv是什么病毒| 豚鼠吃什么食物| 白头翁吃什么食物| 硬卧是什么样子的| 辟谷是什么意思| 二十年婚姻是什么婚| 肌酐指标高说明什么| 上面白下面本念什么| 鞋履是什么意思| 自得其乐是什么意思| 心率低有什么危害| 测幽门螺旋杆菌挂什么科| itp是什么| 神经衰弱吃什么中成药| 逝者如斯夫是什么意思| fast什么意思| 苦荞茶有什么功效| 五味杂陈什么意思| 7月去英国穿什么| dha宝宝什么时候吃最好| 舌中间有裂纹是什么原因| 孕妇流鼻血是什么原因| 标准偏差是什么意思| 纤维蛋白原是什么意思| 普通的近义词是什么| 介词后面跟什么| 滋养细胞疾病是什么病| 7.6什么星座| 怀疑心衰做什么检查| 白手套是什么意思| 吕布属什么生肖| 肾功能不全是指什么| 胸疼应该挂什么科| 结肠炎不能吃什么食物| bra是什么| 心急吃不了热豆腐什么意思| 荷兰的国花是什么花| 车厘子什么时候成熟| 河南南阳产什么玉| 什么是双向抑郁| 黄瓜苦是什么原因| 闪点什么意思| 有什么神话故事| 飞的第一笔是什么| 梦见火是什么预兆| 舌苔腻是什么意思| 整天犯困没精神想睡觉是什么原因| 中国反导弹系统叫什么| 月办念什么| rp是什么意思| 什么虫子咬了会起水泡| 两棵树是什么牌子| 路引是什么| 西安有什么玩的| 幼犬吃什么| 花魁是什么意思| 考护士资格证需要什么条件| 阿扎西是什么意思| 副鼻窦炎症是什么意思| 肉毒为什么怕热敷| 小排畸主要检查什么| 窦房结内游走性心律是什么意思| 黑色皮肤适合什么颜色的衣服| 鬼迷日眼是什么意思| 中国中铁是做什么的| 上火吃什么水果| 2011属什么生肖| 甯字五行属什么| 桑葚搭配什么泡水喝最好| 77代表什么意思| rhd血型阳性是什么意思| 孕妇贫血吃什么补血最快| 奔豚是什么意思| 粉色分泌物是什么原因| 过敏有什么症状| 赵云的坐骑是什么马| 霍金什么时候去世| 瓤是什么意思| 血糖偏高吃什么水果好| 什么叫牙冠| 冰妹什么意思| 司长是什么级别的官| 为什么会胃胀气| 心火旺喝什么茶| 什么是沉香| 肾动脉彩超主要查什么| 1988是什么生肖| 衣锦还乡是什么意思| 离婚带什么证件才能办理| 138是什么意思啊| 梦见葱是什么意思| 爆粗口是什么意思| 心悸是什么感觉| 所以我求求你别让我离开你是什么歌| 吃什么水果可以护肝| 眼皮发黑是什么原因| 梦见孩子结婚什么预兆| 活好的女人有什么表现| 9月18日是什么日子| 猪心炖什么治失眠| 口臭吃什么中成药| 左手麻木什么原因| 百度???? ????? ???

吉林省启动争做中国好网民系列活动

???? ??? ?????? ???????? ???
百度 譬如说作者本人,母亲已去世而父亲仍健在,清明节,祭拜母亲之同时,一定要孝敬孝敬父亲。

Documentation for this module may be created at ??????: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
1964年是什么年 郎酒是什么香型 杨新鸣包贝尔什么关系 胆汁反流是什么原因引起的 佝偻是什么意思
左脸长痣代表什么 贝字旁的字和什么有关 返祖现象什么意思 芃字五行属什么 末法时期是什么意思
喝酒对胃有什么伤害 血管瘤是什么 庸人什么意思 女人怀孕的最佳时间是什么时间 男人眼角有痣代表什么
呕心沥血是什么意思 什么人不能喝丹参 左边脖子疼是什么原因 吃什么对肾有好处 沙漠有什么动物
头晕耳鸣是什么原因引起的hcv9jop5ns5r.cn 莲藕什么时候种植最佳ff14chat.com 血糖偏低是什么原因引起的hcv7jop6ns1r.cn 猫薄荷对猫有什么作用hcv7jop5ns0r.cn 线雕是什么hcv8jop2ns2r.cn
脸上长疣是什么原因hcv8jop4ns5r.cn 呼吸不过来要喘大气是什么情况hcv8jop6ns3r.cn 心灵的洗礼是什么意思hcv7jop9ns7r.cn 取笑是什么意思hcv8jop0ns2r.cn 1939年中国发生了什么hcv8jop6ns5r.cn
甲状腺功能三项查什么hcv7jop5ns6r.cn 体温偏低是什么原因hcv7jop4ns8r.cn 晚上起夜尿多吃什么药hcv9jop3ns0r.cn 喉咙发炎吃什么食物好dayuxmw.com 3月24日什么星座hcv9jop5ns7r.cn
2019年是什么生肖hcv8jop2ns0r.cn 孩子为什么会得抽动症zhongyiyatai.com 阴吹是什么意思hcv8jop0ns0r.cn 铁蛋白高是什么意思hcv8jop3ns9r.cn 想字五行属什么zhiyanzhang.com
百度