2015-04-16 Jason Liao
我想这个功能是非常常见的,就是 Ext 的 Gridpanel 上会有若干个的输入框,一个按钮,点击用于过滤 Gridpanel 里面的信息 但在实践的时候会发现几个问题: 怎么把用户输入的信息传给后台 如果传的值为中文,怎么修改默认的请求方式 重新加载的时候,页脚的信息如何同时更新 继续阅读 »
2014-02-20 Kun Ren
People love dealing with well-structured data. It costs much less efforts than working with disorganized raw texts. In economic and financial research, we typically download data from open-access websites or authentication-required databases. These sources may provide data in multiple formats. For example, almost all 继续阅读 »
2017-02-07 Alex Sun
1. 基本的柱状图 ```py import matplotlib.pyplot as plt data = [5, 20, 15, 25, 10] plt.bar(range(len(data)), data) plt.show() ``` plt.bar函数签名为: py bar(left, height, width=0.8, bottom=None, **kwargs) 事实上,left,height,width,bottom这四个参数确定了柱体的位置和大小。默认情况下,left为柱体的居中位置(可以通过align参数来改变left值的含义),即: (left - width / 2, bottom)为左 继续阅读 »
2015-06-15 litaotao
1. failed to write data to stream 环境:ipython, OSX 操作:在ipython里import 一个pure module 问题: Python - ERROR - failed to write data to stream: ', mode 'w' at 0x104c8f150> 办法:export PYTHONIOENCODING=UTF-8 will solve it. 相关:stackoverflow 继续阅读 »
2014-01-24 Kun Ren
r
R rocks in both academia and industry nowadays. A rapidly increasing number of researchers choose R to be one of their productive tools for data analysis and data visualization. It is partially because the software is totally free and open-source but also because the community behind the stage who contributes to nearly 继续阅读 »
2015-07-06 Eric Wang
Version:Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:44:40) [MSC v.1600 64 bit (AMD64)] on win32 文件与I/O 读写文本数据 使用带有rt模式的open()函数读取文本文件 ```python with open('test.csv', mode='rt', encoding='utf-8') as f: data = f.read() print(data) with open('test.csv', mode='rt', encoding='utf-8') as f: for line in 继续阅读 »
2017-12-31 Vaniot
前端跨域 1.jsonp 原理: 标签不受同源测略 的限制,可以载入任意地方javascript文件,不要求同源 请求的文件 javascript function getWeather(data) { console.log(data); } http://x.y.com/xx.js 文件内容:(返回调用getWeatherca参数为json对象数据) 输出文件: getWeather({ "城市": "北京", "天气": "大雾" }); <!--more--> 2.document.domain 使用条件: 有其他页面windowd对象的引用 二级域名相同 协 继续阅读 »
2015-08-15 王财勇
训练阶段我们采用了分批处理,可以优化部分内存。 原先我们的代码使用一次性载入数据,然后开始若干次迭代,直至收敛。这样保存image与shape的数据矩阵Data就一直占用内存,但实际上,数据集的image与shape 的作用仅仅是计算$\Delta X$和$\Phi$,两变量的定义参考《 Supervised Descent Method and its Applications to Face Alignment》,其实也就是init shape与true shape的差值以及init shape的特征向量。计算完了,Data就没用了。于是我们设想分批处理,每次迭代载入一次数据,用完了就clear。这样就需要载入多次,可能时间上 继续阅读 »
2016-02-18 ALEX LIN
更新日志 * 更新二维码生成 二维码 扫描识别 iOS中实现二维码和条形码扫描,两大开源组件 ZBarSDK 与 ZXing以及AVFoundation。AVFoundation.framework(iOS 7 )之后才添加了二维码扫描的功能。 二维码生成 ``` - (UIImage *)qrCodeGenerator:(NSString *)msg size:(CGSize)size { NSData * data = [msg dataUsingEncoding:NSUTF8StringEncoding]; NSDictionary * params = @{@"inputMessage": data, @ 继续阅读 »
2016-04-28 Borg
花了好久写好的R包与shiny应用。R包可以在通过github安装,repo上也有安装说明,安装完成后运行runExample()能够调出本地版本的shiny app,app上的使用说明更加明确。不会R语言的可以直接无视package,有shinyio上托管的应用,可以自己上传文件查看。注意上传文件是将目录 /data/data/com.xiaomi.hm.health/databases 压缩命名为databases.zip得到,注意是整个databases目录压缩,不是databases目录下的文件。用户id可以在手环官方应用个人信息页面得到。 继续阅读 »