小编geo*_*lee的帖子

Git:如何为合并创建补丁?

当我使用时git format-patch,它似乎不包括合并.如何执行合并,然后将其作为一组补丁通过电子邮件发送给某人?

例如,假设我合并了两个分支并在合并之上执行另一个提交:

git init

echo "initial file" > test.txt
git add test.txt
git commit -m "Commit A"

git checkout -b foo master
echo "foo" > test.txt
git commit -a -m "Commit B"

git checkout -b bar master
echo "bar" > test.txt
git commit -a -m "Commit C"

git merge foo
echo "foobar" > test.txt
git commit -a -m "Commit M"

echo "2nd line" >> test.txt
git commit -a -m "Commit D"
Run Code Online (Sandbox Code Playgroud)

这将创建以下树:

    B
  /   \
A       M …
Run Code Online (Sandbox Code Playgroud)

git merge patch

27
推荐指数
4
解决办法
2万
查看次数

获取exsl:node-set在PHP中工作

我有以下PHP代码,但它不起作用.我没有看到任何错误,但也许我只是失明.我在PHP 5.3.1上运行它.

<?php
$xsl_string = <<<HEREDOC
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
                xmlns="http://www.w3.org/1999/xhtml"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:exsl="http://exslt.org/common"
                extension-element-prefixes="exsl">
  <xsl:template match="/">
    <p>Hello world</p>
    <xsl:variable name="person">
      <firstname>Foo</firstname>
      <lastname>Bar</lastname>
      <email>test@example.com</email>
    </xsl:variable>
    <xsl:value-of select="exsl:node-set(\$person)/email"/>
  </xsl:template>
</xsl:stylesheet>
HEREDOC;

$xml_dom = new DOMDocument("1.0", "utf-8");
$xml_dom->appendChild($xml_dom->createElement("dummy"));

$xsl_dom = new DOMDocument();
$xsl_dom->loadXML($xsl_string);

$xsl_processor = new XSLTProcessor();
$xsl_processor->importStyleSheet($xsl_dom);
echo $xsl_processor->transformToXML($xml_dom);
?>
Run Code Online (Sandbox Code Playgroud)

此代码应输出"Hello world",然后输出"test@example.com",但不会显示电子邮件部分.知道什么是错的吗?

-Geoffrey Lee

php xml xslt exslt

9
推荐指数
1
解决办法
1209
查看次数

在Linux上运行ASP Classic和.NET

我正在研究一种以.NET和ASP Classic混合编码的产品.我想知道是否可以在Linux中运行它?我听说Mono(可以在Linux上运行.NET)和Sun Java Web Server(可以在Linux上运行ASP Classic).你会推荐其他任何技术吗?

另外,我应该注意哪些重大缺陷?

.net linux mono asp-classic

3
推荐指数
1
解决办法
2267
查看次数

$ {HTTPD -...} Perl语法

好吧,我无法通过阅读Perl的文档来解决这个问题.我在看Apache的RHEL4 init脚本......这行代码有什么作用?

httpd=${HTTPD-/usr/sbin/httpd}
Run Code Online (Sandbox Code Playgroud)

为什么不httpd=/usr/sbin/httpd呢?所有额外的语法有什么用?

-Geoffrey Lee

bash shell

0
推荐指数
1
解决办法
131
查看次数

标签 统计

.net ×1

asp-classic ×1

bash ×1

exslt ×1

git ×1

linux ×1

merge ×1

mono ×1

patch ×1

php ×1

shell ×1

xml ×1

xslt ×1