首页 > 其他分享 >test

test

时间:2024-10-06 22:45:04浏览次数:7  
标签:string min int value js test css

测试代码高亮:

<head>
    <meta charset="<?php echo get_bloginfo('charset'); ?>">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="<?php echo get_template_directory_uri() ?>/css/bootstrap.min.css?v=20240515">
    <link rel="stylesheet" href="<?php echo get_template_directory_uri() ?>/style.css?v=20240914">
    <link href="<?php echo get_template_directory_uri() ?>/fontawesome/css/all.min.css" rel="stylesheet">

    <title><?php
		$site_name = get_bloginfo('name');
		$site_description = get_bloginfo('description');
		$page_title = wp_title('', false);

		if (is_front_page() || is_home()) {
			echo $site_name . ' &#8211; ' . $site_description;
		} elseif (is_search()) {
			echo '「' . get_search_query() . '」的搜索结果 &#8211; ' . $site_name;
		} else {
			echo $page_title . ' &#8211; ' . $site_name;
		}
		?></title>

    <?php wp_head(); ?>

    <script src="<?php echo get_template_directory_uri() ?>/js/jquery-1.10.2.min.js"></script>
    <script src="<?php echo get_template_directory_uri() ?>/js/bootstrap.bundle.min.js?v=20240515"></script>
    <script src="<?php echo get_template_directory_uri() ?>/highlight/highlight.min.js"></script>
    <link rel="stylesheet" href="<?php echo get_template_directory_uri() ?>/highlight/styles/atom-one-dark.min.css" />
    <!-- <link rel="stylesheet" href="https://npm.elemecdn.com/[email protected]/style.css" /> -->
	<?php if ( is_admin_bar_showing() ) { ?>
        <style>
            .my-navbar {
                top: 32px;
            }
        </style>
	<?php } ?>
</head>
<header class="sticky-top my-navbar">
    <nav class="navbar navbar-expand-lg bg-body-tertiary" >
        <div class="container">
            <a class="navbar-brand" href="<?php echo home_url() ?>"><?php echo get_bloginfo('name');?></a>
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
                    aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
                <span class="navbar-toggler-icon"></span>
            </button>
			<?php
			wp_nav_menu(array(
				'theme_location' => 'mainmenu',
				'depth' => 2, // 1 = no dropdowns, 2 = with dropdowns.
				'container' => 'div',
				'container_class' => 'collapse navbar-collapse',
				'container_id' => 'navbarNav',
				'menu_class' => 'navbar-nav mr-auto',
				'fallback_cb' => 'WP_Bootstrap_Navwalker::fallback',
				'walker' => new WP_Bootstrap_Navwalker(),
			))
			?>
            <?php /*
            <form class="d-flex" role="search" method="get" action="<?php echo home_url( '/' ); ?>">
                <input class="form-control me-2" type="search" placeholder="Search" aria-label="Search" value="<?php echo get_search_query(); ?>" name="s">
                <button class="btn btn-outline-secondary" type="submit">Search</button>
            </form>
            */ ?>
        </div>
    </nav>
</header>
        /// <summary>
        /// 将传入的字符串中间部分字符替换成特殊字符
        /// </summary>
        /// <param name="value">需要替换的字符串</param>
        /// <param name="startLen">前保留长度</param>
        /// <param name="endLen">尾保留长度</param>
        /// <param name="replaceChar">特殊字符</param>
        /// <returns>被特殊字符替换的字符串</returns>
        private string ReplaceWithSpecialChar(string value, int startLen = 4, int endLen = 6, char specialChar = '*')
        {
            if (string.IsNullOrEmpty(value))
            {
                return "";
            }
            try
            {
                int lenth = value.Length - startLen - endLen;

                string replaceStr = value.Substring(startLen, lenth);

                string specialStr = string.Empty;

                for (int i = 0; i < replaceStr.Length; i++)
                {
                    specialStr += specialChar;
                }

                value = value.Replace(replaceStr, specialStr);
            }
            catch (Exception)
            {
                throw;
            }

            return value;
        }

 

标签:string,min,int,value,js,test,css
From: https://www.cnblogs.com/art/p/18449574

相关文章

  • The 10th Shandong Provincial Collegiate Programming Contest
    A-Sekiro题意初始有\(n\)个金币,死了\(m\)次,死一次\(n=\lceil\fracn2\rceil\)。求最后的金币数。思路模拟。代码点击查看代码#include<bits/stdc++.h>usingnamespacestd;#defineintlonglongvoidsolve(){ intn,m; cin>>n>>m; while(m--......
  • AtCoder Beginner Contest 374
    省流版A.判断末三位即可B.逐位判断即可C.枚举所有分组情况即可D.枚举线段顺序、端点顺序即可E.二分答案,发现贵的机器数量不超过\(100\),枚举求最小花费看是否可行即可F.朴素DP,复杂度分析得到有效时刻不超过\(O(n^2)\)而非\(O(s_i)\),直接\(DP\)即可A-Takahashi......
  • ROS报错The target name "test" is reserved when CTest testing is enabled
    ROS报错“Thetargetname“test“isreservedwhenCTesttestingisenabled”注意:现有特殊情况,可执行文件名可以为test,但是映射名称不可以为test。一般认为,可执行文件名和映射名称同名。因为映射名称不可命名为test,故可执行文件最好不要命名为test。纠正:ROS遇到的问题......
  • [论文阅读报告] All pairs shortest paths using bridging sets and rectangular matr
    本篇文章介绍整数边权下\((\min,+)\)矩阵乘、APSP等问题的一些做法。若每个元素的权值在\([-M,M]\cap\mathbbZ\)中,\(n\timesn^r\)和\(n^r\timesn\)的\((\min,+)\)矩阵乘可做到\(\tildeO(Mn^{\omega(r)})\);有向图APSP可做到\(\tildeO(n^{2+\mu(t)})\),......
  • 2017中国大学生程序设计竞赛 - 女生专场(SDKD 2024 Summer Training Contest K2)
    A-AutomaticJudge题意\(n\)个问题,\(m\)条记录,每条记录有题号、时间、状态,第一次\(AC\)的时候计入罚时,其他没发罚\(20\)分钟。求队伍过题数和罚时。思路模拟。代码点击查看代码#include<bits/stdc++.h>usingnamespacestd;#defineintlonglongvoidsolve()......
  • The 2024 CCPC Shandong Invitational Contest and Provincial Collegiate Programmin
    比赛链接C.ColorfulSegments2考虑最小的分组数量,可以先按左端点排序,然后每次贪心地找到前面一个最大右端点\(r_j<l_i\)的组加入。考虑计数,还是同样地按左端点排序,那么假设现在有\(k\)个组,每个组最大右端点是\(g_i\)(没有元素则\(g_i=0\)),那么每次可以选择一个\(g_j......
  • 【刷题笔记】2024.10.4 test
    2024.10.4test虹色的北斗七星思路题目要求\[maxn-minn-len\]的最大值,其中\(maxn\)为区间的最大值,\(minn\)为区间的最小值,\(len\)为区间的长度注意性质,最优的状态一定是区间的左右端点为最大值和最小值时。因为,如果区间左右端点不为最大值或最小值,那么区间长度就可以继续......
  • The 2024 CCPC Shandong Invitational Contest and Provincial Collegiate Programmin
    Preface传说中被杭电1h十题的比赛,结果打到结束也只会10题这场开局就不太顺,一个Easy题C卡到2h的时候才出,虽然中期题基本都能想到但还是出的很慢最后1h讨论了下L的大致做法发现了几个关键性质后觉得写不完了,遂摆烂滚去打炉石了A.Printer签到,二分答案大力检验即......
  • The 2021 ICPC Asia Shenyang Regional Contest
    B-BitwiseExclusive-ORSequence题意\(n\)个数,\(m\)个关系,每个关系形如\(a_u⊕a_v=w\),表示第\(u\)个数与第\(v\)数的异或运算结果为\(w\)。求是否有这样的\(n\)个数满足所有关系要求,如果没有输出\(-1\),如果有输出所有满足要求的方案中,所有数字的和的最小值。思路建图......
  • Skills - 2022 International Collegiate Programming Contest, Jinan Site, Problem
    有3种技能,\(n(\le10^3)\)天内每天可以对一个技能进行学习,第i天学习第j个技能可以为第j个技能增加\(a_{i,j}(\le10^4)\)的熟练度。在第i天结束时,每个技能的熟练度会减去距离上次学习该技能的天数,但最多减到0。求n天后能得到的熟练度的和的最大值。首先容易有一个显然的dp状态:\(f......