肺部真菌感染吃什么药| 哥哥的孩子叫什么| 谷丙转氨酶什么意思| 孕妇什么时候开始补钙| 累得什么| 把妹什么意思| 桥本氏甲状腺炎是什么意思| 丝瓜只开花不结果是什么原因| 胎儿脉络丛囊肿是什么原因引起的| 拘留所和看守所有什么区别| 血清高是什么原因| 最坚固的锁怕什么| 什么是偏财| 为什么总是长口腔溃疡| 长此以往什么意思| 双肺纹理增多增粗是什么病| 庄周梦蝶是什么意思| 梦见煤气罐爆炸是什么意思| 全身无力吃什么药| 墓志铭是什么意思| 舌头起泡吃什么药好| 风热感冒吃什么消炎药| 什么东西越洗越脏脑筋急转弯| 八月是什么月| sc是什么意思| 淋巴细胞偏低是什么原因| 眼睛为什么会痛| 一个至一个秦是什么字| 梦见把狗打死了是什么意思| 子宫内膜ca是什么意思| 海清是什么意思| 诸葛亮是什么生肖| 脂溢性脱发是什么原因引起的| 黑今读什么| 无名指是什么经络| 子宫内膜厚是什么原因引起的| 勺是什么意思| 敏感肌是什么| 空气刘海适合什么脸型| 逆转是什么意思| 胆结石是什么原因造成的| 吃什么食物能补钾| 身体出汗多是什么原因| 不出汗是什么原因| 防晒衣什么面料好| 什么药可以溶解血栓| 蓝颜是什么意思| 邓紫棋为什么叫gem| 山药吃了有什么好处| 阿莫西林和头孢有什么区别| 左手大拇指抖动是什么原因| 牙疼吃什么止疼药见效快| 鹿茸泡酒有什么功效| 什么是清关| boss是什么意思| 为什么鸡蛋不能和牛奶一起吃| 拉肚子引起的发烧吃什么药| 吃什么提高记忆力| 上面一个日下面一个立是什么字| 今年50岁属什么| 壑是什么意思| 什么样的乌云| 什么叫钙化了| 舌尖起泡是什么原因| 恩施有什么好玩的| 五阴是什么| 球虫病有什么症状| 腹腔气体多是什么原因| 有毒是什么意思| q12h医学上是什么意思| 什么是比热容| 七月是什么星座| 生殖器疱疹用什么药最好| 半夏反什么药| 气滞血瘀吃什么中成药| 寻麻疹看什么科| 月经不调去医院要做什么检查| 什么是闰月| 病理切片是什么意思| 做面条用什么面粉| 壁虎的尾巴有什么作用| 飞是什么结构| 为什么肚子老是胀气| 威士忌属于什么酒| 中国劲酒有什么功效| 萨洛蒙什么档次| 置之死地而后生是什么意思| 榴莲有什么好处| 4.8什么星座| 梦见和老公吵架是什么意思| 敏感肌是什么意思| 生理年龄是什么意思| 优越感是什么意思| sapphire手表什么牌子| 尿酸高饮食要注意什么| 松鼠是什么生肖| 眼睛老是流眼泪是什么原因| 狗狗咳嗽吃什么药好得快| 血小板压积偏低是什么原因| 肌无力挂什么科| 扁桃和芒果有什么区别| ups是什么快递公司| 胆囊炎能吃什么水果| 地龙是什么生肖| 95511是什么号码| 尿囊素是什么| 胸口容易出汗是什么原因| 柳枝什么的什么的| 黑色屎是什么原因| 防风通圣颗粒治什么病| 博士生导师是什么级别| 词牌名什么意思| 什么是公元前和公元后| 腰椎间盘突出挂什么科| 纤维灶是什么意思| 知世故而不世故是什么意思| 本子是什么意思| 印比是什么意思| 嘴唇神经跳动是什么原因| 前列腺回声欠均匀什么意思| 气色是什么意思| 低压108有什么危险| 法西斯是什么意思啊| 月经前腰疼的厉害是什么原因| 享受低保需要什么条件| 空挡是什么意思| 脖子上长个包挂什么科| 气胸叩诊呈什么音| 颈部淋巴结肿大是什么原因| 什么人不能吃茄子| 补血吃什么药最快最好| 低钾是什么原因造成的| 急性呼吸道感染是什么引起的| 二郎神是什么动物| 冷冻和冷藏有什么区别| 盛世的意思是什么| 治便秘什么药最好| 血脂高吃什么药最好| 感想是什么意思| 冥王星是什么星| c1e驾照能开什么车| 补气血吃什么食物最好| 刚怀孕要吃些什么好| tt什么意思| 肝不好的人有什么症状| 塘角鱼吃什么食物| 血脂高是什么意思| IB是什么| 凤仙花长什么样| 学海无涯苦作舟的上一句是什么| 次第花开是什么意思| 宜宾燃面为什么叫燃面| 喉炎吃什么药| 绝情是什么意思| 刻章需要什么材料| 黄牌是什么意思| 什么什么如生| 月经前腰疼的厉害是什么原因| 孩子经常流鼻血是什么原因| 妈妈的爷爷叫什么| 总蛋白偏低是什么原因| 有时头晕是什么原因| 苯丙酮尿症是什么| 上火牙疼吃什么药| 去年的树告诉我们什么| 宠幸是什么意思| 喜气洋洋是什么意思| cybex是什么牌子| 防血栓是什么意思| 尿出血是什么原因| 三轮体空是什么意思| 慕名而来是什么意思| 粘纤是什么面料| 孩子生化了是什么意思| 夏天是什么| 哈尼是什么意思| 什么是性瘾症| 身上长很多痣是什么原因| 女人银屑病一般都长什么地方| 7年之痒是什么意思| 口加一笔变成什么字| 烦闷是什么意思| 上火吃什么好| 牡丹花什么季节开| 式可以加什么偏旁| 床品是什么意思| 品相是什么意思| 长白头发了吃什么才能把头发变黑| 去医院看嘴唇挂什么科| 尿潜血弱阳性是什么意思| 走青是什么意思| 为什么长白头发| 头疼去医院挂什么科| 什么东西天气越热它爬得越高| 拔罐拔出水是什么原因| 砭石是什么东西| 吃什么会变白| 公众号是什么意思| 泓五行属什么| 2月18日是什么星座| 胃气上逆是什么原因造成的| 高考用什么笔| 睾丸扭转是什么意思| 吃李子有什么好处| 什么是动脉硬化| 头疼恶心想吐吃什么药| 高血糖吃什么食物好| 梦见摘枣是什么意思| 营销号是什么意思| 头疼可以吃什么药| 微信什么时候开始的| 黄褐斑是什么样的图片| 尿常规能查出什么| mechrevo是什么牌子的电脑| 去皱纹用什么方法最好和最快| 这个是什么表情| 草字头下面一个高字读什么| dr是什么| 尿道炎用什么药| 什么是一体机| 奇货可居是什么意思| 巴利属于什么档次的| 低钠盐是什么意思| 造纸术什么时候发明的| 什么的假山| 三叉神经痛挂什么科就诊| 什么叫做红颜知己| 艾灸是什么意思| 优衣库属于什么档次| 脸上痣多是什么原因| 水星是什么颜色的| 肚子痛是什么原因| 上海曙光医院擅长什么| 吃榴莲对妇科病有什么好处| 血常规用什么颜色的试管| 此言差矣是什么意思| 拉肚子吃什么抗生素| 睾头囊肿是什么意思| 月经量少是什么原因| 肝斑一般在脸上的什么地方| 嘴巴苦吃什么药| 为什么会莫名其妙的哭| 住院需要带什么东西| 纯字五行属什么| 乙肝五项25阳性是什么意思| 尿频尿急吃什么药比较好| 二脚趾比大脚趾长代表什么| stories是什么意思| 宝宝肤专家软膏主要治什么| 力挽狂澜什么意思| 司令是什么军衔| 感冒为什么不能吃鸡蛋| 高汤是什么意思| 属龙的和什么属相最配| 导火索是什么意思| 什么叫二氧化碳| 萎缩性鼻炎用什么药| 梦见鬼是什么意思| 球菌阳性是什么意思| 宝宝吃益生菌有什么好处和坏处| 好强的女人是什么性格| 梦见对象出轨什么征兆| 舌苔发白是什么病的前兆| 梅尼埃综合症是什么病| 百度Jump to content

我区扎实推进严格执法规范市场秩序专项整治行动

.i la'o zoi. Wikipedia .zoi krasi
百度   在浙江省获得《外国高端人才确认函》的外国人才中,有来自白俄罗斯、加拿大的院士,有英国诺丁汉大学校长,有德国吕贝克应用科技大学、英国剑桥大学教授,也有入选国家和浙江省千人计划、杭州521计划等引才引智项目外国高端人才。

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
10.30什么星座 左手食指有痣代表什么 静脉曲张吃什么食物 mc什么意思 雌激素过高是什么原因造成的
11是什么生肖 经略相公是什么官 疱疹性咽峡炎吃什么食物 肾结石不能吃什么东西 排卵的时候有什么症状
六月十一是什么星座 腰酸背痛挂什么科 泥鳅吃什么 男同叫什么 脸皮最厚是什么生肖
黑曜石是什么 石榴花什么时候开花 天经地义是什么意思 拙作是什么意思 呼呼是什么意思
鲭鱼是什么鱼hcv8jop4ns5r.cn 什么人不适合喝咖啡jingluanji.com 7月10号是什么星座hcv8jop9ns0r.cn 这是什么鱼hcv9jop8ns2r.cn pr医学上是什么意思hcv8jop2ns8r.cn
怀孕两个月出血是什么原因hcv7jop5ns0r.cn 为什么身上会起小红点hcv8jop2ns1r.cn 丙烯颜料用什么洗掉hcv8jop9ns2r.cn 耳鸣需要做什么检查hcv9jop5ns4r.cn 怀孕脉象是什么样子hcv8jop0ns5r.cn
用苦良心是什么意思sscsqa.com 扎巴依是什么意思hcv7jop6ns9r.cn 麻婆豆腐是什么菜系hcv9jop1ns4r.cn 毕业送老师什么礼物好hcv7jop9ns1r.cn 喉咙有痰挂什么科hcv8jop9ns2r.cn
甲状腺功能亢进吃什么药hcv8jop2ns1r.cn 脚冰凉吃什么药hcv8jop8ns7r.cn 老人生日送什么礼物好hcv9jop3ns1r.cn 汉朝后面是什么朝代hcv8jop3ns3r.cn 化疗后吃什么增加白细胞yanzhenzixun.com
百度