ITeye博客

tianyalinfeng

tianyalinfeng · 共 355 篇文章

新概念英语第三册Lesson 12

Life on a desert island Most of us have formed an unrealistic picture of life on a desert island. We sometimes imagine a desert island to be a sort of paradise where the sun always shines. Life there is simple and good. Ripe fruit falls from the trees and you never have to work. The other side of t…

2011-07-14 13:44 · English · 评论(0)

Blob 存储方法

byte[] b = Snappy.compress((字符串).getBytes("UTF-8")); //可选用Snappy压缩 InputStream is = new ByteArrayInputStream(b);//转为InputStream ps.setBinaryStream(3, is);//用setBinaryStream对blob字段进行存储

2011-07-13 10:50 · Java · 评论(0)

byte[] 和 InputStream 相互转化

1. byte[] -> InputStream byte[] b = xxx; InputStream is = new ByteArrayInputStream(b); 2. InputStream -> byte[] InputStream is = xxx; ByteArrayOutputStream bytestream = new ByteArrayOutputStream(); int ch; while ((ch = is.read()) != -1) { bytestream.write(ch); } byte[] b = bytestream.toByteArray();…

2011-07-13 10:47 · Java · 评论(0)

对html实体编码进行解码

例如 法 解码为 汉字 ‘法’ private static String decodeUnicode(final String dataStr) { int start = 0; int end = 0; final StringBuffer buffer = new StringBuffer(); while (start > -1) { int system = 10;// 进制 if (start == 0) { int t = dataStr.indexOf("&#"); if (start != t) start = t; } end = dataStr.index…

2011-07-12 17:10 · 评论(0)

汉字ASCII码

法 27861是 汉字 ‘法’ 的ASCII码 在网页上法会显示成汉字

2011-07-12 16:40 · Java · 评论(0)

不等于空

mysql 不等于空 不能用 != null 只能用 is not null

2011-07-11 17:11 · Mysql · 评论(0)

去指定的网站下载maven库

在.m2文件夹内建立settings.xml 贴入如下内容: <?xml version="1.0" encoding="UTF-8"?> <settings xsi:schemaLocation=" http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd " xmlns=" http://maven.apache.org/SETTINGS/1.0.0 " xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance "> <pro…

2011-07-07 15:14 · 评论(0)

新概念英语第三册Lesson 11

Not guilty What was the Customs Officer looking for? Customs Officers are quite tolerant these days, but they can still stop you when you are going through the Green Channel and have nothing to declare. Even really honest people are often made to feel guilty. The hardened professional smuggler, on …

2011-07-06 13:11 · English · 评论(0)

新概念英语第三册Lesson 10

What would have happened if only two of the sixteen water-tight compartments had been flooded? The great ship, Titanic, sailed for New York from Southampton on April 10th, 1912. She was carrying 1,316 passengers and crew of 891. Even by modern standards, the 46,000 ton Titanic was a colossal ship. …

2011-07-06 12:30 · English · 评论(0)

myeclipse 项目上有个红差,但是项目里的代码没有错误

.classpath .mymetadata .project 还有.settings里有关的文件里存在与实际使用JDK版本不相符合的内容

2011-07-05 17:45 · Java · 评论(0)

MyEclipse 9.0运行速度优化

(1)、Eclipse Building Workspace 很慢的解决办法 解决办法: 1. 取消掉“project -> Buiild Automatically”选项即可 2. 取消各种文件的validation 3. 在 Eclipse.ini文件中增加最大内存使用数量-vmargs-Xms40m-Xmx512m 4. 在 Help->Software Updates->Manage Configration中unenable掉subclipse插件 优化二: 1、老是弹出Quick update error 、关闭MyEclipse的Quick Update自动更新功能 这个问题的…

2011-06-29 10:05 · Java · 评论(1) · Myeclipse · Windows · Eclipse · maven · JSF

MyEclipse No Default Proposals 无代码提示

window->Preferences->Java->Editor->Content Assist->Advanced 上面的选项卡Select the proposal kinds contained in the 'default' content assist list: 中把 Java Proposals 勾上

2011-06-29 09:19 · Java · 评论(0) · Java · Myeclipse

myeclipse中导出javadoc时出错

如果项目的编码格式是UTF-8:在最后一项的:Extra Javadoc options下的文本框中输入以下参数: -encoding UTF-8 -charset UTF-8 默认的导出格式是:gbk格式;

2011-06-28 15:19 · Java · 评论(0) · Myeclipse

solr web配置时与tomcat7.0 某些jar包冲突

异常:java.lang.LinkageError: loader constraint violation: when resolving interface method "javax.servlet.jsp.JspApplicationContext.getExpressionFactory()Ljavax/el/Expression...... jsp-2.1-glassfish-2.1.v20091210.jar 与 tomcat中 jsp-api.jar 冲突 配置时不要加入jsp-2.1-glassfish-2.1.v20091210.jar 但要加入 activation-1…

2011-06-28 11:02 · 评论(0) · Solr · JSP · Tomcat · Web · Glassfish

Tomcat 7.0 修改密码

conf tomcat-users.xml <tomcat-users>节点中添加 <role rolename="manager-gui"/> <user username="admin" password="admin" roles="manager-gui"/>

2011-06-25 12:43 · Java · 评论(0) · XML · Tomcat