Sunday, December 17, 2006

不能被删除或创造的档案和目录

 不能被删除或创造的档案和目录

2006-12-15 12:22:00

在微软系统,CON,PRN,AUX,NUL,COM1和LPT1等等名字都是reserved word。
因此,用这些名字命名档案或目录是不被允许的。。。

慢着,真的不能删除或创造以这些reserved word命名的档案吗?
答案是否定的。。。

利用window explorer来完成


失败了。。。

利用cmd (command prompt)来完成

又不能。。。

换个方式。。。

成功的创造出con目录和con文本档案。。。

利用window explorer删除con目录和con文本档案

也不能。。。

再用cmd (command prompt)删除

成功的删除。。。

如何在 .NET 2.0 framework 执行 .NET 1.0 的程序??

在正常的情况下,如果你用vs 2003编写程序,你就必须在deploy的machine里安装 .NET 1.0 framework。下次,你用了vs 2005,那么在deploy的machine你又得安装 .NET 2.0 framework。

这么多 .NET framework 难道不可以共用吗?如果 .NET 1.0 framework 下载不到,那么你的 .NET 1.0 的程序不是不可以用了吗??

今天,上网找资料时,无意中让我找到在 .NET 2.0 framework 执行 .NET 1.0 程序的方法。。。也就是说,即使未来,你安装的是 .NET 3.0 framework,没有安装 .NET 1.0 framework,你编写的 .NET 1.0 也可以执行。


原文:https://blogs.msdn.com/davidklinems/archive/2004/08/03/207372.aspx

How do I force my NetCF v1 application to run against NetCF v2?

In my “NetCF v2 now supports NTLM” post, I mentioned that the 3 ways to gain NTLM support with existing code are:

1. Building your application against the v2 beta
2. Uninstall v1 from your device (not possible on PPC 2003 devices, as v1 is installed in ROM)
3. Construct an application configuration file for your executable, instructing it to run against the
v2 beta

Option number 3 sparked a few questions. Hopefully, this post will help answer those questions.

To force your NetCF v1 application to run against NetCF v2, whether or not v1 is installed on the device (either in RAM or ROM), all you need is a simple XML file in the following format:

<configuration>
<startup>
<supportedRuntime version=“v2.0.4135“/>
</startup>
</configuration>


This file must be named as follows: .exe.config. For example, if my executable is simpletest.exe, the name of the configuration file must be simpletest.exe.config. Place the file in your application's folder on the device and you'll be running on NetCF v2.

Please note the last number in the version string. This value must match the exact build number of NetCF v2 for this to work. The value 4135 is the correct build number for NetCF v2 beta1.

One thing I like to do, to help me verify that I have created the configuration file correctly is to display the runtime version somewhere in my application (ex: the About box). To do this, create a label control and assign the runtime version to the Text property as shown below:

runtimeVersionLabel.Text = System.Environment.Version.ToString()

If you do not see “2.0.4135“, you are not running against the NetCF v2 beta. Most likely, this is due to a type-o in your configuration file or that the file cannot be located (copied to the wrong folder, misnamed, etc).

Hope this helps!
--DK

Disclaimers:This posting is provided "AS IS" with no warranties, and confers no rights.Some of the information contained within this post may be in relation to beta software. Any and all details are subject to change.

Published Tuesday, August 03, 2004 3:11 PM by DavidKlineMS
Filed under: ,

奇怪的algorithm???

先玩个游戏。。。开启notepad,在notepad输入以下的句子。
bush hid the facts
(不要在句子前后输入任何东西,包括)

打完之后,储存然后关闭,再打开。。。你看到什么??格子对吗??
(不同的电脑设定,可能看到中文字)

现在,把那些格子擦掉,重新输入刚才的句子。
再储存,关闭然后再打开。。。
现在,整行句子出来了??

为什么这样呢??大家一起猜猜看吧。