shit什么意思中文| 为什么要吃叶酸| 小便清长是什么意思| 土地出让是什么意思| 喉咙上火吃什么药| 六字真言是什么意思| 民营和私营有什么区别| 清朝前面是什么朝代| 门庭若什么| ct是什么| 有心无力是什么意思| 健康状况填什么| 夏天是什么| 什么什么害命| 鸡心为什么不建议吃| 丝状疣用什么药| 16岁是什么年华| 第二次世界大战是什么时候| 低级别上皮内瘤变是什么意思| 口腔溃疡缺乏什么维生素| 私募是做什么的| 朱代表什么生肖| 什么心什么心| 女生胸疼是什么原因| 晚上手脚发热是什么原因| 平安夜什么时候吃苹果| 晨勃消失是什么原因| 检查乳腺挂什么科| 流注是什么意思| 急性胰腺炎吃什么药| gf什么意思| 手红是什么原因| 河南属于什么气候| 偶尔胸闷是什么原因| 小蓝瓶是什么| 夜里2点到3点醒什么原因| 什么的面目| 接吻是什么感觉| 2段和3段奶粉有什么区别| 考研都考什么| 寄生树有什么功效作用| 眼镜pd是什么意思| 人类什么时候出现的| vol是什么意思| 一个日一个安念什么字| 骨质破坏是什么意思| 破壁机是干什么用的| aj是什么鞋子| 做梦梦到狗是什么征兆| 阴茎插入阴道什么感觉| 肾阴虚吃什么药最好| 促甲状腺激素偏高有什么症状| 巨蟹座是什么星象| 一个火一个宣念什么| 诸葛亮是什么星座| 养病是什么意思| 吃什么补维生素b12| 儿童手足口病吃什么药| 反应迟钝是什么原因造成的| 过敏性鼻炎喝什么茶好| 淡水鱼什么鱼最好吃| 山加乘念什么| 内务是什么意思| 皮肤感染吃什么消炎药| 警察代表什么生肖| 什么的白云| 腋下长痘痘是什么原因| 老被蚊子咬是什么原因| 树菠萝什么时候成熟| 三岁宝宝喝什么奶粉比较好| 眼压高是什么原因造成的| 爱钻牛角尖是什么意思| 心动过缓吃什么药| 阴道里面长什么样| 谈恋爱是为了什么| srpl是什么药| 鼻息肉长什么样| 小孩肠套叠什么症状| 口干舌燥口苦是什么原因引起的| 舌苔厚黄吃什么药| 很容易饿是什么原因| 什么病会引起皮肤瘙痒| 9月13日什么星座| 炖鸡汤放什么材料好吃| 养神经的药是什么药最好| 生蚝和什么不能一起吃| 吃葡萄皮有什么好处| 缺陷的陷是什么意思| 什么叫丁克| nz是什么意思| 他将是你的新郎是什么歌| 骆驼是什么品牌| 吃什么可以化痰| 乌龟喜欢吃什么食物| 为什么不能天天喝豆浆| 冥币是什么意思| 漂洋过海是什么生肖| 大排畸和四维的区别是什么| 什么是生物制剂药| 海参几头是什么意思| 什么粉| 手麻疼是什么原因引起| 男羊配什么属相最好| 手老是出汗是什么原因| 秦始皇长什么样| 为什么太阳会发光| 血糖高忌什么食物| 梦见战争是什么兆头| 任然什么意思| 爱是什么偏旁| 中医师承是什么意思| 吃什么能立马通大便| 静脉曲张是什么症状| 过敏是什么样的图片| 越国在现在的什么地方| 宝宝反复发烧是什么原因引起的| 急性肠胃炎吃什么食物| 免疫抑制剂是什么意思| 诸葛亮发明了什么| 人为什么会缺钾| imp是什么意思| mi是什么单位| 双脚浮肿是什么原因| 开心水是什么| 天热出汗多是什么原因| 12345是什么投诉电话| 擦汗表情是什么意思| 竹棉和纯棉有什么区别| 月经黑色的是什么原因| 为什么会黄体功能不足| 2002年属马的是什么命| 累觉不爱是什么意思| 带手串有什么讲究| 卤米松软膏主治什么| 什么无为| 张衡发明了什么东西| cn是什么意思二次元| 终亡其酒的亡是什么意思| 什么什么发抖| 打强心针意味着什么| 肛裂用什么药治最好效果最快| 心电图低电压什么意思| 取环后月经量少是什么原因| 体面什么意思| 妤字属于五行属什么| 湘潭市花是什么| 什么鸣什么盗| 阴囊潮湿是什么症状| 天天喝白酒对身体有什么危害| #NAME?| rapido是什么牌子| 胃胀打嗝吃什么药最好| 孕妇为什么不能吃韭菜| 气场什么意思| 颈椎骨质增生吃什么药效果好| 警察两杠三星是什么级别| 活泼的反义词是什么| 手脚抽筋是什么原因引起的| 孩子喉咙痛吃什么药好| 孕期腰疼是什么原因| 尖锐湿疣是什么病| 标准工资指什么| 什么草药能治痔疮| 决明子泡水喝有什么功效| 一天老是放屁是什么原因| 骨感是什么意思| 盐酸达泊西汀片是什么药| 2月13号是什么星座| 女人肝胆湿热吃什么药| 孕妇感冒了对胎儿有什么影响| 吃什么补钙最好| 浑身酸痛什么原因| 刚愎自负是什么意思| 什么能让男人变大变长| 基诺浦鞋属于什么档次| 月经期间同房有什么危害| 梦见鞋子是什么意思| 荤菜是什么意思| 扌字旁的字和什么有关| 变色龙形容什么样的人| 疱疹是什么原因长的| 白细胞计数偏低是什么意思| 百香果是什么季节的| 陈酿是什么意思| 落地生根是什么生肖| 咖喱是什么材料做的| ich是什么意思| 形态各异是什么意思| 什么东西好消化| 芒种可以种什么菜| 同比增长是什么意思| 肺痈是什么意思| 农历4月是什么星座| 漠河什么时候可以看到极光| 考试为什么要用2b铅笔| 山竹是什么季节的水果| 甲亢食疗吃什么| 小孩拉肚子吃什么药效果好| 申酉是什么时间| 胡椒粉是什么做的| 眼皮浮肿是什么原因引起的| 饭后打嗝是什么原因| 阴虚吃什么食补最快| 感康是什么| 含是什么意思| 猪心炖什么补气补血| 什么是白平衡| 清对什么| 灭蚂蚁什么药最有效| 睾丸痛是什么原因| 人生轨迹是什么意思| 口臭是什么原因| 七月六号是什么星座| 12生肖为什么没有猫| 插入是什么感觉| 芹菜什么时候种| 梅杰综合症是什么病| 奶酪和芝士有什么区别| 养殖什么| 晚上9点到11点是什么时辰| 花椒泡脚有什么功效| 岍是什么意思| 三个马读什么| 87岁属什么生肖| 什么鸡没有毛| naps是什么意思| 四月二十九是什么星座| 农历八月十三是什么星座| 女人没经验开什么店好| 人武部是干什么的| 颈椎病吃什么药最好| 中国的国酒是什么| 2004年是什么生肖| 电波系是什么意思| 清奇是什么意思| 华佗是什么生肖| 巧克力和什么不能一起吃| 冰妹是什么| 神经疼痛吃什么药| 草头是什么菜| 椰蓉是什么| 猫奴是什么意思| 什么东西不能一起吃| 伤官见官是什么意思| 百思不得其解什么意思| 脸上长扁平疣是什么原因引起的| 梦见偷桃子是什么意思| 烟青色是什么颜色| 伊人是什么意思| 警惕是什么意思| 婴儿湿疹用什么| 风象星座是什么意思| 甲钴胺有什么作用| 左手小指和无名指发麻是什么原因| 边缘心电图是什么意思| 戾气重是什么意思| 肝功能七项是检查什么| 梦见做手术是什么意思| 释怀和释然有什么区别| 白细胞低什么原因| nz是什么意思| 爻辞是什么意思| 肠梗阻是什么病| 面色晄白是什么意思| 百度Jump to content

尚洋信息(股票代码832524)新三板上市最新公告列表

From Wikispecies
百度 (责编:邝亮桢(实习生)、张雨)

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)
	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
		elseif not exists[v] then
			ret[#ret + 1] = v
			exists[v] = true
		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)
	if type(orig) ~= "table" then
		return orig
	end
	
	-- already_seen stores copies of tables indexed by the original table.
	local copy = already_seen[orig]
	if copy ~= nil then
		return copy
	end
	
	copy = {}
	already_seen[orig] = copy -- memoize before any recursion, to avoid infinite loops
	
	for orig_key, orig_value in pairs(orig) do
		copy[_deepCopy(orig_key, includeMetatable, already_seen)] = _deepCopy(orig_value, includeMetatable, already_seen)
	end
	
	if includeMetatable then
		local mt = getmetatable(orig)
		if mt ~= nil then
			setmetatable(copy, _deepCopy(mt, true, already_seen))
		end
	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 or {})
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 searchElement is a member of the array, and false otherwise.
-- Equivalent to JavaScript array.includes(searchElement) or
-- array.includes(searchElement, fromIndex), except fromIndex is 1 indexed
------------------------------------------------------------------------------------
function p.inArray(array, searchElement, fromIndex)
	checkType("inArray", 1, array, "table")
	-- if searchElement is nil, error?

	fromIndex = tonumber(fromIndex)
	if fromIndex then
		if (fromIndex < 0) then
			fromIndex = #array + fromIndex + 1
		end
		if fromIndex < 1 then fromIndex = 1 end
		for _, v in ipairs({unpack(array, fromIndex)}) do
			if v == searchElement then
				return true
			end
		end
	else
		for _, v in pairs(array) do
			if v == searchElement then
				return true
			end
		end
	end
	return false
end

------------------------------------------------------------------------------------
-- merge
--
-- Given the arrays, returns an array containing the elements of each input array
-- in sequence.
------------------------------------------------------------------------------------
function p.merge(...)
	local arrays = {...}
	local ret = {}
	for i, arr in ipairs(arrays) do
		checkType('merge', i, arr, 'table')
		for _, v in ipairs(arr) do
			ret[#ret + 1] = v
		end
	end
	return ret
end

------------------------------------------------------------------------------------
-- extend
--
-- Extends the first array in place by appending all elements from the second
-- array.
------------------------------------------------------------------------------------
function p.extend(arr1, arr2)
	checkType('extend', 1, arr1, 'table')
	checkType('extend', 2, arr2, 'table')

	for _, v in ipairs(arr2) do
		arr1[#arr1 + 1] = v
	end
end

return p
什么野菜降血糖 6月24什么星座 牛油果是什么季节的水果 梦见男朋友出轨了是什么意思 失去抚养权意味着什么
脊柱炎吃什么药 艺不压身是什么意思 天葬是什么 百字五行属什么 经期吃什么让血量增加
为什么家里有蟑螂 9月9日是什么星座 97属什么 素土是什么 结缡什么意思
省检察长什么级别 中国人为什么要学英语 开天眼是什么意思 维生素c是什么 不长毛的猫叫什么名字
梦见大火烧房子是什么意思hcv9jop7ns2r.cn 心什么诚什么hcv7jop7ns2r.cn 异常是什么意思hcv8jop3ns5r.cn 8月30号什么星座hcv9jop5ns9r.cn 脚烧是什么原因hcv8jop4ns7r.cn
dr和ct有什么区别hcv9jop3ns3r.cn 抗日战争什么时候开始的96micro.com 抗巨细胞病毒抗体igg高是什么意思bjcbxg.com 三维彩超主要检查什么bysq.com m指的是什么hcv7jop7ns3r.cn
七月是什么生肖hcv8jop2ns2r.cn 目赤什么意思hcv7jop4ns6r.cn 什么叫肾阳虚肾阴虚hcv8jop9ns8r.cn 牙套什么年龄戴合适kuyehao.com 夕阳红是什么意思hkuteam.com
狐狸的尾巴有什么作用hcv9jop1ns3r.cn 晚上减肥吃什么xjhesheng.com 回民不能吃什么hcv9jop1ns2r.cn 宽慰什么意思zsyouku.com 孩子睡觉咬牙齿是什么原因引起的youbangsi.com
百度