<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>雪花面包 &#187; 语言与设计</title>
	<atom:link href="https://snowbread.com/category/posts-on-home/work/c00051/feed" rel="self" type="application/rss+xml" />
	<link>https://snowbread.com</link>
	<description>just for fun</description>
	<lastBuildDate>Thu, 16 Apr 2026 07:19:33 +0000</lastBuildDate>
	<language>zh-CN</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.6.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>如何跨越不同的电脑执行程序(2)</title>
		<link>https://snowbread.com/how-to-perform-procedures-across-different-computers-2.html</link>
		<comments>https://snowbread.com/how-to-perform-procedures-across-different-computers-2.html#comments</comments>
		<pubDate>Fri, 10 Feb 2017 07:38:20 +0000</pubDate>
		<dc:creator>雪花面包</dc:creator>
				<category><![CDATA[.]]></category>
		<category><![CDATA[语言与设计]]></category>

		<guid isPermaLink="false">http://snowbread.com/how-to-perform-procedures-across-different-computers-2.html</guid>
		<description><![CDATA[<p>上一节说过我无法解决监听主机的问题，所以我决定采用另外的办法，首先我考虑了ssh或是telnet，但是win7对ssh不能够直接支持，telnet倒是支持，不过一来是明文通讯，二来用起来还是不放便，需要先登录才能控制。然后我又想到了win7上弄个http服务器，然后通过cgi脚本或php脚本的方式来执行命令，不过弄了半天还是没搞定，感觉这种http程序想要执行本地文件还是比较麻烦。</p> <p>最后还回到了nc这个命令行程序上，我发现这个程序可以实现接收消息的功能，采用命令 nc -l -p 60000 即可，这个命令执行后，会监听任何电脑发往60000端口的消息并显示在标准输出上(我测试了在苹果上使用 echo message &#124; nc destination_host_ip port 来给win7上的nc发送消息)，为了根据消息来执行不同的操作，可以将消息转发给autohotkey程序，命令如下：</p>[......]<p class='read-more'><a href='https://snowbread.com/how-to-perform-procedures-across-different-computers-2.html'>继续阅读</a></p>]]></description>
				<content:encoded><![CDATA[<p>上一节说过我无法解决监听主机的问题，所以我决定采用另外的办法，首先我考虑了ssh或是telnet，但是win7对ssh不能够直接支持，telnet倒是支持，不过一来是明文通讯，二来用起来还是不放便，需要先登录才能控制。然后我又想到了win7上弄个http服务器，然后通过cgi脚本或php脚本的方式来执行命令，不过弄了半天还是没搞定，感觉这种http程序想要执行本地文件还是比较麻烦。</p>
<p>最后还回到了n[......]</p>
<p class='read-more'><a href='https://snowbread.com/how-to-perform-procedures-across-different-computers-2.html'>继续阅读</a></p>
]]></content:encoded>
			<wfw:commentRss>https://snowbread.com/how-to-perform-procedures-across-different-computers-2.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>如何跨越不同的电脑执行程序(1)</title>
		<link>https://snowbread.com/how-to-perform-procedures-across-different-computers-1.html</link>
		<comments>https://snowbread.com/how-to-perform-procedures-across-different-computers-1.html#comments</comments>
		<pubDate>Fri, 10 Feb 2017 02:20:25 +0000</pubDate>
		<dc:creator>雪花面包</dc:creator>
				<category><![CDATA[.]]></category>
		<category><![CDATA[语言与设计]]></category>

		<guid isPermaLink="false">http://snowbread.com/how-to-perform-procedures-across-different-computers-1.html</guid>
		<description><![CDATA[<p>这个问题看起来很简单，可惜一般人没这需求，所以没有找到这种功能的软件。那就自己动手吧，不料这却是一个深坑。好吧，我网络知识比较匮乏。。</p> <p>为什么我会有这种需求呢？我电脑系统是win7的，然后用vmware装了个苹果系统，我想在vmware中操作苹果系统的时候能够一键切换win7中正在播放的歌以及调整调整win7的音量，而不是先要从虚拟机中释放控制(默认应该是按ctrl+alt)，然后才能给win7发送热键。</p> <p>很显然，要实现这种需求，最简单的方法就是通过网络来发送信号，然后由接收方解析这个信号，根据解析出的内容执行不同的程序。</p>[......]<p class='read-more'><a href='https://snowbread.com/how-to-perform-procedures-across-different-computers-1.html'>继续阅读</a></p>]]></description>
				<content:encoded><![CDATA[<p>这个问题看起来很简单，可惜一般人没这需求，所以没有找到这种功能的软件。那就自己动手吧，不料这却是一个深坑。好吧，我网络知识比较匮乏。。</p>
<p>为什么我会有这种需求呢？我电脑系统是win7的，然后用vmware装了个苹果系统，我想在vmware中操作苹果系统的时候能够一键切换win7中正在播放的歌以及调整调整win7的音量，而不是先要从虚拟机中释放控制(默认应该是按ctrl+alt)，然后才能给win7发[......]</p>
<p class='read-more'><a href='https://snowbread.com/how-to-perform-procedures-across-different-computers-1.html'>继续阅读</a></p>
]]></content:encoded>
			<wfw:commentRss>https://snowbread.com/how-to-perform-procedures-across-different-computers-1.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>子进程结束时如何返回指定的值给父进程</title>
		<link>https://snowbread.com/how-to-return-the-specified-value-at-the-end-of-the-process-to-the-parent-process.html</link>
		<comments>https://snowbread.com/how-to-return-the-specified-value-at-the-end-of-the-process-to-the-parent-process.html#comments</comments>
		<pubDate>Mon, 06 Feb 2017 09:54:32 +0000</pubDate>
		<dc:creator>雪花面包</dc:creator>
				<category><![CDATA[.]]></category>
		<category><![CDATA[语言与设计]]></category>

		<guid isPermaLink="false">http://snowbread.com/how-to-return-the-specified-value-at-the-end-of-the-process-to-the-parent-process.html</guid>
		<description><![CDATA[<p>父进程在启动子进程时向子进程传递参数这个很常见，那么子进程如何在结束时返回指定的值给父进程呢，这里我以几种常见的解释器为例做个简单的说明。</p> <p>windows中最常用的脚本软件莫过于autohotkey了(后面我简称ahk)，这里就以ahk程序为父进程，由它来调用其它程序(也就是子进程)。在ahk中要获取子进程的返回值可以使用runwait命令，这个命令在默认情况下会把子进程的返回值存储到ERRORLEVEL变量中。</p> <p>如果子进程是cmd程序，那么使用exit退出程序并在exit后面跟一个常数或者变量即可返回这个常数或者变量的值给父进程，例如 exit 5 或者 exit %num%</p>[......]<p class='read-more'><a href='https://snowbread.com/how-to-return-the-specified-value-at-the-end-of-the-process-to-the-parent-process.html'>继续阅读</a></p>]]></description>
				<content:encoded><![CDATA[<p>父进程在启动子进程时向子进程传递参数这个很常见，那么子进程如何在结束时返回指定的值给父进程呢，这里我以几种常见的解释器为例做个简单的说明。</p>
<p>windows中最常用的脚本软件莫过于autohotkey了(后面我简称ahk)，这里就以ahk程序为父进程，由它来调用其它程序(也就是子进程)。在ahk中要获取子进程的返回值可以使用runwait命令，这个命令在默认情况下会把子进程的返回值存储到ERRORL[......]</p>
<p class='read-more'><a href='https://snowbread.com/how-to-return-the-specified-value-at-the-end-of-the-process-to-the-parent-process.html'>继续阅读</a></p>
]]></content:encoded>
			<wfw:commentRss>https://snowbread.com/how-to-return-the-specified-value-at-the-end-of-the-process-to-the-parent-process.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>如何禁止静态网页被浏览器缓存</title>
		<link>https://snowbread.com/how-to-prevent-static-web-pages-cached-by-the-browser.html</link>
		<comments>https://snowbread.com/how-to-prevent-static-web-pages-cached-by-the-browser.html#comments</comments>
		<pubDate>Tue, 13 Sep 2016 03:07:33 +0000</pubDate>
		<dc:creator>雪花面包</dc:creator>
				<category><![CDATA[语言与设计]]></category>

		<guid isPermaLink="false">http://snowbread.com/how-to-prevent-static-web-pages-cached-by-the-browser.html</guid>
		<description><![CDATA[<p><s>对于很简单的静态网页，禁止其被浏览器缓存的最简是单办法就是每次服务器更新网页时使用不同的首页地址，例如，轮换使用index.htm和index.html</s></p> <p>上面那个方法实际上有问题，轮换使用会导致两种类型的首页都被缓存，而且也没有考虑到除了首页之外的页面被缓存的情况。</p> <p>在网站规模很小的情况下，最简单的办法是在网站的根目录建立一个index.php文件和一个跳转目录，将网站的文件 全部放到跳转目录内，然后设置index.php内容如下：</p>[......]<p class='read-more'><a href='https://snowbread.com/how-to-prevent-static-web-pages-cached-by-the-browser.html'>继续阅读</a></p>]]></description>
				<content:encoded><![CDATA[<p>对于很简单的静态网页，禁止其被浏览器缓存的最简是单办法就是每次服务器更新网页时使用不同的首页地址，例如，轮换使用index.htm和index.html</p>
<p>上面那个方法实际上有问题，轮换使用会导致两种类型的首页都被缓存，而且也没有考虑到除了首页之外的页面被缓存的情况。</p>
<p>在网站规模很小的情况下，最简单的办法是在网站的根目录建立一个index.php文件和一个跳转目录，将网站的文件 全部放到跳转目录内，[......]</p>
<p class='read-more'><a href='https://snowbread.com/how-to-prevent-static-web-pages-cached-by-the-browser.html'>继续阅读</a></p>
]]></content:encoded>
			<wfw:commentRss>https://snowbread.com/how-to-prevent-static-web-pages-cached-by-the-browser.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>如何在网页中嵌入代码段</title>
		<link>https://snowbread.com/how-to-embed-snippet-in-the-page.html</link>
		<comments>https://snowbread.com/how-to-embed-snippet-in-the-page.html#comments</comments>
		<pubDate>Mon, 08 Aug 2016 03:10:21 +0000</pubDate>
		<dc:creator>雪花面包</dc:creator>
				<category><![CDATA[.]]></category>
		<category><![CDATA[语言与设计]]></category>

		<guid isPermaLink="false">http://snowbread.com/testgg.html</guid>
		<description><![CDATA[<p>首先看你是想嵌入外部代码段还是本地代码段。 <hr />  </p><p>嵌入外部代码段本质就是嵌入外部网页，参见<br /><a href="http://holy2010.blog.51cto.com/1086044/322035">如何将一个HTML页面嵌套在另一个页面中 - Holy - 51CTO技术博客</a> </p><p>嵌入外部代码段最简单的方式是使用js脚本，例如可以使用gist.github.com提供的js脚本。具体方法就将从gist获得的脚本代码插入到htm文件中即可。 </p><p>嵌入外部代码段的优点在于当外部代码段修改时嵌入外部代码段的本地网页不必修改。另外，无需操心代码的字体，着色等格式问题(例如引用gist的代码段)。</p>[......]<p class='read-more'><a href='https://snowbread.com/how-to-embed-snippet-in-the-page.html'>继续阅读</a></p>]]></description>
				<content:encoded><![CDATA[<p>首先看你是想嵌入外部代码段还是本地代码段。<br />
<hr /></p>
<p>嵌入外部代码段本质就是嵌入外部网页，参见<br /><a href="http://holy2010.blog.51cto.com/1086044/322035">如何将一个HTML页面嵌套在另一个页面中 - Holy - 51CTO技术博客</a> </p>
<p>嵌入外部代码段最简单的方式是使用js脚本，例如可以使用gist.github.com提供的js脚本。具体方法就将从gist获得的脚本代码插入到htm文件中即可。 </p>
<p>嵌入外部代码段的优点在于当外部代码段修改时嵌入外部代码段的本地网页不必[......]</p>
<p class='read-more'><a href='https://snowbread.com/how-to-embed-snippet-in-the-page.html'>继续阅读</a></p>
]]></content:encoded>
			<wfw:commentRss>https://snowbread.com/how-to-embed-snippet-in-the-page.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>keil c51 静态变量初始化问题</title>
		<link>https://snowbread.com/keil_c51_static_variable_init.html</link>
		<comments>https://snowbread.com/keil_c51_static_variable_init.html#comments</comments>
		<pubDate>Sun, 08 Dec 2013 03:05:00 +0000</pubDate>
		<dc:creator>雪花面包</dc:creator>
				<category><![CDATA[.]]></category>
		<category><![CDATA[语言与设计]]></category>

		<guid isPermaLink="false">http://snowbread.com/2013/12/keil_c51_static_variable_init.html</guid>
		<description><![CDATA[<p>参考资料<br /><a href="http://www.wendangdaquan.com/Wdshow.asp?id=c7cdc1d2240c844769eaeeaf" target="_blank">keil C51–在main__之前到底做了什么(静态变量的初始化问题)</a></p> <p> <hr /> 看过上面的资料大家就应该明白了，keil c51中静态变量的初始化是由INIT.A51这个文件完成的，但keil没有显示的添加这个文件，而是使用的库文件。]]></description>
				<content:encoded><![CDATA[<p>参考资料<br /><a href="http://www.wendangdaquan.com/Wdshow.asp?id=c7cdc1d2240c844769eaeeaf" target="_blank">keil C51–在main__之前到底做了什么(静态变量的初始化问题)</a></p>
<p>
<hr /> 看过上面的资料大家就应该明白了，keil c51中静态变量的初始化是由INIT.A51这个文件完成的，但keil没有显示的添加这个文件，而是使用的库文件。</p>
]]></content:encoded>
			<wfw:commentRss>https://snowbread.com/keil_c51_static_variable_init.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>keil c51中使用pc-lint</title>
		<link>https://snowbread.com/pc-lint-keil.html</link>
		<comments>https://snowbread.com/pc-lint-keil.html#comments</comments>
		<pubDate>Thu, 12 Sep 2013 12:33:59 +0000</pubDate>
		<dc:creator>雪花面包</dc:creator>
				<category><![CDATA[.]]></category>
		<category><![CDATA[语言与设计]]></category>

		<guid isPermaLink="false">http://snowbread.com/?p=641</guid>
		<description><![CDATA[总是担心把if语句判断条件中等于号写成赋值号，keil c51检测的效果不是很好，于是想到了pc-lint，这个软件能很好的检测出我前面所说的那个问题。

在keil中设置pc-lint的方法
μVision4 User's Guide: Running PC-Lint
<a href="http://www.keil.com/support/man/docs/uv4/uv4_ut_running_pc_lint.htm" target="_blank">http://www.keil.com/support/man/docs/uv4/uv4_ut_running_pc_l[......]</a><p class='read-more'><a href='https://snowbread.com/pc-lint-keil.html'>继续阅读</a></p>]]></description>
				<content:encoded><![CDATA[<p>总是担心把if语句判断条件中等于号写成赋值号，keil c51检测的效果不是很好，于是想到了pc-lint，这个软件能很好的检测出我前面所说的那个问题。</p>
<p>在keil中设置pc-lint的方法<br />
μVision4 User's Guide: Running PC-Lint<br />
<a href="http://www.keil.com/support/man/docs/uv4/uv4_ut_running_pc_lint.htm" target="_blank">http://www.keil.com/support/man/docs/uv4/uv4_ut_running_pc_l[......]</a>
<p class='read-more'><a href='https://snowbread.com/pc-lint-keil.html'>继续阅读</a></p>
]]></content:encoded>
			<wfw:commentRss>https://snowbread.com/pc-lint-keil.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>keil c51编译器指向函数的指针</title>
		<link>https://snowbread.com/function_pointers_in_c51.html</link>
		<comments>https://snowbread.com/function_pointers_in_c51.html#comments</comments>
		<pubDate>Tue, 27 Aug 2013 07:38:20 +0000</pubDate>
		<dc:creator>雪花面包</dc:creator>
				<category><![CDATA[.]]></category>
		<category><![CDATA[语言与设计]]></category>

		<guid isPermaLink="false">http://snowbread.com/?p=545</guid>
		<description><![CDATA[<p>参考资料<br /><a href="http://www.keil.com/appnotes/files/apnt_129.pdf" target="_blank">keil应用笔记Application Note 129之c51函数指针的使用 Function Pointers in C51</a><br /></p> <p> <hr /> 指向函数的指针系统编译时无法确定 call tree，即使按照上面参考资料里面说的“As long as the function pointer table is located in a separate source file, C51 and BL5[......]</p><p class='read-more'><a href='https://snowbread.com/function_pointers_in_c51.html'>继续阅读</a></p>]]></description>
				<content:encoded><![CDATA[<p>参考资料<br /><a href="http://www.keil.com/appnotes/files/apnt_129.pdf" target="_blank">keil应用笔记Application Note 129之c51函数指针的使用 Function Pointers in C51</a></p>
<p>
<hr /> 指向函数的指针系统编译时无法确定 call tree，即使按照上面参考资料里面说的“As long as the function pointer table is located in a separate source file, C51 and BL5[......]</p>
<p class='read-more'><a href='https://snowbread.com/function_pointers_in_c51.html'>继续阅读</a></p>
]]></content:encoded>
			<wfw:commentRss>https://snowbread.com/function_pointers_in_c51.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>keil c51中的右移运算符的使用注意</title>
		<link>https://snowbread.com/c_right_shift_operator.html</link>
		<comments>https://snowbread.com/c_right_shift_operator.html#comments</comments>
		<pubDate>Sun, 11 Aug 2013 12:50:10 +0000</pubDate>
		<dc:creator>雪花面包</dc:creator>
				<category><![CDATA[.]]></category>
		<category><![CDATA[语言与设计]]></category>

		<guid isPermaLink="false">http://snowbread.com/?p=469</guid>
		<description><![CDATA[<div><span style="color: #444444;">具体遇到的问题如下： </span>&#160;

<span style="color: #444444;">假设有一个函数(函数原型为unsigned char test(void);)，然后假设调用此函数的返回值是0xFF，然后执行如下语句：</span>
<div>temp=(test()&#60;&#60;4)&#62;&#62;4;
预期的结果应该是temp=0x0F，但实际上我得到的结果是0xFF（视编译器优化级别的不同可能不一定是这个值）&#160;

那么如何才能得到预期[......]</div></div><p class='read-more'><a href='https://snowbread.com/c_right_shift_operator.html'>继续阅读</a></p>]]></description>
				<content:encoded><![CDATA[<div><span style="color: #444444;">具体遇到的问题如下： </span>&nbsp;</p>
<p><span style="color: #444444;">假设有一个函数(函数原型为unsigned char test(void);)，然后假设调用此函数的返回值是0xFF，然后执行如下语句：</span></p>
<div>temp=(test()&lt;&lt;4)&gt;&gt;4;<br />
预期的结果应该是temp=0x0F，但实际上我得到的结果是0xFF（视编译器优化级别的不同可能不一定是这个值）&nbsp;</p>
<p>那么如何才能得到预期[......]</p></div>
</div>
<p class='read-more'><a href='https://snowbread.com/c_right_shift_operator.html'>继续阅读</a></p>
]]></content:encoded>
			<wfw:commentRss>https://snowbread.com/c_right_shift_operator.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
