public class Index { public static void main(String[] args) { String s = "黄伟强"; try { // 编码(编码方式 GBK:国标 UTF-8:国际通用 ISO-8859-1:美洲 默认为当前项目的编码) byte[] b ... ...
分类:
编程语言 时间:
2017-01-19 21:47:14
阅读次数:
249
本文主要描述网关上线的一次异常排查,分析排查问题的思路及过程。 通过本文,可以较好的了解网络,netty及http协议。
分类:
其他好文 时间:
2017-01-19 15:26:25
阅读次数:
366
/******************** 心得 **********************/ 先说 File 文件 zipFile = zipfile.ZipFile(FilePath , 'r' , zipfile.ZIP_DEFLATED) 打开一个文件,并返回这个对象; FilePath: ...
分类:
其他好文 时间:
2017-01-19 14:21:06
阅读次数:
193
最近用nginx部署服务器的时候,遇到了一个问题,就是每次访问浏览器,sessionid都不一样。我们做的项目使用了shiro框架。 ...
分类:
其他好文 时间:
2017-01-19 12:32:25
阅读次数:
371
在activity里设置android:screenOrientation的值。android:screenOrientation的属性有以下值:unspecified(默认值,由系统判断状态自动切换),The default value. The system chooses the orient ...
分类:
移动开发 时间:
2017-01-19 07:55:32
阅读次数:
226
异常即是一个事件,该事件会在程序执行过程中发生,影响了程序的正常执行。 一般情况下,在Python无法正常处理程序时就会发生一个异常。 异常是Python对象,表示一个错误。 当Python脚本发生异常时我们需要捕获处理它,否则程序会终止执行。 except Exception,e e是Except ...
分类:
其他好文 时间:
2017-01-19 03:39:02
阅读次数:
143
Better to use a circuit breaker which supports the following set of features: Automatically time-out calls that take longer than a defined threshold. ...
分类:
其他好文 时间:
2017-01-19 01:40:16
阅读次数:
244
镇场诗: 诚听如来语,顿舍世间名与利。愿做地藏徒,广演是经阎浮提。 愿尽吾所学,成就一良心博客。愿诸后来人,重现智慧清净体。——————————————————————————————————————————ex1: code: result: ex2: code: result: ———————— ...
分类:
编程语言 时间:
2017-01-18 09:40:49
阅读次数:
233
以SQLit3为例: import sqlite3 conn = sqlite3.connect('db.sqlite3') #获取游标对象 cur = conn.cursor() #执行一系列SQL语句 #建立一张表 #cur.execute("create table demo(num int,... ...
分类:
数据库 时间:
2017-01-18 01:01:52
阅读次数:
983
简单的MD5加密 首先要有一个加解密的规则 就是key 代码如下 // 创建Key public string GenerateKey() { DESCryptoServiceProvider desCrypto = (DESCryptoServiceProvider)DESCryptoServic ...