用shazam 听歌找歌 听歌识别歌曲

看到一个视频的配乐, 很好听. 听歌词查了好久, 但还是不知道歌曲名字.

最后在wp手机上安装了shazam(音乐雷达), 真心的好使! 查到演唱者和歌名再搜就好找多了!

shazam(音乐雷达) 简介:

突然出现悦己心神的音乐作品。而自己又不知道是什么音乐时,Shazam就能告诉玩家音乐信息,当然玩家需要让Shazam也听10秒钟。是的Shazam就是如此神奇!

P.S. 奉上找的那首音乐

Yuna – Lullabies  (adventure club remix)

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();   
}

.NET Windows Forms C# 线程中的全局异常处理

异常处理

任何线程创建范围内try/catch/finally块,当线程开始执行便不再与其有任何关系。考虑下面的程序:

public static void Main() {
try {
       new Thread (Go).Start();
}
catch (Exception ex) {
       // 不会在这得到异常
       Console.WriteLine ("Exception!");
}

static void Go() { throw null; }
}

这里try/catch语句一点用也没有,新创建的线程将引发NullReferenceException异常。当你考虑到每个线程有独立的执行路径的时候,便知道这行为是有道理的,补救方法是在线程处理的方法内加入他们自己的异常处理:

public static void Main() {
      new Thread (Go).Start();
}

static void Go() {
try {
       ...
       throw null;         // 这个异常在下面会被捕捉到
       ...
}
catch (Exception ex) {
       记录异常日志,并且或通知另一个线程
       我们发生错误
       ...
}

从.NET 2.0开始,任何线程内的未处理的异常都将导致整个程序关闭,这意味着忽略异常不再是一个选项了。因此为了避免由未处理异常引起的程序崩溃,try/catch块需要出现在每个线程进入的方法内,至少要在产品程序中应该如此。对于经常使用“全局”异常处理的Windows Forms程序员来说,这可能有点麻烦,像下面这样:

using System;
using System.Threading;
using System.Windows.Forms;

static class Program {
static void Main() {
       Application.ThreadException += HandleError;
       Application.Run (new MainForm());
}

static void HandleError (object sender, ThreadExceptionEventArgs e) {
       记录异常或者退出程序或者继续运行...
}
}

Application.ThreadException事件在异常被抛出时触发,以一个Windows信息(比如:键盘,鼠标活着 “paint” 等信息)的方式,简言之,一个Windows Forms程序的几乎所有代码。虽然这看起来很完美,它使人产生一种虚假的安全感——所有的异常都被中央异常处理捕捉到了。由工作线程抛出的异常便是一个没有被Application.ThreadException捕捉到的很好的例外。(在Main方法中的代码,包括构造器的形式,在Windows信息开始前先执行)

.NET framework为全局异常处理提供了一个更低级别的事件:AppDomain.UnhandledException,这个事件在任何类型的程序(有或没有用户界面)的任何线程有任何未处理的异常触发。尽管它提供了好的不得已的异常处理解决机制,但是这不意味着这能保证程序不崩溃,也不意味着能取消.NET异常对话框。

IP-BGP 以及 BGP Monitoring / BGP 监测

IP-BGP

Introduction

A couple services have been established for mapping IP numbers to BGP prefixes and ASNs:

  • Whois (TCP 43)
  • DNS (UDP 53)

Three modes are supported origin, peer, and prefix.  The data returned is basically the same except that the peer mode also lists the BGP peers for the ASN.

The data to support these services are collected from the following sources:

Whois

The whois interface is used as follows:

Whois/Origin

 
$ whois -h asn.shadowserver.org origin 17.112.152.32
714 | 17.112.0.0/16 | APPLE-ENGINEERING | US | APPLE.COM | APPLE COMPUTER INC

The output is as follows

ASN | Prefix        | AS Name           | CN | Domain    | ISP

Whois/Peer

Using the peer mode is very similar:

$ whois -h asn.shadowserver.org peer 17.112.152.32
3356 7018 | 714 | 17.112.0.0/16 | APPLE-ENGINEERING | US | APPLE.COM | APPLE COMPUTER INC

The output is as follows

Peer(s)   | ASN | Prefix        | AS Name           | CN | Domain    | ISP

A more verbose mode is also available:

$ whois -h asn.shadowserver.org peer 4.5.6.4 verbose
 3356 | 4.0.0.0/9 | LEVEL3 | US | DSL-VERIZON.NET | GTE.NET LLC

  209    ASN-QWEST             Qwest
  293    ESNET                 Energy Sciences Network
  701    UUNET                 MCI Communications Services, Inc. d/b/a Verizon Business
  702    AS702                 Verizon Business EMEA - Commercial IP service provider in Europe
  1239   SPRINTLINK            Sprint
  1668   AOL-ATDN              AOL Transit Data Network
  2497   JPNIC-ASBLOCK         AP JPNIC
  2828   XO-AS15               XO Communications
  2914   NTT-COMMUNICATIONS-2  NTT America, Inc.
  3257   TISCALI               BACKBONE Tiscali Intl Network BV
  3303   SWISSCOM              Swisscom Solutions Ltd
  3333   RIPE-NCC              AS RIPE Network Coordination Centre
  3356   LEVEL3                Level 3 Communications
  3549   GBLX                  Global Crossing Ltd.
  3561   SAVVIS                Savvis
  4513   Globix                Corporation
  4637   REACH                 Reach Network Border AS
  5459   LINX                  AS London Internet Exchange Ltd.
  5511   OPENTRANSIT           France Telecom
  6079   RCN-AS                RCN Corporation
  6395   BROADWING             Broadwing Communications Services, Inc.
  6453   GLOBEINTERNET         VSNL International
  6461   MFNX                  MFN - Metromedia Fiber Network
  7018   ATT-INTERNET4         AT&T WorldNet Services
  8075   MICROSOFT-CORP---MSN  Microsoft Corp
  12956  TELEFONICA            Telefonica Backbone Autonomous System

Whois/Prefix

 
$ whois -h asn.shadowserver.org prefix 8075
64.4.0.0/18                                                           
65.54.8.0/22                                                          
65.54.48.0/20                                                         
65.54.74.0/23                                                         
65.54.80.0/23                                                         
65.54.83.0/24                                                         
65.54.86.0/23                                                         
65.54.92.0/23                                                         
65.54.94.0/23                                                         
65.54.96.0/20                                                         
65.54.120.0/21                                                        
65.54.128.0/19        
<<CHOPPED>>

Whois Batch Mode

The Whois server also supports batch mode where a list of IP addresses can be handled.  For example:

begin origin
4.5.4.3
17.112.152.32
208.77.188.166
end

Use netcat, telnet, or perl to send your list to the whois server:

$ netcat asn.shadowserver.org 43 < /tmp/list
3356 | 4.0.0.0/9 | LEVEL3 | US | DSL-VERIZON.NET | GTE.NET LLC
714 | 17.112.0.0/16 | APPLE-ENGINEERING | US | APPLE.COM | APPLE COMPUTER INC
40528 | 208.77.188.0/22 | ICANN-LAX | - | - | -

DNS

The format for a DNS based origin lookup is:

$ dig +short 32.152.112.17.origin.asn.shadowserver.org TXT
"714" "|" "17.112.0.0/16" "|" "APPLE-ENGINEERING" "|" "US" "|" "APPLE.COM" "|" "APPLE" "COMPUTER" "INC"

And the format for a ”peer’ lookup is:

$ dig +short 32.152.112.17.peer.asn.shadowserver.org TXT
"3356" "7018" "|" "714" "|" "17.112.0.0/16" "|" "APPLE-ENGINEERING" "|" "US" "|" "APPLE.COM" "|" "APPLE" "COMPUTER" "INC"

http://www.shadowserver.org/wiki/pmwiki.php/Services/IP-BGP

Shadowserver

Other Res :  BGP Monitoring   http://www.team-cymru.org/Monitoring/BGP/

Team Cymru

c# 获取HTTP headers 以及获取页面title

在写一个工具, 其中一个功能是检测收集服务器的一些信息, 需要在一个操作中取到HTTP headers 信息和 页面的标题(title).

尝试了WebRequest,WebResponse和 HttpWebRequest,HttpWebResponse. 研究他们的不同, 有Http的提供 了对无Http类的 HTTP 特定方法的实现. 关键似乎找不到我的要求”在一次操作中”完成获取到HTTP headers 和 title.

最后突然看到了一段国外代码中用到WebClient, 虽然功能不尽相同, 但又多了一点思路.  进行一翻测试, 发现WebClient十分简便好用, 代码量也骤减. 虽然效率可能会略慢一些,但是做到了一次调用, 取到headers 和 title.

代码如下:

//方法函数		
		/// <summary>
		/// 返回 HTTP headers.
		/// </summary>
		/// <param name="Url">地址</param>
		/// <returns>headers的列表</returns>
		public Dictionary<string, string> GetHTTPResponseHeaders(string url)
		{
		    Dictionary<string, string> HeaderList = new Dictionary<string, string>();

            WebClient x = new WebClient();
            x.Headers.Set("Timeout", "6000"); //超时设置6秒
            string source = x.DownloadString(url);

            //用正则表达式取页面标题
            string title = Regex.Match(source, @"<titleb[^>]*>s*(?<Title>[sS]*?)</title>", RegexOptions.IgnoreCase).Groups["Title"].Value;
            HeaderList.Add("Address", url); //加入地址
            HeaderList.Add("Title", title); //加入页面标题

            foreach (string HeaderKey in x.ResponseHeaders)
                HeaderList.Add(HeaderKey, x.ResponseHeaders[HeaderKey]);

		    return HeaderList;
		}

//调用
		void Button2Click(object sender, EventArgs e)
		{
			Dictionary<string, string> Headers = GetHTTPResponseHeaders("http://www.bohu.cn/");

			foreach (string HeaderKey in Headers.Keys) 
			    textBox5.Text += HeaderKey+" : "+Headers[HeaderKey]+"rn";
		}

CNNIC 的创新服务 – 中文导航(“.中国”中文域名分类导航列表)

CNNIC 的创新服务 – 中文导航(“.中国”中文域名分类导航列表)

http://导航.中国/

“.中国”域名的域名网站分类导航列表

  显示分类关键词,非中文域名形式,展示“.中国”域名域名网站分类,点击分类网站,可弹出分类信息结果页面,显示已经注册开通解析且与分类相关的中文域名网站列表。

中文域名简介

“中国域名”是中文域名的一种,特指以“.中国”为域名后缀的中文域名,是我国域名体系和全球互联网域名体系的组成部分。“.中国”是在全球互联网上代表中国的中文顶级域名,于2010年7月正式纳入全球互联网根域名体系,全球网民可通过联网计算机在世界任何国家、地点实现无障访问。

中文域名工具

CNNIC 的创新服务 – 公共云解析(SDNS)

关于公共云解析(SDNS)

  公共云解析是中国互联网络信息中心(CNNIC)推出的免费公共解析服务(Secure DNS,简称SDNS)。旨在为用户提供更加安全、智能、高速的上网接入解析服务。公共云解析SDNS的免费DNS服务地址为1.2.4.8和210.2.4.8。SDNS官网:www.sdns.cn

   公共云解析SDNS正式上线:
链接至:http://cnnic.cn/CNNIC_ZH/gywm/xwzx/rdxw/2012nrd/201207/t20120709_30828.htm

ISO 3166-1 国家代码表

  • Standards
  • ISO 3166 – Country codes
  • ISO 3166-1 decoding table

ISO 3166-1 decoding table

Last updated:  2012-08-02

 

This decoding table provides the user of ISO 3166-1 with an easy access to the definition  of all 676 code elements available in the alpha-2 code of ISO’s country code standard.

The  content of this document is taken from two sources: The official code list of ISO 3166-1 and the list  of reserved ISO 3166-1 code elements which contains information on code allocations which are not officially  part of ISO 3166-1 (see “Reserved code elements”). The reserved code elements  have different statuses with regard to restrictions on use within ISO’s country code system. Some may  be used – others must not be used.

These statuses – and their approximate meanings  for the user of ISO 3166-1 – are described and colour-coded in Table 1. Tables 2 gives a colour coded,  clickable matrix of all ISO 3166-1 alpha-2 code elements which is linked to Table 3 which gives the  definition of the code element.

For more detailed information please refer  to the section on “Reserved code elements” on our Website.

Contact the ISO 3166 Maintenance Agency

The  ISO 3166/MA  should be contacted through its secretariat. Please use the following address:

ISO  3166 Maintenance Agency c/o International Organization for Standardization Case  postale 56 CH-1211 Genève 20

Telephone: +41 22 749 02 22 Telefax:  +41 22 749 01 55 E-mail: mbinfo@iso.org Web: www.iso.org/iso/country_codes

 

Color
Status of code element What it means
Officially assigned code element Code element may be used without restriction
User-assigned code element Code element may be used without restriction
Exceptionally reserved code element Code element may be used but restrictions may apply
Transitionally reserved code element Code element deleted from ISO 3166-1; stop using ASAP
Indeterminately reserved code element Code element must not be used in ISO 3166-1
Code elements not used at present stage [A] Code element must not be used in ISO 3166-1
Un-assigned code elements Code element free for assignment (by ISO 3166/MA only!)
AA AB AC AD AE AF AG AH AI AJ AK AL AM AN AO AP AQ AR AS AT AU AV AW AX AY AZ
BA BB BC BD BE BF BG BH BI BJ BK BL BM BN BO BP BQ BR BS BT BU BV BW BX BY BZ
CA CB CC CE CD CF CG CH CI CJ CK CL CM CN CO CP CQ CR CS CT CU CV CW CX CY CZ
DA DB DC DD DE DF DG DH DI DJ DK DL DM DN DO DP DQ DR DS DT DU DV DW DX DY DZ
EA EB EC ED EE EF EG EH EI EJ EK EL EM EN EO EP EQ ER ES ET EU EV EW EX EY EZ
FA FB FC FD FE FF FG FH FI FJ FK FL FM FN FO FP FQ FR FS FT FU FV FW FX FY FZ
GA GB GC GD GE GF GG GH GI GJ GK GL GM GN GO GP GQ GR GS GT GU GV GW GX GY GZ
HA HB HC HD HE HF HG HH HI HJ HK HL HM HN HO HP HQ HR HS HT HU HV HW HX HY HZ
IA IB IC ID IE IF IG IH II IJ IK IL IM IN IO IP IQ IR IS IT IU IV IW IX IY IZ
JA JB JC JD JE JF JG JH JI JJ JK JL JM JN JO JP JQ JR JS JT JU JV JW JX JY JZ
KA KB KC KD KE KF KG KH KI KJ KK KL KM KN KO KP KQ KR KS KT KU KV KW KX KY KZ
LA LB LC LD LE LF LG LH LI LJ LK LL LM LN LO LP LQ LR LS LT LU LV LW LX LY LZ
MA MB MC MD ME MF MG MH MI MJ MK ML MM MN MO MP MQ MR MS MT MU MV MW MX MY MZ
NA NB NC ND NE NF NG NH NI NJ NK NL NM NN NO NP NQ NR NS NT NU NV NW NX NY NZ
OA OB OC OD OE OF OG OH OI OJ OK OL OM ON OO OP OQ OR OS OT OU OV OW OX OY OZ
PA PB PC PD PE PF PG PH PI PJ PK PL PM PN PO PP PQ PR PS PT PU PV PW PX PY PZ
QA QB QC QD QE QF QG QH QI QJ QK QL QM QN QO QP QQ QR QS QT QU QV QW QX QY QZ
RA RB RC RD RE RF RG RH RI RJ RK RL RM RN RO RP RQ RR RS RT RU RV RW RX RY RZ
SA SB SC SD SE SF SG SH SI SJ SK SL SM SN SO SP SQ SR SS ST SU SV SW SX SY SZ
TA TB TC TD TE TF TG TH TI TJ TK TL TM TN TO TP TQ TR TS TT TU TV TW TX TY TZ
UA UB UC UD UE UF UG UH UI UJ UK UL UM UN UO UP UQ UR US UT UU UV UW UX UY UZ
VA VB VC VD VE VF VG VH VI VJ VK VL VM VN VO VP VQ VR VS VT VU VV VW VX VY VZ
WA WB WC WD WE WF WG WH WI WJ WK WL WM WN WO WP WQ WR WS WT WU WV WW WX WY WZ
XA XB XC XD XE XF XG XH XI XJ XK XL XM XN XO XP XQ XR XS XT XU XV XW XX XY XZ
YA YB YC YD YE YF YG YH YI YJ YK YL YM YN YO YP YQ YR YS YT YU YV YW YX YY YZ
ZA ZB ZC ZD ZE ZF ZG ZH ZI ZJ ZK ZL ZM ZN ZO ZP ZQ ZR ZS ZT ZU ZV ZW ZX ZY ZZ
Code Name Remark Status
AA user-assigned
AC Ascension Island [B] Requested by Universal Postal Union (UPU) exceptionally reserved
AD ANDORRA officially assigned
AE UNITED ARAB EMIRATES officially assigned
AF AFGHANISTAN officially assigned
AG ANTIGUA AND BARBUDA officially assigned
AI ANGUILLA officially assigned
AL ALBANIA officially assigned
AM ARMENIA officially assigned
AN Netherlands Antilles 2011-12 to 2061-12 transitionally reserved
AO ANGOLA officially assigned
AP African Regional Industrial Property Organization [A] Requested by World Intellectual Property Organization (WIPO) for use in Standard ST.3 indeterminately reserved
AQ ANTARCTICA officially assigned
AR ARGENTINA officially assigned
AS AMERICAN SAMOA officially assigned
AT AUSTRIA officially assigned
AU AUSTRALIA officially assigned
AW ARUBA officially assigned
AX ÅLAND ISLANDS officially assigned
AZ AZERBAIJAN officially assigned
BA BOSNIA AND HERZEGOVINA officially assigned
BB BARBADOS officially assigned
BD BANGLADESH officially assigned
BE BELGIUM officially assigned
BF BURKINA FASO officially assigned
BG BULGARIA officially assigned
BH BAHRAIN officially assigned
BI BURUNDI officially assigned
BJ BENIN officially assigned
BL SAINT BARTHÉLEMY officially assigned
BM BERMUDA officially assigned
BN BRUNEI DARUSSALAM officially assigned
BO BOLIVIA, PLURINATIONAL STATE OF officially assigned
BQ BONAIRE, SINT EUSTATIUS AND SABA officially assigned
BR BRAZIL officially assigned
BS BAHAMAS officially assigned
BT BHUTAN officially assigned
BU Burma 1989-12 to 2039-12 transitionally reserved
BV BOUVET ISLAND officially assigned
BW BOTSWANA officially assigned
BX Benelux Trademarks and Designs Office [A] Requested by World Intellectual Property Organization (WIPO) for use in Standard ST.3 indeterminately reserved
BY BELARUS officially assigned
BZ BELIZE officially assigned
CA CANADA officially assigned
CC COCOS (KEELING) ISLANDS officially assigned
CD CONGO, THE DEMOCRATIC REPUBLIC OF THE officially assigned
CF CENTRAL AFRICAN REPUBLIC officially assigned
CG CONGO officially assigned
CH SWITZERLAND officially assigned
CI CÔTE D’IVOIRE officially assigned
CK COOK ISLANDS officially assigned
CL CHILE officially assigned
CM CAMEROON officially assigned
CN CHINA officially assigned
CO COLOMBIA officially assigned
CP Clipperton Island [C] Requested by International Telecommunication Union (ITU) exceptionally reserved
CR COSTA RICA officially assigned
CS SERBIA AND MONTENEGRO 2006-09 to 2056-09 transitionally reserved
CU CUBA officially assigned
CV CAPE VERDE officially assigned
CW CURAÇAO officially assigned
CX CHRISTMAS ISLAND officially assigned
CY CYPRUS officially assigned
CZ CZECH REPUBLIC officially assigned
DE GERMANY officially assigned
DG Diego Garcia [C] Requested by International Telecommunication Union (ITU) exceptionally reserved
DJ DJIBOUTI officially assigned
DK DENMARK officially assigned
DM DOMINICA officially assigned
DO DOMINICAN REPUBLIC officially assigned
DY Benin [D] Requested by Secretary-General of UN for Road Traffic Conventions R49 and R68 indeterminately reserved
DZ ALGERIA officially assigned
EA Ceuta, Melilla [E] Requested by World Customs Organization (WCO) exceptionally reserved
EC ECUADOR officially assigned
EE ESTONIA officially assigned
EF Union of Countries under the European Community Patent Convention [A] Requested by World Intellectual Property Organization (WIPO) for use in Standard ST.3 indeterminately reserved
EG EGYPT officially assigned
EH WESTERN SAHARA officially assigned
EM European Trademark Office [A] Requested by World Intellectual Property Organization (WIPO) for use in Standard ST.3 indeterminately reserved
EP European Patent Organization [A] Requested by World Intellectual Property Organization (WIPO) for use in Standard ST.3 indeterminately reserved
ER ERITREA officially assigned
ES SPAIN officially assigned
ET ETHIOPIA officially assigned
EU European Union Requested by ISO 4217/MA (March 1998) for ISO 6166 “Securities – International securities identification numbering system (ISIN)”. In August 1999, extension of scope to any application needing to represent the name European Union. exceptionally reserved
EV Eurasian Patent Organization [A] Requested by World Intellectual Property Organization (WIPO) for use in Standard ST.3 indeterminately reserved
EW Estonia [D] indeterminately reserved
FI FINLAND officially assigned
FJ FIJI officially assigned
FK FALKLAND ISLANDS (MALVINAS) officially assigned
FL Liechtenstein [D] indeterminately reserved
FM MICRONESIA, FEDERATED STATES OF officially assigned
FO FAROE ISLANDS officially assigned
FR FRANCE officially assigned
FX France, Metropolitan Requested by France exceptionally reserved
GA GABON officially assigned
GB UNITED KINGDOM officially assigned
GC Patent Office of the Cooperation Council for the Arab States of the Gulf (GCC) [A] Requested by World Intellectual Property Organization (WIPO) for use in Standard ST.3 indeterminately reserved
GD GRENADA officially assigned
GE GEORGIA officially assigned
GF FRENCH GUIANA officially assigned
GG GUERNSEY officially assigned
GH GHANA officially assigned
GI GIBRALTAR officially assigned
GL GREENLAND officially assigned
GM GAMBIA officially assigned
GN GUINEA officially assigned
GP GUADELOUPE officially assigned
GQ EQUATORIAL GUINEA officially assigned
GR GREECE officially assigned
GS SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS officially assigned
GT GUATEMALA officially assigned
GU GUAM officially assigned
GW GUINEA-BISSAU officially assigned
GY GUYANA officially assigned
HK HONG KONG officially assigned
HM HEARD ISLAND AND MCDONALD ISLANDS officially assigned
HN HONDURAS officially assigned
HR CROATIA officially assigned
HT HAITI officially assigned
HU HUNGARY officially assigned
IB International Bureau of WIPO [A] Requested by World Intellectual Property Organization (WIPO) for use in Standard ST.3 indeterminately reserved
IC Canary Islands [E] Requested by World Customs Organization (WCO) exceptionally reserved
ID INDONESIA officially assigned
IE IRELAND officially assigned
IL ISRAEL officially assigned
IM ISLE OF MAN officially assigned
IN INDIA officially assigned
IO BRITISH INDIAN OCEAN TERRITORY officially assigned
IQ IRAQ officially assigned
IR IRAN, ISLAMIC REPUBLIC OF officially assigned
IS ICELAND officially assigned
IT ITALY officially assigned
JA Jamaica [F] Requested by Secretary-General of UN for Road Traffic Conventions indeterminately reserved
JE JERSEY officially assigned
JM JAMAICA officially assigned
JO JORDAN officially assigned
JP JAPAN officially assigned
KE KENYA officially assigned
KG KYRGYZSTAN officially assigned
KH CAMBODIA officially assigned
KI KIRIBATI officially assigned
KM COMOROS officially assigned
KN SAINT KITTS AND NEVIS officially assigned
KP KOREA, DEMOCRATIC PEOPLE’S REPUBLIC OF officially assigned
KR KOREA, REPUBLIC OF officially assigned
KW KUWAIT officially assigned
KY CAYMAN ISLANDS officially assigned
KZ KAZAKHSTAN officially assigned
LA LAO PEOPLE’S DEMOCRATIC REPUBLIC officially assigned
LB LEBANON officially assigned
LC SAINT LUCIA officially assigned
LF Libya Fezzan [D] indeterminately reserved
LI LIECHTENSTEIN officially assigned
LK SRI LANKA officially assigned
LR LIBERIA officially assigned
LS LESOTHO officially assigned
LT LITHUANIA officially assigned
LU LUXEMBOURG officially assigned
LV LATVIA officially assigned
LY LIBYA officially assigned
MA MOROCCO officially assigned
MC MONACO officially assigned
MD MOLDOVA, REPUBLIC OF officially assigned
ME MONTENEGRO officially assigned
MF SAINT MARTIN (FRENCH PART) officially assigned
MG MADAGASCAR officially assigned
MH MARSHALL ISLANDS officially assigned
MK MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF officially assigned
ML MALI officially assigned
MM MYANMAR officially assigned
MN MONGOLIA officially assigned
MO MACAO officially assigned
MP NORTHERN MARIANA ISLANDS officially assigned
MQ MARTINIQUE officially assigned
MR MAURITANIA officially assigned
MS MONTSERRAT officially assigned
MT MALTA officially assigned
MU MAURITIUS officially assigned
MV MALDIVES officially assigned
MW MALAWI officially assigned
MX MEXICO officially assigned
MY MALAYSIA officially assigned
MZ MOZAMBIQUE officially assigned
NA NAMIBIA officially assigned
NC NEW CALEDONIA officially assigned
NE NIGER officially assigned
NF NORFOLK ISLAND officially assigned
NG NIGERIA officially assigned
NI NICARAGUA officially assigned
NL NETHERLANDS Includes: the islands Bonaire, Saint Eustatius and Saba officially assigned
NO NORWAY officially assigned
NP NEPAL officially assigned
NR NAURU officially assigned
NT Neutral Zone 1993-07 to 2043-07 transitionally reserved
NU NIUE officially assigned
NZ NEW ZEALAND officially assigned
OA African Intellectual Property Organization [A] Requested by World Intellectual Property Organization (WIPO) for use in Standard ST.3 indeterminately reserved
OM OMAN officially assigned
PA PANAMA officially assigned
PE PERU officially assigned
PF FRENCH POLYNESIA officially assigned
PG PAPUA NEW GUINEA officially assigned
PH PHILIPPINES officially assigned
PI Philippines [F] indeterminately reserved
PK PAKISTAN officially assigned
PL POLAND officially assigned
PM SAINT PIERRE AND MIQUELON officially assigned
PN PITCAIRN officially assigned
PR PUERTO RICO officially assigned
PS PALESTINIAN TERRITORY, OCCUPIED officially assigned
PT PORTUGAL officially assigned
PW PALAU officially assigned
PY PARAGUAY officially assigned
QA QATAR officially assigned
QM user-assigned
QN user-assigned
QO user-assigned
QP user-assigned
QQ user-assigned
QR user-assigned
QS user-assigned
QT user-assigned
QU user-assigned
QV user-assigned
QW user-assigned
QX user-assigned
QY user-assigned
QZ user-assigned
RA Argentina [F] indeterminately reserved
RB Bolivia [cf. Botswana: identical code element] [D] indeterminately reserved
RC China [F] indeterminately reserved
RE RÉUNION officially assigned
RH Haiti [D] indeterminately reserved
RI Indonesia [F] indeterminately reserved
RL Lebanon [F] indeterminately reserved
RM Madagascar [F] indeterminately reserved
RN Niger [G] indeterminately reserved
RO ROMANIA officially assigned
RP Philippines [G] indeterminately reserved
RS SERBIA officially assigned
RU RUSSIAN FEDERATION officially assigned
RW RWANDA officially assigned
SA SAUDI ARABIA officially assigned
SB SOLOMON ISLANDS officially assigned
SC SEYCHELLES officially assigned
SD SUDAN officially assigned
SE SWEDEN officially assigned
SF Finland [D] indeterminately reserved
SG SINGAPORE officially assigned
SH SAINT HELENA, ASCENSION AND TRISTAN DA CUNHA officially assigned
SI SLOVENIA officially assigned
SJ SVALBARD AND JAN MAYEN officially assigned
SK SLOVAKIA officially assigned
SL SIERRA LEONE officially assigned
SM SAN MARINO officially assigned
SN SENEGAL officially assigned
SO SOMALIA officially assigned
SR SURINAME officially assigned
SS SOUTH SUDAN officially assigned
ST SAO TOME AND PRINCIPE officially assigned
SU USSR Requested by Foundation of Internet Development (FID) exceptionally reserved
SV EL SALVADOR officially assigned
SX SINT MAARTEN (DUTCH PART) The island of Saint Martin is divided into the French northern part and the Dutch southern part officially assigned
SY SYRIAN ARAB REPUBLIC officially assigned
SZ SWAZILAND officially assigned
TA Tristan da Cunha [B] Requested by Universal Postal Union (UPU) exceptionally reserved
TC TURKS AND CAICOS ISLANDS officially assigned
TD CHAD officially assigned
TF FRENCH SOUTHERN TERRITORIES officially assigned
TG TOGO officially assigned
TH THAILAND officially assigned
TJ TAJIKISTAN officially assigned
TK TOKELAU officially assigned
TL TIMOR-LESTE officially assigned
TM TURKMENISTAN officially assigned
TN TUNISIA officially assigned
TO TONGA officially assigned
TP East Timor 2002-05 to 2052-05 transitionally reserved
TR TURKEY officially assigned
TT TRINIDAD AND TOBAGO officially assigned
TV TUVALU officially assigned
TW TAIWAN, PROVINCE OF CHINA officially assigned
TZ TANZANIA, UNITED REPUBLIC OF officially assigned
UA UKRAINE officially assigned
UG UGANDA officially assigned
UK United Kingdom Requested by United Kingdom exceptionally reserved
UM UNITED STATES MINOR OUTLYING ISLANDS officially assigned
US UNITED STATES officially assigned
UY URUGUAY officially assigned
UZ UZBEKISTAN officially assigned
VA HOLY SEE (VATICAN CITY STATE) officially assigned
VC SAINT VINCENT AND THE GRENADINES officially assigned
VE VENEZUELA, BOLIVARIAN REPUBLIC officially assigned
VG VIRGIN ISLANDS, BRITISH officially assigned
VI VIRGIN ISLANDS, U.S. officially assigned
VN VIET NAM officially assigned
VU VANUATU officially assigned
WF WALLIS AND FUTUNA officially assigned
WG Grenada [D] indeterminately reserved
WL Saint Lucia [D] indeterminately reserved
WO World Intellectual Property Organization [A] Requested by World Intellectual Property Organization (WIPO) for use in Standard ST.3 indeterminately reserved
WS SAMOA officially assigned
WV Saint Vincent [D] indeterminately reserved
XA user-assigned
XB user-assigned
XC user-assigned
XD user-assigned
XE user-assigned
XF user-assigned
XG user-assigned
XH user-assigned
XI user-assigned
XJ user-assigned
XK user-assigned
XL user-assigned
XM user-assigned
XN user-assigned
XO user-assigned
XP user-assigned
XQ user-assigned
XR user-assigned
XS user-assigned
XT user-assigned
XU user-assigned
XV user-assigned
XW user-assigned
XX user-assigned
XY user-assigned
XZ user-assigned
YE YEMEN officially assigned
YT MAYOTTE officially assigned
YU Yugoslavia 2003-07 to 2053-07 transitionally reserved
YV Venezuela [D] indeterminately reserved
ZA SOUTH AFRICA officially assigned
ZM ZAMBIA officially assigned
ZR Zaire 1997-07 to 2047-07 transitionally reserved
ZW ZIMBABWE officially assigned
ZZ user-assigned

Notes:

 

[A]  The World Intellectual Property Organization (WIPO) uses ten alpha-2 code elements for particular purposes  in its Standard ST.3 which are not assigned in ISO 3166-1. The ISO 3166/MA will not use these alpha-2  code elements for assignment in ISO 3166 at the present stage.

[B]  Official country names are given in CAPITAL LETTERS. Other names are given in normal orthography i.e  including lower case letters.

[C]  The list of ISO 3166-1 reserved code elements is only available in English, hence the lack of French  names for entries which are not officially included in ISO 3166-1.

[D] Here the following pieces of information can  be given:

  • Acronym of organization or name of country  on whose behalf a reservation was made
  • Date of reservation (for transitional reservations)
  • Abbreviation of source document for reserved code element
  • Explanatory text

根域名服务器 Root Servers

root-servers

Internet Domain Name System Root Servers

全球13个根域名服务器以英文字母A到M依序命名,网域名称格式为“字母.root-servers.net”。其中7个并不只有单一个服务器,是以任播(anycast)技术在全球多个地点设立镜像站。

字母 IPv4地址 IPv6地址 自治系统编号(AS-number)[1] 旧名称 运作单位 设置地点 #数量(全球性/地区性)[2] 软件
A 198.41.0.4 2001:503:ba3e::2:30 AS19836 ns.internic.net VeriSign 以任播技术分散设置于多处 6/0 BIND
B 192.228.79.201 (2004年1月起生效,旧IP地址为128.9.0.107)[3] 2001:478:65::53 (not in root zone yet) none ns1.isi.edu 南加州大学信息科学研究所 (Information Sciences Institute, University of Southern California)  美国加州马里纳戴尔雷伊 (Marina del Rey) 0/1 BIND
C 192.33.4.12 AS2149 c.psi.net Cogent Communications 以任播技术分散设置于多处 6/0 BIND
D 128.8.10.90 AS27 terp.umd.edu 马里兰大学学院市分校 (University of Maryland, College Park)  美国马里兰州大学公园市 (College Park) 1/0 BIND
E 192.203.230.10 AS297 ns.nasa.gov NASA  美国加州山景城 (Mountain View) 1/0 BIND
F 192.5.5.241 2001:500:2f::f AS3557 ns.isc.org 互联网系统协会 (Internet Systems Consortium) 以任播技术分散设置于多处 2/47 BIND 9[4]
G 192.112.36.4 AS5927 ns.nic.ddn.mil 美国国防部国防信息系统局 (Defense Information Systems Agency) 以任播技术分散设置于多处 6/0 BIND
H 128.63.2.53 2001:500:1::803f:235 AS13 aos.arl.army.mil 美国国防部陆军研究所 (U.S. Army Research Lab)  美国马里兰州阿伯丁(Aberdeen) 1/0 NSD
I 192.36.148.17 2001:7fe::53 AS29216 nic.nordu.net 瑞典奥托诺米嘉公司(Autonomica) 以任播技术分散设置于多处 36 BIND
J 192.58.128.30 (2002年11月起生效,旧IP地址为198.41.0.10) 2001:503:c27::2:30 AS26415 VeriSign 以任播技术分散设置于多处 63/7 BIND
K 193.0.14.129 2001:7fd::1 AS25152 荷兰RIPE NCC 以任播技术分散设置于多处 5/13 NSD[5]
L 199.7.83.42 (2007年11月起生效,旧IP地址为198.32.64.12)[6] 2001:500:3::42 AS20144 ICANN 以任播技术分散设置于多处 37/1 NSD[7]
M 202.12.27.33 2001:dc3::35 AS7500 日本WIDE Project 以任播技术分散设置于多处 5/1 BIND

参见

Hostname IP Addresses Manager
a.root-servers.net 198.41.0.4, 2001:503:ba3e::2:30 VeriSign, Inc.
b.root-servers.net 192.228.79.201 University of Southern California (ISI)
c.root-servers.net 192.33.4.12 Cogent Communications
d.root-servers.net 199.7.91.13, 2001:500:2d::d University of Maryland
e.root-servers.net 192.203.230.10 NASA (Ames Research Center)
f.root-servers.net 192.5.5.241, 2001:500:2f::f Internet Systems Consortium, Inc.
g.root-servers.net 192.112.36.4 US Department of Defence (NIC)
h.root-servers.net 128.63.2.53, 2001:500:1::803f:235 US Army (Research Lab)
i.root-servers.net 192.36.148.17, 2001:7fe::53 Netnod
j.root-servers.net 192.58.128.30, 2001:503:c27::2:30 VeriSign, Inc.
k.root-servers.net 193.0.14.129, 2001:7fd::1 RIPE NCC
l.root-servers.net 199.7.83.42, 2001:500:3::42 ICANN
m.root-servers.net 202.12.27.33, 2001:dc3::35 WIDE Project