• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录

绝望生鱼片

  • 博客园
  • 联系
  • 订阅
  • 管理

公告

上一页 1 2 3 4 5 6 下一页

2013年11月1日

千万别在Java类的static块里写会抛异常的代码!

摘要: public class Demo{ static{ // 模拟会抛异常的代码 throw new RuntimeException(); }}如果你在Java类的static块里写这样会抛异常的代码,你,会后悔的!因为JVM启动时,会加载需要的类,如果加载到这样的类,执行 static块时抛异常,ClassLoader就会卡在这里,而且!没有任何输出,JVM就卡住了,如果这样的类多了,完全不知道去哪里找问题!!于是在static里写代码最好加个try-catch!!!切记! 阅读全文

posted @ 2013-11-01 18:57 绝望生鱼片 阅读(901) 评论(0) 推荐(0)

2013年8月15日

linux shell的一些配置

摘要: alias egrep='egrep --color=auto'alias fgrep='fgrep --color=auto'alias grep='grep --color=auto'alias l='ls -CF'alias la='ls -A'alias ll='ls -alF'alias ls='ls --color=auto'各种高亮,加到/etc/profile最后. 阅读全文

posted @ 2013-08-15 20:36 绝望生鱼片 阅读(188) 评论(0) 推荐(0)

2013年7月8日

URL里的分号';'一定要编码为%3b!!!!

摘要: http://en.wikipedia.org/wiki/Query_stringThe series of pairs is separated by theampersand, '&' (orsemicolon, ';' for URLs embedded in HTML and not generated by a...; see below).While there is no definitive standard, most web frameworks allow multiple values to be associated with 阅读全文

posted @ 2013-07-08 19:56 绝望生鱼片 阅读(5085) 评论(0) 推荐(0)

2013年3月22日

python使用imap接收邮件的过程...郁闷的探索

摘要: 我只是个python初 学者.....想用python做一个很简单的接收邮件的功能,只看python的官方doc(http://docs.python.org/2/library/imaplib.html)真的很不好懂,经过google之,探索之,稍微总结一下:要使用imap接收邮件,当然要导入imaplib拉.import imaplib然后按常规的,建立链接→登录conn = imaplib.IMAP4("imap.xxx.com",143)conn.login("userName","password")然后我想查看收件箱的邮件 阅读全文

posted @ 2013-03-22 16:21 绝望生鱼片 阅读(10321) 评论(2) 推荐(0)

2013年3月11日

java int 乘法溢出问题

摘要: 今天在看框架的工具包时发现了一个细节,double d=1024d * 1024 * 1024 * 1024;第一个1024后面为什么要带个d呢?于是我尝试了一下: double d = 1024d * 1024 * 1024 * 1024; double dw = 1024 * 1024 * 1024 *1024 ; System.out.println(d); System.out.println(dw);结果为:1.099511627776E120--------------0?为啥是0?? java的普通数字类型是int,1024是int,4个... 阅读全文

posted @ 2013-03-11 11:14 绝望生鱼片 阅读(2852) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 下一页
 
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3