牙齿酸是什么原因| 肺火吃什么药| 加菲猫是什么品种| 夜宵是什么意思| 妈妈弟弟的儿子叫什么| 口力念什么| 双子座女和什么星座最配| 17088a是什么尺码男装| 血小板分布宽度偏低是什么意思| 脂肪肝喝什么茶最好| 腮边长痘是什么原因| 什么情况下血压会升高| 何德何能是什么意思| 小孩满月送什么礼物好| 喝红糖水有什么好处和坏处| 小白加小白等于什么| 心里烦躁是什么原因| 水瓶男喜欢什么样的女生| 什么叫脑卒中| 无中生有是什么生肖| 违背是什么意思| 雪芽是什么茶| 为什么会有阴虱子| 梦见杀鸡是什么意思| 怀孕7天有什么症状| 发烧喝什么粥| 修女是什么意思| 低氧血症是什么意思| 人为什么会哭| 头皮问题挂什么科| 额头长痘是什么原因| 发烧想吐是什么原因| 拔智齿后吃什么恢复快| 脑疝是什么原因引起的| 腹股沟淋巴结肿大是什么原因| hairy什么意思| 看肝挂什么科| 梦见蛇是什么意思| 年少轻狂是什么意思| 最大的荔枝是什么品种| 眉梢有痣代表什么| 乳腺增生乳腺结节吃什么药| 电影监制是做什么的| 聋哑人为什么不会说话| 经血粉红色是什么原因| 骨膜炎是什么症状| 屁股疼挂什么科室| 0到3个月的婴儿惊吓吃什么药| 逆商是什么意思| 十加一笔是什么字| 盐酸二甲双胍缓释片什么时候吃| 世界大战是什么意思| 打坐有什么好处| 病毒性肠胃炎吃什么药| 威士忌是用什么酿造的| 巴基斯坦人说什么语言| 纯爱是什么意思| 额头长痘是因为什么| 什么是大麦| ct是什么| 品相是什么意思| 埃及法老是什么意思| 高铁动车有什么区别| 吃什么可以补血| dp是什么| 五个月的宝宝能吃什么辅食| 什么是三重一大事项| 低密度脂蛋白偏高是什么原因| 不拉屎是什么原因| 香港代表什么生肖| 症是什么意思| 搞破鞋什么意思| 汗疱疹吃什么药| 睛可以组什么词| 什么是肉刺图片大全| 丝苗米是什么米| 抑郁吃什么药可以缓解情绪| 玉佛寺求什么最灵验| 吃什么补铁快| 申时是什么时间| 人走茶凉下一句是什么| 头发热是什么原因| 压马路什么意思| 低密度脂蛋白偏高什么意思| 子宫腺肌症是什么| 取什么补什么| 年下是什么意思| 手掌痒是什么原因| 血色病是什么病| 三维是什么| 马口鱼是什么鱼| 北面属于什么档次| 灭蚂蚁什么药最有效| 刀子嘴豆腐心是什么意思| dvd是什么意思| 336是什么意思| 唵是什么意思| mico是什么意思| 乳头经常痒是什么原因| 海肠是什么| 酸中毒是什么意思| ph阳性是什么意思| 封豕长蛇是什么意思| 7月29日是什么星座| 什么食物含钙高| 早晨起床手麻是什么原因| 结婚前一天晚上的宴会叫什么| 被蚂蚁咬了怎么止痒消肿要擦什么药| 吃金蝉有什么好处| 血糖高喝酒有什么影响| 怀孕1个月有什么症状| 青蛙吃什么| 黄金为什么值钱| 乳腺一类是什么意思| 彰字五行属什么| hm什么牌子| 种牙和假牙有什么区别| 将军代表什么生肖| 预防水痘吃什么药| 危楼高百尺的危是什么意思| 鸡头米是什么东西| 烦躁不安的意思是什么| 忧虑是什么意思| 乖戾是什么意思| 贫血是什么原因导致的| 四眼狗有什么迷信说法| 人中附近长痘痘什么原因| 家族是什么意思| 香草是什么植物| visa卡是什么| 破月什么意思| 怀孕一个月会有什么反应| allin什么意思| 10.5号是什么星座| 什么叫消融手术| ppt是什么单位| 为什么一进去就想射| 杜甫世称什么| 睑缘炎用什么药| 花椒是什么| 睡觉为什么磨牙| 浜是什么意思| 花仙子是什么意思| 64属什么| 胆结石是什么原因造成的| hpv52高危阳性是什么意思| 净身出户需要什么条件| 六月初一什么日子| 为什么手脚老是出汗| 心脏在人体什么位置| 脑供血不足吃什么| 炎性改变是什么意思| 逆钟向转位什么意思| 晚上睡不着什么原因| 经期可以吃什么水果| 拉屎有泡沫是什么原因| 体检要带什么| 今日是什么生肖日| 什么减肥药好使| 景气是什么意思| 蔚字五行属什么| 什么如什么什么| 身份证有什么用| 今年40岁属什么生肖| 煮虾放什么调料| 中秋送什么| 痢疾吃什么药最有效| b超是查什么的| 梦见龙是什么预兆| 体寒的人吃什么食物好| 海豹是什么动物| 你想什么| 韩语思密达是什么意思| 火召是什么字| 学姐是什么意思| 暴发火眼吃什么药| 湿疹为什么一热就出来| 增强抵抗力吃什么| 三十六计最后一计是什么| 一例是什么意思| alpha什么意思| 感激不尽是什么意思| 冬菇有什么功效与作用| 不将就是什么意思| 六味地黄丸起什么作用| 蜂蜜有什么功效| 鼾症是什么病| 蛇鼠一窝什么意思| 灌肠为什么能通输卵管| 新生的什么| 嘱托是什么意思| 早搏吃什么药效果好| pn医学上是什么意思| 肋骨属于什么骨| 什么是单亲家庭| 富贵包是什么| 咳嗽肺疼是什么原因| 解尿支原体是什么| 开普拉多的都是什么人| 非典是什么| 一个草字头一个见念什么| 牙周炎用什么漱口水好| 锅烧是什么| 基因检测是什么| 开火车什么意思| 4b橡皮和2b橡皮有什么区别| 乳腺结节有什么症状| 渡船是什么意思| 尿常规能检查出什么| 梦见小婴儿是什么意思| 难道是什么意思| 昙花一现是什么生肖| 金庸原名叫什么| 四个火是什么字| 日加匀念什么| 息斯敏又叫什么药名| 拉稀屎是什么原因| 肾气亏虚吃什么中成药| 烧心吃什么药| 血淀粉酶是检查什么的| 不典型鳞状细胞是什么意思| 六月一日是什么星座| 卯宴席是什么意思| 10月20日什么星座| 211985是什么意思| 人流后吃什么药| 扇贝不能和什么一起吃| 五月十二号是什么日子| 唏嘘什么意思| 50年婚姻是什么婚| 女人腰酸背痛是什么病| 导管子是什么意思| 喝酒后胃不舒服吃什么药| 梦见小孩子是什么意思| 吃什么对痔疮好得快| 益生菌有什么作用| 七月出生的是什么星座| 手指头发麻是什么原因引起的| 吃杨梅有什么好处| 16年属什么| 狮子住在什么地方| 生活防水是什么意思| 晚上老咳嗽是什么原因| 五七是什么意思有什么讲究| 拍黄瓜是什么意思| 七月十一日是什么日子| 备孕要注意什么| 有什么鱼| saucony是什么牌子| 肾虚腰疼吃什么药最有效| 眼镜是什么时候发明的| 肺结节是什么引起的| 旗袍穿什么鞋子好看图| 头皮屑结块是什么原因| 乌鸦嘴是什么意思| mommy什么意思| 蛇蝎美人是什么意思| 紧急避孕药什么时候吃最好| 白带什么时候来| 念珠菌是什么病| 知柏地黄丸主治什么| 小县城适合做什么生意| penis什么意思| 鱼翅是什么| 百度Jump to content

重大疑难疾病中西医临床协作试点启动 涉及肝癌等疾病

Gikan sa Bikol Sentral na Wikipedia, an talingkas na ensiklopedya
百度 发病部位多在负重大、活动多、容易发生劳损的骨或关节。
--[[
------------------------------------------------------------------------------------
--                               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
治前列腺炎吃什么药效果最好 兔子五行属什么 黄酒是什么 风月是什么意思 棺材一般用什么木头
人为什么会便秘 et是什么 女命劫财代表什么 桑葚搭配什么泡水喝最好 惊雷是什么意思
甲肝是什么病 两个a型血的人生的孩子什么血型 老有眼屎是什么原因 1985年属什么 球虫病有什么症状
唇系带断了有什么影响 唐筛是检查什么的 肾功能不全是什么意思 汽车abs是什么意思 血脂稠吃什么食物好
什么情况下做试管婴儿hcv9jop4ns3r.cn 梦见芹菜是什么意思hcv8jop0ns2r.cn 人老是犯困想睡觉是什么原因hcv8jop0ns9r.cn 备皮什么意思hcv9jop0ns4r.cn 十二指肠炎吃什么药dajiketang.com
蒲公英和玫瑰花一起泡有什么功效hcv7jop4ns5r.cn 胃痛按什么部位可以缓解疼痛hcv9jop7ns2r.cn 十二月四号是什么星座hcv7jop9ns1r.cn 女人梦见棺材是什么征兆hcv8jop0ns2r.cn 查hcg挂什么科hcv9jop0ns5r.cn
经常感冒是什么原因hcv9jop5ns8r.cn 电梯房什么楼层最好hcv9jop1ns5r.cn 三叉神经痛有什么症状aiwuzhiyu.com 心病是什么病有哪些症状gysmod.com 核磁和ct有什么区别96micro.com
胎盘0级是什么意思啊bfb118.com 蜂蜜和柠檬一起喝有什么作用hcv8jop6ns6r.cn 解解乏是什么意思hcv9jop2ns2r.cn 什么是淀粉hcv9jop6ns9r.cn 睡觉盗汗是什么原因hcv7jop5ns1r.cn
百度