xml IIS URL重写规则

IIS URL重写规则

iis_url_rewrite_rules.xml
<rewrite>
    <rules>
        <rule name="Rewriter" stopProcessing="true">
            <match url="^(.*)$" ignoreCase="false" />
            <conditions>
                <add input="{R:1}" pattern="^(app\\.php|favicon\\.ico)" ignoreCase="false" negate="true" />
                <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
                <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
            </conditions>
            <action type="Rewrite" url="./app.php/{R:1}" appendQueryString="true" />
        </rule>
    </rules>
</rewrite>

xml Magento Memcache配置

Magento Memcache配置

local.xml
<cache>
  <backend>memcached</backend><!-- apc / memcached / empty=file -->
  <memcached><!-- memcached cache backend related config -->
    <servers><!-- any number of server nodes can be included -->
      <server>
        <host><![CDATA[127.0.0.1]]></host>
        <port><![CDATA[11211]]></port>
        <persistent><![CDATA[1]]></persistent>
        </server>
    </servers>
    <compression><![CDATA[0]]></compression>
    <cache_dir><![CDATA[]]></cache_dir>
    <hashed_directory_level><![CDATA[]]></hashed_directory_level>
    <hashed_directory_umask><![CDATA[]]></hashed_directory_umask>
    <file_name_prefix><![CDATA[]]></file_name_prefix>
  </memcached>
</cache>

xml visibilitéd'unbouton parrapportàunegrille de type GridView

visibilitéd'unbouton parrapportàunegrille de type GridView

button-grid.cs
protected void Page_Load(object sender, EventArgs e)
{
    Control CollectiveReportButton = LoginView1.FindControl("CollectiveReportButton");
    ResultGrid.OnlyOneRowSelectedTargetId = CollectiveReportButton.ClientID;
}
    
protected void CollectiveReportButton_Click(object sender, EventArgs e)
{
    if (ResultGrid.SelectedItems.Count == 0) return;
    
    GridDataItem item = ResultGrid.SelectedItems[0] as GridDataItem;
    string evaluationSessionId = item.GetDataKeyValue("EvaluationSessionId").ToString();
    NavigationContext.Redirect("Assessment.Reports.CollectiveReport", "idEvaluationSession", evaluationSessionId);
}
bouton-grid.xml
<Syf:CustomButton runat="server" ID="CollectiveReportButton" Text="Accéder au rapport collectif"
  ToolTip="Accéder au rapport collectif" SkinID="ChartLine"
  Enabled="false" OnClick="CollectiveReportButton_Click" />

<syf:Grid runat="server" ID="ResultGrid" AutoGenerateColumns="False" DataSourceID="ObjectDataSource1"
            AllowPaging="true" PagerStyle-Position="Top" AllowFullExport="true"
        PagerStyle-Mode="NumericPages" PagerStyle-PagerTextFormat=""   
        PageSize="10" AllowCustomPaging="true" >
  
<ClientSettings AllowColumnsReorder="False" AllowExpandCollapse="true">
    <Selecting AllowRowSelect="True"></Selecting>
    <%--<Resizing AllowRowResize="false" AllowColumnResize="false" EnableRealTimeResize="false"
              ResizeGridOnColumnResize="False"></Resizing>--%>
    <%--<ClientEvents OnRowContextMenu="getContextMenu"  />--%>
</ClientSettings>
<GroupingSettings ShowUnGroupButton="false" />
        

xml Gradle的Notepad ++用户定义语言文件

Gradle的Notepad ++用户定义语言文件

userDefineLang_Gradle.xml
<NotepadPlus>
    <UserLang name="Gradle" ext="gradle" udlVersion="2.1">
        <Settings>
            <Global caseIgnored="yes" allowFoldOfComments="no" foldCompact="no" forcePureLC="0" decimalSeparator="0" />
            <Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="yes" Keywords7="no" Keywords8="no" />
        </Settings>
        <KeywordLists>
            <Keywords name="Comments">00// 01 02 03/* 04*/</Keywords>
            <Keywords name="Numbers, prefix1"></Keywords>
            <Keywords name="Numbers, prefix2"></Keywords>
            <Keywords name="Numbers, extras1"></Keywords>
            <Keywords name="Numbers, extras2"></Keywords>
            <Keywords name="Numbers, suffix1"></Keywords>
            <Keywords name="Numbers, suffix2"></Keywords>
            <Keywords name="Numbers, range"></Keywords>
            <Keywords name="Operators1">: -&gt; &lt;&lt; . , ( ) [ ] + - / * =</Keywords>
            <Keywords name="Operators2"></Keywords>
            <Keywords name="Folders in code1, open">{</Keywords>
            <Keywords name="Folders in code1, middle"></Keywords>
            <Keywords name="Folders in code1, close">}</Keywords>
            <Keywords name="Folders in code2, open"></Keywords>
            <Keywords name="Folders in code2, middle"></Keywords>
            <Keywords name="Folders in code2, close"></Keywords>
            <Keywords name="Folders in comment, open"></Keywords>
            <Keywords name="Folders in comment, middle"></Keywords>
            <Keywords name="Folders in comment, close"></Keywords>
            <Keywords name="Keywords1">absoluteProjectPath afterEvaluate allprojects ant apply artifacts beforeEvaluate buildscript childrenDependOnMe configurations configure container copy copySpec createAntBuilder defaultTasks delete dependencies dependsOn dependsOnChildren depthCompare evaluationDependsOn evaluationDependsOnChildren exec file fileTree files findProject hasProperty javaexec mkdir project property relativePath relativeProjectPath repositories subprojects tarTree task uri zipTree deleteAllActions dependsOnTaskDidWork doFirst doLast finalizedBy leftShift mustRunAfter onlyIf</Keywords>
            <Keywords name="Keywords2">allTasks buildDir buildFile childProjects components convention dependsOnProjects depth description extensions gradle logger logging parent path plugins projectDir properties resources rootDir rootProject state status tasks tasksByName actions didWork enabled inputs outputs taskDependencies temporaryDir</Keywords>
            <Keywords name="Keywords3">plugin from to group name version type</Keywords>
            <Keywords name="Keywords4">manifest sourceSets compile classpath destinationDir processResources classes compileJava processTestResources testClasses compileTestJava test jar javadoc runtime testRuntime testCompile testClassesDir testSrcDirs check build buildDependents buildNeeded verification documentation java clean classesDir resourcesDir title destination binResultsDir assemble upload distsDirName libsDirName reporting baseDir process sources binaries</Keywords>
            <Keywords name="Keywords5">dependencyCacheDir dependencyCacheDirName docsDir docsDirName metaInf sourceCompatibility targetCompatibility testReportDir testReportDirName testResultsDir testResultsDirName archivesBaseName distsDir libsDir apiDocTitle reportsDir reportsDirName</Keywords>
            <Keywords name="Keywords6"></Keywords>
            <Keywords name="Keywords7">flatDir ivy jcenter maven mavenCentral mavenLocal mavenRepo attributes writeTo artifactUrls url effectiveManifest sections conf2ScopeMappings mavenPomDir pom mavenDeployer mavenInstaller srcDir srcDirs source srcDirTrees filter systemProperties main </Keywords>
            <Keywords name="Keywords8">antBuilderFactory asDynamicObject buildScriptSource buildTasks class cleanEclipse cleanEclipseClasspath cleanEclipseJdt cleanEclipseProject cleanIdea cleanIdeaModule cleanIdeaProject cleanIdeaWorkspace configurationActions defaultArtifacts eclipse eclipseClasspath eclipseJdt eclipseProject ext fileResolver idea ideaModule ideaProject ideaWorkspace implicitTasks inheritedScope metaClass module parentIdentifier projectEvaluationBroadcaster projectEvaluator projectRegistry rebuildTasks runtimeClasspath scriptPluginFactory services standardOutputCapture</Keywords>
            <Keywords name="Delimiters">00&apos; 01 02&apos; 03&quot; 04 05&quot; 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23</Keywords>
        </KeywordLists>
        <Styles>
            <WordsStyle name="DEFAULT" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="COMMENTS" fgColor="008080" bgColor="FFFFFF" fontName="" fontStyle="2" nesting="0" />
            <WordsStyle name="LINE COMMENTS" fgColor="008080" bgColor="FFFFFF" fontName="" fontStyle="2" nesting="0" />
            <WordsStyle name="NUMBERS" fgColor="FF8080" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="KEYWORDS1" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="KEYWORDS2" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="KEYWORDS3" fgColor="8080FF" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="KEYWORDS4" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="KEYWORDS5" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="KEYWORDS6" fgColor="009F00" bgColor="FFFF80" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="KEYWORDS7" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="KEYWORDS8" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="OPERATORS" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="FOLDER IN CODE1" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="FOLDER IN CODE2" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="FOLDER IN COMMENT" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS1" fgColor="009F00" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS2" fgColor="009F00" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS3" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS4" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS5" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS6" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS7" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS8" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
        </Styles>
    </UserLang>
</NotepadPlus>

xml 要重定向到HTTPS的web.config文件和子目录。 <br/>禁用远程处理层的HTTPS重定向。 <br/>将WWW.domain.com重定向到https://

要重定向到HTTPS的web.config文件和子目录。 <br/>禁用远程处理层的HTTPS重定向。 <br/>将WWW.domain.com重定向到https://domain.com

gistfile1.xml
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<location path="." inheritInChildApplications="false">
    <system.webServer>
		<rewrite>
			<rules>
                <clear />
                <rule name="Root Hit Redirect" enabled="false" stopProcessing="true">
                    <match url="^$" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Redirect" url="/home/" />
                </rule>
                <rule name="Redirect www.domain.com to domain.com" patternSyntax="Wildcard" enabled="false" stopProcessing="true">
	                <match url="*" />
        	        <conditions>
                	    <add input="{HTTP_HOST}" pattern="www.domain.com" />
	                </conditions>
        	        <action type="Redirect" url="domain.com/{R:0}" />
	            </rule>
                <rule name="Remoting Bypass" enabled="false" patternSyntax="Wildcard" stopProcessing="true">
                    <match url="*Remoting*" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="None" />
                </rule>
                <rule name="HTTP to HTTPS redirect" enabled="false" stopProcessing="true">
                    <match url="(.*)" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                        <add input="{HTTPS}" pattern="off" ignoreCase="true" />
                    </conditions>
                    <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Found" />
                </rule>

			</rules>
		</rewrite>
    </system.webServer>
    </location>
	
</configuration>

xml 【WPF】的RichTextBoxの行间を普通っぽくする.Block.LineHeightを “1” に设定すると普通っぽくなります。

【WPF】的RichTextBoxの行间を普通っぽくする.Block.LineHeightを “1” に设定すると普通っぽくなります。

Sample.xaml
<Grid>
	<!-- デフォルト値は"0"のようです。 -->
	<RichTextBox Block.LineHeight="1"/>
</Grid>

xml XamDataGridで,セルを选択した时にその列の全セルを选択させ,背景色をつける。<br/> <br/>结构无理矢理です。

XamDataGridで,セルを选択した时にその列の全セルを选択させ,背景色をつける。<br/> <br/>结构无理矢理です。

XamDataGridSelectAllField2.xaml.cs
// 列が多段の場合は、こっちの方が良い。

/// <summary>
/// xamDataGrid1_CellActivated Event 
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void xamDataGrid1_CellActivated(object sender, Infragistics.Windows.DataPresenter.Events.CellActivatedEventArgs e)
{
  if (xamDataGrid1.ActiveCell != null) {
  	int activeRow = xamDataGrid1.ActiveCell.Field.Row;
  	var activeRowFields = xamDataGrid1.FieldLayouts[0].Fields.Where(it => it.Row == activeRow);
  	this.Dispatcher.BeginInvoke(new Action(() => {
  		foreach (var record in xamDataGrid1.Records) {
  			foreach (var field in activeRowFields) {
  				xamDataGrid1.SelectedItems.Fields.Add(field);
  			}
  		}
  		xamDataGrid1.SelectedItems.Records.Clear();
  	}));
  }
}
XamDataGridSelectAllField.xaml.cs
/// <summary>
/// xamDataGrid1_CellActivated Event 
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void xamDataGrid1_CellActivated(object sender, Infragistics.Windows.DataPresenter.Events.CellActivatedEventArgs e)
{
	int activeFieldIndex = xamDataGrid1.ActiveCell.Field.Index;
	// Dispatcherで非同期に処理する。 
	this.Dispatcher.BeginInvoke(new Action(() => {
	  // レコード毎にループ 
		for (int i = 0; i < xamDataGrid1.Records.Count; i++) {
		  // アクティブなセルをSelectedItemsに積んでいく。
			xamDataGrid1.SelectedItems.Fields.Add(xamDataGrid1.ActiveCell.Field);
			// 行にたいするSelectedItemsはクリアしておく。
			xamDataGrid1.SelectedItems.Records.Clear();
		}
	}));
}
XamDataGridSelectAllField.xaml
<igDP:XamDataGrid Name="xamDataGrid1" CellActivated="xamDataGrid1_CellActivated">
	<igDP:XamDataGrid.Resources>
		<Style TargetType="{x:Type igDP:CellValuePresenter}">
			<Style.Triggers>
			  <!-- 選択されているフィールド(セル)の背景色をピンク色にする。 -->
				<DataTrigger Binding="{Binding Path=IsFieldSelected, RelativeSource={RelativeSource Self}}" Value="True">
					<Setter Property="Background" Value="Pink"/>
				</DataTrigger>
			</Style.Triggers>
		</Style>
	</igDP:XamDataGrid.Resources>
	<igDP:XamDataGrid.ViewSettings>
		<igDP:GridViewSettings Orientation="Horizontal"/>
	</igDP:XamDataGrid.ViewSettings>
	<igDP:XamDataGrid.FieldSettings>
		<igDP:FieldSettings AllowEdit="False"/>
	</igDP:XamDataGrid.FieldSettings>
	<igDP:XamDataGrid.FieldLayoutSettings>
		<igDP:FieldLayoutSettings SelectionTypeCell="Extended" />
	</igDP:XamDataGrid.FieldLayoutSettings>
</igDP:XamDataGrid>

xml Sonar Ant Build

Sonar Ant Build

Sonar_ant_build.xml
<project name="My Project" default="all" basedir="."
	xmlns:sonar="antlib:org.sonar.ant">
	<!--
	<property name="sonar.jdbc.url"
		value="jdbc:mysql://localhost:3306/sonar?useUnicode=true&amp;characterEncoding=utf8" />
		-->
		
	<property name="sonar.host.url" value="http://localhost:9000" />	
	<property name="sonar.jdbc.username" value="sonar" />
	<property name="sonar.jdbc.password" value="sonar" />
	<!-- Define the SonarQube project properties -->
	<property name="sonar.projectKey" value="org.codehaus.sonar:example-java-ant" />
	<property name="sonar.projectName"
		value="Simple Java Project analyzed with the SonarQube Ant Task" />
	<property name="sonar.projectVersion" value="1.0" />
	<property name="sonar.language" value="java" />
	<property name="sonar.sources" value="C:\liferay-portal-src-6.2.0-ce-ga1\portal-service\src" />
	<property name="sonar.binaries" value="C:\liferay-portal-src-6.2.0-ce-ga1\portal-service\classes" />
	<!-- Define the SonarQube target -->
	<target name="sonar">
		<taskdef uri="antlib:org.sonar.ant" resource="org/sonar/ant/antlib.xml">
			<!--
				Update the following line, or put the "sonar-ant-task-*.jar" file in
				your "$HOME/.ant/lib" folder
			-->
			<classpath path="./sonar-ant-task-*.jar" />
		</taskdef>

		<!-- Execute Sonar -->
		<sonar:sonar />
	</target>


</project>

xml 删除块

删除块

Removing Block.xml
<!-- Remove -->
<remove name="[block_name]" />

<!-- Unset Child -->
<reference name="[reference_name]">
	<action method="unsetChild"><alias>[alias]</alias></action>
	<action method="unsetChild"><name>[name]</name></action>
</reference>

<!-- IE: -->
<reference name="right">
	<action method="unsetChild"><alias>cart_sidebar</alias></action>
	<action method="unsetChild"><name>catalog.compare.sidebar</name></action>
</reference>

xml 设置模板

设置模板

Set Template.xml
<reference name="root">
	<action method="setTemplate"><template>[directory/ie: inside template folder]/[filename.phtml]</template></action>
</reference>