LoveUnix » 墨香雅韵 » interesting research
让LU留住您的每

一天 让LU博客留住您的每一天
2004-10-14 10:07 gandalf
Aoccdrnig to rscheearch dneo at an Elingsh uinervtisy,it deosn&#39;t mttaer in waht oredr the ltteers in a wrod are, the olny iprmoetnt tihng is taht frist and lsat ltteer is in teh rghit pclae.The rset can be a toatl mses adn yuo cna sitll raed it wouthit ayn porbselm. Tihs is bcuseae we do not raed ervey lteter by itslef but the wrod as a wlohe. <br /><br /> <!--emo&:grin:--><img src='style_emoticons/default/grin.gif' border='0' style='vertical-align:middle' alt='grin.gif' /><!--endemo-->  <!--emo&:grin:--><img src='style_emoticons/default/grin.gif' border='0' style='vertical-align:middle' alt='grin.gif' /><!--endemo-->

2004-10-14 10:14 trick
ho,mygod

2004-10-21 10:21 gandalf
aha, your avatar is very funny<br /><img src='http://www.0599np.com/bbs/UploadFace/761_200410713442564865.gif' border='0' alt='user posted image' />

2004-11-2 22:56 Yoda
I should have read this earlier&#33; <br /><br />Well, it would be better for Nairanidutilos to do the other reply.<br /><br /> <!--emo&:grin:--><img src='style_emoticons/default/grin.gif' border='0' style='vertical-align:middle' alt='grin.gif' /><!--endemo-->

2004-11-2 23:07 Nairanidutilos
<!--QuoteBegin-Yoda+2004-11-02 22:56:13--><div class='quotetop'>QUOTE(Yoda @ 2004-11-02 22:56:13)</div><div class='quotemain'><!--QuoteEBegin-->I should have read this earlier&#33; <br /><br />Well, it would be better for Nairanidutilos to do the other reply.<br /><br /> <!--emo&:grin:--><img src='style_emoticons/default/grin.gif' border='0' style='vertical-align:middle' alt='grin.gif' /><!--endemo--><br />[right][snapback]407029[/snapback][/right]<br /><!--QuoteEnd--></div><!--QuoteEEnd--><br /><br /><br /><!--QuoteBegin-gandalf+2004-10-14 10:07:42--><div class='quotetop'>QUOTE(gandalf @ 2004-10-14 10:07:42)</div><div class='quotemain'><!--QuoteEBegin-->Aoccdrnig to rscheearch dneo at an Elingsh uinervtisy,it deosn&#39;t mttaer in waht oredr the ltteers in a wrod are, the olny iprmoetnt tihng is taht frist and lsat ltteer is in teh rghit pclae.The rset can be a toatl mses adn yuo cna sitll raed it wouthit ayn porbselm. Tihs is bcuseae we do not raed ervey lteter by itslef but the wrod as a wlohe. <br /><br /> <!--emo&:grin:--><img src='style_emoticons/default/grin.gif' border='0' style='vertical-align:middle' alt='grin.gif' /><!--endemo-->&nbsp; <!--emo&:grin:--><img src='style_emoticons/default/grin.gif' border='0' style='vertical-align:middle' alt='grin.gif' /><!--endemo--><br />[right][snapback]398962[/snapback][/right]<br /><!--QuoteEnd--></div><!--QuoteEEnd--><br /><br /><br /> <!--emo&:wacko:--><img src='style_emoticons/default/wacko.gif' border='0' style='vertical-align:middle' alt='wacko.gif' /><!--endemo-->  <!--emo&:wacko:--><img src='style_emoticons/default/wacko.gif' border='0' style='vertical-align:middle' alt='wacko.gif' /><!--endemo-->  <!--emo&:wacko:--><img src='style_emoticons/default/wacko.gif' border='0' style='vertical-align:middle' alt='wacko.gif' /><!--endemo--> <br /><br /><br />taht slaever egassem evoba eht<br /><br /><br />gnidne eht dna gninnigeb eht ot noitnetta erom yap ot sdnet dnim eht fo msinahcem eht<br /><br /><br />detnarg rof sgniht ekat ot ekil elpoep erofereht<br /><br /><br /><span style='color:blue'>Solitudinarian</span>,flesym evigrof ot,nam si rre ot,erofereht<br /><br /> <!--emo&:wacko:--><img src='style_emoticons/default/wacko.gif' border='0' style='vertical-align:middle' alt='wacko.gif' /><!--endemo-->  <!--emo&:wacko:--><img src='style_emoticons/default/wacko.gif' border='0' style='vertical-align:middle' alt='wacko.gif' /><!--endemo-->  <!--emo&:wacko:--><img src='style_emoticons/default/wacko.gif' border='0' style='vertical-align:middle' alt='wacko.gif' /><!--endemo--> <br /><br /><br /><br />

2004-11-3 16:47 gandalf
To read your input, I have to write a script:<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->%cat do_reverse<br />#&#33;/usr/bin/perl<br />#read a text then reverse each word<br />#with all characters in the opposite order<br /><br />die &#34;You should appoint a source file&#33;\nUSAGE&#58; do_reverse source.txt\n $&#33;&#34; if&#40;@ARGV&#60;1&#41;;<br />open&#40;READ_txt,&#34;$ARGV&#91;0&#93;&#34;&#41;;<br />my $i=1;<br />while&#40;&#60;READ_txt&#62;&#41;{<br /> &nbsp; &nbsp; &nbsp; &nbsp;$new&#91;$i&#93;=reverse&#40;$_&#41;;<br /> &nbsp; &nbsp; &nbsp; &nbsp;$i++;<br />}<br />close&#40;READ_txt&#41;;<br />foreach&#40;@new&#41;{<br /> &nbsp; &nbsp; &nbsp; &nbsp;chomp $_;<br /> &nbsp; &nbsp; &nbsp; &nbsp;printf&#40;&#34;%s&#34;, $_&#41;;<br />}<br />print &#34;\n&#34;;<br />&#91;sc28&#93; /users1/claudehu/perl 210 %./do_reverse orig.txt<br /><br />the above message reveals that<br />the mechanism of the mind tends to pay more attention to the beginning and the ending<br />therefore people like to take things for granted<br />therefore,to err is man,to forgive myself,nairanidutiloS<br />%<br /><!--c2--></div><!--ec2-->

2004-11-4 00:30 Yoda
I found from the web, the script:<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;script&#62;<br />var str=prompt&#40;&#34;请输入字符串&#34;,&#34;123&#34;&#41;<br />if&#40;str&#33;=null&#41;alert&#40;str.split&#40;&#34;&#34;&#41;.reverse&#40;&#41;.join&#40;&#34;&#34;&#41;&#41;;<br />&#60;/script&#62;<!--c2--></div><!--ec2--><br /><br /> <!--emo&:)--><img src='style_emoticons/default/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /><!--endemo-->

2004-11-6 00:32 Solitudinarian
I added two lines to the script and now the html goes like this:<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;HTML&#62;<br />&#60;HEAD&#62;<br />&#60;TITLE&#62;Reverse&#60;/TITLE&#62;<br />&#60;meta http-equiv=&#34;Content-Type&#34; content=&#34;text/html; charset=gb2312&#34;&#62;<br />&#60;/HEAD&#62;<br /><br />&#60;BODY&#62;<br />&#60;script&#62;<br />var str=prompt&#40;&#34;请输入字符串&#34;,&#34;123&#34;&#41;<br />document.writeln&#40;str+&#34;&#60;br&#62;&#60;br&#62;&#34;&#41;;<br />if&#40;str&#33;=null&#41;alert&#40;str.split&#40;&#34;&#34;&#41;.reverse&#40;&#41;.join&#40;&#34;&#34;&#41;&#41;;<br />document.writeln&#40;str.split&#40;&#34;&#34;&#41;.reverse&#40;&#41;.join&#40;&#34;&#34;&#41;&#41;;<br />&#60;/script&#62;<br />&#60;/BODY&#62;<br />&#60;/HTML&#62;<br /><!--c2--></div><!--ec2--><br /><br />Now two lines of different directions can also be copied more easily.<br /><br /> <!--emo&:)--><img src='style_emoticons/default/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /><!--endemo-->

页: [1]
查看完整版本: interesting research


Powered by Discuz! Archiver 5.5.0  © 2001-2006 Comsenz Inc.