Steam 打造一个操作系统 – SteamOS

数千款游戏,数千万用户,你所爱的 Steam 的一切。      专为电视和客厅设计的免费操作系统即将到来。

Steam 即将迎来一个新的操作系统

在我们试着将 Steam 带入客厅的过程中,我们得出了一个结论:对用户来说最有价值最适合的方式就是围绕 Steam 打造一个操作系统。SteamOS 包括了 Linux 的金牌架构以及为大屏幕模式设计的游戏体验。很快这将会成为专为客厅设备打造的独立免费操作系统。

Steam 与客厅

终于,您无需为了在大屏幕模式下玩而放弃您喜爱的游戏,您线上的好友,以及那些您喜爱的 Steam 功能。SteamOS,可在任意客厅设备上运行,它能让您体验到最好的游戏以及最好的用户生产内容。

快进

在 SteamOS 中,我们在图像处理上取得了显著的进步,并且我们现在还正致力于操作系统层面的音频表现力和输入延迟优化。游戏开发者们在使用 SteamOS 发布他们的游戏时,就已经从这些优化中受益了。

合作系统

Steam 不是一个单向的内容发布频道,而是一个多对多的集成娱乐平台,在这里每个参与者都是其他所有人体验的一部分。有了 SteamOS,“开放性”被赋予了新的含义,这意味着硬件行业在客厅的迭代已经开始,并且前进的速度前所未有的快。内容的提供者们可以直接和他们的用户关联。用户可以随意更改或替换硬件和软件的任何一部分。游戏玩家被赋予了加入他们所热爱的游戏的设计的权利。SteamOS 将会不断进化,然而不变的是创造一个可以培养这一系列革新的大环境。

Steam 专为客厅打造的四项新功能

即将在 SteamOS 和 Steam 客户端上线

家用流式传输

您可以在您的 SteamOS 设备上玩您在 Windows 和 Mac 下的所有游戏。只需要打开您现在的电脑,启动 Steam——然后您的 SteamOS 设备就能将这些游戏通过您的家庭网络直接推送到您的电视机上!

音乐、电视、电影

我们在和您所熟知和喜爱的多家媒体合作。很快我们就会使其上线,让您可以通过 Steam 和 SteamOS 获取您最喜爱的音乐和视频。

家庭分享

在过去,和家庭成员一起分享 Steam 游戏很难。现在您可以和您所爱的人分享您所爱的游戏了!家庭分享能让您和家里其他成员轮流玩对方的游戏,同时为您自己的 Steam 账号赢得成就,还能通过 Steam 云将您自己的游戏进度保存到自己的账户上。

家庭选项

客厅是家庭领地。这很棒,但您可能不想在自己的库中看到您父母的游戏。很快,家庭成员将能够控制每个人所看到的游戏内容,同时还有更多的新功能来让家庭中的每个人都能将自己的 Steam 库物尽其用。

SteamOS 的核心就是 Steam 上您所喜爱的一切。

您爱的所有游戏

SteamOS 已经原生支持上百款游戏佳作。在未来几周内请留意有关所有 3A 级大作即将在 2014年原生登陆 SteamOS 消息。通过家用流式传输将可访问 Steam 上所有将近 3000 个游戏以及电脑软件。

超过五千万好友

Steam 用户是 Steam 乐趣横生的关键。结识新朋友,加入游戏群,组成战队,游戏内聊天并一起游戏,您最喜欢的游戏的核心活动,一并囊括。

创意工坊

Steam 用户的创意是推动创意工坊形成的力量——您获取附加内容的一站式商店。在这里您可以设计、发掘和下载无尽的顶级品质的用户创造内容。

跨平台云系统

无缝内容传递,无需担心的大容量和自动更新一切。随意切换设备并继续上次游戏,甚至您的个人喜好设置,Steam 云都为您想到了。

持续升级

从 2003 年开始 Steam 本身就一直在不断地进化升级。SteamOS 不仅仅会直接从开发者处获取最新的最有价值的游戏更新,还将不断地为自身加入新的功能。

全球化

Steam 已登陆 185 个国家并被翻译成了 25 种语言。作为一个真正的国际平台,Steam,还有现在的 SteamOS,为用户带去无国界的娱乐体验。

下载即将可用。永久免费!

SteamOS 很快就将作为一个开源操作系统对用户和制造商开放免费下载。请留意接下来的日子里我们发布的更多信息。

http://store.steampowered.com/livingroom/SteamOS/

下载地址

http://store.steampowered.com/steamos/

http://store.steampowered.com/steamos/download/?ver=custom

http://repo.steampowered.com/download/

Free GNU/Linux distributions | 免费的 GNU/Linux 发行版

th0

Free GNU/Linux distributions

(免费的 GNU/Linux 发行版)

http://www.gnu.org/distros/free-distros.html

popular nonfree GNU/Linux distributions

(流行的私有 GNU/Linux 发行版)

http://www.gnu.org/distros/common-distros.html

—————————————————————

以下来自: (http://deviantdark.deviantart.com/art/Powered-by-GNU-Linux-82766279)

ArchLinux
Debian
Fedora
Foresight
Gentoo
Kubuntu
Mandriva
Linux Mint
openSUSE
PCLinuxOS
Red Hat
Sabayon
Slackware
Slax
Ubuntu
Xubuntu

——————————————————————————–

以下来自: (http://www.gnu-linux.net/)

                  |    o                         |
,---.,---..   .   |    .,---..   ..  , ,---.,---.|---
|   ||   ||   |---|    ||   ||   | ><  |   ||---'|
`---|`   '`---'   `---'``   '`---''  `o`   '`---'`---'
`---'
Get Archlinux Get Debian Get Fedora
Get Gentoo Get Knoppix Get Kubuntu
Get Mandriva Get OpenSuSE Get Red Hat
Get Slackware Get SuSE Get Ubuntu
Get Yellow Dog linux.org

All logos and trademarks on this site are property of their respective owner

Linux is a registered trademark by Linus Torvalds

使用”index of”寻找资源入口

index of rmvb mp3 rm 突破网站入口下载

首先打开http://www.baidu.com,在关键词输入框中输入index of mp3,选择回车搜索,得到了一些网页,不要以为这是一些普通的页面,其实它们是一些mp3网站的资源列表,点击打开它来看看,怎么样?是不是所有资源一收眼底了?
以下是百度搜索排名
1. index of mpeg4
3. index of mp3
4. index of cnki
5. index of rmvb
6. index of rm
7. index of movie
8. index of swf
9. index of jpg
10. index of admin
12. index of pdf
13. index of doc
14. index of wmv
15. index of mdb
16. index of mpg
17. index of mtv
18. index of software
19. index of mov
20. index of asf
23. index of lib
24. index of vod
25. index of rar
27. index of exe
28. index of iso
29. index of video
30. index of book
31. index of soft
32. index of chm
33. index of password
34. index of game
35. index of music
36. index of dvd
37. index of mid
38. index of ebook
40. index of download
到这里,大家也许都明白了,其实就是”index of /”这个关键词在起的作用,使用它可以直接进入网站首页下的所有文件和文件夹中,不必在通过HTTP的网页形式了,从而避免了那些网站的限制,作到了突破限制下载
首先打开Google,在关键词输入框中输入”index of/”inurl:lib(双引号为英文状态下),选择“搜索简体中文网页”选项,回车搜索,得到了一些网页,不要以为这是一些普通的页面,其实它们是 一些图书网站的资源列表,点击打开它来看看,怎么样?是不是所有资源一收眼底了?
使用其他关键字可能得到更多的资源:
在搜索框上输入:index of /cnki
再按搜索你就可以找到许多图书馆的CNKI、VIP、超星等入口!
在搜索框上输入:index of / ppt
再按搜索你就可以突破网站入口下载powerpint作品!
f中国Flash技术中心–技术论坛在搜索框上输入:index of /mp3
再按搜索你就可以突破网站入口下载mp3、rm等影视作品!

在搜索框上输入:index of /swf

再按搜索你就可以突破网站入口下载flash作品!

index of /加上要下载的软件
在搜索框上输入:index of /AVI

再按搜索你就可以突破网站入口下载AVI视频

你会找到什么呢?同理,把AVI换为MPEG看看又会找到什么呢?呵呵!接下来不用我再教了吧?那就试一下你的手气吧!
index of /RMVB
index of /MTV
index of /MPEG
到这里,大家也许都明白了,其实和百度一样。

[源: http://www.wlzix.com/?post=6]

了解 URI, URL, and URN

url-300x197

  • URI:Uniform Resource Identifier,统一资源标识符;(RFC 3986)
  • URL:Uniform Resource Locator,统一资源定位符;(RFC 1738
  • URN:Uniform Resource Name,统一资源名称。(RFC 1737

URI可被视为定位符(URL),名称(URN)或两者兼备。统一资源名(URN)如同一个人的名称,而统一资源定位符(URL)代表一个人的住址。换言之,URN定义某事物的身份,而URL提供查找该事物的方法。

用于标识唯一书目的ISBN系统是一个典型的 URN 使用范例。例如,ISBN 0-486-27557-4(urn:isbn:0-486-27557-4)无二义性地标识出莎士比亚的戏剧《罗密欧与朱丽叶》的某一特定版本。

为获得该资源并阅读该书,人们需要它的位置,也就是一个 URL 地址。在类Unix操作系统中,一个典型的URL地址可能是一个文件目录,例如file:///home/username/RomeoAndJuliet.pdf。该URL标识出存储于本地硬盘中的电子书文件。因此,URL和URN有着互补的作用。

URL方案分类图。URL(定位符)和URN(名称)方案属于URI的子类,URI可以为URL或URN两者之一或同时是URI和URN。技术上讲,URL和URN属于资源ID;但是,人们往往无法将某种方案归类于两者中的某一个:所有的URI都可被作为名称看待,而某些方案同时体现了两者中的不同部分。


URI 标准

RFC3986,即“Uniform Resource Identifier (URI):Generic Syntax”,是一个 Internet Standard。 Request for Comments (RFC) 系列是著名的档案式文档系列,该系列构成了 Internet Engineering Task Force (IETF) 标准过程的主干。 在数以千计的 RFC 中,只有很少的部分,比如   TCP (RFC793) 以及 Internet Mail 格式 (RFC821) 和协议 (RFC822), 提高了整个 Internet Standard 的发展水平。 RFC3986 在  2005 年 1 月也提高了这个水平。

按照 URI 标准,上面的第一个例子 —— http://www.cisco.com/en/US/partners/index.html —— 实际上是一个 URI,并且它由以下几个组成部分:

th

  • 方案名 (http)

url(uniformresourcelocator)

  • 域名 (www.cisco.com)
  • 路径 (/en/US/partners/index.html)

thCA1OQ0FA

IETF 达成共识,共同管理该方案。Official IANA Registry of URI Schemes(请参阅 参考资料)中包括一些大家所熟悉的方案,如 httphttpsmailto,还有其他许多您可能熟悉或不熟悉的方案。

URI 路径像一个典型的文件路径名。URI 按照 UNIX® 的惯例采用了正下划线 (a/b/c),因为在 20 世纪 80 年代后期设计 URI 的时候, 在 Internet 上, UNIX 文化比 PC 文化更流行。正是那个时候,出现了几个用于访问远程文件的流行表示法。其中一个是 Ange-ftp, 它是用来编辑远程文件的 emacs 的一个扩展。它用路径名将主机名和用户名结合起来,以获取像/jbrown@freddie.ucla.edu:~mblack/这样的结果。为了跨机器进行命名,为 Web 开发的 URI 语法(按照非标准的 Apollo Domain UNIX)使用了双下划线符号,但是它也引入了方案语法,这样,来自许多不同协议的命名约定得到了统一。其中的一些例子有:

  • mailto:mbox@domain
  • ftp://host/file
  • http://domain/path

这里介绍的第二个例子是 www.yahoo.com/sports,它不是一个真正的 URI。 它是对 http://www.yahoo.com/sports 的一种方便的简写,是一种受流行的 Web 浏览器用户界面  (UI) 支持的格式。然而,不要再犯在 XSLT 中遗漏方案这样的错误,如下所示:

<xsl:include href="exslt.org/math/min/math.min.template.xsl" />

因为它将不会按照您期望的那样工作,除非您真的 在 XSLT 样式表之后引用 exslt.org 目录中的一个文件。XSLT 的 href 属性采用了一个 URI 引用,它可能是绝对引用,也可能是相对引用。以一个方案和一个冒号开始的 URI 引用是绝对引用;否则,该引用就是相对引用。相对的 URI 引用更像一个文件路径。例如,../noarch/config.xsd 也是一个相对的 URI 引用。

国际化的资源标志符

HTML 中的 href 属性采用了 URI 引用,这样讲有些过于简单。URI 和 URI 引用都是从有限的 ASCII 字符集合中得出的,并且 HTML 比它们更加国际化。事实上,对遵循 RFC3986 的注释的请求是符合 RFC3987 标准,即 Internationalized Resource Identifiers (IRI) 标准(请参阅 参考资料)。此规范在 IETF 标准化过程中没有它的前辈走的远,但是技术本身已是相当成熟,并被广泛部署。除了能够使用所有 Unicode 字符,而不是仅仅能够使用 ASCII 字符之外,IRI 和 URI 是完全一样的。像 URI一样,每个 IRI 都有一个相应的编码,以防需要在只接受 URI 的协议(比如 HTTP)中使用 IRI。

用 xml:base 重写基本 URI

通常, URI 引用与在哪种文档中发现它有关。如果使用基本 URI http://exslt.org/math/min/math.min.template.xsl 查看一个文档,并看到了一个 URI 引用 ../../random/random.xml,那么引用将扩展为 http://exslt.org/random/random.xml。在 HTML 中,您可以把一个 base 元素放在文档顶端来重写基本 URI。XML Base 规范(请参阅 参考资料)在 XML 中也提供了同样的功能。

考虑一个既可以用 file:/my/doc 访问也可以用 http://my.domain/doc 访问的文档。通常,当通过文件系统访问文档时,您可能希望这些引用像 #part2 那样扩展为 file:/my/doc#part2;而通过 HTTP 访问文档时,您可能希望 #part2 扩展为 http://my.domain/doc#part2。但是在 Resource Description Framework (RDF) 模式中,为了使一些组件正常工作,展开的形式必须保持不变。 XML Base 使这种扩展变得容易(参见清单 1)。

清单 1. RDF 中的展开形式

				
<rdf:RDF
  xmlns="&owl;"
  xmlns:owl="&owl;"
  xml:base="http://www.w3.org/2002/07/owl"
  xmlns:rdf="&rdf;"
  xmlns:rdfs="&rdfs;"
>
...
    <Class rdf:about="#Nothing"/>

在这个例子中,无论您是在哪里找到的那个文件,#Nothing 引用均被扩展为 http://www.w3.org/2002/07/owl#Nothing

好了,关于 URI、IRI 和 URI 引用的介绍就到此结束了。

URL 和 URN

设计 URI 的目的是让它起到名称和定位器的作用。当 IETF 用它们实现标准化的时候,它们就成了通常所说的 Uniform Resource Locators,并且另一项关于 Uniform Resource Names 的独立的工作也已经开始了。

对于 Internet 主机,名称和位置都有单独的标准。主机名和域名有相同的语法(例如,zork1.example.edu)。这些主机名通过 Domain Name System (DNS) 协议和类似 192.168.300.21 的地址相连。当主机改变了在网络中的位置或重新编号之后,这种间接的做法允许主机保留其名称。

Web 中偶尔中断的链接使 Web 地址从外观上看更像是一个位置,而不是一个名称,并且在 IEIF 社区中也出现了不同的观点:

  • URI:RFC1630,发布于 1994 年 6 月,被称为“Universal Resource Identifiers in WWW: A Unifying Syntax for the Expression of Names and Addresses of Objects on the Network as used in the World-Wide Web”(请参阅 参考资料)。它是一个Informational RFC  —— 也就是说,它没有获得社区的任何认可。
  • URL:RFC1738,发布于 1994 年 12 月, 被称为“Uniform Resource Locators”(请参阅 参考资料)。它是一个 Proposed Standard —— 也就是说,它是一个共识过程的结果,虽然它还没有经过测试,并成熟到足以成为一个完整的 Internet Standard。
  • URN:RFC1737,发布于 1994 年 12 月,被称为“Functional Requirements for Uniform Resource Names”(请参阅 参考资料)。

1997 年,紧随 Proposed Standard RFC2141(即 URN Syntax)之后发布了 RFC1737,它指定了另一个方案 —— urn: —— 来加入 http:ftp:和其他协议中。

最终的 URI Standard (RFC3986) 在 1.1.3 小节“URI, URL, and URN”中澄清了这一区别:

URI 可以进一步分为定位器、名称,或者二者兼具。术语“Uniform Resource Locator” (URL) 涉及的是 URI 的子集,除识别资源外,它还通过描述其最初访问机制(比如它的网络“位置”)来提供定位资源的方法。 术语“Uniform Resource Name” (URN) 在历史上曾用于引用“urn”方案 [RFC2141] 下的 URI,这个 URI 需要是全球惟一的,并且在资源不存在或不再可用时依然保持不变,对于其他任何拥有名称的一些属性的 URI,都需要使用这样的 URI。

对于单独的方案,没有必要将其分为仅仅是一个 “名称”或者是一个“定位器”。 来自任意特定方案的 URI 实例可能有名称或定位器的特征,或两者兼而有之, 这通常取决于标识符分配中的持久性和命名机构对其关注程度, 而不取决于其他方案的质量。未来的规范和相关的文档应当使用通用术语“URI”,而不是使用有更多限制的条目“URL”和“URN” [RFC3305]。

http://www.ibm.com/developerworks/cn/xml/x-urlni.html

 

附录(梳理归类):

其中,URL,URN是URI的子集,其区别如下: Web上地址的基本形式是URI,它代表统一资源标识符,有两种形式: URL:目前URI的最普遍形式就是无处不在的URL或统一资源定位器。 URN:URL的一种更新形式,统一资源名称(URN, Uniform Resource Name)不依赖于位置,并且有可能减少失效连接的个数。但是其流行还需假以时日,因为它需要更精密软件的支持。

参考:http://www.cnlei.org/blog/article.asp?id=356

URN 站点 : http://purl.org/ | http://www.doi.org/demos.html

 

[文章部分内容引用地址] :

http://blog.sina.com.cn/s/blog_5c4a1a800100gxke.html

[分清 URI、URL 和 URN] http://www.ibm.com/developerworks/cn/xml/x-urlni.html

 

P.S. :  http://,https://,mms://,ftp://,rtsp://,ssl://,sftp://,pnm://,rtmp://等协议, 又如 thunder迅雷 , flashget快车 &&QQ旋风等.

thunder://类似的协议是base64编码加密。

 

Special-Use Domain Names

  • Created

2012-07-06

  • Last Updated

2013-02-21

Special-Use Domain Names

Registration Procedure(s)
Standards Action and IESG Approval
Reference
[RFC6761]
Note
The "Special Use" designation applies to both the listed domains and their subdomains.
Alternative Formats
CSV      Plain text
Name Reference
10.in-addr.arpa. [RFC6761]
16.172.in-addr.arpa. [RFC6761]
17.172.in-addr.arpa. [RFC6761]
18.172.in-addr.arpa. [RFC6761]
19.172.in-addr.arpa. [RFC6761]
20.172.in-addr.arpa. [RFC6761]
21.172.in-addr.arpa. [RFC6761]
22.172.in-addr.arpa. [RFC6761]
23.172.in-addr.arpa. [RFC6761]
24.172.in-addr.arpa. [RFC6761]
25.172.in-addr.arpa. [RFC6761]
26.172.in-addr.arpa. [RFC6761]
27.172.in-addr.arpa. [RFC6761]
28.172.in-addr.arpa. [RFC6761]
29.172.in-addr.arpa. [RFC6761]
30.172.in-addr.arpa. [RFC6761]
31.172.in-addr.arpa. [RFC6761]
168.192.in-addr.arpa. [RFC6761]
254.169.in-addr.arpa. [RFC6762]
8.e.f.ip6.arpa. [RFC6762]
9.e.f.ip6.arpa. [RFC6762]
a.e.f.ip6.arpa. [RFC6762]
b.e.f.ip6.arpa. [RFC6762]
example. [RFC6761]
example.com. [RFC6761]
example.net. [RFC6761]
example.org. [RFC6761]
invalid. [RFC6761]
local. [RFC6762]
localhost. [RFC6761]
test. [RFC6761]

DistroWatch上的中国Linux发行版

DistroWatch.com – Search Distributions – Country of origin  : CHINA

[ 受欢迎程度排名 截止至 2013-04-18 ]

The following distributions match your criteria (sorted by popularity):

1. Linux Deepin (受欢迎程度排名: 76)

deepin

Linux Deepin


Linux Deepin(最初叫做Hiweed GNU/Linux)是一份易于使用的基于Ubuntu的中文发行。其特性包括预配置好的中文应用软件及工具,例如中文输入法、LibreOffice办公套件、汉英和英汉字典、以及中文TrueType字体。它还供应一份高度定制的GNOME 3桌面和大量可用性方面的增强。

Linux Deepin (formerly Hiweed GNU/Linux) is an easy-to-use Chinese distribution based on Ubuntu. Its features include pre-configured Chinese applications and tools, such as Chinese input method, the LibreOffice office suite, Chinese-English and English-Chinese dictionaries, and Chinese TrueType fonts. It also delivers a highly customised GNOME 3 desktop and a large number of usability enhancements.

2. UbuntuKylin (受欢迎程度排名: 159)

ubuntukylin

UbuntuKylin


UbuntuKylin是Ubuntu正式的子项目,其宗旨是创建一份Ubuntu的变体,以更适合使用简体中文写作系统的华人用户。该项目提供精巧的、考虑周到的、完全定制的、开箱即用的中文用户体验,而这靠一份进行了简体中文本地化的桌面用户环境及广大中文用户喜爱的软件来提供。 UbuntuKylin is an official Ubuntu subproject whose goal is to create a variant of Ubuntu that is more suitable for Chinese users using the Simplified Chinese writing system. The project provides a delicate, thoughtful and fully customised Chinese user experience out-of-the-box by providing a desktop user interface localised into Simplified Chinese and with software generally preferred by many Chinese users.

3. StartOS (受欢迎程度排名: 182)

startos

StartOS


起点操作系统是一份独立的中文Linux发行,它采用了改造的GNOME桌面从而看起来很像Microsoft Windows XP。起先它基于Ubuntu,但从4.0版本开始它采用了自己的包管理工具(称为YPK)和安装程序,尽管其低层的自启动运行媒质依然是使用Ubuntu的Casper工具创建。

StartOS is an independent Chinese Linux distribution with the GNOME desktop tweaked to resemble Microsoft Windows XP. In the beginning it was based on Ubuntu, but starting from version 4.0 it adopted custom package management (called YPK) and system installer, though the underlying live medium is still built using Ubuntu’s Casper tool.

4. CDlinux (受欢迎程度排名: 215)

cdlinux

CDlinux


CDlinux是一份紧凑的Linux迷你发行。它包含了最新的Linux内核、X.Org、Xfce窗口管理器,以及很多流行应用程序。它的国际化/本地化程度很好,并且用户可配置性很高。     CDlinux is a compact Linux mini-distribution. It ships with an up-to-date version of the Linux kernel, X.Org, Xfce window manager, and many popular applications. It has good internationalisation and locale support, and is highly user-configurable.

5. Red Flag Linux (受欢迎程度排名: 247)

redflag

Red Flag Linux


红旗软件有限公司(简称红旗软件)由中国科学院软件研究所和上海联创投资管理有限公司共同组建。我们专注于基于Linux的操作系统的开发和市场,以及面向不断增长的中文技术用户的多平台应用软件。我们的目标是“为网络生活注入活力”。公司将持续发展我们称之为“红旗方式”的一套现代管理模式。这是客户驱动的用户化,它以我们进行自由软件开发的企业模式为基础。

Red Flag Software Co., Ltd. (Red Flag Software) was founded by Software Research Institute of the Chinese Academy of Sciences and NewMargin Venture Capital. We are focused on the development and marketing of Linux-based operating systems and application software on multiple platforms for the constantly growing base of Chinese technology users. Our goal is “Creating Incentives for Networking Life.” The company will continue to develop a modern management pattern we call the “Red Flag Way.” This is client driven customization based on our business model involving free software.

6. Qomo Linux (受欢迎程度排名: 292)

qomo

Qomo Linux


Qomo Linux是一份由Red Flag Linux开发的中文发行,它按社区项目来进行管理(其模式类似于Red Hat的Fedora, 或Novell的openSUSE)。其主要特色在于用户友好的桌面,极好的硬件检测,对简体中文的完整支持,以及为期六个月的发布周期。

Qomo Linux (formerly Everest Linux) is a Chinese distribution developed by Red Flag Linux and managed as a community project (in a fashion similar to Red Hat’s Fedora or Novell’s openSUSE). Its main features are user-friendly desktop, excellent hardware detection, full support for simplified Chinese, and a 6-month release cycle.

7. Asianux (受欢迎程度排名: 317)

asianux

Asianux


Asianux是一份由中国Linux供应商领头羊红旗软件公司和日本Linux供应商Miracle Linux公司联合开发的Linux服务器操作系统,其应用目标则是面向亚洲企业系统的通用性Linux平台。它为企业级客户提供了高可靠性、扩展性、易管理性及更好的软硬件兼容性。Asianux认证伙伴活动则邀请更多的软硬件产品加入到Asianux的认证中来,这无疑将有助于节省开发和认证所需的资源,并为Linux带来高质量和低成本。红旗软件和miracle将发布Asianux,Asianux在中国和日本市场上销售时,每一个Linux发行软件包都不作任何修改。新产品将基于Asianux,每一个都将与各国的本地化特性结合。

Asianux is a Linux server operating system which is co-developed by Chinese Leading Linux vendor Red Flag Software Co., Ltd. and Japanese Linux vendor Miracle Linux Cooperation, aiming at the common-standard enterprise Linux platform for Enterprise systems in Asia. It provides enterprise customers with high reliability, scalability, manageability and better hardware and software compatibility. Asianux certification partner program will invite more hardware and software products to be certified on Asianux, and it will definitely help to reduce developing and certificating resources and provide Linux with high quality and low cost. Red Flag Software and Miracle will distribute and market Asianux without any modifications in each Linux distribution package in China and Japan. New products will be based on Asianux and each will be bundled with localised features in each country.

在C#中调用 VB.Net 中的 IsSingleInstance 实现只运行单个实例的应用程序

<<Windows Forms 2.0 Programming, 2nd Edition>>   –  Single-Instance Applications 这一章中, 学到了调用 VB.Net 中的 IsSingleInstance, 为 C# WinForm 添加只运行应用程序的单个实例 ( Single Instance Application). 是个好方法!

该方法显然从易用性上便捷与 Mutex 和 Process 这两种只运行单个应用程序实例的方法.

 

Single Instance 概念:

从.NET 2.0起,提供了WindowsFormsApplicationBase类来简化Windows应用程序编程,如果您是开发人员会感到感到奇怪,WindowsFormsApplicationBase类不在System.Windows.Forms 命名空间中而是属于Microsoft.VisualBasic.ApplicationServices 命名空间,也许这是作为VB.NET开发人员的优先好处吧。该类对应的程序集为Microsoft.VisualBasic.dll,不过该程序集包含在.NET框架中一起发布,如果要引用该程序集,在部署上不存在额外操作。

WindowsFormsApplicationBase类实现了类似于Application类的一些功能,不过该类还包含一些简化Windows Forms应用程序开发的接口,下面来简单了解一下。WindowsFormsApplicationBase类实现了对单实例应用程序的支持,通过设置IsSingleInstance 属性为True以及重写OnStartupNextInstance方法可以简洁的实现。

 

实现

在 Program.cs – Main 方法

1. 项目中引用VB.Net 的DLL – Microsoft.VisualBasic.DLL,

Program.cs

using Microsoft.VisualBasic.ApplicationServices;

2. 在Program.cs中增加一个类

Program.cs

public sealed class SingleInstanceApplication : WindowsFormsApplicationBase
{
    public SingleInstanceApplication()
    {
        base.IsSingleInstance = true;
        base.ShutdownStyle = ShutdownMode.AfterMainFormCloses;
    }

    protected override void OnCreateMainForm()
    {
        base.MainForm = new MainForm();
    }

    protected override void OnStartupNextInstance(StartupNextInstanceEventArgs e)
    {
        base.OnStartupNextInstance(e);
        base.MainForm.Activate();
    }
}

 

3. 修改原 Application.Run(new MainForm()); 方法为:

//添加运行单进程程序
SingleInstanceApplication application = new SingleInstanceApplication();
application.Run(args);

 

SingleInstanceApplication类继承自WindowsFormsApplicationBase,在构造函数中设置为单实例模式,同时设置在主窗体关闭后退出应用程序。在继承类中,OnCreateMainForm方法被重写用来创建主窗体,如果要保证应用程序单一实例运行,还需要重写OnStartupNextInstance方法,在该应用程序的下一个应用程序实例启动时,OnStartupNextInstance方法会得到执行,在上面的实现代码中,调用基类方法同时激活主窗口。

 

windows 环境变量

Getting and setting environment variables

The variables can be used both in scripts and on the command line. They are usually referenced by putting special symbols in front of or around the variable name. For instance, to display the user home directory, in most scripting environments, the user has to type:

echo $HOME

On DOS, OS/2 or Windows systems, the user has to type this:

echo %HOME%

In Windows PowerShell, the user has to type this:

Write-Output $HOME

DOS, OS/2 and Windows (Command Prompt)

In DOS, OS/2 and Windows, the set command without any arguments displays all environment variables along with their values.

To set a variable to a particular value, use:

set VARIABLE=value

However, this is temporary. Permanent change to the environment variable can be achieved through editing the registry (not recommended for novices) and using the Windows Resource Kit application setx.exe. With the introduction of Windows Vista, the setx command became part of Windows.

Users of the Windows GUI can manipulate variables via <Control Panel:System:Advanced:Environment Variables>; through the Windows Registry this is done changing the values under HKCU\Environment (for user specific variables) and HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment (for System variables).

To set a variable whose name is in another variable:

set %VARNAME%=value

This feature allows certain interesting applications. For example, a uni-dimensional array of elements (vector) may be generated this way:

set VECTOR[%I%]=value of element subscript %I%

:MkVec
set VECNAME=%1
set i=0
:loop
    shift
    if "%1" == "" goto exitloop
    set /a i+=1
    set %VECNAME%[%i%]=%1
    goto loop
:exitloop
exit /B %i%

call :MkVec DOWNAME=Monday Tuesday Wednesday Thursday Friday Saturday Sunday

To see the current value of a particular variable, use:

echo %VARIABLE%

or

set VARIABLE

Note: Please take note that doing so will print out all variables beginning with ‘VARIABLE’. Another example is:

C:\> set p
Path=c:\.. ..
PATHEXT=.COM;.EXE;.BAT;
PROCESSOR_ARCHITECTURE=.. ..
PROCESSOR_IDENTIFIER=x8..
PROCESSOR_LEVEL=6..
PROCESSOR_REVISION=1706..
ProgramFiles=C:\Program.. .
PROMPT=$P$G

To see the value of an array element a double expansion is required: one for the subscript value and an additional expansion for the array element. This may be achieved via Delayed !VARIABLE! Expansion this way:

set DOW=value of Day of Week (1..7)
echo !DOWNAME[%DOW%]!

To delete a variable, the following command is used:

set VARIABLE=

Windows PowerShell

To set a system variable:

Set-Content -Path Env:VARIABLE -value value
$Env:VARIABLE = value # alternate form

Examples of DOS environment variables

%COMSPEC%

This variable contains the full path to the command processor, command.com.

%PATH%

This variable contains a semicolon-delimited list of directories in which the command interpreter will search for executable files. Equivalent to the Unix $PATH variable (although note that PATH on Windows additionally performs the same task as LD_LIBRARY_PATH on Unix-like systems). Note that %PATH% can also be set like this PATH=c:\dos; where SET isn’t required.

%TEMP% and %TMP%

These variables contain the path to the directory where temporary files should be stored.

Examples from Microsoft Windows

Discrete value variables

These variables generally expand to discrete values, such as the current working directory, the current date, or a random number. Some of these are true environment variables and will be expanded by all functions that handle environment variables. Others, like %CD% simply look like environment variables and will only be expanded by some functions and shells. They are not case sensitive.

%CD%

This variable points to the current directory. Equivalent to the output of the command cd when called without arguments.

%DATE%

This variable expands to the current date. The date is displayed according to the current user’s date format preferences.

The following is a way of reformatting the date and time for use in file copies. The example assumes UK format of day month year and the time is set for a 24 hour clock.

@echo off
echo %DATE% %TIME%
for /F "tokens=1-3 delims=/" %%a in ("%DATE%") do set MTH=%%a& set DAY=%%b& set YR=%%c
for /F "tokens=1-3 delims=:." %%a in ("%TIME%") do set HR=%%a& set MIN=%%b& set SEC=%%c
if "%HR:~0,1%"==" " set HR=0%HR:~1,1%
set MYDATE=%YR%%MTH%%DAY%-%HR%%MIN%%SEC%
echo %MYDATE%
%ERRORLEVEL%

This variable points to the current error level. If there was an error in the previous command, it is checked against this.

%RANDOM%

This variable returns a random number between 0 and 32767.

%TIME%

This variable points to the current time. The time is displayed according to the current user’s time format preferences.

System path variables

These variables refer to locations of critical operating system resources, and as such generally are not user-dependent.

%AppData%

Contains the full path to the Application Data directory of the logged-in user. Does not work on Windows NT 4.0 SP6 UK.

%LOCALAPPDATA%

This variable is the temporary files of Applications. Its uses include storing of Desktop Themes, Windows Error Reporting, Caching and profiles of web browsers.

%ComSpec%

This variable contains the full path to the command processor; on Windows NT based operating systems this is cmd.exe, while on Windows 9x and ME it is the DOS command processor, COMMAND.COM.

%PATH%

This variable contains a semicolon-delimited (do not put spaces in between) list of directories in which the command interpreter will search for an executable file that matches the given command. Equivalent to the Unix $PATH variable.

%ProgramFiles%

This variable points to Program Files directory, which stores all the installed program of Windows and others. The default on English-language systems is C:\Program Files. In 64-bit editions of Windows (XP, 2003, Vista), there are also %ProgramFiles(x86)% which defaults to C:\Program Files (x86) and %ProgramW6432% which defaults to C:\Program Files. The %ProgramFiles% itself depends on whether the process requesting the environment variable is itself 32-bit or 64-bit (this is caused by Windows-on-Windows 64-bit redirection).

%CommonProgramFiles%

This variable points to Common Files directory. The default is C:\Program Files\Common Files.

%SystemDrive%

The %SystemDrive% variable is a special system-wide environment variable found on Microsoft Windows NT and its derivatives. Its value is the drive upon which the system directory was placed. Also see next item.

The value of %SystemDrive% is in most cases C:.

%SystemRoot%

The %SystemRoot% variable is a special system-wide environment variable found on Microsoft Windows NT and its derivatives. Its value is the location of the system directory, including the drive and path.

The drive is the same as %SystemDrive% and the default path on a clean installation depends upon the version of the operating system. By default, on a clean installation:

  • Windows NT 5.1 (Windows XP) and newer versions use \WINDOWS
  • Windows NT 5.0 (Windows 2000), Windows NT 4.0 and Windows NT 3.1 use \WINNT
  • Windows NT 3.5x uses \WINNT35
  • Windows NT 4.0 Terminal Server use \WTSRV
%WinDir%

This variable points to the Windows directory (on Windows NT-based operating systems it is identical to the %SystemRoot% variable, above). If the System is on drive C: then the default values are:

Note that Windows NT 4 Terminal Server Edition by default installs to C:\WTSRV.

User management variables

These variables store information related to resources and settings owned by various user profiles within the system. As a general rule, these variables do not refer to critical system resources or locations that are necessary for the OS to run.

%AllUsersProfile% (%PROGRAMDATA% for Windows Vista, Windows 7)

The %AllUsersProfile%(%PROGRAMDATA%) variable expands to the full path to the All Users profile directory. This profile contains resources and settings that are used by all system accounts. Shortcut links copied to the All Users’ Start menu or Desktop directories will appear in every user’s Start menu or Desktop, respectively.

%UserDomain%

The variable holds the name of the Workgroup or Windows Domain to which the current user belongs. The related variable, %LOGONSERVER%, holds the hostname of the server that authenticated the current user’s logon credentials (name and password). For Home PCs, and PCs in a Workgroup, the authenticating server is usually the PC itself. For PCs in a Windows Domain, the authenticating server is a domain controller (a primary domain controller, or PDC, in Windows NT 4-based domains).

%UserProfile%

The %UserProfile% variable is a special system-wide environment variable found on Microsoft Windows NT and its derivatives. Its value is the location of the current user’s profile directory, in which is found that user’s HKCU registry hive (NTUSER).

Users can also use the %USERNAME% variable to determine the active users login identification.

Windows GUI forced variable expansion

In certain cases it is not possible to create file paths containing environment variables using the Windows GUI, and it is necessary to fight with the user interface to make things work as intended.

  • In Windows 7, a shortcut may not contain the variable %USERNAME% in unexpanded form. Trying to create shortcut to \\server\share\accounts\%USERNAME% or C:\users\%USERNAME% will be silently changed to replace %USERNAME% with the account name of the currently logged-in user, when the OK button is pressed on the shortcut properties.
    • This can only be overridden if the %USERNAME% variable is part of a parameter to some other program in the shortcut. For example, %SYSTEMROOT%\Explorer.exe C:\Users\%USERNAME% is not expanded when OK is clicked, but this shortcut is treated as unsafe and displays a warning when opened.
  • In Group Policy Management on Server 2008 R2, a profile directory can not be redirected to a custom directory hierarchy. For example, the desktop can not be redirected to \\server\share\accounts\%USERNAME%\custom\path\desktop. Upon pressing OK, this is silently changed to “Create a directory for each user in the root path” with the path \\server\share\accounts\ pointing to “\username\desktop”.
    • This behavior can only be overridden if the path contains a variable or drive letter that is not currently resolvable at the time of editing the GPO. For example if a mapping for drive Z: does not exist on the server, then the path Z:\directory\%username%\CustomTarget is not expanded when OK is selected.
  • A domain user account may not contain a profile path or home directory path containing an unexpanded %USERNAME% variable. Upon clicking OK, this is silently replaced with the user’s account name.
    • This causes problems for new user creation that is performed by copying an existing user account, if there are additional directories listed after the username in the path. For a pre-existing account with a profile path of \server\share\accounts\DomainUser\profile the Microsoft Management Console doesn’t know which part of the path contains the previous user’s name and doesn’t change the path during the copy, resulting in the new account pointing to the other account’s profile/home paths. The profile/home paths must be manually re-edited to point to the correct location.

Default Values on Microsoft Windows

Variable Windows XP Windows Vista/7
 %ALLUSERSPROFILE% C:\Documents and Settings\All Users C:\ProgramData
 %APPDATA% C:\Documents and Settings\{username}\Application Data C:\Users\{username}\AppData\Roaming
 %COMPUTERNAME% {computername} {computername}
 %COMMONPROGRAMFILES% C:\Program Files\Common Files C:\Program Files\Common Files
 %COMMONPROGRAMFILES(x86)% C:\Program Files (x86)\Common Files (only in 64-bit version) C:\Program Files (x86)\Common Files (only in 64-bit version)
 %COMSPEC% C:\Windows\System32\cmd.exe C:\Windows\System32\cmd.exe
 %HOMEDRIVE% C: C:
 %HOMEPATH% \Documents and Settings\{username} \Users\{username}
 %LOCALAPPDATA% C:\Users\{username}\AppData\Local
 %LOGONSERVER% \\{domain_logon_server} \\{domain_logon_server}
 %PATH% C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;{plus program paths} C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;{plus program paths}
 %PATHEXT% .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.WSF;.WSH .com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh;.msc
 %PROGRAMDATA%  %SystemDrive%\ProgramData
 %PROGRAMFILES%  %SystemDrive%\Program Files  %SystemDrive%\Program Files
 %PROGRAMFILES(X86)%  %SystemDrive%\Program Files (x86) (only in 64-bit version)  %SystemDrive%\Program Files (x86) (only in 64-bit version)
 %PROMPT% Code for current command prompt format. Code is usually $P$G Code for current command prompt format. Code is usually $P$G
 %PSModulePath%  %SystemRoot%\system32\WindowsPowerShell\v1.0\Modules\
 %PUBLIC%  %SystemDrive%\Users\Public
{Drive}:\$Recycle.Bin C:\Recycle.Bin C:\$Recycle.Bin
 %SystemDrive% C: C:
 %SystemRoot% The Windows directory, usually C:\Windows, formerly C:\WINNT  %SystemDrive%\Windows
 %TEMP% and %TMP%  %SystemDrive%\Documents and Settings\{username}\Local Settings\Temp  %SystemDrive%\Users\{username}\AppData\Local\Temp
 %USERDOMAIN% {userdomain} {userdomain}
 %USERNAME% {username} {username}
 %USERPROFILE%  %SystemDrive%\Documents and Settings\{username}  %SystemDrive%\Users\{username}
 %WINDIR%  %SystemDrive%\Windows  %SystemDrive%\Windows

In this list, there is no environment variable that refers to the location of the user’s My Documents directory, so there is no standard method for setting a program’s home directory to be the My Documents directory.

C# 多线程操作整理 (System.Threading)

Thread 类

创建并控制线程,设置其优先级并获取其状态。

命名空间:System.Threading 程序集:mscorlib(在 mscorlib.dll 中)

概述与概念

C#支持通过多线程并行地执行代码,一个线程有它独立的执行路径,能够与其它的线程同时地运行。一个C#程序开始于一个单线程,这个单线程是被CLR和操作系统(也称为“主线程”)自动创建的,并具有多线程创建额外的线程。

1.使用线程的情况

  • ①.程序需要执行和两个和多个任务
  • ②.程序要等待某事件的发生:例如用户输入、文件操作、网络操作和搜索
  • ③.后台程序

2.多线程的并发执行 如果有多个线程在执行,单CPU只有一个,到底执行的哪个?

  • ①.如果一个线程连续占用CPU资源时间过长,其它的资源得不到执行,      则系统会强制的切换执行其它线程。(强制剥夺)
  • ②.如果一个线程没事可做、CPU可执行其它线程。(主动放弃)
  • ③.这是由操作系统的调度机制决定的,不同的操作系统调度机制不一样。    一般无法精确的预料多线程的执行顺序,在程序设计的时候应特别注意

3.创建并启动线程

ThreadStart 线程启动委托名=new ThreadStart(方法名);

Thread 线程实例名=new Thread(线程启动委托名); 线程实例名.Start();

4.终止线程

  • ①.线程实例名.Abort();用此方法的后果是不可恢复的终止线程。
  • ②.线程实例名.Interrupt();中断后可恢复

5.休眠线程

  • ①.线程实例名.Sleep();     当线程Sleep时,系统就立即退出执行队列一段时间,当睡眠结束时,系统会产生一个时钟中断,从而     使线程回到执行队列中,从而恢复线程的执行。

6.挂起/恢复线程

  • ①.线程实例名.Suspend();挂起     与线程休眠不同,线程的挂起不会使线程立即停止执行,直到线程到达安全点之后它才可以将该线程挂起,如果线程尚未启动或已经停止,则它将不能挂起。
  • ②.线程实例名.Resume();恢复      将使一个线程跳出挂起状态并使该线程继续执行。     一个线程不能对另一个线程调用Sleep() ,但是一个线程可以对另一个线程调用Suspend()。     还可以使用许多其它的方式来阻塞线程。例如,可以通过调用 Thread.Join 使一个线程等待另一个线程 (子线程)停止。使用Monitor.Wait使一个线程等待访问一个同步对象。

7.串行化线程

  • ①.线程实例名.jion();     例如在主线程中插入t.jion();      主线程执行到这条语句后,主线程(当前线程)立即进入阻塞状态.直到t运行完后阻塞状态才解除。相当于把t的任务插入或串联到主线程中,把两条线索串联成一条线索

8.线程的锁定机制 线程的锁定机制可以保证每次只有一个线程可以访问共享资源。 使用关键字lock

  • ①.lock语句的语法      lock(对象引用)语句块;
  • ②.lock语句的功能      当对象被lock 锁定时,访问该线程的其它线程会进入等待的状态。
  • ③.对象锁机制保证了对象访问的完整性:只有一个线程完成操作后,其它的线程才能进行操作。
  • ④.一般情况下,当一个线程写某个变量,而同时可能有其它的线程读或写这个变量时,为了保持数据的一 致性应该使用锁定机制。
  • ⑤.线程的安全性      线程安全性就是保护的类的成员和代码的安全,从而使他们不会同时被几个线程中断,使用锁定机制。
  • ⑥.多线程公用一个对象时,就不应该使用lock关键字了,这里Monitor,Monitor提供了使线程共享资源的方 案。 Monitor类可以锁定一个对象,一个线程只有得到这把锁才可以对该对象进行操作。 如: Monitor.Enter(obj);
    Monitor.Exit(obj);
  • ⑦.临界区和锁 当谈论多线程应用程序的时候,首先应该想到的就是并发性问题。尽管这对于同时执行多个任务的程序是很有用的,但通常都是危险的。为了解决这个问题,在C#中提出了临界区和锁的概念。在程序设计中,临界区是一块在任何时候只能有一个进程进入的区域。在C#中通过语句lock来声明临界区。lock声明后面的代码,不管是以行还是一块代码,在同一时间最多只能有一个进程执行。

9.线程的优先级具有不可靠性,就是说不能用优先级来控制线程的执行顺序。

10.后台线程

  • ①.什么是后台线程?比起应用程序的主图形用户界面(GUI)线程来说,这些线程以较低的优先权在不同的过程中运行着。对于不能立即执行结束, 又不想一直等待的任务,后台线程能很好的胜任。在C#中,把线程对象的  IsBackground属性设为true,该线程即为后台线程。    后台线程跟前台线程只有一个区别,那就是后台线程不妨碍程序的终止。一旦一个进程所有的前台线程都终止后,CLR将通过调用任意一个存活中的后台进程的Abort()方法来彻底终止进程。注意:后台线程不能直接操作所在进程之外的数据引用。
  • ②.怎样与后台线程通讯?运用MethodInvoker委派实体。也可在初始化(构造函数)中加入下面一句即可实现通讯:

Control.CheckForIllegalCrossThreadCalls = False;

要使用MethodInvoker委派,需要三个条件:

  •   a.一个创建委派的后台线程
Thread thread=new Thread(new ThreadStart(Run));

thread.IsBackground=true;  //把Thread设为后台线程

thread.Start();
  •   b.一个用作后台线程与前台可视化单元的接口的类级方法
 public void Run()
        {
            int count = 0;
            try
            {
                MethodInvoker mi = new MethodInvoker(this.UpdateLabel);
                //创建一个委托,UpdateLabel是该委托所托管的代码,必须是声明为void 且不接受任何参数的任何方法。
                while (true)
                {
                    count++;
                    //this.Invoke(mi);//同步执行委托
                    this.BeginInvoke(mi);//异步执行委托
                    Thread.Sleep(500);
                }
            }
            catch (ThreadInterruptedException e)
            {
                Console.WriteLine("Interruption Exception in Thread:{0}", e);
            }
            catch (Exception ex)
            {
                Console.WriteLine("Exception in Thread:{0}", ex);
            }
        }
  •   c.一个应用程序中可以更新的可视化单元
public void UpdateLabel()
{     
    label1.Text=count.ToString();   
}