眼睛干涩用什么眼药水好| 鸟飞到头上什么预兆| 压力过大会有什么症状| 低钙血症是什么意思| 北五行属什么| 冠状沟有白色分泌物是什么原因| 鸡蛋不能和什么一起吃| 阴道菌群失调用什么药| 左手臂发麻是什么原因| 血沉低是什么意思| 左眼皮一直跳是什么意思| 总头晕是什么原因| 7月14号是什么节日| 智齿吃什么消炎药| 乳铁蛋白是什么| 加拿大签证需要什么材料| 甲亢可以吃什么水果| 男人梦到掉牙什么预兆| 七字五行属什么| ck什么意思| 一国两制是什么时候提出的| 拉屎肛门疼是什么原因| 眼白发红是什么原因| 智五行属性是什么| 传媒公司是做什么的| 车前草治什么病最好| 下眼睑红肿是什么原因| 吃什么长指甲最快| 赤子之心什么意思| 乳头为什么是黑的| 猫贫血吃什么补血最快| 小孩尿不出来尿是什么原因| 胆囊切除后对身体有什么影响| 虹膜是什么| 地道战在河北什么地方| 溶菌酶是什么| 王八是什么字| mac代表什么| 睡觉为什么会打呼噜| 平均血小板体积偏高是什么意思| 什么人不能喝丹参| 例假量少是什么原因| 九月15是什么星座| 郭敬明为什么叫小四| 心梗吃什么药| 文雅什么意思| 手指长水泡很痒是什么原因| 跳脱是什么意思| 当今社会什么行业前途比较好| 常吃南瓜有什么好处和坏处| 相什么无什么| 三凹征是什么| 拉姆是什么意思| 底妆是什么意思| 贫血吃什么补血效果最好| 拉拉裤后面的胶片是做什么用的| 车前草长什么样子| 4月17是什么星座| 司空见惯是什么意思| 贡菜是什么| 哪吒代表什么生肖| 汝窑开片是什么意思| 米醋是什么| 婆婆妈妈什么意思| 长期便秘吃什么药效果最好| 晨起口干口苦是什么原因| 盐酸氯米帕明片有什么作用| 5月份是什么星座| 急性咽喉炎吃什么药好得快| 男士带什么手串好| 属马是什么星座| qaq什么意思| 金的部首是什么| 婴儿为什么老吐奶| 吊人什么意思| 中央组织部部长什么级别| 小腹痛什么原因| smile是什么牌子| rapper什么意思| 五谷丰登是什么生肖| 肛裂是什么原因引起的| 小肺大泡是什么意思| 声音沙哑是什么原因| 胆结石不能吃什么| bg是什么| 尿蛋白高有什么危害| 什么是疤痕增生| 浅表性胃炎吃什么药| 手指头抽筋是什么原因| 信佛有什么好处| 米黄是什么颜色| 头疼吃什么药| 一晚上尿五六次是什么原因| 甘油是什么东西| 值是什么意思| 小白兔是什么意思| 女人吃什么提高性激素| 女人生气容易得什么病| 氯雷他定不能和什么药一起吃| 黄喉是什么东西| 御守是什么意思| 今年43岁属什么生肖| 左金丸治什么病最好| 什么的小狗| 啃手指甲是什么毛病| 95年是什么年| 心脏有问题挂什么科| 菜粥里面放什么菜最好| 喝红茶有什么好处和坏处| 股票的量比是什么意思| 涉黑是什么意思| 中国人在印度属于什么种姓| 胰岛素是什么器官分泌的| 农村一般喂金毛吃什么| 粘土是什么土| 肚子咕咕叫放屁多是什么原因| 头顶疼是什么原因引起的| 直肠息肉有什么症状| 鸡珍是什么| 桑蚕丝用什么洗最好| 布洛芬吃多了有什么副作用| 甲子日是什么意思| 滑膜炎是什么症状| 手心为什么老出汗| 两个土念什么字| 梦见苍蝇很多是什么意思| exm是什么意思| mri什么意思| 下腹痛挂什么科| 四大神兽是什么动物| 掉眉毛是什么原因| 鲁字五行属什么| 流产吃什么药| o型血的父母是什么血型| mrsa医学上是什么意思| 体位是什么意思| 妇科支原体感染吃什么药| 牛奶什么时候喝| 1月24日是什么星座| 吃什么才能提高免疫力| a型熊猫血是什么血型| 口臭是什么原因造成的| 什么人不能喝丹参| 花椒桂圆艾绒敷肚脐有什么作用| 党参长什么样子| 十面埋伏是什么生肖| 小孩抽多动症吃什么药最好| 黑户是什么| 常吃南瓜有什么好处和坏处| 墨龟为什么只能养一只| 发烧拉肚子是什么原因| 茯苓长什么样子图片| 鱼蛋是什么| 宵字五行属什么| 肠梗阻有什么症状| 八八年属什么| 肤如凝脂是什么意思| 大腿疼是什么原因| 方便是什么意思| 舌尖起泡是什么原因| 阳虚有什么症状和表现| 啤酒兑什么饮料好喝| 什么叫埋下伏笔| 什么食物降火| 处女男喜欢什么样的女生| 肝叶钙化灶是什么意思| 锁骨是什么骨| 束缚是什么意思| 鸡精吃多了有什么危害| 血压高是什么引起的| 驻外大使是什么级别| 三十而立四十不惑什么意思| 菩提根是什么材质| 口水多是什么原因引起的| 背后长痘痘什么原因| 无下限是什么意思| 3月27日是什么星座| arr是什么意思| RH什么意思| 财迷是什么意思| 人工流产后可以吃什么| 梦见结婚是什么意思| Op是什么| 子宫饱满是什么意思| 心电监护pr是什么意思| 什么高什么下| 胆汁淤积症有什么症状| 蘑菇不能和什么一起吃| 为什么手脚冰凉还出汗| 大林木是什么生肖| 卡其色是什么颜色| 世界上最难写的字是什么| 小孩子肚子疼吃什么药| 肝多发囊肿是什么意思| 怀孕前三个月应该注意什么| 尿白细胞3十什么意思| 一直打嗝是什么原因引起的| 亦的意思是什么| 什么是肾癌| 痰湿吃什么食物| 夜间睡觉流口水是什么原因| 白帆是什么| trab是甲状腺什么指标| 老年人头晕是什么原因| 抖s是什么意思| 1月10号是什么星座| 麻醉科属于什么科室| 大公无私是什么意思| 女人吃鹿鞭有什么好处| 碘化银什么颜色| 宀与什么有关| loaf是什么意思| 吃了安宫牛黄丸要禁忌什么不能吃| 低烧吃什么| 射频消融是什么手术| 6月6日是什么节| 什么是尿酸| 低血压什么症状| 有什么赚钱的软件| 胆固醇是什么东西| 孕妇吃西红柿对胎儿有什么好处| 晚八点是什么时辰| 吃什么去湿气最快| boss是什么意思| 血尿是什么原因引起的男性| 次方是什么意思| 人为什么有五根手指| 预防肺结核吃什么药| 白蛋白偏高是什么原因| 营养不良会导致身体出现什么症状| 驻京办是干什么的| 下连是什么意思| 面红耳赤是什么生肖| 丰都为什么叫鬼城| 喝什么能解酒| 又字五行属什么| sma是什么病| 卡介苗预防什么疾病| 海兔是什么| 淋巴细胞数偏高是什么意思| 二聚体测定是什么| 左后背疼是什么原因| 属猪的幸运颜色是什么| 益母草什么时候喝最好| 梦见玻璃碎了什么意思| 本科属于什么学位| 阿拉蕾什么意思| 十月一是什么星座| 12月13日是什么日子| 什么是直男| 回盲部憩室是什么意思| 什么十分什么| 风疹病毒是什么病| afp是什么意思| 氨纶丝是什么面料| 孕妇前三个月吃什么对胎儿好| 后脑勺疼痛什么原因引起的| 甲沟炎是什么引起的| 血糖高吃什么| va是什么车牌| 呦呦鹿鸣什么意思| 万事达卡是什么卡| 什么药补血最快| 寄什么快递最便宜| 百度B??c t?i n?i dung

55家房企八成前三季盈利 楼市成交步入调整期

B? s?u t?p danh ng?n m? Wikiquote
百度 会议议程1.审议种子法修订草案;2.审议全国人大内务司法委员会关于提请审议慈善法草案的议案;3.审议全国人大环境与资源保护委员会关于提请审议深海海底区域资源勘探开发法草案的议案;4.审议国务院关于提请审议电影产业促进法草案的议案;5.审议国务院关于提请审议关于授权国务院开展药品上市许可持有人制度试点和药品注册分类改革试点工作决定草案的议案;6.审议国务院关于提请审议批准亚洲基础设施投资银行协定的议案;7.审议最高人民法院关于行政审批工作情况的报告;8.审议最高人民检察院关于刑罚执行监督工作情况的报告;9.审议最高法、最高检关于刑事案件速裁程序试点情况的中期报告;10.审议全国人大常委会执法检查组关于检查消费者权益保护法实施情况的报告;11.审议全国人大常委会执法检查组关于检查农业法实施情况的报告;12.审议全国人大内务司法委员会关于第十二届全国人大第三次会议主席团交付审议的代表提出的议案审议结果的报告;13.审议全国人大财政经济委员会关于第十二届全国人大第三次会议主席团交付审议的代表提出的议案审议结果的报告;

Xem c: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)
	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
宫颈病变是什么意思 微喇裤配什么鞋子好看 别开生面是什么意思 为什么会遗精 敏感肌是什么意思
为什么不能下午看病人 为什么会有蚊子 心寒是什么意思 右脸麻木是什么原因 高氨血症是什么病
尿等待是什么症状 7月1号是什么节日 养肝护肝吃什么食物好 新疆是什么地貌 甲胎蛋白是什么指标
五常指的是什么 红米是什么米 幽门螺杆菌感染有什么症状 半夏反什么药 吃什么降羊水最快
什么口罩hcv8jop1ns4r.cn 软肋骨炎吃什么药对症zsyouku.com 史迪奇是什么动物hcv8jop0ns2r.cn 诸行无常是什么意思hcv9jop0ns8r.cn 青少年长白头发是什么原因wuhaiwuya.com
心胆气虚吃什么中成药hcv8jop8ns8r.cn 黑色阔腿裤搭配什么上衣好看hcv8jop7ns1r.cn 偏头痛吃什么药效果好hcv8jop8ns9r.cn 欲盖弥彰什么意思hcv8jop2ns3r.cn 来姨妈吃什么好hcv7jop5ns2r.cn
老鹰的绝症是什么hcv9jop4ns7r.cn 人性是什么意思xinjiangjialails.com 空调自动关机是什么原因hcv8jop8ns8r.cn 米糠是什么东西hcv8jop5ns7r.cn 2005年什么年bjhyzcsm.com
梅花表属于什么档次hcv8jop1ns9r.cn 藏红花有什么作用和功效hcv8jop2ns1r.cn 白色裤子配什么上衣好看hcv9jop3ns5r.cn 脚后跟痛什么原因hcv8jop2ns1r.cn 边缘是什么意思hcv7jop5ns4r.cn
百度