`
文章列表
public enum PermissionEnum { ECMNG_ACCESS_MANAGE("ECMNG_ACCESS_MANAGE", "内部权限管理"), // ECMNG_CLASSIFY("ECMNG_CLASSIFY", "分类管理"), // ECMNG_NEW("ECMNG_NEW", "新建区域"), // ECMNG_CONTENT_MODIFY("ECMNG_CONTENT_MODIFY" ...
简单的接收邮件的例子: public static void main(String[] args) { Properties props = new Properties(); props.put("mail.store.protocol", "pop3"); props.put("mail.pop3.auth ", "true"); Session session = Session.getInstance(props, null); ...
简单的邮件发送: public static void main(String[] args) throws UnsupportedEncodingException, AddressException { Properties props = new Properties(); props.put("mail.transport.protocol", "smtp"); props.put("mail.smtp.auth ", "true"); ...
根据Subject对象中的site对象的nick属性和自己的nick属性排序(按中文排序): List<Subject> subjects = new ArrayList<Subject>(); Collections.sort(subjects, new Comparator<Subject>() { private int result = 0; @Override public int compare(Subject o1, Subject o2) { ...
package com.yonge.test; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Test { public static void main(String[] args) { //字符串根据正则去查找 Pattern p = null; Matcher matcher = null; p = Pattern.compile("[\\s]"); ...
package com.yonge.test; import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; public class Test { private static int commen, white, normal; public Test() { } private static void countCod ...

Unsupported Image Type

    博客分类:
  • java
今天cms系统中出现上传文件失败,报了这样的一个错: javax.imageio.IIOException: Unsupported Image Type at com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(Unknown Source) at com.sun.imageio.plugins.jpeg.JPEGImageReader.read(Unknown Source) at javax.imageio.ImageIO.read(Unknown Source) at javax.imageio.Image ...
maven插件地址:http://m2eclipse.sonatype.org/sites/m2e git插件地址:http://download.eclipse.org/egit/updates svn插件地址:http://subclipse.tigris.org/update_1.0.x ibatis插件地址:http://ibatis.apache.org/tools/ibator
在Eclipse中处理图片,需要引入两个包:import com.sun.image.codec.jpeg.JPEGCodec;import com.sun.image.codec.jpeg.JPEGImageEncoder;报错:Access restriction: The type JPEGImageEncoder is not accessible due to restriction on required library C:\Java\jre1.6.0_07\lib\rt.jar此时解决办法:Eclipse 默认把这些受访问限制的API设成了ERROR。只要把Windows-Pre ...
//对象转换成xml public String createSiteConfig(Site site) { StringBuffer sb = new StringBuffer(); sb.append("<?xml version=\"1.0\" encoding=\"GBK\"?>"); sb.append("<site>"); sb.append("<domain>").appen ...
Git 进阶功能 【TIP】在我们的《Windows 下 Git 配置与使用指南》 中,有介绍大家使用 $ git go 命令。其实,这并非 Git 的原生命令,它是我们自定义的一个 alias(别名),由 $git add、$git commit、$git push 和 $git pull 四个命令组合而成。待熟悉之后,你可以直接使用这些原生命令,或者自定义更适合自己的 alias。 add 添加新文件到 Git 代码仓库的索引中 $ git add filename mv 移动或重命名文件 $ git mv old-filename new-filename rm 从 ...

Git 常遇的问题

    博客分类:
  • git
wb-gaoy@ALIPAY-38342W96 /E/git/cms (yonge3.0)$ git pullsummer@qu.inc.alipay.net's password:You asked me to pull without telling me which branch youwant to merge with, and 'branch.yonge3.0.merge' inyour configuration file does not tell me, either. Pleasespecify which branch you want to use on the comm ...
当你使用svn客户端checkout了一份文件,文件下的每个目录都会有.svn目录,有时候想去掉此目录,我们可以使用svn客户端自带的Export命令即可,很方便,很实用!!
Set转化成List Map<String, List<Ress>> result = ressDao.getPieChartData(); List<String> domains = new ArrayList<String>(result.keySet()); List转化成Set Set set=new HashSet(new ArrayList());     Set/List转化成Array,只需Object.toArray()即可.   Array转化成Set/List String[] array = {&quo ...
最近在cms项目中出现了一个bug,该项目是集群部署的,程序中使用了缓存(非分布式缓存),导致多台服务器信息不一致的情况,在网上搜了下,发现Hazelcast可以很容易解决这样的问题,后来了解Hazelcast后,在Spring中集成了Hazelcast,可发现没有像文档中说的那样简单,老是出现问题,出现的第一个问题,就是下面一段代码出现注入的参数类型不一致问题: <bean id="instance" class="com.hazelcast.core.Hazelcast" factory-method="newHazelcastIn ...
Global site tag (gtag.js) - Google Analytics