User:DoraConan/個人沙盒

维基百科,自由的百科全书

入禀 http://www.xuehaiblog.com/?fromuser=DoraConan

有人向你發送了一則新信息:)(看看与上一个版本有什么不同)。

這個是本人的沙盒,不允許別人使用,只供觀看。(以下都是不知所云的内容,不建議觀看,對外人來説只會浪費時間)

重要外部鏈接[编辑]

http://tools.wikimedia.de/~interiot/cgi-bin/Tool1/wannabe_kate

http://editthis.info/wikihome/Main_Page

http://editthis.info/zh/Main_Page

簽名測試區[编辑]

DoraConan 按此入禀本人的對話頁起訴本人 2007年8月4日 (六) 13:18 (UTC)

臨時文件[编辑]

#!/usr/bin/perl 
# catnav bot by WikiPedia:User:下一次登录 
# Sisclaimer: No warranty granted, use at your own risk! 
  
# call requirements 
use Getopt::Std; 
use LWP::Simple; 
use LWP::UserAgent; 
use HTTP::Request; 
use HTTP::Response; 
use HTTP::Cookies; 
  
#subroutine 
 
#parameters 
local $username="xcnbot";    #input your username here, only English names are tested. 
local $password="******";    #input your password here 
local $WIKI_PATH="zh.100ke.info"; 
local $WIKI_PAGE; 
 
### Login to wiki 
  
# Set up connection data 
my $browser=LWP::UserAgent->new(); 
my @ns_headers = ( 
 'User-Agent' => 'Xcnbot 1.0 by 下一次登录',  #Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20041107 Firefox/1.0', 
 'Accept' => 'image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*', 
 'Accept-Charset' => 'iso-8859-1,*,utf-8', 
 'Accept-Language' => 'en-US', 
); 
  
# Hold cookies 
$browser->cookie_jar( {} ); 
  
{# Login 
    # Make login request 
    $response=$browser->post("http://".$WIKI_PATH."/w/index.php?title=Special:Userlogin&action=submitlogin", 
    @ns_headers, Content=>[wpName=>$username,wpPassword=>$password,wpRemember=>"1",wpLoginAttempt=>"Log in"]); 
  
    # After logging in, we should be redirected to another page. 
    # If we aren't, something is wrong. 
        if($response->code!=302) { #cannot login 
            print "We weren't able to login.\n\n"; 
            close(DEBUG); 
            exit 1; 
        } 
} 
 	print "Logged in \n"; 
 
 
# Trivial variables 
local $content; 
local $content1; 
local $content2; 
local @cnTree; 
local $editToken; 
local $editTime; 
 
 
# Set parameters 
local $DEPTH=5; #predefined DEPTH 
local $cChange=0; #Counter of CHANGEs 
my $vName; #Variable: current cat NAME 
my $vNameU="%E9%A0%81%E9%9D%A2%E5%88%86%E9%A1%9E";  #vName: Unicode, starting from “页面分类” 
my @aTree; #Array: current cat-TREE 
my $vDepth=0; #Variable: current cat-tree DEPTH 
my @aChild; #Array: current cat's CHILDREN    
my @aChildU; #aChildren: Unicode    
  
# Connect to root cat 
  $WIKI_PAGE=$vNameU; 
  $URL="http://".$WIKI_PATH."/wiki/Category:".$WIKI_PAGE; 
  $response=$browser->get($URL, @ns_headers); 
  $content=$response->as_string; 
    
  {  # extract vName 
   $filestartstr="<h1 class=\"firstHeading\">Category:"; 
   $filestart=index($content, $filestartstr);  
   $content1=substr($content, $filestart+34); 
        
   $fileendstr="</h1>"; 
   $fileend=index($content1, $fileendstr);   
   $vName=substr($content1, 0, $fileend); 
  }  # extract vName 
 
   print "got vName\n"; 
 
 # Change @aTree 
 $aTree[$vDepth]=$vName; 
 $vDepth+=1; 
  
 if(1)  
 { #debug 
	open INPUT, ">debug1.txt"; 
	print INPUT $URL; 
	print INPUT "\n\n before digui\n\n"; 
  close INPUT; 
 } #debug 
 
	if(1)  
	  { #log 
 		  open INPUT, ">cnlog.txt"; 
		 	print INPUT "program start\n"; 
			close INPUT; 
		} #log    	 
  
 &gotocat($vName, $vNameU, $vDepth, @aTree); 
  
 
sub gotocat 
{ #递归程序 
  my($vName, $vNameU, $vDepth, @aTree) = @_; 
     	if(1)  
		  { #debug log 
 			  open INPUT, ">diguilog.txt"; 
			 	print INPUT "Name="; 
		 		print INPUT $vName; 
			 	print INPUT "  UName="; 
		 		print INPUT $vNameU; 
			 	print INPUT "  vDepth="; 
			 	print INPUT "  aTree="; 
		 		print INPUT $vDepth; 
		 		for($i=0;$i<$vDepth;$i+=1) 
		 		{ 
		 			print INPUT $aTree[$i]; 
		 			print INPUT ">"; 
		 		} 
			 	print INPUT "\n"; 
				close INPUT; 
			} #debug log    	 	 
 
  my @aChild; 
  my @aChildU; 
  my $nChild=0; #Child cat number 
 
	if($vDepth>$DEPTH)  
	{ #depth exceeds 
		$aTree[1]="..."; 
		for($i=2;$i<$DEPTH;$i+=1) 
		{ 
			$aTree[$i]=$aTree[$i+1]; 
		} 
		$vDepth=$DEPTH; 
		 
     	if(1)  
		  { #debug log 
 			  open INPUT, ">>diguilog.txt"; 
			 	print INPUT "Depth exceeds\n"; 
				close INPUT; 
			} #debug log    	 	 
	} 
	 
	print "in digui. vDepth="; 
	print $vDepth; 
	print "\n"; 
 
 
   
  if(1) 
  { # list and sort all children 
    ## list 
    print "list "; 
     
    $WIKI_PAGE=$vNameU; 
    $URL="http://".$WIKI_PATH."/wiki/Category:".$WIKI_PAGE; 
    $response=$browser->get($URL, @ns_headers); 
    $content=$response->as_string; 
  
 		$content1=$content; 
    $filestartstr="<a class=\"CategoryTreeLabel  CategoryTreeLabelNs14 CategoryTreeLabelCategory\" href=\"/wiki/Category:"; 
 
    while(index($content1, $filestartstr)>=0)  
    { #while there is more children 
			print "c "; 
			 
     {  # extract a Child cat line 
      $filestartstr="<a class=\"CategoryTreeLabel  CategoryTreeLabelNs14 CategoryTreeLabelCategory\" href=\"/wiki/Category:"; 
      $filestart=index($content1, $filestartstr);  
      $content1=substr($content1, $filestart+99); 
           
      $fileendstr="</a></div>"; 
      $fileend=index($content1, $fileendstr);   
      $content2=substr($content1, 0, $fileend); 
      $content1=substr($content1, $fileend+10); 
     }  # extract a Child cat line    
 
     { # cat name and Uname 
     	$fileendstr="\">"; 
     	$fileend=index($content2, $fileendstr);   
     	$aChildU[$nChild]=substr($content2, 0, $fileend); 
     	$aChild[$nChild]=substr($content2, $fileend+2); 
     } # cat name and Uname 
     
     $nChild+=1; 
    } #while there is more children 
		 
   if(0) { ## check if there is "next 200" 
     $filestartstr="<br style=\"clear:both;\"/>"; 
   	 $filestart=index($content, $filestartstr); 
   	 $content1=substr($content, $filestart+25); 
   	 $fileendstr="<h2>"; 
   	 $fileend=index($content1, $fileendstr);   
   	 $content1=substr($content1, 0, $fileend); 
   	 $filestartstr="200</a>)<div id"; 
 
   	 while(index($content1, $filestartstr)>=0) 
   	 {	# while there is "next 200" 
	   	 print "200 "; 
			  
	 		{	## extract url 
 	   	  $filestartstr="200) (<a href=\""; 
		   	$filestart=index($content1, $filestartstr); 
		  	$content1=substr($content1, $filestart+15); 
		    $fileendstr="\" title="; 
    	  $fileend=index($content1, $fileendstr); 
      	$WIKI_PAGE=substr($content1, 0, $fileend); 
    	} ## extract url 
 
			$URL="http://".$WIKI_PATH.$WIKI_PAGE; 
			if(1)  
			  { #log 
		 		  open INPUT, ">>cnlog.txt"; 
				 	print INPUT $URL; 
				 	print INPUT "\n"; 
					close INPUT; 
				} #log    	 
			 
	    $response=$browser->get($URL, @ns_headers); 
	    $content=$response->as_string; 
	    $content1=$content; 
	    $filestartstr="<a class=\"CategoryTreeLabel  CategoryTreeLabelNs14 CategoryTreeLabelCategory\" href=\"/wiki/Category:"; 
	    while(index($content1, $filestartstr)>=0)  
	    { #while there is more children 
	    	print "c "; 
 		    { # extract a Child cat line 
			    $filestartstr="<a class=\"CategoryTreeLabel  CategoryTreeLabelNs14 CategoryTreeLabelCategory\" href=\"/wiki/Category:"; 
 		  	  $filestart=index($content1, $filestartstr);  
      		$content1=substr($content1, $filestart+99); 
           
      		$fileendstr="</a></div>"; 
		      $fileend=index($content1, $fileendstr);   
    		  $content2=substr($content1, 0, $fileend); 
		      $content1=substr($content1, $fileend+10); 
    		} # extract a Child cat line    
       
	      { # cat name and Uname 
		     	$fileendstr="\">"; 
		     	$fileend=index($content2, $fileendstr);   
		     	$aChildU[$nChild]=substr($content2, 0, $fileend); 
		     	$aChild[$nChild]=substr($content2, $fileend+2); 
		    } # cat name and Uname 
		     
		     $nChild+=1; 
		  } #while there is more children 
 
      # next 200? 
    	$filestartstr="<br style=\"clear:both;\"/>"; 
    	$filestart=index($content, $filestartstr); 
    	$content1=substr($content, $filestart+25); 
   	  $fileendstr="<h2>"; 
    	$fileend=index($content1, $fileendstr);   
    	$content1=substr($content1, 0, $fileend); 
   	  $filestartstr="200</a>)<div id"; 
   	 }	# while there is "next 200" 
			    	 
 	 } ## check if there is "next 200" 
   
   ## sort 
   	print "sort "; 
   	 
  	my $i,$j; 
  	my $swap; 
  	for($i=0;$i<$nChild-1;$i+=1) 
  	{ 
  		for($j=$i+1;$j<$nChild;$j+=1) 
  		{ 
  			if($aChild[$i] gt $aChild[$j]) 
  			{ 
  				$swap=$aChild[$i]; 
  				$aChild[$i]=$aChild[$j]; 
  				$aChild[$j]=$swap; 
 
  				$swap=$aChildU[$i]; 
  				$aChildU[$i]=$aChildU[$j]; 
  				$aChildU[$j]=$swap; 
  			} 
  		} 
  	} 
  	 
  	print "entered current page. nChild="; 
  	print $nChild; 
  	print "\n"; 
  	 
	  if(0)  
	  { #debug 
			 open INPUT, ">>debug1.txt"; 
			 my $i; 
			 for($i=0;$i<$nChild;$i+=1) 
			 { 
			 	print INPUT $aChild[$i]; 
			 	print INPUT "  "; 
			 	print INPUT $aChildU[$i]; 
			 	print INPUT "\n"; 
			 } 
		   print INPUT "\n\n\n"; 
			 close INPUT; 
		} #debug    	 
  } # list and sort all children 
 
	if(1)  
	  { #log 
 		  open INPUT, ">>cnlog.txt"; 
		 	print INPUT "Digui: Cat="; 
		 	print INPUT $vName; 
		 	print INPUT ", Tree="; 
		 	for($i=0;$i<$vDepth;$i+=1) 
		 	{  
		 		print INPUT $aTree[$i]; 
		 		print INPUT ">"; 
		 	} 
		 	print INPUT "\n"; 
		 	print INPUT "    "; 
		 	print INPUT $nChild; 
		 	print INPUT " children: "; 
		 	for($i=0;$i<$nChild;$i+=1) 
		 	{  
		 		print INPUT $aChild[$i]; 
		 		print INPUT " "; 
		 	} 
		 	print INPUT "\n"; 
			close INPUT; 
		} #log    	 
 
  
	my $i; 
	for($i=0;$i<$nChild;$i+=1)  
  { # check and add catnav to all children 
  	my $cnDepth; 
  	my $bFound=0;	#found same tree? 
  	my $bSame=1;	#cat name is the same? 
  	my $cnFound=0; 
		# get edit content 
			$WIKI_PAGE=$aChildU[$i]; 
			#$WIKI_PAGE="%E4%BA%9A%E6%B4%B2%E5%9B%BD%E5%AE%B6"; 
    	$URL="http://".$WIKI_PATH."/w/index.php?title=Category:".$WIKI_PAGE."&action=edit"; 
    	$response=$browser->get($URL, @ns_headers); 
    	$content=$response->as_string; 
   		  
    	# Get EditToken 
    	($editToken) = ( $content =~ m/value\=\"([0-9a-f\\]*)\" name\=\"wpEditToken\"/ ); 
    	($editTime) = ( $content =~ m/value\=\"([0-9a-f]*)\" name\=\"wpEdittime\"/ ); 
  		  
    	$filestartstr="<textarea tabindex='1' accesskey=\",\" name=\"wpTextbox1\" id=\"wpTextbox1\" rows='25'"; 
    	$fileendstr="</textarea>"; 
    	$filestart= index($content, $filestartstr); 
    	$filestart+=92; 
    	$fileend= index($content, $fileendstr); 
    	$content=substr($content, $filestart, $fileend-$filestart); 
     
    # check if there is Catnav 
   	$filestartstr="{{Catnav|"; 
   	$content1=$content; 
    while(index($content1, $filestartstr)>=0) 
    { #while there is still Catnav 
    	$cnFound=1; 
	   	$cnDepth=0; 
    	$filestart=index($content1, $filestartstr); 
    	$content1=substr($content1, $filestart+9); 
    	$fileendstr="}}"; 
    	$fileend=index($content1, $fileendstr); 
    	$content2=substr($content1, 0, $fileend); 
    	$content1=substr($content1, $fileend+1); 
 
			$filestartstr="|"; 
			while(index($content2, $filestartstr)>=0) 
			{ #while there is | 
				$filestart=index($content2, $filestartstr); 
				$cnTree[$cnDepth]=substr($content2, 0, $filestart); 
				$content2=substr($content2, $filestart+1); 
				$cnDepth+=1; 
			} #while there is | 
			#the last one 
			$cnTree[$cnDepth]=$content2; 
			$cnDepth+=1; 
 
		if(0)  
	  { #debug 
			 open INPUT, ">>debug1.txt"; 
			 my $j; 
				for($j=0;$j<$cnDepth;$j+=1)  
			  { # check and add catnav to all children 
					 	 
					 { 
					 	print INPUT $cnTree[$j]; 
					 	print INPUT "  "; 
					 } 	 
					 	print INPUT "\n\n\n"; 
			  	 
				} # check and add catnav to all children 
		} #debug 
		 
		$bSame=1;  
		if($vDepth == $cnDepth) 
		{ 
			for($j=0;$j<$cnDepth;$j+=1)  
			{ 
				if($cnTree[$j] ne $aTree[$j])	{ 
				$bSame=0;} 
			} 
		} 
		else 
		{ 
			$bSame=0; 
		} 
		 
		if($bSame) 
		{ 
			$bFound=1; 
		} 
 
   	$filestartstr="{{Catnav|"; 
    } #while there is still Catnav 
		 
		print "entered child page. bFound=";	 
		print $bFound;	 
		print "\n";	 
		 
		if($bFound<1) 
		{	# add new tree 
			my $treecontent; 
			$treecontent="{{Catnav"; 
			for($j=0;$j<$vDepth;$j+=1) 
			{ 
				$treecontent=$treecontent."|".$aTree[$j]; 
			} 
			if($cnFound) { 
				$treecontent=$treecontent."}}\n"; 
			} 
			else { 
				$treecontent=$treecontent."}}\n\n"; 
			} 
						 
			$content=$treecontent.$content; 
 
			$WIKI_PAGE=$aChildU[$i]; 
    	$URL="http://".$WIKI_PATH."/w/index.php?title=Category:".$WIKI_PAGE."&action=edit"; 
 
			#check for illegal characters 
			my $special_char; 
			 
			$special_char="""; #" 
			while(index($content, $special_char)>=0) { 
				substr($content, index($content, $special_char), length($special_char) ) ="\""; 
			} 
			$special_char="<"; #< 
			while(index($content, $special_char)>=0) { 
				substr($content, index($content, $special_char), length($special_char) ) ="<"; 
			} 
			$special_char=">"; #> 
			while(index($content, $special_char)>=0) { 
				substr($content, index($content, $special_char), length($special_char) ) =">"; 
			} 
			$special_char="&"; #& 
			while(index($content, $special_char)>=0) { 
				substr($content, index($content, $special_char), length($special_char) ) ="&"; 
			} 
			 
			if(1) {#Update 
        $response=$browser -> 
          post($URL, @ns_headers, Content_Type=>'form-data',Content=> 
           [  wpTextbox1 => $content, 
		          wpSummary => "[[User:xcnbot|xcnbot]] testing", 
              wpSave => "Save page", 
              wpSection => "", 
              wpEdittime => $editTime, 
              wpEditToken => $editToken, 
              wpMinoredit => "1", 
              ]);	 
      print "Change made\n"; 
       
     	if(1)  
		  { #log 
 			  open INPUT, ">>cnlog.txt"; 
			 	print INPUT "    Child:"; 
		 		print INPUT $aChild[$i]; 
		 		print INPUT " change made.\n"; 
				close INPUT; 
			} #log    	 
	 
    	} #Update 
		} 
    		 
	} # check and add catnav to all children 
    
  # call sub-gotocat on every child 
  my $ch; 
 	for($ch=0;$ch<$nChild;$ch+=1)  
 	{ 
  	# Change @aTree 
     	if(1)  
		  { #log 
 			  open INPUT, ">>cnlog.txt"; 
			 	print INPUT "Go into: Child="; 
		 		print INPUT $aChild[$ch]; 
		 		print INPUT "\n"; 
				close INPUT; 
			} #log    	 	 
	  $aTree[$vDepth]=$aChild[$ch]; 
		&gotocat($aChild[$ch], $aChildU[$ch], $vDepth+1, @aTree); 
     	if(1)  
		  { #log 
 			  open INPUT, ">>cnlog.txt"; 
			 	print INPUT "Jump outto: Parent="; 
		 		print INPUT $vName; 
		 		print INPUT "\n"; 
				close INPUT; 
			} #log    	 	 
		 
	} 
} #递归程序
阿波罗5号
任务概要
任务名称 阿波罗5号
呼号AS-204
登月舱LM-1
运载火箭土星IB号 SA-204
成员人数0
发射 1968年1月22日
22:48:09 UTC
卡纳维尔角 LC 37B
返回 1968年1月23日
09:58:00 UTC
任务时间11小时10分钟
环绕轨道次数7.5
远地点214千米
近地点162千米
飞行距离300,000千米
质量14,360千克
导航
前次任务后次任务
阿波罗4号 阿波罗6号

阿波罗5号阿波罗计划中的一次无人任务,也是使用登月舱的第一次任务。[1]

目标[编辑]

阿波罗5的任务是在太空中测试登月舱,特别是新的引擎功能,该引擎有能力单独起飞和降落。这个的引擎将成为第一架能够在太空发射的火箭发动机。

延误[编辑]

阿波罗4号,这次飞行被延误了很长时间。主要原因是登月舱。它與預計時相差很遠。除了一些延误可被归咎于缺乏建立一个载人降落月球的太空船经验。

它已被计划在1967年4月发射阿波罗5号时运送普,是在1966年9月起有的希望。但是,延误还是不断发生。尽管登月舱完全被设计了,但还是有需要量身订制的零部件。重要引擎及零件也全部出了问题。开始时,引擎顺利地启动,没有被烧着,并且沒有上升引擎制造和焊接的困难。

虽然这些问题最终被解决了,但是花了几个月和它直到1967年6月23日才那登月舱到达海角随车携带航空的Spacelines的超级Guppy。在四个月的试验和修补以后登月舱被在11月19日配对到发射工具。

1967年12月17日,一次LM试验没通过Grumman上升阶段制造植物。在 LM-5 中的一扇窗口(阿波罗 11 的 LM 的“鹰”)在其最初的小屋加压试验期间粉碎,设计是 39 增压小屋 kPa(5.7 lbf/in2)。既内部又外部的窗口和丙烯酸的玻璃 右手的窗口的封面在压力找到 35 kPa 时粉碎(5.1 lbf/in2)。在1967年12月28日,被决定设法把在 LM-1 中的玻璃窗口替换成铝窗口,作为在类似于在检查方面在 LM-5 上出现的一个的飞行中的一次失败对面的防范。

飞行[编辑]

测试中的登月舱
准备起飞的阿波罗5号

阿波罗5号的发射工具是土星IB,一只更小的火箭较之土星V。但是有能力启动 阿波罗航天船 到地球轨道中。土星IB在阿波罗5号被使用的如-204是原来被打算的一个阿波罗1号。曾经不损坏在火中在发射建筑群 34 和在发射建筑群被重新召集用于阿波罗5发射的37B。

LM-1的窗口被取代在有固态的铝的飞行之前覆镀。缩短登月舱的发送时间,没组件的腿也行被决定。不跟一群机务人员一起,没有需要发射逃跑系统火箭那通常坐在上这非常土星的秘诀。作为一个结果,被装配的火箭是仅仅55米高的。

1968年1月22日,在已计划的发射日期后八月,阿波罗5号正好在日落之前升上太空。土星IB完美的完成工作,把第二个阶段和LM插入163乘222公里的轨道。登月舱 45分钟以后分开,在两条轨道开始其下降引擎的一块已计划39块第二灼伤以后。这被缩减在由随车携带的指导计算机所作的四秒以后,发现那引擎的刺不足够迅速地在增强。这是由于软件的bug在推进的坦克被偏袒地只是保持近于正常的气压,它花长时间较之达到彻底的加速的被制作节目的四秒。

被搬到一个交换的计划的地控制器。他们打开指导计算机和开始自动次序到随车携带的计算机中制作节目。这另外二次点燃下降引擎。然后“在洞”试验“中”实施“火”和另一块上升引擎灼伤。

在四条轨道以后任务经过,二个阶段到太平洋中被留给衰退几百公里的西南关岛

1968-007A的阿波罗5号的LM上升阶段腐烂于1968年1月24日。1968-007B的LM下降阶段腐烂于1968年2月12日

勋章[编辑]

这次修补没有被美国国家航空航天局设计但是通过设计和建造登月舱的在 Grumman 飞机的工程师。为火在洞的试验画像。也拿着在最高权利中的卫星,显示没有起落架的LM。

参考资料[编辑]

外部链接[编辑]