喝普洱茶有什么功效| 地黄长什么样| 颈椎挂什么科| 尿酸高什么意思| 床垫什么材质的好| 土人参长什么样| 湿气重会有什么症状| 刘亦菲是什么国籍| 中国信仰什么教| 观音得道日是什么时候| 3月6号是什么星座| 牙齿出血是什么病表现出来的症状| 做月子可以吃什么| 天运子什么修为| nsnm什么意思| prog是什么意思| 929是什么星座| 梦见小白兔是什么意思| 11.7号是什么星座| 磨平了棱角是什么意思| 风调雨顺是什么生肖| 左室舒张功能减低是什么意思| 泰山石敢当是什么意思| 145是什么意思| 5月23号是什么星座| 什么样的空气| 吃什么对心脏好改善供血不足| 喝什么能解酒| 低置胎盘有什么危险| 血压高压高低压正常是什么原因| 心血虚吃什么中成药| 正常人尿液是什么颜色| 甲胎蛋白是什么| 去湿气吃什么食物好| 反复口腔溃疡是什么病的前兆| 颠鸾倒凤什么意思| 再说吧是什么意思| 现在创业做什么好| 吃丝瓜有什么功效和作用| 农历今天属什么生肖| 做眉毛有什么危害| 室上速是什么病| 表姐的孩子叫我什么| 人的脂肪是什么颜色| gpa什么意思| 做爱时间短吃什么药好| 安阳车牌号是豫什么| 阴道炎是什么原因引起的| 3911农药主要治什么| 黯然泪下是什么意思| 降血脂吃什么药效果好| 7月24日是什么日子| 老来得子是什么意思| lee是什么牌子中文名| 试金石是什么意思| 什么叫贵妃镯| 今天股市为什么暴跌| 吃什么补精子快| 黄皮适合什么颜色的衣服| 电离辐射是指什么| 扁平苔藓有什么症状| dyj什么意思| 吃什么降尿酸最快| 4级残疾证有什么优惠政策| 脱氧核苷酸是什么| 冬虫夏草有什么功效与作用| 丝状疣用什么药| 艾滋病挂什么科| 慢阻肺吃什么药最有效最好| 女生下面叫什么| 梅毒是什么症状图片| 为什么嘴巴老是干| 肺部高密度影是什么意思| 胆囊炎输液用什么药| dr是什么检查项目| 人为什么会突然晕倒| 枸杞对女人有什么好处| 阳痿是什么意思| 肠胃不好经常拉肚子吃什么药| 2月18什么星座| 磨玻璃结节是什么| 杏林是指什么| 1.20是什么星座| 为什么有眼袋是什么原因引起的| 光气是什么气体| 什么姿势| 韶字五行属什么| 武警是干什么的| 头顶是什么穴位| fs是什么单位| 日前是什么意思| 明朝什么时候灭亡| 软饭是什么意思| 固本培元是什么意思| ca199检查是什么意思| 什么木质手串最好| 风流倜傥是什么意思| 梦到前男友是什么意思| 什么叫眩晕| 770是什么意思| 什么生机| 糖尿病人可以吃什么零食| 阴道里面痒是什么原因| 三月六日是什么星座| 年夜饭吃什么| 过敏嘴唇肿是什么原因| 盲盒是什么| 钧五行属什么| 大便发绿色是什么原因| 退烧药吃多了有什么副作用| 瞬息什么| 查钙含量做什么检查| 水险痣是什么意思| 细菌性前列腺炎吃什么药| 老爹是什么意思| 松鼠吃什么| 阳亢是什么意思| p.a.是什么意思| 智齿发炎肿痛吃什么药| 喉结大是什么原因| 梦到做饭是什么意思| 芥蒂什么意思| 拉屎有泡沫是什么原因| 鼻涕倒流吃什么药效果好| 糖尿病是什么原因造成的| 尿遁什么意思| 结婚唱什么歌送给新人| 早餐吃什么养胃| 五彩斑斓是什么意思| 盆底肌松弛有什么影响| 宽字五行属什么| 为什么拼音| 什么车最长脑筋急转弯| 蛋白酶是什么东西| 砒霜是什么| 2000年属龙的是什么命| 小三阳吃什么食物好得快| 月经崩漏吃什么止血| 儿童急性肠胃炎吃什么药| 心脏造影是什么检查| 孕妇适合喝什么牛奶| 什么是公主病| 包的部首是什么| 早上醒来手麻是什么原因| 粘胶纤维是什么面料| 口干口苦吃什么中成药| 手机什么时候发明的| 肝有钙化灶是什么意思| 武警是干什么的| 喝最烈的酒下一句是什么| 梦到捡菌子是什么意思| 九牛一毛什么意思| 过会是什么意思| 大力出奇迹什么意思| 塔罗牌愚者是什么意思| 牙龈炎吃什么药| 鹿参膏有什么作用和功效| 文化传媒是干什么的| 肚子疼挂什么科| 拉肚子拉出血是什么原因| 小鸭吃什么| 虎父无犬女是什么意思| 大便什么颜色是正常的| 一月10号是什么星座| 属虎的五行属什么| 明胶是什么| 细菌感染发烧吃什么药| 尿的正常颜色是什么样| 佛跳墙属于什么菜系| 你在说什么用英语怎么说| 过敏不能吃什么| 女人为什么会宫外怀孕| gap什么意思| 天长地久是什么生肖| 输血四项检查是什么| 绿豆不能和什么同吃| siri是什么意思| 年纪是什么意思| 常州有什么特产| 为什么明星都不戴黄金| 作古是什么意思| 松香有毒吗对人体有什么危害| gucci什么品牌| 惨绿少年什么意思| 枸杞有什么作用和功效| 腰无力是什么原因| 吃完麻辣烫吃什么补救| 中性粒细胞高是什么原因| ENBD手术全称是什么| 段子是什么意思| 打胎吃什么药| 大将军衔相当于什么官| 鸡肠炎用什么药效果好| kms是什么药| 金蝉脱壳什么意思| 女性私处长痘痘是什么原因| 切除一侧输卵管对女性有什么影响| 失眠为什么开奥氮平片| 查尿酸挂什么科| 脚掌痒是什么原因| 什么字五行属土| 劳士顿手表什么档次| 什么叫白内障| 口臭口干口苦是什么原因| 双子座的幸运花是什么| 非你莫属是什么意思| 血管鼓起来是什么原因| 醒酒器有什么作用| 老师为什么叫老师| 吃什么能提升免疫力| 推拿和按摩有什么区别| 阴道口发白是什么原因| 86年属什么| 司马光和司马迁是什么关系| 早饱是什么意思| 出片是什么意思| 总胆固醇偏高是什么意思| 机缘是什么意思| 格色是什么意思| 人工授精是什么意思| 1953年属什么| 什么手机电池最耐用| 三途苦是指的什么| 地奥司明片治疗什么病| 什么样的人容易孕酮低| 宇宙之外还有什么| 为什么会真菌感染| 人造海蜇丝是什么做的| 泪目是什么意思| 小儿拉肚子吃什么药好得快| bl是什么单位| 大便真菌阳性说明什么| 感冒去医院挂什么科| 男生的鸡鸡长什么样| 梅菜是什么菜晒干的| 飞行员妻子有什么待遇| 付之东流是什么意思| 胎儿停止发育是什么原因造成的| 肝内点状钙化灶什么意思| 什么叫生化| 什么季节喝白茶| 4岁打什么疫苗| 落选是什么意思| 高血糖喝什么茶好| 亥时是什么时候| 什么是篮球基本功| 瓷娃娃什么意思| 吃醋是什么意思| 反式脂肪酸是什么意思| 壬寅年五行属什么| 房东是什么意思| 拉稀水是什么原因| 梦见战争是什么兆头| 小孩咳嗽流鼻涕吃什么药效果好| 紫色搭配什么颜色| 手麻是什么原因引起的| 头发容易油是什么原因| 复查是什么意思| 会车是什么| 澄粉是什么粉| 猴的守护神是什么菩萨| 什么面朝天| 在什么什么后面| 吃什么补头发| 百度Jump to content

南京市委常委、宣传部长曹路宝到访人民日报社江苏分社

?? ????????? ??????????? ?????
百度 证券时报社2017年度总结表彰大会召开2018-01-2919:17来源:证券时报网2018年1月27日,证券时报社2017年度总结表彰大会在深圳商报社大厦二楼国际会议厅召开。

Documentation for this module may be created at Module:Citation/CS1/Utilities/doc

local u = {}

local z = {
	error_categories = {};														-- for categorizing citations that contain errors
	error_ids = {};
	message_tail = {};
	maintenance_cats = {};														-- for categorizing citations that aren't erroneous per se, but could use a little work
	properties_cats = {};														-- for categorizing citations based on certain properties, language of source for instance
};


--[[--------------------------< F O R W A R D   D E C L A R A T I O N S >--------------------------------------
]]

local cfg;																		-- table of tables imported from selected Module:Citation/CS1/Configuration


--[[--------------------------< I S _ S E T >------------------------------------------------------------------

Returns true if argument is set; false otherwise. Argument is 'set' when it exists (not nil) or when it is not an empty string.

]]

local function is_set( var )
	return not (var == nil or var == '');
end


--[[--------------------------< I N _ A R R A Y >--------------------------------------------------------------

Whether needle is in haystack

]]

local function in_array( needle, haystack )
	if needle == nil then
		return false;
	end
	for n,v in ipairs( haystack ) do
		if v == needle then
			return n;
		end
	end
	return false;
end


--[[--------------------------< S U B S T I T U T E >----------------------------------------------------------

Populates numbered arguments in a message string using an argument table.

]]

local function substitute( msg, args )
	return args and mw.message.newRawMessage( msg, args ):plain() or msg;
end


--[[--------------------------< E R R O R _ C O M M E N T >----------------------------------------------------

Wraps error messages with css markup according to the state of hidden.

]]

local function error_comment( content, hidden )
	return substitute( hidden and cfg.presentation['hidden-error'] or cfg.presentation['visible-error'], content );
end


--[=[-------------------------< M A K E _ W I K I L I N K >----------------------------------------------------

Makes a wikilink; when bot link and display text is provided, returns a wikilink in the form [[L|D]]; if only
link is provided, returns a wikilink in the form [[L]]; if neither are provided or link is omitted, returns an
empty string.

]=]

local function make_wikilink (link, display)
	if is_set (link) then
		if is_set (display) then
			return table.concat ({'[[', link, '|', display, ']]'});
		else
			return table.concat ({'[[', link, ']]'});
		end
	else
		return '';
	end
end


--[[--------------------------< S E T _ E R R O R >--------------------------------------------------------------

Sets an error condition and returns the appropriate error message.  The actual placement of the error message in the output is
the responsibility of the calling function.

]]

local function set_error( error_id, arguments, raw, prefix, suffix )
	local error_state = cfg.error_conditions[ error_id ];
	
	prefix = prefix or "";
	suffix = suffix or "";
	
	if error_state == nil then
		error( cfg.messages['undefined_error'] );								-- because missing error handler in Module:Citation/CS1/Configuration
	elseif is_set( error_state.category ) then
		table.insert( z.error_categories, error_state.category );
	end
	
	local message = substitute( error_state.message, arguments );

	message = table.concat (
		{
		message,
		' (',
		make_wikilink (
			table.concat (
				{
				cfg.messages['help page link'],
				'#',
				error_state.anchor
				}),
			cfg.messages['help page label']),
		')'
		});

--	message = table.concat ({message, ' (', substitute (cfg.presentation['wikilink'], 
--		{cfg.messages['help page link'] .. '#' .. error_state.anchor, cfg.messages['help page label']}), ')'});
--	message = message .. " ([[" .. cfg.messages['help page link'] .. 
--		"#" .. error_state.anchor .. "|" ..
--		cfg.messages['help page label'] .. "]])";
	
	z.error_ids[ error_id ] = true;
	if in_array( error_id, { 'bare_url_missing_title', 'trans_missing_title' } )
			and z.error_ids['citation_missing_title'] then
		return '', false;
	end
	
	message = table.concat({ prefix, message, suffix });
	
	if raw == true then
		return message, error_state.hidden;
	end		
		
	return error_comment( message, error_state.hidden );
end


--[[-------------------------< I S _ A L I A S _ U S E D >-----------------------------------------------------

This function is used by select_one() to determine if one of a list of alias parameters is in the argument list
provided by the template.

Input:
	args – pointer to the arguments table from calling template
	alias – one of the list of possible aliases in the aliases lists from Module:Citation/CS1/Configuration
	index – for enumerated parameters, identifies which one
	enumerated – true/false flag used choose how enumerated aliases are examined
	value – value associated with an alias that has previously been selected; nil if not yet selected
	selected – the alias that has previously been selected; nil if not yet selected
	error_list – list of aliases that are duplicates of the alias already selected

Returns:
	value – value associated with alias we selected or that was previously selected or nil if an alias not yet selected
	selected – the alias we selected or the alias that was previously selected or nil if an alias not yet selected

]]

local function is_alias_used (args, alias, index, enumerated, value, selected, error_list)
	if enumerated then															-- is this a test for an enumerated parameters?
		alias = alias:gsub ('#', index);										-- replace '#' with the value in index
	else
		alias = alias:gsub ('#', '');											-- remove '#' if it exists
	end

	if is_set(args[alias]) then													-- alias is in the template's argument list
		if value ~= nil and selected ~= alias then								-- if we have already selected one of the aliases
			local skip;
			for _, v in ipairs(error_list) do									-- spin through the error list to see if we've added this alias
				if v == alias then
					skip = true;
					break;														-- has been added so stop looking 
				end
			end
			if not skip then													-- has not been added so
				table.insert( error_list, alias );								-- add error alias to the error list
			end
		else
			value = args[alias];												-- not yet selected an alias, so select this one
			selected = alias;
		end
	end
	return value, selected;														-- return newly selected alias, or previously selected alias
end


--[[--------------------------< A D D _ M A I N T _ C A T >------------------------------------------------------

Adds a category to z.maintenance_cats using names from the configuration file with additional text if any.
To prevent duplication, the added_maint_cats table lists the categories by key that have been added to z.maintenance_cats.

]]

local added_maint_cats = {}														-- list of maintenance categories that have been added to z.maintenance_cats
local function add_maint_cat (key, arguments)
	if not added_maint_cats [key] then
		added_maint_cats [key] = true;											-- note that we've added this category
		table.insert( z.maintenance_cats, substitute (cfg.maint_cats [key], arguments));	-- make name then add to table
	end
end


--[[--------------------------< S A F E _ F O R _ I T A L I C S >----------------------------------------------

Protects a string that will be wrapped in wiki italic markup '' ... ''

Note: We cannot use <i> for italics, as the expected behavior for italics specified by ''...'' in the title is that
they will be inverted (i.e. unitalicized) in the resulting references.  In addition, <i> and '' tend to interact
poorly under Mediawiki's HTML tidy.

]]

local function safe_for_italics( str )
	if not is_set(str) then
		return str;
	else
		if str:sub(1,1) == "'" then str = "<span></span>" .. str; end
		if str:sub(-1,-1) == "'" then str = str .. "<span></span>"; end
		
		-- Remove newlines as they break italics.
		return str:gsub( '\n', ' ' );
	end
end


--[[--------------------------< W R A P _ S T Y L E >----------------------------------------------------------

Applies styling to various parameters.  Supplied string is wrapped using a message_list configuration taking one
argument; protects italic styled parameters.  Additional text taken from citation_config.presentation - the reason
this function is similar to but separate from wrap_msg().

]]

local function wrap_style (key, str)
	if not is_set( str ) then
		return "";
	elseif in_array( key, { 'italic-title', 'trans-italic-title' } ) then
		str = safe_for_italics( str );
	end

	return substitute( cfg.presentation[key], {str} );
end


--[[--------------------------< S E L E C T _ O N E >----------------------------------------------------------

Chooses one matching parameter from a list of parameters to consider.  The list of parameters to consider is just
names.  For parameters that may be enumerated, the position of the numerator in the parameter name is identified
by the '#' so |author-last1= and |author1-last= are represented as 'author-last#' and 'author#-last'.

Because enumerated parameter |<param>1= is an alias of |<param>= we must test for both possibilities.


Generates an error if more than one match is present.

]]

local function select_one( args, aliases_list, error_condition, index )
	local value = nil;															-- the value assigned to the selected parameter
	local selected = '';														-- the name of the parameter we have chosen
	local error_list = {};

	if index ~= nil then index = tostring(index); end

	for _, alias in ipairs( aliases_list ) do									-- for each alias in the aliases list
		if alias:match ('#') then												-- if this alias can be enumerated
			if '1' == index then												-- when index is 1 test for enumerated and non-enumerated aliases
				value, selected = is_alias_used (args, alias, index, false, value, selected, error_list);	-- first test for non-enumerated alias
			end
			value, selected = is_alias_used (args, alias, index, true, value, selected, error_list);		-- test for enumerated alias
		else
			value, selected = is_alias_used (args, alias, index, false, value, selected, error_list);		--test for non-enumerated alias
		end
	end

	if #error_list > 0 and 'none' ~= error_condition then						-- for cases where this code is used outside of extract_names()
		local error_str = "";
		for _, k in ipairs( error_list ) do
			if error_str ~= "" then error_str = error_str .. cfg.messages['parameter-separator'] end
			error_str = error_str .. wrap_style ('parameter', k);
		end
		if #error_list > 1 then
			error_str = error_str .. cfg.messages['parameter-final-separator'];
		else
			error_str = error_str .. cfg.messages['parameter-pair-separator'];
		end
		error_str = error_str .. wrap_style ('parameter', selected);
		table.insert( z.message_tail, { set_error( error_condition, {error_str}, true ) } );
	end
	
	return value, selected;
end


--[=[-------------------------< R E M O V E _ W I K I _ L I N K >----------------------------------------------

Gets the display text from a wikilink like [[A|B]] or [[B]] gives B

The str:gsub() returns either A|B froma [[A|B]] or B from [[B]] or B from B (no wikilink markup).

In l(), l:gsub() removes the link and pipe (if they exist); the second :gsub() trims white space from the label
if str was wrapped in wikilink markup.  Presumably, this is because without wikimarkup in str, there is no match
in the initial gsub, the replacement function l() doesn't get called.

]=]

local function remove_wiki_link (str)
	return (str:gsub( "%[%[([^%[%]]*)%]%]", function(l)
		return l:gsub( "^[^|]*|(.*)$", "%1" ):gsub("^%s*(.-)%s*$", "%1");
	end));
end


--[=[-------------------------< I S _ W I K I L I N K >--------------------------------------------------------

Determines if str is a wikilink, extracts, and returns the the wikilink type, link text, and display text parts.
If str is a complex wikilink ([[L|D]]):
	returns wl_type 2 and D and L from [[L|D]];
if str is a simple wikilink ([[D]])
	returns wl_type 1 and D from [[D]] and L as empty string;
if not a wikilink:
	returns wl_type 0, str as D, and L as empty string.

trims leading and trailing white space and pipes from L and D ([[L|]] and [[|D]] are accepted by MediaWiki and
treated like [[D]]; while [[|D|]] is not accepted by MediaWiki, here, we accept it and return D without the pipes).

]=]

local function is_wikilink (str)
	local D, L
	local wl_type = 2;															-- assume that str is a complex wikilink [[L|D]]

	L, D = str:match ('%[%[([^|]+)|([^%]]+)%]%]');								-- get L and D from [[L|D]] 

	if not is_set (D) then														-- if no separate link
		D = str:match ('%[%[([^%]]*)|*%]%]');									-- get D from [[D]]
		wl_type = 1; 
	end
	
	if not is_set (D) then														-- no wikilink markup
		D = str;																-- return the string as D
		wl_type = 0;															-- but say that it is not a wikilink
	end
	
	D = mw.text.trim (D, '%s|');												-- trim white space and pipe characters 
	L = L and mw.text.trim (L, '%s|');
	
	return wl_type, D, L or '';
end


--[[--------------------------< S E T _ S E L E C T E D _ M O D U L E S >--------------------------------------

Sets local cfg table to same (live or sandbox) as that used by the other modules.

]]

local function set_selected_modules (cfg_table_ptr)
	cfg = cfg_table_ptr;
	
end



return {																		-- return exported functions and tables
	is_set = is_set,
	in_array = in_array,
	substitute = substitute,
	error_comment = error_comment,
	set_error = set_error,
	select_one = select_one,
	add_maint_cat = add_maint_cat,
	wrap_style = wrap_style,
	safe_for_italics = safe_for_italics,
	remove_wiki_link = remove_wiki_link,
	is_wikilink = is_wikilink,
	make_wikilink = make_wikilink,
	set_selected_modules = set_selected_modules,
	z = z,
	}
产妇吃什么下奶快又多又营养 什么是逆商 副区长什么级别 月经来潮是什么意思 猜疑是什么意思
鸭子炖汤和什么一起炖最有营养 痛风应该挂什么科 寮房是什么意思 尿酸高是什么引起的 一个土一个贝念什么
2006属什么 什么是小苏打 猫有什么品种 丰富多腔的腔是什么意思 盆底脱垂有什么症状
尿不净是什么原因 IC什么意思 茶叶过期了有什么用途 雷龙鱼吃什么 什么水果最贵
男人什么时候精子最强hcv8jop1ns0r.cn 胎停是什么原因引起的hcv8jop2ns4r.cn 手机壳什么材质好hcv9jop2ns4r.cn 心率是什么意思hcv9jop0ns8r.cn 深圳市市长是什么级别aiwuzhiyu.com
天生一对成伴侣是什么生肖hcv8jop2ns4r.cn 肾小球滤过率偏高说明什么hcv8jop0ns6r.cn 拉肚子是什么原因hcv7jop6ns9r.cn 小意思是什么意思hcv9jop4ns3r.cn 心电图诊断窦性心律什么意思hcv8jop0ns0r.cn
肾上腺素是什么东西hcv8jop3ns9r.cn 神经病吃什么药效果好hcv8jop1ns8r.cn 为什么记忆力很差hcv9jop7ns9r.cn 牙齿像锯齿是什么原因hcv9jop5ns2r.cn 冰箱灯不亮是什么原因chuanglingweilai.com
什么火没有烟hcv8jop4ns5r.cn 十1是什么意思hcv8jop3ns1r.cn 降调是什么意思hanqikai.com 秦始皇的佩剑叫什么剑hlguo.com 带翅膀的黑蚂蚁是什么hcv9jop5ns4r.cn
百度