- 浏览: 262780 次
- 性别:
- 来自: 福州
文章分类
最新评论
-
zwhc:
finalerboy 写道有问题的。。。而且问题多得很,你自己 ...
将数字转为指定长度的字符串,如果位数不够,添加前缀 0 -
finalerboy:
有问题的。。。而且问题多得很,你自己试试
for(int j ...
将数字转为指定长度的字符串,如果位数不够,添加前缀 0 -
a542435582:
没有考虑中文哦,实现了三分之一
以 UE 十六进制编辑模式的显示方式显示数据 -
white_crucifix:
kyfxbl 写道左耳朵耗子这人感觉挺装的,发的帖子也没什么营 ...
atoi -
kyfxbl:
左耳朵耗子这人感觉挺装的,发的帖子也没什么营养,我已经取消关注 ...
atoi
单词里面字母乱序不影响阅读的现象,学名叫做Typoglycemia :
http://en.wikipedia.org/wiki/Typoglycemia
运行结果:
原文:
Typoglycemia is a neologism given to a purported recent discovery about the cognitive processes behind reading written text. The word does not refer to any actual medical condition related to hypoglycemia. The word appears to be a portmanteau of "typo", as in typographical error, and "hypoglycemia". It is an urban legend/Internet meme that appears to have an element of truth to it.
The legend, propagated by email and message boards, purportedly demonstrates that readers can understand the meaning of words in a sentence even when the interior letters of each word are scrambled. As long as all the necessary letters are present, and the first and last letters remain the same, readers appear to have little trouble reading the text.
----------------------------
打乱后:
Toeiyyplmcga is a nlsoiogem gievn to a pruroeptd rneect deicvsroy about the cvtgiinoe pcseoress bnihed rianedg wteitrn txet. The word deos not refer to any aauctl micaedl cntodoiin rtlaeed to hymicyoplega. The wrod aepraps to be a potramnaetu of "typo", as in tpgiycphoaarl error, and "hepiymoylgca". It is an urabn leengd/Ieetnnrt mmee taht arpeaps to have an enelmet of tturh to it.
The leegnd, ptrapogead by email and msgaese brados, ptlrouedpry dtartmeonses taht rdreaes can udnetsnrad the manenig of wrdos in a snceetne eevn wehn the ineitorr leterts of each wrod are sleramcbd. As lnog as all the ncseerasy lttrees are prsenet, and the frist and last lrteets rmaein the same, rerdaes apepar to have ltilte tlbuore rnaedig the text.
http://en.wikipedia.org/wiki/Typoglycemia
package test; import java.util.ArrayList; import java.util.Collections; public class Test001 { private static String typoglycemia(String s){ if(s.length()<3){ return s; } ArrayList al = new ArrayList(); for(int i=1; i<s.length()-1; i++){ al.add(s.charAt(i)); } Collections.shuffle(al); StringBuffer sb = new StringBuffer(); sb.append(s.charAt(0)); for(int i=1; i<s.length()-1; i++){ sb.append( al.get(i-1) ); } sb.append(s.charAt(s.length()-1)); return sb.toString(); } private static void test01(){ String[] ss = { "This", "tutorial", "is", "designed", "for", "two", "groups", "of", "people", "The", "first", "includes", "those", "who", "are", "new", "to", "Eclipse", "and", "want", "to", "understand", "it's", "basic", "functionality", "Although", "we", "use", "a", "Java", "project", "as", "our", "example,", "this", "tutorial", "involves", "no", "programming", "and", "is", "designed", "so", "that", "the", "content", "is", "relevant", "to", "any", "application", "that", "uses", "the", "Eclipse", "workbench" }; for(int i=0; i<ss.length; i++){ //System.out.println( s ); System.out.print( typoglycemia(ss[i]) ); System.out.print( " " ); } } private static void test02(){ String s = "Typoglycemia is a neologism given to a purported recent discovery about the cognitive processes behind " + "reading written text. The word does not refer to any actual medical condition related to hypoglycemia. The " + "word appears to be a portmanteau of \"typo\", as in typographical error, and \"hypoglycemia\". It is an urban " + "legend/Internet meme that appears to have an element of truth to it.\r\n\r\n" + "The legend, propagated by email and message boards, purportedly demonstrates that readers can understand the " + "meaning of words in a sentence even when the interior letters of each word are scrambled. As long as all the " + "necessary letters are present, and the first and last letters remain the same, readers appear to have little " + "trouble reading the text."; StringBuffer sb = new StringBuffer(); int begin = 0; int end = 0; boolean isBegin = false; for(int i=0; i<s.length(); i++){ char c = s.charAt(i); // System.out.println( "isBegin:" + isBegin ); // System.out.println( "c:" + c ); if(isBegin == false){ if( (c>='A' && c<='Z') || (c>='a' && c<='z') ){ isBegin = true; begin = i; } else { sb.append(c); } } else{ if( (c>='A' && c<='Z') || (c>='a' && c<='z') ){ } else{ isBegin = false; end = i; // System.out.println( "begin:" + begin ); // System.out.println( "end:" + end ); String s1 = s.substring(begin, end); sb.append(typoglycemia(s1)); sb.append(c); } } // System.out.println( "isBegin:" + isBegin ); } System.out.println( s ); System.out.println( sb.toString() ); } /** * @param args */ public static void main(String[] args) { test02(); } }
运行结果:
原文:
Typoglycemia is a neologism given to a purported recent discovery about the cognitive processes behind reading written text. The word does not refer to any actual medical condition related to hypoglycemia. The word appears to be a portmanteau of "typo", as in typographical error, and "hypoglycemia". It is an urban legend/Internet meme that appears to have an element of truth to it.
The legend, propagated by email and message boards, purportedly demonstrates that readers can understand the meaning of words in a sentence even when the interior letters of each word are scrambled. As long as all the necessary letters are present, and the first and last letters remain the same, readers appear to have little trouble reading the text.
----------------------------
打乱后:
Toeiyyplmcga is a nlsoiogem gievn to a pruroeptd rneect deicvsroy about the cvtgiinoe pcseoress bnihed rianedg wteitrn txet. The word deos not refer to any aauctl micaedl cntodoiin rtlaeed to hymicyoplega. The wrod aepraps to be a potramnaetu of "typo", as in tpgiycphoaarl error, and "hepiymoylgca". It is an urabn leengd/Ieetnnrt mmee taht arpeaps to have an enelmet of tturh to it.
The leegnd, ptrapogead by email and msgaese brados, ptlrouedpry dtartmeonses taht rdreaes can udnetsnrad the manenig of wrdos in a snceetne eevn wehn the ineitorr leterts of each wrod are sleramcbd. As lnog as all the ncseerasy lttrees are prsenet, and the frist and last lrteets rmaein the same, rerdaes apepar to have ltilte tlbuore rnaedig the text.
发表评论
-
递归查找指定的目录,将所有的md转换成html
2015-02-16 13:33 1687在 github.com fork 了 markdown2ht ... -
弈城围棋棋谱下载,附源码
2014-06-10 21:55 2491弈城围棋的解说用的好象是 sgf 第一版的。 平时我们用的 s ... -
appfuse 非常棒
2014-05-31 14:17 1276appfuse 非常棒 【1】在线 demo http:// ... -
stripes spring annotation
2014-05-02 14:19 807stripes 源码阅读 stripes-code-1527 ... -
junit annotation
2014-05-02 01:15 1236写了个简单的 junit 启动器。 package ... -
一种变形全排列算法
2013-06-07 17:39 1442public static boolean next(i ... -
axis 源码初步研读
2012-10-16 15:41 1667经过反复跟踪,这段代码比较重要: org.apache.ax ... -
电信彩信附件,webservice HttpURLConnection
2012-10-16 15:26 1768电信彩信附件,webservice HttpURLConnec ... -
java final parameter
2012-09-14 19:28 1121一些代码里,参数前加了 final 修饰符,不太明白这样做的原 ... -
hibernate like in 多表 查询
2012-09-07 12:24 1586public List getMaintainList( ... -
学一篇韵文,识天下汉字
2012-08-20 15:49 1734学一篇韵文,识天下汉字 http://blog.renren. ... -
简易建表工具
2012-07-19 16:56 0简易建表工具 生成 oracle 表。 -
正则表达式测试工具。
2012-05-29 17:47 1173http://docs.oracle.com/javase/t ... -
关于 《Java 性能优化之 String 篇》 的疑问
2012-05-18 11:55 1157原文地址在: http://www.ibm.com/devel ... -
java char
2012-04-24 09:30 3069刚才简单研究了一下 char 。 比想象的复杂得多。主要应该 ... -
java 与 iso-8859-1 编码
2012-04-20 10:58 11603今天又研究了一下字符编码。写了些测试代码,算是比较了解了。 ... -
java 死循环
2012-03-08 15:46 1046写了这么段代码,居然出现死循环了。真晕。 /** ... -
利息计算
2011-11-29 01:00 1280/** * 利息计算: * 借款 12000,一年 ... -
Enum 如何继承?
2011-11-08 20:30 2961Enum 如何继承? public abstract clas ... -
enum 的 name 是如何传进去的呢?
2011-11-08 17:48 1388enum 的 name 是如何传进去的呢? public e ...
相关推荐
这种扩展的灵感来自一种被称为“ Typhoglycemia(Typoglycemia)”的新词(http://en.wikipedia.org/wiki/Typoglycemia),它是“据称有关阅读书面文本背后认知过程的最新发现”。 例如,即使文本被弄乱了,大多数人...
这种扩展的灵感来自一种被称为“ Typhoglycemia(Typoglycemia)”的新词(http://en.wikipedia.org/wiki/Typoglycemia),这是“据称有关阅读书面文本背后的认知过程的最新发现”。 例如,即使文本被弄乱了,大多数...
微信小程序Artandw_eapp-artand
本项目是一款基于Vue和JavaScript开发的心旅途个性化推荐旅游平台设计源码,整合了513个Java文件、76个PNG图片、70个XML配置文件、62个JavaScript文件、42个Vue组件文件、28个CSS样式文件、22个HTML文件、18个YAML配置文件、16个属性文件、11个Vue模板文件,总计919个文件。平台采用现代化前端技术堆栈,旨在为用户提供个性化的旅游推荐服务。
微信小程序开发地图演示、地图导航、标记标注_echat-weapp-mpdemo
Vue和Axios文件
该项目为基于Python语言开发的HTML与任务清单关系系统,包含50个文件,其中16个为HTML文件,14个为Python源代码文件,其余包括Python编译文件、Markdown文件、图片、数据库文件、配置文件、模板文件、文本文件等,旨在为用户提供简单便捷的生活时间段安排及任务规划管理工具。
全国大学生电子设计大赛项目合集全国电赛优秀作品大学生电子竞赛历届题目
该项目是一款基于Python和pygame引擎开发的植物大战僵尸游戏,包含125个文件,涵盖93个PNG图像文件、11个Python源代码文件、10个Python字节码文件、8个GIF动画文件、1个Git忽略配置文件、1个JSON数据文件以及1个Markdown说明文件。游戏设计源码为学习游戏开发提供了丰富的实践素材。
本项目是一款以Java为核心开发的Qiniu服务端设计源码整合的RunFlow桌面端效率工具,总文件数29个,包括17个Java源文件、2个属性文件、1个Git忽略文件、1个JAR包文件、1个LICENSE文件、1个Markdown文件、1个YAML文件、1个Maven配置文件和1个命令文件。该工具旨在提升工作效率,适用于各种桌面环境下的便捷使用。
那些年,与你同分同位次的同学都去了哪里?全国各大学在辽宁2020-2024年各专业最低录取分数及录取位次数据,高考志愿必备参考数据
Golang支付-微信公众号、微信应用、微信小程序、微信企业支付、支付宝网络版、支付宝应用、支付宝企业支付_支付宝
医疗辅助诊断系统-开题
该项目为东东购物网的后台开发源码,采用JavaScript为主要编程语言,辅以CSS、Java、HTML等多种语言,共包含1300个文件。具体文件类型分布如下:458个PNG图片文件、215个JavaScript文件、160个JPG图片文件、159个GIF图片文件、107个CSS样式表文件、96个Java源代码文件、28个HTML文件、24个XML文件、12个JSON文件、8个Map文件。该系统旨在提供高效、便捷的购物后台管理功能。
content_1728052071778.apk
资源视频编辑软件win781064位系统
职业心理测试人格气质情绪控制测试18个文件
那些年,与你同分同位次的同学都去了哪里?全国各大学在辽宁2020-2024年各专业最低录取分数及录取位次数据,高考志愿必备参考数据
该项目为基于Python语言的微信小程序源码,全面整合了JavaScript和微信小程序开发技术。项目结构包含50个文件,涵盖了15个PNG图片、9个JSON配置、8个JavaScript脚本、7个wxss样式表、6个WXML模板和4个JPG图片。此外,还包括1个Markdown文档。该小程序的设计与实现展现了Python编程的强大能力,适用于微信生态下的各类应用场景。
全国大学生电子设计大赛项目合集全国电赛优秀作品电赛B题风力摆控制系统设计(原理图+源代码+设计报告等)