诺如病毒吃什么药最有效| 氨咖黄敏胶囊主治什么| 吾矛之利的利什么意思| 吃百合有什么好处| 舌苔发白是什么原因引起的| 奶奶的妈妈叫什么| 坐飞机不能带什么物品| 夜晚睡不着觉什么原因| 用什么泡水喝对肝脏好| 18点是什么时辰| 英语四级什么时候报名| 补白蛋白吃什么食物最快最好| 鳞状上皮增生是什么病| 学无止境是什么意思| 泡沫尿吃什么药| 端午节安康是什么意思| abo是什么血型| 什么叫流产| 血清胰岛素测定查什么| 十月二十二是什么星座| 嗓子发炎吃什么水果| 抬举征阳性是什么意思| 雨水是什么季节| 92年的猴是什么命| 心什么胆什么| 金代表什么数字| 痰多吃什么好| 上火嗓子疼吃什么药| 甲状腺双叶回声欠均匀是什么意思| 3月22日什么星座| 什么鸟一生只有一个伴侣| 缓刑是什么意思还要坐牢吗| 香辛料是什么| 总lge是什么| 老人适合喝什么茶| 5月24日是什么星座| 吃猪皮有什么好处和坏处| 农历5月是什么星座| 使节是什么意思| 女人为什么比男人长寿| 1983年出生是什么命| 梗阻是什么意思| 细菌性前列腺炎有什么症状| 小狗感冒吃什么药| 什么是精液| 心肌梗塞是什么原因造成的| 商务专员是做什么的| 减肥吃什么药好| 新加坡属于什么气候| 肚子痛是什么原因| 生不逢时是什么意思| 江浙沪是什么意思| 读书破万卷下一句是什么| 有什么办法让男人死精| 走水是什么意思| 6月18号是什么日子| 吃什么对血液好| 看血管挂什么科| 号外是什么意思| 97年的牛是什么命| 急性肠胃炎能吃什么水果| 三什么九什么成语| 中国中铁是做什么的| 草龟吃什么食物| 经常感冒吃什么增强抵抗力| 栀子花什么时候修剪| 脓毒血症是什么原因引起的| 病毒五项检查的是什么| 偏安一隅是什么意思| 天蝎什么象星座| 查高血压挂什么科| 尿等待是什么原因| 面部痉挛是什么原因引起的| sephora是什么牌子| 什么减肥药效果最好而且不反弹| 蛇毒有什么用| 成双成对是什么数字| 法令纹是什么| 十一月份是什么星座| 甲醛有什么危害| 吃什么可以提高新陈代谢| 结节是什么症状| 甲鱼和乌龟有什么区别| 老是瞌睡是什么原因| 1995年的猪五行属什么| 打嗝吃什么药好| 微创是什么| 烩是什么意思| 朗姆酒是什么酒| 碱和小苏打有什么区别| 吃瓜子有什么好处| 自闭什么意思| 降结肠疼是什么原因| 玟字五行属什么| 燕窝有什么好处| 红酒兑什么好喝| 跑步穿什么衣服| 降结肠疼是什么原因| 血小板减少有什么症状| 外阴痒用什么药膏| 荷叶又什么又什么| 真菌感染什么症状| 鹅口疮是什么引起的| wa是什么意思| 解酒的酶是什么酶| 敏五行属什么| 乳房痛是什么原因| 出汗太多是什么原因| 吃什么补肺养肺比较好| 淡盐水是什么| 白灼虾是什么虾| 长痘痘用什么药| 心肌酶是检查什么的| 平板支撑练什么| 小便有泡沫是什么情况| 老婆妹妹叫什么| 余什么意思| 不见棺材不落泪是什么生肖| 硝酸酯类药物有什么药| 蜘蛛结网预示着什么| 气泡水是什么| 梦见蛇蛋是什么意思啊| 2030年属什么生肖| 非诚勿扰什么意思| 做乳腺彩超挂什么科| 陈皮泡酒喝有什么功效和作用| 增强胃动力吃什么药| 什么样的肚子疼是癌| 重情重义是什么意思| 乐得什么填词语| 低压48有什么危险| 猫咪呕吐吃什么药可以解决| 金玉其外败絮其中是什么意思| 品牌背书是什么意思| 中药学学什么| 文替是什么意思| 尿频去药店买什么药| 肚子大是什么原因造成的| 面色发黄是什么原因| 蜈蚣最怕什么| 焦虑症什么症状| 胸部b超挂什么科| 猥亵是什么意思| 梅花肉是什么肉| 专硕和学硕有什么区别| 无水酥油是什么| 心口痛挂什么科| 花椒有什么作用| 梦见僵尸是什么预兆| 左边肚子疼是什么原因| 进口二甲双胍叫什么| 什么情况下需要打破伤风针| 什么是局限性肺纤维化| 170是什么尺码| 重庆为什么这么热| 512是什么节日| 什么是朱砂痣| 黄精有什么作用和功效| 牛蒡是什么| 一什么棉花| 肝火旺盛喝什么茶| 降血脂吃什么最好| 118什么意思| 乙木的根是什么| 七嘴八舌是什么生肖| 银耳为什么助湿气| 什么叫甲状腺| 泡果酒用什么酒好| 香兰素是什么东西| 尖锐湿疣用什么药| 汗斑是什么原因引起的| 咳嗽喉咙痒吃什么药好得快| 经常打哈欠是什么原因| 梦见洪水是什么意思| 鱼什么而什么| eos是什么意思| 萨德事件是什么意思| 口大是什么字| 缺钾是什么原因引起的| 胸部发炎是什么症状| 更年期什么症状| 烟花三月下扬州什么意思| 强盗是什么意思| 付字五行属什么| 脑白质是什么病| 什么高什么低| 冒虚汗是什么原因| 私房菜是什么意思| 女性憋不住尿是什么原因| 静修是什么意思| 牛肉和什么包饺子好吃| 什么时候放暑假| 幽门螺旋杆菌感染吃什么药| 打醮是什么意思| 头晕是什么情况| 人乳头病毒是什么意思| 女的排卵期一般是什么时间| 今天股票为什么大跌| 大义是什么意思| 咳嗽想吐是什么原因| gr是什么| 西瓜什么季节成熟| 百褶裙配什么鞋子| 膈应是什么意思| 硒酵母胶囊对甲状腺的作用是什么| 口腔发苦是什么原因| 玉米排骨汤放什么调料| 马步鱼为什么是甜的| 脱发吃什么| 男人肾虚吃什么补得快| 冰丝和天丝有什么区别| 眼皮痒是什么原因| 紫色搭配什么颜色| 产后大出血一般发生在什么时候| 三点水真读什么| 七八年属什么| 世界上最长的英语单词是什么| 你掀起波澜抛弃了我是什么歌| 佳偶天成什么意思| 属龙是什么星座| 子宫增大是什么原因| 臆想是什么意思| 类胡萝卜素主要吸收什么光| 粉籍是什么意思| vr间隙是什么意思| md是什么意思| 泰山石敢当什么意思| 绿色和红色混合是什么颜色| 尿酸高什么东西不能吃| 诬赖是什么意思| 胆囊炎属于什么科| 攻受是什么意思| 1月16日是什么星座| 什么水果清肝火| mickey是什么牌子| 喉咙发甜是什么原因| 槲皮素是什么东西| 什么是情商| 2005年属鸡是什么命| 羽五行属什么| 身上起疙瘩是什么原因| 广州属于什么气候| 核磁dwi是什么意思| 后知后觉什么意思| 消炎药吃多了有什么副作用| 夏天梦见下雪是什么意思| 乳癖是什么病| 乌龟死了有什么预兆| 吃什么不长肉还能瘦| 办银行卡需要什么条件| 32岁属什么的生肖| 娃娃脸是什么脸型| 黄泉是什么意思| 婴儿什么时候长牙| 含漱是什么意思| 什么是洁癖| ivd是什么意思| 巴氏征阳性是什么意思| 百分点是什么意思| 左手中指麻木是什么原因| 432是什么意思| 手腕长痣代表什么意思| 附件炎有什么症状| 妇科病有什么症状| 百度?????????? ???????????

三明未来七天都是雨!还有短时强降水、7到9级雷...

Permanently protected ????????
????????????? ??
Documentation icon ??????????????????????[??????]
百度 因此,地方志文献不仅能够反映各个地方的历史文化,而且通过各地方志之间的关联的、补充,能够共同反映作为一个整体的中华历史文化。
------------------------------------------------------------------------------------
--                                   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)
	return type(v) == 'number' and v >= 1 and floor(v) == v and v < infinity
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)
	return type(v) == 'number' and v ~= v
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)
	checkType('shallowClone', 1, t, 'table')
	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(arr)
	checkType('removeDuplicates', 1, arr, 'table')
	local isNan = p.isNan
	local ret, exists = {}, {}
	for _, v in ipairs(arr) 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 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.
		return s:gsub('([%(%)%%%.%[%]%*%+%-%?%^%$])', '%%%1')
	end

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

	local nums = {}
	for k 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 _ 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
	elseif type1 == 'table' or type1 == 'boolean' or type1 == 'function' then
		return tostring(item1) < tostring(item2)
	else
		return item1 < item2
	end
end
------------------------------------------------------------------------------------
-- keysToList
--
-- Returns an array 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 arr = {}
	local index = 1
	for k in pairs(t) do
		arr[index] = k
		index = index + 1
	end

	if keySort ~= false then
		keySort = type(keySort) == 'function' and keySort or defaultKeySort
		table.sort(arr, keySort)
	end

	return arr
end

------------------------------------------------------------------------------------
-- sortedPairs
--
-- 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 arr = p.keysToList(t, keySort, true)

	local i = 0
	return function ()
		i = i + 1
		local key = arr[i]
		if key ~= nil then
			return key, t[key]
		else
			return nil, nil
		end
	end
end

------------------------------------------------------------------------------------
-- isArray
--
-- Returns true if the given value is a table and all keys are consecutive
-- integers starting at 1.
------------------------------------------------------------------------------------
function p.isArray(v)
	if type(v) ~= 'table' then
		return false
	end
	local i = 0
	for _ in pairs(v) do
		i = i + 1
		if v[i] == nil then
			return false
		end
	end
	return true
end

------------------------------------------------------------------------------------
-- isArrayLike
--
-- Returns true if the given value is iterable and all keys are consecutive
-- integers starting at 1.
------------------------------------------------------------------------------------
function p.isArrayLike(v)
	if not pcall(pairs, v) then
		return false
	end
	local i = 0
	for _ in pairs(v) do
		i = i + 1
		if v[i] == nil then
			return false
		end
	end
	return true
end

------------------------------------------------------------------------------------
-- invert
--
-- Transposes the keys and values in an array. For example, {"a", "b", "c"} ->
-- {a = 1, b = 2, c = 3}. Duplicates are not supported (result values refer to
-- the index of the last duplicate) and NaN values are ignored.
------------------------------------------------------------------------------------
function p.invert(arr)
	checkType("invert", 1, arr, "table")
	local isNan = p.isNan
	local map = {}
	for i, v in ipairs(arr) do
		if not isNan(v) then
			map[v] = i
		end
	end

	return map
end

------------------------------------------------------------------------------------
-- listToSet
--
-- Creates a set from the array part of the table. Indexing the set by any of the
-- values of the array returns true. For example, {"a", "b", "c"} ->
-- {a = true, b = true, c = true}. NaN values are ignored as Lua considers them
-- never equal to any value (including other NaNs or even themselves).
------------------------------------------------------------------------------------
function p.listToSet(arr)
	checkType("listToSet", 1, arr, "table")
	local isNan = p.isNan
	local set = {}
	for _, v in ipairs(arr) do
		if not isNan(v) then
			set[v] = true
		end
	end

	return set
end

------------------------------------------------------------------------------------
-- deepCopy
--
-- 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

------------------------------------------------------------------------------------
-- sparseConcat
--
-- 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 arr = {}

	local arr_i = 0
	for _, v in p.sparseIpairs(t) do
		arr_i = arr_i + 1
		arr[arr_i] = v
	end

	return table.concat(arr, sep, i, j)
end

------------------------------------------------------------------------------------
-- length
--
-- Finds the length of an array, or of a quasi-array with keys such as "data1",
-- "data2", etc., using an exponential search algorithm. 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, prefix)
	-- requiring module inline so that [[Module:Exponential search]] which is
	-- only needed by this one function doesn't get millions of transclusions
	local expSearch = require("Module:Exponential search")
	checkType('length', 1, t, 'table')
	checkType('length', 2, prefix, 'string', true)
	return expSearch(function (i)
		local key
		if prefix then
			key = prefix .. tostring(i)
		else
			key = i
		end
		return t[key] ~= nil
	end) or 0
end

------------------------------------------------------------------------------------
-- inArray
--
-- Returns true if valueToFind is a member of the array, and false otherwise.
------------------------------------------------------------------------------------
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
耗儿鱼是什么鱼 月经不来什么原因 什么叫卒中 蚕长什么样 十字架代表什么意思
儿童掉头发什么原因 喝豆浆拉肚子什么原因 什么解酒快 睡眠不好用什么泡脚助于睡眠 tvoc是什么意思
小朋友坐飞机需要什么证件 a4腰什么意思 一个王一个月念什么 悬饮是什么意思 1938年属什么生肖
mlf操作是什么意思 口我是什么意思 梦到跟人吵架是什么意思 儿童支气管炎吃什么药 顺其自然是什么意思
开车穿什么鞋子hcv8jop4ns5r.cn 梦见吃油饼是什么意思hcv8jop0ns8r.cn 结核杆菌dna检测是检查什么hcv7jop9ns3r.cn 酥油茶是什么做的hcv8jop0ns7r.cn 脓包疮用什么药xinjiangjialails.com
女人小腹坠痛是什么原因hcv9jop5ns7r.cn 什么叫老人临终骨折hcv8jop2ns0r.cn 男人射的快是什么原因hcv9jop3ns4r.cn b超和彩超有什么区别hcv7jop6ns7r.cn 鼻窦炎吃什么抗生素hcv9jop1ns8r.cn
急性胃炎吃什么药hcv9jop2ns7r.cn 屁股上长痘是什么原因hcv9jop0ns2r.cn 强高是什么意思hcv8jop7ns4r.cn 中医科是看什么病的hcv8jop9ns1r.cn 三公是什么意思hcv8jop0ns9r.cn
pr是什么工作hcv8jop6ns5r.cn 割礼是什么意思hcv8jop0ns1r.cn 冲动是什么意思mmeoe.com 看头部挂什么科hcv8jop3ns0r.cn 两票制指的是什么hcv9jop6ns1r.cn
百度