Replacing SharePoint 2010 Menu Control

原文链接

 

March 4, 2011 by Aryan Nava

 

Do you want to change the SharePoint 2010 Menu Control to this?



 

Try the following steps to change SharePoint 2010 Menu Control

 

 

 

To replace the Menu control with a TreeView control
  1. In SharePoint Designer 2010, open the website that you want to customize.

  2. In the Navigation pane, select Master Pages.

  3. Right-click v4.master, and then click Copy.

  4. Right-click an empty area of the Master Pages pane, and then click Paste.

    The file v4_copy(1).master is created.

  5. Right-click v4_copy(1).master, click Rename, and type a new name, such as v4_sample.master.

Edit the master page and go to code view



 7. CTRL + F and find the code
<SharePoint:AspMenu id="V4QuickLaunchMenu"



 8. Right click V4QuickLaunchMenu, select Select Tag, and then press the Delete key.



 9. Replace the deleted markup with markup for three new controls, an SPHierarchyDataSourceControl and an SPRememberScroll control that contains an SPTreeView control.

<SharePoint:SPHierarchyDataSourceControl
      id="MyTreeViewDataSource"
      runat="server" RootContextObject="Web"
      IncludeDiscussionFolders="true" />
<SharePoint:SPRememberScroll
      id="MyTreeViewRememberScroll"
      runat="server" 
      style="overflow: auto;height: 400px;width: 150px; ">
  <SharePoint:SPTreeView
        id="MyWebTreeView"
        runat="server"
        ShowLines="true"
        DataSourceId="MyTreeViewDataSource"
        ExpandDepth="3"
        SelectedNodeStyle-CssClass="ms-tvselected"
        NodeStyle-CssClass="ms-navitem"
        NodeStyle-HorizontalPadding="2"
        NodeStyle-VerticalPadding="5"
        SkipLinkText=""
        NodeIndent="20"
        ExpandImageUrl="/_layouts/images/tvplus.gif"
        CollapseImageUrl="/_layouts/images/tvminus.gif"
        NoExpandImageUrl="/_layouts/images/tvblank.gif" />
</SharePoint:SPRememberScroll>

 

10. On the File menu, click Save.

    1. 11. In the Navigation pane, select Master Pages. Right-click the name of your master page, and then click Set as Default Master Page.


  1.  Open a page in the website to see the result of your changes. You will see your menu is changed to this.


  1.  

 

内容概要:本文围绕EKF SLAM(扩展卡尔曼滤波同步定位与地图构建)的性能展开多项对比实验研究,重点分析在稀疏与稠密landmark环境下、预测与更新步骤同时进行与非同时进行的情况下的系统性能差异,并进一步探讨EKF SLAM在有色噪声干扰下的鲁棒性表现。实验考虑了不确定性因素的影响,旨在评估不同条件下算法的定位精度与地图构建质量,为实际应用中EKF SLAM的优化提供依据。文档还提及多智能体系统在遭受DoS攻击下的弹性控制研究,但核心内容聚焦于SLAM算法的性能测试与分析。; 适合人群:具备一定机器人学、状态估计或自动驾驶基础知识的科研人员及工程技术人员,尤其是从事SLAM算法研究或应用开发的硕士、博士研究生和相关领域研发人员。; 使用场景及目标:①用于比较EKF SLAM在不同landmark密度下的性能表现;②分析预测与更新机制同步与否对滤波器稳定性与精度的影响;③评估系统在有色噪声等非理想观测条件下的适应能力,提升实际部署中的可靠性。; 阅读建议:建议结合MATLAB仿真代码进行实验复现,重点关注状态协方差传播、观测更新频率与噪声模型设置等关键环节,深入理解EKF SLAM在复杂环境下的行为特性。稀疏 landmark 与稠密 landmark 下 EKF SLAM 性能对比实验,预测更新同时进行与非同时进行对比 EKF SLAM 性能对比实验,EKF SLAM 在有色噪声下性能实验
### 替换无效字符或值的方法 在处理字符串时,如果需要替换其中的无效字符或值,可以采用多种方法来实现这一目标。以下是几种常见的解决方案: #### 方法一:使用正则表达式过滤无效字符 通过 `String.replaceAll()` 或其他编程语言中的正则表达式功能,可以高效地移除或替换不符合条件的字符。 ```java // 使用 Java 的 String.replaceAll() 来替换所有非数字字符 String input = "abc123!@#"; String result = input.replaceAll("[^0-9\\.\\+\\-eE]", ""); // 只保留有效数值字符 ``` 此代码片段会将输入字符串中所有的非法字符替换为空字符串,仅留下有效的数值字符[^1]。 --- #### 方法二:逐字符验证并构建新字符串 对于更复杂的场景,可以通过遍历字符串中的每一个字符,并判断其合法性后再决定是否将其加入新的字符串中。 ```python def filter_invalid_characters(input_string): allowed_chars = set('0123456789.+eE') # 定义允许的字符集合 output = ''.join([char for char in input_string if char in allowed_chars]) return output input_string = "abc123!@#" result = filter_invalid_characters(input_string) print(result) # 输出: 123 ``` 这种方法能够灵活控制哪些字符被认为是合法的[^3]。 --- #### 方法三:编码转换与错误处理 当涉及不同编码之间的转换时,可能遇到无法解码的情况。此时可利用 Python 中的 `unicode()` 函数或其他类似的工具指定如何处理这些异常情况。 ```python try: decoded_string = bytes_object.decode(encoding='utf-8', errors='strict') except ValueError as e: print(f"Decoding failed due to invalid characters: {e}") ``` 这里设置了 `'strict'` 错误模式,在发现任何不可接受的字符时都会抛出异常;也可以改为 `'ignore'` 或 `'replace'` 模式以忽略或者替代这些问题字符[^2]。 --- #### 性能考量 需要注意的是,不同的替换方式可能会带来显著的性能差异。例如,在某些情况下多次调用简单的 `replace()` 方法相较于一次性执行复杂匹配操作如 `replaceAll()` 而言效率较低[^4]。 因此,在实际应用过程中应当综合考虑需求的具体特点以及运行环境等因素选择最合适的方案。 ---
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值