- 浏览: 264018 次
- 性别:
- 来自: 福州
文章分类
最新评论
-
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 1698在 github.com fork 了 markdown2ht ... -
弈城围棋棋谱下载,附源码
2014-06-10 21:55 2515弈城围棋的解说用的好象是 sgf 第一版的。 平时我们用的 s ... -
appfuse 非常棒
2014-05-31 14:17 1309appfuse 非常棒 【1】在线 demo http:// ... -
stripes spring annotation
2014-05-02 14:19 812stripes 源码阅读 stripes-code-1527 ... -
junit annotation
2014-05-02 01:15 1243写了个简单的 junit 启动器。 package ... -
一种变形全排列算法
2013-06-07 17:39 1445public static boolean next(i ... -
axis 源码初步研读
2012-10-16 15:41 1683经过反复跟踪,这段代码比较重要: org.apache.ax ... -
电信彩信附件,webservice HttpURLConnection
2012-10-16 15:26 1773电信彩信附件,webservice HttpURLConnec ... -
java final parameter
2012-09-14 19:28 1127一些代码里,参数前加了 final 修饰符,不太明白这样做的原 ... -
hibernate like in 多表 查询
2012-09-07 12:24 1595public List getMaintainList( ... -
学一篇韵文,识天下汉字
2012-08-20 15:49 1756学一篇韵文,识天下汉字 http://blog.renren. ... -
简易建表工具
2012-07-19 16:56 0简易建表工具 生成 oracle 表。 -
正则表达式测试工具。
2012-05-29 17:47 1180http://docs.oracle.com/javase/t ... -
关于 《Java 性能优化之 String 篇》 的疑问
2012-05-18 11:55 1167原文地址在: http://www.ibm.com/devel ... -
java char
2012-04-24 09:30 3075刚才简单研究了一下 char 。 比想象的复杂得多。主要应该 ... -
java 与 iso-8859-1 编码
2012-04-20 10:58 11628今天又研究了一下字符编码。写了些测试代码,算是比较了解了。 ... -
java 死循环
2012-03-08 15:46 1065写了这么段代码,居然出现死循环了。真晕。 /** ... -
利息计算
2011-11-29 01:00 1291/** * 利息计算: * 借款 12000,一年 ... -
Enum 如何继承?
2011-11-08 20:30 2977Enum 如何继承? public abstract clas ... -
enum 的 name 是如何传进去的呢?
2011-11-08 17:48 1412enum 的 name 是如何传进去的呢? public e ...
相关推荐
这种扩展的灵感来自一种被称为“ Typhoglycemia(Typoglycemia)”的新词(http://en.wikipedia.org/wiki/Typoglycemia),它是“据称有关阅读书面文本背后认知过程的最新发现”。 例如,即使文本被弄乱了,大多数人...
这种扩展的灵感来自一种被称为“ Typhoglycemia(Typoglycemia)”的新词(http://en.wikipedia.org/wiki/Typoglycemia),这是“据称有关阅读书面文本背后的认知过程的最新发现”。 例如,即使文本被弄乱了,大多数...
pandas whl安装包,对应各个python版本和系统(具体看资源名字),找准自己对应的下载即可! 下载后解压出来是已.whl为后缀的安装包,进入终端,直接pip install pandas-xxx.whl即可,非常方便。 再也不用担心pip联网下载网络超时,各种安装不成功的问题。
基于java的大学生兼职信息系统答辩PPT.pptx
基于java的乐校园二手书交易管理系统答辩PPT.pptx
tornado-6.4-cp38-abi3-musllinux_1_1_i686.whl
Android Studio Ladybug 2024.2.1(android-studio-2024.2.1.10-mac.dmg)适用于macOS Intel系统,文件使用360压缩软件分割成两个压缩包,必须一起下载使用: part1: https://download.csdn.net/download/weixin_43800734/89954174 part2: https://download.csdn.net/download/weixin_43800734/89954175
有学生和教师两种角色 登录和注册模块 考场信息模块 考试信息模块 点我收藏 功能 监考安排模块 考场类型模块 系统公告模块 个人中心模块: 1、修改个人信息,可以上传图片 2、我的收藏列表 账号管理模块 服务模块 eclipse或者idea 均可以运行 jdk1.8 apache-maven-3.6 mysql5.7及以上 tomcat 8.0及以上版本
tornado-6.1b2-cp38-cp38-macosx_10_9_x86_64.whl
Android Studio Ladybug 2024.2.1(android-studio-2024.2.1.10-mac.dmg)适用于macOS Intel系统,文件使用360压缩软件分割成两个压缩包,必须一起下载使用: part1: https://download.csdn.net/download/weixin_43800734/89954174 part2: https://download.csdn.net/download/weixin_43800734/89954175
matlab
基于java的毕业生就业信息管理系统答辩PPT.pptx
随着高等教育的普及和毕业设计的日益重要,为了方便教师、学生和管理员进行毕业设计的选题和管理,我们开发了这款基于Web的毕业设计选题系统。 该系统主要包括教师管理、院系管理、学生管理等多个模块。在教师管理模块中,管理员可以新增、删除教师信息,并查看教师的详细资料,方便进行教师资源的分配和管理。院系管理模块则允许管理员对各个院系的信息进行管理和维护,确保信息的准确性和完整性。 学生管理模块是系统的核心之一,它提供了学生选题、任务书管理、开题报告管理、开题成绩管理等功能。学生可以在此模块中进行毕业设计的选题,并上传任务书和开题报告,管理员和教师则可以对学生的报告进行审阅和评分。 此外,系统还具备课题分类管理和课题信息管理功能,方便对毕业设计课题进行分类和归档,提高管理效率。在线留言功能则为学生、教师和管理员提供了一个交流互动的平台,可以就毕业设计相关问题进行讨论和解答。 整个系统设计简洁明了,操作便捷,大大提高了毕业设计的选题和管理效率,为高等教育的发展做出了积极贡献。
这个数据集来自世界卫生组织(WHO),包含了2000年至2015年期间193个国家的预期寿命和相关健康因素的数据。它提供了一个全面的视角,用于分析影响全球人口预期寿命的多种因素。数据集涵盖了从婴儿死亡率、GDP、BMI到免疫接种覆盖率等多个维度,为研究者提供了丰富的信息来探索和预测预期寿命。 该数据集的特点在于其跨国家的比较性,使得研究者能够识别出不同国家之间预期寿命的差异,并分析这些差异背后的原因。数据集包含22个特征列和2938行数据,涉及的变量被分为几个大类:免疫相关因素、死亡因素、经济因素和社会因素。这些数据不仅有助于了解全球健康趋势,还可以辅助制定公共卫生政策和社会福利计划。 数据集的处理包括对缺失值的处理、数据类型转换以及去重等步骤,以确保数据的准确性和可靠性。研究者可以使用这个数据集来探索如教育、健康习惯、生活方式等因素如何影响人们的寿命,以及不同国家的经济发展水平如何与预期寿命相关联。此外,数据集还可以用于预测模型的构建,通过回归分析等统计方法来预测预期寿命。 总的来说,这个数据集是研究全球健康和预期寿命变化的宝贵资源,它不仅提供了历史数据,还为未来的研究和政策制
基于微信小程序的高校毕业论文管理系统小程序答辩PPT.pptx
基于java的超市 Pos 收银管理系统答辩PPT.pptx
基于java的网上报名系统答辩PPT.pptx
基于java的网上书城答辩PPT.pptx
婚恋网站 SSM毕业设计 附带论文 启动教程:https://www.bilibili.com/video/BV1GK1iYyE2B
基于java的戒烟网站答辩PPT.pptx