1、模式定义
解释器模式(Interpreter Pattern) :定义语言的文法,并且建立一个解释器来解释该语言中的句子,这里的“语言”意思是使用规定格式和语法的代码,它是一种类行为型模式。
2、模式结构
解释器模式包含如下角色:
AbstractExpression: 抽象表达式
TerminalExpression: 终结符表达式
NonterminalExpression: ...
分类:
其他好文 时间:
2014-11-19 01:27:44
阅读次数:
151
linux shell scripts:Syntax error: Bad for loop variable
sh add.sh 报错:
add.sh: 4: Syntax error: Bad for loop variable
代码没有错误,Ubuntu为了加快开机速度,用dash代替bash。
解决办法:取消dash,使用bash:
sudo dpkg-reconfigure dash
选择No选项。...
分类:
系统相关 时间:
2014-11-18 16:01:51
阅读次数:
226
最近想起Android开发的知识,好久没有使用了,都忘得差不多了,今天查看了一会资料往回捡捡,顺便写下来帮助一下需要的同学。
首先讲述一下Environment与StatFs这两个类,然后介绍它们的详细使用方法。
1、 Environment 类:
Environment 是一个提供访问环境变量的类。
Environment 包含常量:
MEDIA_BAD_REMOVAL
解释...
分类:
移动开发 时间:
2014-11-18 11:53:43
阅读次数:
184
HowbaddoyouwannabesuccessfulTherewasayoungmanwhoyouknowhewantedtomakealotofmoneyandsohewenttothisguru,right?Hetoldtheguru“youknowiwannabeonthesameleve...
分类:
其他好文 时间:
2014-11-17 15:26:33
阅读次数:
200
其实问题的本质是对elf格式的理解问题,因为是查看so库的符号表发现的问题。事情起因是这样的,由于我的一个程序编译的时候出现了undefined reference to “XXX”的错误,需要链接特定的so库,发现用nm [file]找不到“XXX”函数符号,结果用readelf -s [file...
分类:
其他好文 时间:
2014-11-17 11:58:02
阅读次数:
178
http://www.aqee.net/why-programmers-are-bad-at-estimating-times/一个我曾经共事过的很有经验的项目经理曾宣称说,他会拿程序员估计出的时间乘以π值,然后再提高一个数量级,这样得出的才是正确的开发所需要的时间。1天时间经过变换后是3.14周。...
分类:
其他好文 时间:
2014-11-16 09:18:05
阅读次数:
189
部署方式还是跟网站的部署方式一样,可是通过localhost访问一直提示400(bad request)错误。可以在iis上预览到。在vs上引用的时候怎么都预览不到。换个思路,把localhost换成本机的IP试一下。问题解决在vs上添加了web服务的引用后,需要using引用命名空间,别忘记了!!
分类:
Web程序 时间:
2014-11-13 22:16:34
阅读次数:
184
解决客户端挂载nfs是出现如下报错问题:mount:wrongfstype,badoption,badsuperblockon172.16.1.9:/home/addam,
missingcodepageorhelperprogram,orothererror
(forseveralfilesystems(e.g.nfs,cifs)youmight
needa/sbin/mount.<type>helperprogram)
Insomecasesusefulinf..
分类:
其他好文 时间:
2014-11-13 19:07:09
阅读次数:
108
/usr/local/lib/libz.a: could not read symbols: Bad value(64 位 Linux)/usr/bin/ld: /usr/local/lib/libz.a(crc32.o): relocation R_X86_64_32 against `a loc...
分类:
系统相关 时间:
2014-11-13 16:21:00
阅读次数:
297
建立了一个域用户ftp.始终登陆不上winserver 2008 R2上的FTP.错误如下:530-User cannot log in.Win32 error: Logon failure: unknown user name or bad password.Error details: Anon...
分类:
Windows程序 时间:
2014-11-13 15:59:42
阅读次数:
1076