总胆红素高是什么原因| cta是什么检查| 梦到伟人有什么兆头| 妈妈的姐姐的儿子叫什么| 什么笑组词| professional是什么意思| 女人吃什么补充胶原蛋白| 1962属什么| 手足口病用什么药最好| 白脸红脸代表什么| 五指毛桃什么人不能吃| 梦见自己流血是什么预兆| 女性体寒 吃什么好| t是什么意思| 砍单是什么意思| 那悲歌总会在梦中惊醒是什么歌| 宫腔分离是什么意思| 什么原因导致有幽门杆菌| 福尔马林是什么味道| 熬夜头疼是什么原因| 湿气重是什么引起的| 什么人容易得白血病| 一度是什么意思| 吃什么补维生素a| 蜈蚣为什么不能打死| 山豆念什么| 熟褐色是什么颜色| 拉肚子不能吃什么食物| 避孕套什么牌子的好| 号什么意思| 眉毛白了是什么原因引起的| 痔疮疼痛用什么药| 10月10日是什么星座| sd什么意思| 陈皮泡酒喝有什么功效和作用| 斑秃吃什么药| 生性是什么意思| 3D硬金是什么意思| 3月12日是什么星座| 什么人适合吃红参| 透析病人吃什么水果好| 放屁多吃什么药好| 吃小米粥有什么好处| 一个木一个号念什么| 小麦和大麦有什么区别| 焦虑症看什么科| 嗜睡是什么意思| 梦见种菜是什么意思| 舌头伸不出来是什么原因| 世界第一大运动是什么| 孕期便秘吃什么通便快| 红隼吃什么| 狮子座是什么象星座| 尿肌酐高是什么原因引起的| 梦见在天上飞是什么意思| 澳大利亚属于什么洲| 缺维生素b吃什么食物| 主胰管不扩张是什么意思| 乙肝表面抗原携带者什么意思| 昱五行属性是什么| 神经损伤吃什么药| 头出汗多至头发湿透是什么原因| 浙大校长什么级别| 电波系是什么意思| 电泳是什么意思| 里急后重吃什么药最好| 霉菌是什么| 白酒泡什么补肾壮阳最好| 为什么叫西瓜| 六安瓜片属于什么茶| 卡地亚蓝气球什么档次| 为什么来月经肚子疼| 什么样的肚子疼是癌| 七月生日是什么星座| 高血压头晕吃什么药| 润色是什么意思| 大腿粗是什么原因导致的| 非分之想什么意思| 指尖发麻是什么原因| 基弧是什么| 猿人头是什么牌子| 财神是什么生肖| 什么的松脂| 梦见买床是什么意思| 免疫组化是什么意思| 甲状腺低回声什么意思| 刘三姐是什么生肖| 正因数是什么| 脑肿瘤有什么症状| 寒湿体质吃什么中成药| noon什么意思| 脚底板疼是什么原因| 一个口四个又念什么| 白色裤子配什么上衣好看| 延长收货是什么意思| 母的第三笔是什么| 又什么又什么的花朵| 什么东西可以解酒| 镜花缘是什么意思| 天天喝豆浆有什么好处和坏处| 幼对什么| 棉花代表什么生肖| 拔牙后吃什么食物最好| 双子座女和什么座最配| u型压迹是什么意思| 葡萄胎是什么意思| 米是什么结构| 姐姐的婆婆叫什么| 肾亏吃什么好| 心火旺吃什么中药| 什么三什么四| 什么是附件炎| 什么狗不会咬人| 草字头一个见念什么| 什么茶减肥效果最好| 抑菌液有什么作用| 吃什么可以软化血管| 流年是什么意思| 疮疖是什么样子图片| 糜烂性胃炎可以吃什么蔬菜| 芙蓉什么意思| 玉帝和王母是什么关系| 肚子两侧疼是什么原因| 男性尿道疼痛小便刺痛吃什么药| 出栏是什么意思| 鹅吃什么食物| gccg是什么牌子| 变色龙指什么人| 什么肠什么肚| 1972年是什么命| snoopy是什么意思| 轻如鸿毛是什么意思| 肝囊肿是什么| 怀孕生化是什么意思| 猎德村为什么那么有钱| 护士证什么时候下来| 眼角发痒是什么原因| 吃葛根粉有什么好处| 女人出黄汗是什么原因| 早上起来嘴巴发苦是什么原因| 碳14和碳13有什么区别| 白带豆腐渣用什么药| 甲状腺五类是什么意思| 挖空细胞是什么意思啊| 蝴蝶花长什么样| 为什么脸一边大一边小| 排斥是什么意思| 当今社会什么行业前途比较好| 猫咖是什么| 黄钻有什么用| 苏打水是什么水| 胃反酸水是什么原因| 神经衰弱是什么| 孕早期不能吃什么食物| 手指关节疼是什么原因| 头顶一阵一阵疼是什么原因| 继发性高血压什么意思| 傻白甜的意思是什么| 头皮发热是什么原因| 荷叶和山楂一起泡水有什么功效| 泄露是什么意思| 喝酒后头晕是什么原因| 捞女是什么意思| 慌张的近义词是什么| 什么是医美| 日昳是什么意思| 糖尿病什么症状| 大头虾是什么意思| 血稠有什么症状| 喉咙痛吃什么药效果好| 百脚虫的出现意味什么| 天秤女喜欢什么样的男生| 79年属什么生肖| 蓝牙耳机什么样的好| 芬太尼是什么药| 眼睛双重影什么原因| 梦特娇属于什么档次| 电解质饮料有什么作用| 柠檬水有什么功效| 宫腔镜是检查什么的| 坐围是什么| 恢复是什么意思| 女人绝经是什么症状| 水母吃什么| 脸上为什么会长痣| 人参果长什么样| 胃溃疡能吃什么水果| 腹腔肠系膜淋巴结是什么病| 喝黑咖啡有什么好处| 泪沟是什么| 什么榴莲品种最好吃| 大眼角痒是什么原因| 达喜是什么药| 肺癌早期有什么症状| 什么水果糖分低| 狗咬了不能吃什么| 庚什么意思| 三昧什么意思| 哺乳期是什么意思| 什么叫等离子| 黑匣子是什么意思| 抛砖引玉是什么生肖| 出汗有盐霜是什么原因| 孩子专注力差去什么医院检查| 一个口一个巴念什么字| 白粥配什么菜好吃| 咸肉烧什么好吃| hg是什么意思| 芒果和什么榨汁好喝| 邓超属什么生肖| 三亚免税店什么最便宜| 腿脚肿是什么原因| 肾综合征是什么病严重吗| 肚子怕冷是什么原因该怎么办| 什么专业就业前景好| 提前吃什么喝酒不醉| 拜金是什么意思| 六一送女孩子什么礼物| 过敏性鼻炎用什么药效果最好| 舌头中间裂纹是什么病| 什么是开放性伤口| 吃什么补钙最快| 眼圈发黑什么原因| 失语是什么意思| 什么中药可以减肥| 蜂蜜不能和什么食物一起吃| 小孩咳嗽吃什么药效果最好| 白带发黄有异味用什么药| 生黄瓜吃了有什么好处| 指尖发麻是什么原因| 海凉粉是什么做的| 头皮癣用什么药膏最好| 老鼠为什么怕猫| 黑色的蛇是什么蛇| 超声波检查是什么检查| 木星是什么颜色| 血糖高的人早餐吃什么好| 风雨雷电代表什么生肖| 炒菜勾芡用什么淀粉| 鼻血止不住是什么原因| 籼米是什么米| 抗药性是什么意思| 吃绿豆有什么好处| 减肥为什么让早上空腹喝咖啡| 草果在炖肉起什么作用| 女人矜持是什么意思| 铅超标吃什么排铅| 左氧氟沙星氯化钠注射作用是什么| 麦冬和什么相克| 石榴石一般什么价位| 嫂嫂是什么意思| 槟榔是什么味道| 合胞病毒吃什么药| 后脑勺疼吃什么药| 流产了有什么症状| 卒中什么意思| 韭菜有什么功效| 耳鸣吃什么药最有效| 八字中的印是什么意思| 爱戴是什么意思| 黑白双煞是什么意思| 强身之道的强是什么意思| 神经紊乱会出现什么症状| 表里不一是什么意思| 百度Jump to content

上半年工业各领域数据公布 主要行业承压增大

Permanently protected module
Frae Wikipedia, the free beuk o knawledge
百度 (《党史文苑》授权中国共产党新闻网独家发布,请勿转载)毛泽东、朱德、刘少奇、周恩来等老一辈无产阶级革命家,不仅在工作中以身作则、一心为公、勤恳敬业、全心全意为人民服务,而且在家庭生活中也时时处处严以律己、不搞特殊,艰苦奋斗、勤俭持家。
--[[
------------------------------------------------------------------------------------
--                               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 tostring(v) == '-nan'
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.
		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, 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

--[[
-- 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
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
318是什么日子 紫烟是什么意思 90年属什么 喝酒后手麻是什么原因 不硬的原因是什么
恋爱是什么 4.21什么星座 卧轨什么意思 舌苔发白是什么原因 小说be是什么意思
肝瘘是什么 coolmax是什么面料 哼唧是什么意思 什么是刷酸 左侧后背疼是什么原因男性
香蕉吃多了有什么坏处 妇科炎症用什么药好 拍证件照穿什么衣服 44岁月经量少是什么原因 溏是什么意思
情景剧是什么意思hcv9jop5ns4r.cn 8.3是什么星座hcv7jop9ns1r.cn 去势是什么意思hcv8jop3ns6r.cn 睡醒口干舌燥是什么原因hcv7jop6ns2r.cn 六月初三是什么日子hcv9jop4ns9r.cn
胆汁反流吃什么药最好gysmod.com 大暑是什么时间sanhestory.com 不加大念什么hcv8jop3ns5r.cn 谢娜人气为什么那么高hcv7jop6ns0r.cn 总胆汁酸是什么意思wuhaiwuya.com
老戏骨是什么意思hcv7jop6ns9r.cn 经常肚子痛什么原因hcv8jop6ns0r.cn 今天什么节日hcv9jop5ns0r.cn 多发性脂肪瘤是什么原因造成的hcv9jop0ns8r.cn 维多利亚是什么意思hcv8jop0ns5r.cn
沙龙会是什么意思hcv8jop7ns0r.cn 大名鼎鼎的鼎是什么意思xinjiangjialails.com 学业是什么意思hcv8jop8ns4r.cn 细菌性肺炎吃什么药hcv8jop5ns7r.cn 唐僧是什么菩萨hcv8jop5ns3r.cn
百度