最近在用Python处理中文字符串时,报出了如下错误: 1、原因 因为默认情况下,Python采用的是ascii编码方式,如下所示: 而Python在进行编码方式之间的转换时,会将 unicode 作为“中间编码”,但 unicode 最大只有 128 那么长,所以这里当尝试将 ascii 编码字符 ...
分类:
编程语言 时间:
2018-09-05 10:33:26
阅读次数:
287
package sort; import java.util.ArrayList; import java.util.Scanner; public class Gongyi { public static void main(String[] args) { // TODO Auto-genera... ...
分类:
其他好文 时间:
2018-09-05 10:30:36
阅读次数:
197
一、简介 互联网高速发展,数据量爆发增长,传统的单体应用已经不能满足需要了,这时候分布式系统就应运而生。在分布式系统中,常常提到CAP定理,这个定理也成为了理解分布式应用的起点。 二、CAP 那么CAP定理指的是什么呢? 1)C:consistency,即一致性 2)A:availability,即 ...
分类:
其他好文 时间:
2018-09-05 09:07:05
阅读次数:
114
遍历列表 # 直接遍历list: # 通过索引获取 # 基于enumerate()遍历 # 基于iter()遍历 遍历dict # 通过key遍历 # 直接遍历,本质是先转换成 (key,value)的list # iteritems() 返回值是 items的迭代器 ...
分类:
编程语言 时间:
2018-09-05 08:59:36
阅读次数:
167
未安装wget,联网执行以下命令即可: 1、断点续传,只需要添加 -c 参数即可 2、限速下载,只需要添加 -limit-rate=300k 合理参数即可 ...
分类:
系统相关 时间:
2018-09-04 17:00:03
阅读次数:
148
RESTful架构 REST全名为:Representational State Transfer。资源表现层状态转化。是目前最流行的一种互联网软件架构。 它结构清晰、符合标准、易于理解、扩展方便,所以正得到越来越多网站的采用。 资源(Resources) 网络上的一个实体,或者说是网络上的一个具体 ...
分类:
编程语言 时间:
2018-09-04 11:39:28
阅读次数:
196
一、服务端 二、客户端 三、测试结果 需要先启动服务端,再启动客户端 服务端运行结果: 客户端运行结果: ...
分类:
编程语言 时间:
2018-09-03 18:26:59
阅读次数:
263
ENC的概念: The application component environment is referred to as the ENC, the enterprise naming context. 应用组件的业务逻辑应该是 ENC中取得对象。组件提供者使用标准的部署描述符指定必需的ENC入 ...
分类:
编程语言 时间:
2018-09-03 15:06:26
阅读次数:
156
Images in accelerated memory are much faster to draw on the screen. This example demonstrates how to take an image and make an accelerated copy of it ...
分类:
其他好文 时间:
2018-09-02 23:59:46
阅读次数:
343
Given any permutation of the numbers {0, 1, 2,..., N?1}, it is easy to sort them in increasing order. But what if Swap(0, *)is the ONLY operation that ...
分类:
其他好文 时间:
2018-09-02 20:26:27
阅读次数:
169