骟是什么意思| 什么东西天气越热它爬得越高| 三严三实是什么| 二甲苯是什么东西| 三个羊是什么字| 胃发热是什么原因| 子宫内膜息肉样增生是什么意思| 肾结石用什么药最好| 黄鼻涕是什么类型的感冒| 软饮是什么意思| 乳腺点状强回声是什么意思| 什么是海市蜃楼| 木薯是什么| 冒泡是什么意思| 什么是醪糟| 9.7号是什么星座| 一什么月牙| 理工男是什么意思啊| 低盐饮食有利于预防什么| 层出不穷是什么意思| 妇科千金片和三金片有什么区别| biemlfdlkk是什么牌子| 双肺散在纤维灶是什么意思| 胸长什么样| 固精缩尿是什么意思| 先兆性流产是什么症状| 滥竽充数的滥是什么意思| 卢字五行属什么| 氯雷他定什么时候吃| 结婚送什么| 什么是地中海贫血| 排尿困难吃什么药好| 挂号是什么意思| 编程是干什么的| 禾末念什么| 白化病是什么病| 棉毛布是什么面料| 羊后马前对是什么生肖| 四个一是什么| 喝什么茶对睡眠有帮助| 为什么香蕉不能放冰箱| 左室高电压什么意思| 鲜为人知是什么意思| 疣体是什么| 皮下脂肪瘤挂什么科| 咽喉疼吃什么药| 口腔痛什么原因| 食管反流用什么药| 山东立冬吃什么| 388是什么意思| 什么颜色的猫最旺财| 胃病吃什么好| 榨菜的原料菜叫什么| 窦性心律不齐是什么原因引起的| 膑是什么意思| gxg是什么牌子| 什么的云彩| 嗓子哑了是什么原因| 鼻子歪了是什么原因| 游离三碘甲状腺原氨酸是什么意思| 割韭菜什么意思| 南海龙王叫什么| 6月份是什么季节| 食指发麻是什么原因| 睾丸是什么| 女人吃猪肝有什么好处| 碗打碎了预示着什么| 喝中药为什么会拉肚子| 为什么积食发烧很难退| 腱鞘炎吃什么药好使| 儒字五行属什么| 吃了什么药不能喝酒| 2012年是什么命| 十面埋伏是什么生肖| 两岁宝宝不会说话但什么都知道| 老人不睡觉是什么预兆| 植村秀属于什么档次| 小龙虾什么季节| 有什么症状是肯定没怀孕| 查血铅挂什么科| 胸痒痒是什么原因| 梦游为什么不能叫醒| 反流性食管炎吃什么药最有效| 吃完就拉是什么原因| 净化心灵是什么意思| 双子座是什么星象| 大败毒胶囊主治什么病| 探病送什么花| 关联词是什么意思| 肚脐眼连接体内的什么器官| 乌鸦长什么样| vcr什么意思| 宅心仁厚是什么意思| 光圈是什么| 宝宝拉肚子吃什么药好得快| 头顶冒汗是什么原因| 枸杞子和什么泡水喝补肾壮阳| 来大姨妈不能吃什么水果| 想念是什么意思| 海苔吃多了有什么坏处| 电测听是什么| 被蜱虫咬了有什么症状| 泡打粉可以用什么代替| 今天出生的男宝宝取什么名字好| 打完疫苗不能吃什么| 湿气重吃什么药最有效| 幽门螺杆菌是什么意思| 脸上起疙瘩是什么原因| 感谢是什么意思| hp是什么牌子的电脑| igm阳性是什么意思| 灵芝煮水喝有什么功效| 梦见把狗打死了是什么意思| 羽字五行属什么的| 哥文花园女装什么档次| 控是什么意思| 毛骨悚然是什么意思| 依云矿泉水为什么贵| 什么样的葡萄| 什么是类风湿性关节炎| 临终关怀的目的是什么| 口唇发绀是什么意思| 命脉是什么意思| 绿巨人是什么意思| 吃什么药提高免疫力| 愚昧是什么意思| 吃什么东西对心脏好| 心肾不交有什么症状| 什么的眉头| 黄体是什么| 5月3号是什么星座| 吃什么对牙齿好| 女的肾虚是什么原因引起的| 龛影是什么意思| 大智若愚什么意思| 头发为什么会掉| 抗甲状腺球蛋白抗体高是什么原因| 腻害什么意思| 大拇指发抖是什么原因| 女人什么时候最容易怀孕| 5.25是什么星座| 拍身份证照片穿什么衣服| 多五行属性是什么| 老是低血糖是什么原因| 湿疹吃什么| 耽美剧是什么意思| 乙肝第二针最晚什么时候打| 心脏肥大吃什么药好| 为什么空腹喝牛奶会拉肚子| 7月27日什么星座| 柚子是什么季节的水果| 为什么会有口腔溃疡| 自限性疾病是什么意思| 男人右眉毛里有痣代表什么| 什么是口爆| 日抛是什么意思| 虾仁炒什么| 嗯哼的爸爸叫什么| 指甲是白色的是什么原因| 胎儿什么时候入盆| 星期狗什么意思| 四季春茶是什么茶| 拉肚子应该吃什么药| 沙拉酱可以做什么美食| 下水道井盖为什么是圆的| 肾造瘘是什么意思| b像什么| 阴虚是什么| 鼻尖长痘是什么原因| 曲水流觞是什么意思| 七夕送什么| 京东什么时候优惠最大| 为什么精子是黄色的| 40年属什么| 丝瓜有什么好处| 活化部分凝血活酶时间偏高是什么意思| 经常梦遗是什么原因| 毛宁和毛阿敏是什么关系| 不以为然的意思是什么| 树欲静而风不止什么意思| 人为什么会近视| 尿蛋白三个加号吃什么药| 壮字五行属什么| 好事多磨什么意思| 钢铁侠叫什么名字| 10月26日什么星座| 激素六项什么时间查最好| 男人蛋蛋疼是什么原因| 去阴虱用什么药最好| 什么是裸分| 四面楚歌什么意思| 中国什么武器世界第一| 胃造影和胃镜有什么区别| 不作为什么意思| 长得标致是什么意思| 梦见掉牙齿是什么意思| 湿疹是因为什么原因引起的| 青霉素过敏吃什么消炎药| 老人吃什么钙片补钙效果最好| 鱿鱼属于什么类| 街道办事处属于什么单位| amor是什么意思| 瘆人是什么意思| 神经性皮炎用什么药好| 洛神花有什么功效| 火旺是什么意思| 1218是什么星座| 什么是再生纤维素纤维| 4.29是什么星座| 生物学父亲是什么意思| 为什么晚上血压比白天高| 疱疹性咽峡炎用什么药| 茶叶里面含有什么成分| 宝宝吃益生菌有什么好处和坏处| 海王星是什么颜色| lp是什么意思| 贫血挂什么科| 人彘为什么还能活着| 小肚子突出是什么原因| 七月二十号是什么星座| 支付宝余额和余额宝有什么区别| 春风得意是什么生肖| 109是什么意思| 吃了避孕药有什么副作用| 噤若寒蝉是什么生肖| 喉咙吞口水痛吃什么药| 吃什么降低尿酸| 病理是什么意思| 李商隐被称为什么| 辅食是什么意思| 心理学属于什么学科| 什么叫上门女婿| 中国梦是什么| 牙周炎吃什么药好| 身心健康是什么意思| 右眼皮上长痣代表什么| 浪荡闲游是什么生肖| 鲁肃是一个什么样的人| 什么茶养胃| 国药准字是什么意思| alexanderwang是什么牌子| 屈原是什么诗人| 吃什么补硒| 但闻人语响的但是什么意思| 老年人吃什么钙片好| 曙光是什么意思| 男人遗精是什么原因造成的| 牙龈爱出血是什么原因| 哈尔滨有什么好吃的| 分期是什么意思| 常山现在叫什么| 沧州有什么好玩的地方| 梅花鹿吃什么食物| 女人梦见鞋子什么预兆| 乙肝核心抗体是什么意思| 胯疼是什么原因| 痛风不能吃什么东西| hpv12种高危型阳性是什么意思| 头痒用什么洗头可以止痒| 蝉联什么意思| 抑郁症吃什么食物好| 短裙配什么鞋子好看| 152是什么意思| 单核细胞计数偏高是什么意思| 百度Jump to content

月经量多是什么原因

Kusuka e Wikipedia
百度 据悉,正在建设中的青藏高原原产地特色产业聚集园位于湟源县大华镇,项目将建设智能化标准厂房、高原农牧产品大宗交易中心、智能化冷链仓储物流基地、电子商务基地、创新创业基地、科研与综合服务大楼等,将聚集数百家农牧产业、贸易、流通企业,辐射带动省内近千家农牧业专业合作社、种养殖基地,带动周边农牧民劳动生产和增收致富。

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
原浆酒是什么意思 肝脏低密度灶是什么意思 什么的眉头 1942年属什么生肖 深千尺是什么意思
血清铁低是什么原因 舌战群儒是什么意思 散光有什么症状 大骨头炖什么好吃 出汗太多是什么原因
淋巴清扫是什么意思 属羊五行属什么 什么是冤亲债主 水泡型脚气用什么药 伶人是什么意思
颞下颌关节挂什么科 半夜饿了吃什么不长胖 布病是什么症状 手机流量是什么 resp是什么意思
香菜什么时候种植最好hcv9jop2ns2r.cn 阴虚吃什么食补最快bjcbxg.com 狐狸是什么科hcv9jop4ns0r.cn 阴历7月22什么日子xianpinbao.com 钧鉴是什么意思hcv8jop5ns1r.cn
喝咖啡不能吃什么食物qingzhougame.com 壁立千仞无欲则刚是什么意思jinxinzhichuang.com 孕妇查凝血是检查什么hcv7jop7ns4r.cn 骨加客念什么hcv9jop4ns0r.cn 隔离是什么意思hcv8jop1ns3r.cn
肆虐是什么意思hcv7jop6ns3r.cn 本命佛是什么意思hcv8jop5ns8r.cn 滂沱是什么意思tiangongnft.com 人是什么结构hcv9jop6ns0r.cn 梦见做鞋子是什么意思hcv9jop2ns7r.cn
纠察是什么意思gysmod.com 法令纹深是什么原因hcv8jop9ns3r.cn 掉发挂什么科hcv8jop5ns2r.cn 常打嗝是什么原因hcv9jop6ns1r.cn 看痣挂什么科hcv8jop2ns0r.cn
百度