In engineering, there are always hot topics and non-hot topics. Whenever there is a hot topic, it's like everyone is working on it. No one wants to be left behind. More precisely, everyone seems to want to get some money out of it. Hot topics come and go, leaving behind lots of people with knowledge and skills that are not valued anymore.
When I first started my PhD, I thought I was working on a relatively "interesting" area. But as I am close to graduation, everybody seems to despise this area. They already moved on to the current hot topics like big data. Everywhere you hear people say: "Oh, xx area is not worthwhile studying anymore." When you submit a paper, reviewers tell you that they are not interested in research in this old area anymore. When you submit a propose, funding agencies tell you that they definitely don't give funding to this dying area. When you try to find a job, companies emphasize that they are looking for people working on this and this hot topics. No one values your experience in the old non-hot area.
Now I see why mathematician is the best job in the world. No one tells a mathematician what he or she ought to work on. No one tells the mathematicians to work on some hot topics. Because saying this, it's like telling the mathematicians that maybe you are not too stupid to work on this famous problem, this long-open problem; it's an insult to the mathematician's intelligence.
Wednesday, June 4, 2014
Monday, April 7, 2014
C++ STL中Map的按Key排序和按Value排序
Very good explanation about how to sort map according to key and value, respectively.
http://blog.csdn.net/iicy266/article/details/11906189
http://blog.csdn.net/iicy266/article/details/11906189
Labels:
Technology
Thursday, January 16, 2014
Add copyright notice in IEEE Latex conference class
http://www.stabeler.com/blog/541/
Add the following two commands before \maketitle
\IEEEoverridecommandlockouts
\IEEEpubid{\makebox[\columnwidth]{978-1-4799-3360-0/14/\$31.00~\copyright~2014 IEEE \hfill} \hspace{\columnsep}\makebox[\columnwidth]{ }}
Use the \IEEEpubidadjcol command somewhere in your second column text, which makes the relevant adjustments for the text. (didn't use in my paper, it seems to be okay without this command).
Add the following two commands before \maketitle
\IEEEoverridecommandlockouts
\IEEEpubid{\makebox[\columnwidth]{978-1-4799-3360-0/14/\$31.00~\copyright~2014 IEEE \hfill} \hspace{\columnsep}\makebox[\columnwidth]{ }}
Use the \IEEEpubidadjcol command somewhere in your second column text, which makes the relevant adjustments for the text. (didn't use in my paper, it seems to be okay without this command).
Labels:
Technology
Monday, December 16, 2013
Copy-pastable ASCII characters with pdftex/pdflatex
Trying to get a pastable URL that has tilde in it, using \verb|~| to replay the tilde make the url working when you paste it from the pdf file to a web browser.
Learned it from here:
This document presents how to obtain fully copyable PDF documents from
Latex. By fully, I mean that all ASCII characters are copied into the
equivalent binary character with Ctrl-C in a PDF viewer (evince, xpdf,
acrobat reader, etc.) or with pdftotext in command line. Indeed, by
default certain characters are transformed, eg. ' becomes ’.
Let's list the printable ASCII characters:
0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"#$%&\'()*+,-./:;<=>?@[]^_`{|}~
Alphanumeric characters are always copyable. Many punctutation
characters work out of the box if powerful fonts are correctly set up
(e.g. with cm-super): . / : ; < = > ? @ [ ].
Many other characters just need to be escaped in order to be copy-pastable:
\#, \$, \%, \&, \{, \}
The problems start with " (double quotes), \ (backslash), ' (single quote, apostrophe), - (hyphen or minus), ^ (caret), | (pipe), ` (backtick, backquotes, accent grave), ~ (equivalency sign - tilde), _ (underscore).
It turns out that obtaining those characters is not straigthforward: it depends on your default fonts and on whether
\usepackage[T1]{fontenc}
is present.
Here are commands that might work:
- " (double quotes):
\verb|"|
,\char34
- \ (backslash):
\textbackslash
(with\usepackage{textcomp}
),\verb|\|
,\char124
- ' (single quote, apostrophe):
\textquotesingle
(with\usepackage{textcomp}
),\char"0D
,\char39
- - (hyphen or minus):
\verb|-|
,\texttt{-}
,\char45
- ^ (caret):
\verb|^|
,\char94
- | (pipe): out of the box (sometimes),
\texttt{|}
,\char124
- ` (backquote):
\`{}
,\char"0D
,\char96
- ~ (equivalency sign - tilde):
\verb|~|
,\char126
- _ (underscore): \verb|~|,
\char95
On my Debian Linux / TeX Live, with cm-super installed, and with \usepackage[T1]{fontenc} , the following produces a completely copy-pastable PDF:
\documentclass{article} \usepackage[T1]{fontenc} \usepackage{textcomp} \begin{document} \tiny{ 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!\char34\#\$\%\& \verb|\|\textquotesingle()*+,\verb|-|./:;<=>?@[]\verb|^|\verb|_|\`{}\{\texttt{|}\}\verb|~| } \end{document}
Without
: the following works:
\documentclass{article} \begin{document} \tiny{ 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!\verb|"|\#\$\%\&\verb|\|\char"0D()*+,\verb|-|./:;<=>?@[]\verb|^|\verb|_|\`{}\{\texttt{|}\}\verb|~| } \end{document}
Labels:
Technology
Wednesday, February 6, 2013
Compilation Error on inet-2.1.0 32/64 bit compat of MACAddress.h MACAddress.cc
After I updated my OMNeT++ from 4.0 to 4.2.2, I also tried to update the inet to the newest version 2.1.0. According to the INSTALL file, I run the make command. I got the following errors:
linklayer/contract/MACAddress.h line 60: error: integer constant is too large for ‘long’ type
linklayer/contract/MACAddress.h line 120: error: integer constant is too large for ‘long’ type
linklayer/contract/MACAddress.h line 125: error: integer constant is too large for ‘long’ type
I found the following post by EZ.
https://groups.google.com/forum/#!msg/omnetpp/JF_BbiqQIWg/9wgJWoezgoEJ
Compilation Warning on inet-1.99.4 32/64 bit compat of MACAddress.h
1 post by 1 author in omnetpp
| ![]() ![]() ![]() |
I have just moved to inet-1.99.4-development- 03d5d15-src.tgz
I am running on Ubuntu i686:
2.6.35-32-generic #67-Ubuntu SMP Mon Mar 5 19:35:26 UTC 2012 i686 GNU/Linux
I get the warnings:
linklayer/contract/MACAddress. h:59: warning: integer constant is too large for ‘unsigned long’ type
linklayer/contract/MACAddress. h:119: warning: integer constant is too large for ‘unsigned long’ type
linklayer/contract/MACAddress. h:124: warning: integer constant is too large for ‘unsigned long’ type
It is clearly caused by the fact long int on my machine is 32bit...
AFAIK there is no "standard" way to write portable code that will know if the long int is 64bit or 32bit.
So I am not sure what to propose here.
I think a best fix should go into OMNET configure script itself (could be coded as a simple test
program that checks the sizeof(long int)). That would probably add -DIS64BIT or similar.
Meanwhile (for linux) we can simply add the following code to linklayer/contract/ MACAddress.h:
#if defined(_WORDSIZE) && __WORDSIZE == 64
# define MAC_ADDRESS_MASK 0x0000ffffffffffffUL
#else
# define MAC_ADDRESS_MASK 0x0000ffffffffffffULL
#endif
So I opened file /src/linklayer/contract/MACAddress.h
In the head there is this line:
#define MAC_ADDRESS_MASK 0xffffffffffffL
I changed it to:
#if defined(_WORDSIZE) && __WORDSIZE == 64
# define MAC_ADDRESS_MASK 0x0000ffffffffffffUL
#else
# define MAC_ADDRESS_MASK 0x0000ffffffffffffULL
#endif
#if defined(_WORDSIZE) && __WORDSIZE == 64
# define MAC_ADDRESS_MASK 0x0000ffffffffffffUL
#else
# define MAC_ADDRESS_MASK 0x0000ffffffffffffULL
#endif
Run make command again, I got one similar error:
linklayer/contract/MACAddress.cc line 137: error: integer constant is too large for ‘long’ type
In file /src/linklayer/contract/MACAddress.cc line 137,
In file /src/linklayer/contract/MACAddress.cc line 137,
uint64 intAddr = 0x0AAA00000000L + (autoAddressCtr & 0xffffffffL);
I changed it to:
uint64 intAddr = 0x0AAA00000000ULL + (autoAddressCtr & 0xffffffffULL);
Run make again, and compile inet-2.1.0 successfully.
Labels:
Technology
Friday, July 27, 2012
Fixing "font not embedded" issue to pass the IEEE PDF eXpress check
Found the solution here: http://mohamednabeel.blogspot.com/2009/10/fixing-font-not-embedded-issue-to-pass.html
Issue #2: Font Times-Italic, Times-Roman, Times-BoldItalic, Times-Bold, Helvetica, Courier is not embedded.
You can see what fonts are embedded and what are not, by using "pdffont file.pdf" and looking at the "emb" column. In our case, it did show that some fonts are not embedded.
Fix: We searched the Internet [1, 2]and found that in order to fix this (i.e. to embed all the required fonts) we need to do the conversion from tex to pdf in two stages. This is a dirty hack; but it works.
latex file.tex
bibtex file
latex file.tex
latex file.tex (Now we have file.dvi)
dvips -Ppdf -G0 -tletter file.dvi (Now we have file.ps)
ps2pdf -dCompatibilityLevel=1.4 -dPDFSETTINGS=/prepress file.ps file.pdf (Now we have file.pdf)
Issue #2: Font Times-Italic, Times-Roman, Times-BoldItalic, Times-Bold, Helvetica, Courier is not embedded.
You can see what fonts are embedded and what are not, by using "pdffont file.pdf" and looking at the "emb" column. In our case, it did show that some fonts are not embedded.
Fix: We searched the Internet [1, 2]and found that in order to fix this (i.e. to embed all the required fonts) we need to do the conversion from tex to pdf in two stages. This is a dirty hack; but it works.
latex file.tex
bibtex file
latex file.tex
latex file.tex (Now we have file.dvi)
dvips -Ppdf -G0 -tletter file.dvi (Now we have file.ps)
ps2pdf -dCompatibilityLevel=1.4 -dPDFSETTINGS=/prepress file.ps file.pdf (Now we have file.pdf)
Labels:
Technology
Monday, June 25, 2012
穿越迷雾那头是什么?
近几年穿越小说很是风靡,穿越电视剧的大潮也不甘示弱紧随其后。我一直都没有看过穿越小说,倒是看了穿越剧《步步经心》。电视开始还有些意思,后面便开始无聊起来。看完再仔细想想,基本都是作者yy。正如网上所调侃的:女子们,醒醒吧,就算是你们穿越回古代去,你们也只能是个丫鬟不会是个公主。
但我仍然很好奇,为什么那么多人喜欢看穿越小说?看这些小说的会对人有什么样的影响呢?我也很喜欢看小说,我个人感觉看小说尤其是好小说时,潜意识里面容易把自己想象成为书中的主角,随着书中人物的幸福而开心,他们的苦难而概叹命运,因着书中人物超乎常人的能力和性格而自我感觉良好。记得我在看《納尼亚传奇》时,最喜欢的角色就是Lucy,她虽是最小的女孩却非常勇敢,又很善良,她对Aslan的信念也是她的兄弟姐妹中最强的。看完书后在听audiobook的时候,有一天我忽然意识到我很自觉得把自己放在了Lucy的角色上。然而现实中的我可能是Edmund,那个属于死亡的叛徒,那个用Aslan的死亡换来生命的Edmund。有时我又会是Susan,容易抱怨,信念薄弱。
那么在看穿越小说的时候,不可避免的会被带入到书中。最近的很多穿越小说,主角大都从现代回到过去,因为有着一些历史发展的知识,再加上作者所赋予的聪明才智,都会在古代的环境里得心应手,大有作为,或享得众人宠爱,寻得如意郎君。若不经思考,潜意识里把自己放在书中主角的位置,被穿越小说带到这样的幻觉中,沉迷于这样的书中,到底是成了对现实不满的逃避,或对奇遇的向往,对被众人追捧的渴求, 对现实爱情失望而对美好爱情的寻求。
孔子说学而不思则罔,讲的正是这个道理。爱看书本是好事,但若只是看书不经思考,受益就浅,也容易被书中表象所蒙蔽。在穿越小说的那头,你能获得什么,到什么样的影响更取决于你对书的思考。
后记:
有很多人穿越小说持批判态度,我没有看过,所以不想妄加评论,下面只是摘录一些别人批判的观点。全文请看:http://blog.sina.com.cn/s/blog_4c2492380100v4nq.html
但我仍然很好奇,为什么那么多人喜欢看穿越小说?看这些小说的会对人有什么样的影响呢?我也很喜欢看小说,我个人感觉看小说尤其是好小说时,潜意识里面容易把自己想象成为书中的主角,随着书中人物的幸福而开心,他们的苦难而概叹命运,因着书中人物超乎常人的能力和性格而自我感觉良好。记得我在看《納尼亚传奇》时,最喜欢的角色就是Lucy,她虽是最小的女孩却非常勇敢,又很善良,她对Aslan的信念也是她的兄弟姐妹中最强的。看完书后在听audiobook的时候,有一天我忽然意识到我很自觉得把自己放在了Lucy的角色上。然而现实中的我可能是Edmund,那个属于死亡的叛徒,那个用Aslan的死亡换来生命的Edmund。有时我又会是Susan,容易抱怨,信念薄弱。
那么在看穿越小说的时候,不可避免的会被带入到书中。最近的很多穿越小说,主角大都从现代回到过去,因为有着一些历史发展的知识,再加上作者所赋予的聪明才智,都会在古代的环境里得心应手,大有作为,或享得众人宠爱,寻得如意郎君。若不经思考,潜意识里把自己放在书中主角的位置,被穿越小说带到这样的幻觉中,沉迷于这样的书中,到底是成了对现实不满的逃避,或对奇遇的向往,对被众人追捧的渴求, 对现实爱情失望而对美好爱情的寻求。
孔子说学而不思则罔,讲的正是这个道理。爱看书本是好事,但若只是看书不经思考,受益就浅,也容易被书中表象所蒙蔽。在穿越小说的那头,你能获得什么,到什么样的影响更取决于你对书的思考。
后记:
有很多人穿越小说持批判态度,我没有看过,所以不想妄加评论,下面只是摘录一些别人批判的观点。全文请看:http://blog.sina.com.cn/s/blog_4c2492380100v4nq.html
杨陈刚:喜欢穿越小说的,明显以女生居多,喜欢的理由也比较一致,穿越小说虚构的情景满足了她们的虚荣和幻想,我们不难发现穿越的主人公多成为了王子公主等显赫的人物。
黄 玲: 西方也有穿越小说,像马克·吐温的《康州美国佬在亚瑟王朝》,被誉为“穿越文的鼻祖”。它
具有现实批判精神,在穿越中表现现代共和制与中世纪君主制的冲突,现代文明与封建教会的冲突,是很严肃的小说。和中国今天的穿越小说的力度完全不一样,现
在中国的穿越小说多是言情加历史。
徐霞:穿越小说的受众对象多以女性为主,一定程度上她们把穿越小说作为自己精神的寄托,用来填补现实生活各方面的空虚。穿越小说很大程度上迎合了女性的阅读喜好,尤其是其中爱情题材的作品,因为随着现实生活中纯粹的爱情越来越少,世俗的因素在婚姻中所占的比重越来越强大,人逐渐的物质化,很多女生转而从
穿越小说中去寻找在现实中寻觅不到的轰轰烈烈的爱情。而历史题材的穿越小说,也从很多方面满足了人们对野史的兴趣。
徐曦: 其实就跟男生看武侠小说寻找精神寄托一样,女生看穿越小说也是在寻找一种精神的宣泄、得到
一种心理的补偿,在现实生活中得不到的优质男、体验不到的浪漫的爱情,却可以在小说的世界里实现。在穿越的世界里,有英俊挺拔的皇子,有浪荡江湖的快意,
有后宫勾心斗角、险中求生的刺激……在那个虚幻的世界里,你可以把自己带入书中女主角的命运,跟着主角一起体会一场轰轰烈烈的爱情,经历一场生离死别的爱
恋;更何况在穿越的世界里,你还可以预知历史、改变历史,甚至把现代的文明与科技带到古代去,这多多少少给了现在很多在生活中平平淡淡、庸庸碌碌的“宅
女”们以心理的滋养与慰藉,那些在现实生活中被压抑了的激情与幻想在穿越的世界里通通得以复活。对于众多的女生来说,穿越小说起到了“成人的童话”的功效。
罗欢:和现实不一样的生活使人们在阅读时有一种猎奇的心理。
黄玲:穿越是人对现实的逃避。它的内容有着对现实的折射,说明人们还是期望传奇、浪漫,只不过换个场景实现而已。
徐霞:这也从一个侧面反映出现如今人的精神世界越来越荒凉,越来越没有精神的寄托了。从另一个角度看,那些现在或者曾经对穿越小说有过热衷以
及思考的人,比起那些完全对这个类型的小说漠视的人一定意义上更显得可贵,想着穿越的人说明他们的心底多少还存在着美好的梦想,还知道自己在现实中丢失的
是什么。而那些连穿越都懒得穿的人,或许他们的内心真的已经一片荒凉。
蔡丽:穿越小说有着人们对浪漫、传奇生活的向往。爱情是人类的本能。
罗欢:写给男生看的穿越小说离不开金钱权势和美女,写给女生看的穿越小说离不开好的对象和美满的家庭。
杨陈刚:穿越小说读起来很轻松,文字不少简短明快,有点古意。内容大多其实就是把言情故事放在一个穿越的背景下。
谢轶群:总体上说,穿越作品的文化价值大于文学价值,它的火爆流行是文化现象,不是文学现象;对它适合做社会文化批评,而不是审美批评。
黄玲:写未来就是科幻小说了,不是穿越小说。如果穿越到了未来,人们就没有优越感了,不能再做预言家。穿越到过去,一切大的事件、方向已经确定,现代人在那里有优势,这是穿越小说的一个特色。
郭鹏群:穿越小说或穿越剧的盛行原因还有两点:一是我们对现实的无法把握。
如今国内流行的电视剧主要有三种:革命历史剧;美化皇权的宫廷剧,其中就包括了穿越剧;以及完全不符合现实的“现实剧”,如《老大的幸福》《乡村爱情》
等,完全是麻痹或娱乐百姓。指向“现在”的电视剧都不多,连现实的深层矛盾都不敢揭露,现实的真实性都把握不住,还想把握未来?所以作家很多作品都是回避
现实的。二是我们对未来其实有预感,但是不敢去想象,更不敢穿越到未来。社会要继续腐败堕落下去,直到崩塌、溃败?我们看不到解决它的有效途径,人们当然
不敢想象未来了,梦想也无从谈起。
宋家宏:穿越多是爱情小说,说明现实没有纯粹的爱情,只能用此来做心理补偿。人们宁肯美化过去来拒绝现实,逃避未来。典型九斤老太式的“厚古薄今”。
蔡丽:这不就像是阿Q,穿越其实是一剂现实的安慰剂,说明现实生活真是太平庸了,一点想象的空间都没有,那就到虚幻空间去吧。把自己设定到某个历史场景,演绎一段爱情或者人生,尤其对女生来讲也是一份满足。或者是不是这样,在现实有多实际,在穿越就有多纯情?
谢轶群:这还是不相信自己有改变现实的能力,不敢面对现实和未来,因为现实太强大,只有通过穿越的避风港来麻痹自己,可以说它是精神鸦片。
罗
欢:穿越小说近来有一点变化:早期穿越小说多是主人公成为公主格格等重要人物,天生就具有一些能力或者神通,不需要怎么努力就能获得成功。
但现在的穿越小说主人公多是成为平凡人物,比如《平凡的清穿日子》、《明朝五好家庭》等一系列的现在被称为“种田文”的穿越小说,并且主人公需要通过自己
的一系列努力奋斗才获得最终的成功。作者有意无意的都想告诉人们,不管身处什么时代,个人的努力才是最重要的。慢慢的穿越小说也变得有励志作用了。
Labels:
Writing
Subscribe to:
Posts (Atom)