- 博客(47)
- 资源 (1)
- 收藏
- 关注
原创 配置apache2 https
版本:Apache/2.4.23很简单加上下面的link文件就可以了,分别在mods-available和sites-available(默认没有下面的link文件)lrwxrwxrwx 1 root root 40 Feb 16 19:29 000-default-ssl -> /etc/apache2/sites-available/default-ssllrwxrwxrw
2017-02-16 19:58:15
793
原创 从就手机恢复应用的数据
平时阅读鲜果,收藏了一些。可是手机坏了,触屏不起作用了,不能解锁进行操作,还好能打开。现在的问题是如何把收藏的保存下来呢?--找到数据库先进入新手机,找到的目录文件,发现一个databases目录,很象。接着再运行鲜果,收藏一个,发现一个文件的日期跟着变了,就是它了xianguo_hdadb shellsucd /data/data/com.xianguo.pad
2013-08-11 14:39:23
1436
原创 mysql的update性能数据
感觉程序的mysql性能很差,网上众说风云,还是自己看看实际情况。做了一点测试,这里是测试数据(不是严格的数据,测试的时候进行其他电脑操作):环境是linux, mysql 5.1, 数据库一个表是330万数据,进行update操作(单条异步插入)InnoDB性能很差,1000条数据用了19秒,:(MyISAM性能较好,数据如下: 20:31:06+0800 [-
2013-04-19 18:08:14
3980
原创 scrapy如何针对不同的spider指定不同的参数
scrapy中如何指定spider不用的参数,特别是item_pipeline?这里没有答案。首先,在scrapy中不直接支持这种方式一般都是通过pipeline的process_item中区分是否当前的pipeline作用到这个item上,这里有一个链接可以参考,https://groups.google.com/forum/?fromgroups=#!topic/scrapy-
2013-04-11 15:50:20
7658
原创 编译pyv8
本想ubuntu的直接安装pyv8,但是失败了,于是手动编译一个需要安装boost和gyp sudo apt-get install libboost-python-dev gyp 下载v8和pyv8git clone https://github.com/v8/v8.gitsvn checkout http://pyv8.googlecode.com/svn/trunk/
2013-02-01 13:45:51
3361
原创 webkit的网络处理
webkit的网络处理的主要类是ResourceHandle,这个类保存着request和response以及具体实现的数据,而WebCore则通过ResourceHandleClient(ResourceLoader)和ResourceHandle协作。典型的数据请求和处理如下一些主要的类如下:--ResourceRequestBase --子类Resour
2013-01-05 15:35:40
1054
原创 webkit的加载过程
类图类介绍Frame--包含FrameLoaderFrameLoader--指针Frame--指针FrameLoaderClient--引用DocumentLoader--引用DocumentLoader(provisional)--引用DocumentLoader(policy)--引用FrameNetworkingContext--包含Resou
2012-12-23 14:55:59
1129
原创 linux下python抓屏
linux抓屏的小程序python#!/usr/bin/python'''by zevolo, 2012.12.20'''import gtk.gdkimport gtkimport glibclass MyRect(): def __init__(self, x = 0, y = 0, w = 0, h = 0): self.x = x
2012-12-20 18:02:51
3269
原创 glib中的调度
GSource的结构:注:GSourceList中还有priority的信息glib的主循环: g_main_loop调用g_main_context_iterateg_main_context_iterate prepare得到优先级最高的GSourceList query添加相应file description到poll列表中
2012-12-18 17:06:33
604
原创 webkit中的javascript(4)---javascript执行的入口
JSC由三个引擎组成: 解释器(interpreter), 简单方法JIT(simple method JIT), 和DFG JIT. 三种形式有一个层次化的编译过程:初始的解析和编译生成字节码(byte-code), 再由simple method JIT加以优化, 最后再由DFG JIT加以优化。在实践中, 多数平台下并没有解释器,所有的代码都是通过method JIT运行。DFG JIT随着
2012-09-28 13:04:46
1710
1
原创 webkit中的javascript(3)---javascript在webkit内部实现结构
by zevoloJavascript如何访问内部属性或者方法呢?以Number对象为例,webkit内部的类图结构参见图。对象的父类JSCell包含着一个内部的Structure对象。首先在sturcture内部的有一个指针m_propertyTable,对于这个对象自身的属性(在javascript表现为属性和方法),是通过m_propertyTable来管理的。通常这
2012-09-24 20:11:18
1211
原创 webkit中的javascript(2)----javascript的prototype 和 constructor
browser的javascript,严格的说,不算是webkit的本身内容#########################################################################################by zevolo在webkit中看到有很多prototype和constructor,看了一下javascript的相关概念
2012-09-24 18:42:02
973
原创 webkit中的javascript(1)---javascript函数调用在webkit中的实现
javascript函数调用如何实现的?#########################################################################################by zevoloJS 的object有三种,Javascript的内部对象,browser的对象,html dom的对象。js object有很多属性和方法,web
2012-09-24 18:37:24
3852
原创 browser的评测网站
测试网站:http://acid3.acidtests.org/ compliance test created by the Web Standards Project. higher = betterhttp://dromaeo.com performance test(javascript and dom, by Mo
2012-09-18 16:21:31
679
原创 webkit在linux平台下的编译
编译webkit#########################################################################################################by zevolowebkit编译需要很多依赖的库文件,有的可能已经系统安装,如果没有,就需要安装或者自己编译库文件来链接。安装比较方便,但是有时候可能不符合
2012-09-13 16:34:28
7517
原创 webkit整体结构略览
开始研究一下webkit:)欢迎大家多交流############################################################################by zevolo名词:icu: International Components for Unicode, software libraries supporting int
2012-09-13 16:26:48
1135
原创 pthead cond的理解
pthread_cond_wait/pthread_cond_timedwait返回时候需要得到mutex,因此有如下两个问题-对于pthread_cond_timedwait()的理解:到了timeout,下面的程序一定能执行吗? 答案应该是否定的,pthread_cond_timedwait()也需要获得mutex,否则也不能唤醒-pthread_cond_signal()只能唤
2012-08-02 12:31:29
842
原创 export qt object to javascript in webkit
--添加object到javascript对象中 webView->page()->mainFrame()->addToJavaScriptWindowObject("formExtractor", this); 第一个参数是javascript中的名字,第二个参数是对象 注:必须将上述的添加连接到javaScriptWindowObjectCleared信号,确保每
2012-07-27 10:24:42
1487
原创 qml的focus问题
It is headache issue of focus in application. If there is no focus item, the key event can't be handled, and it can't do anything in one screen --- the application hangs!!!Basically, the basic ele
2012-06-19 14:53:04
6502
原创 算法导论(3版)第5章少量习题的解答
算法导论(3版)第5章习题解答 by zevolo5.2-3indicator random variableset X(i) = I(i) = 1 (when ith dot is show) 0 (when ith dot is hide)Now E(X) = E(X(1)) + E(X(2)) + E(X(3)) + .... + E(X
2012-06-01 17:19:40
1414
原创 算法导论(3版)第4章习题的部分解答
Introduction to algorithms (3rd editon)第四章部分解答 by zevolo4.3-1Show that the solution of T(n) = T(n-1) + n is O(n^2).proof:assume T(m) T(n) = T(n-1) + n = cn^2 - 2cn + c
2012-05-31 17:17:21
11602
1
原创 寻找蒙赫阵列(monge array)的每行的最小值
monge array是一个矩阵,满足第j行的最小值的列号C(j)大于等于第i行的最小值的列号C(i),当j>=i的时候,有如下特性-- 对于任何行列,正对角线的和#!/usr/bin/python'''file name: monge.py --P111 --input one m*n monge array, find leftmost minimum value, O
2012-05-31 09:16:52
3244
原创 寻找最大子串(线性方法)
O(n)#!/usr/bin/python'''file name: maxsum.py --P75 --find maximum subarray sum, O(n) --author: zevolo, 2012.05.11'''def find_max_sum(list): now_max = list[0] low = high = 0
2012-05-29 17:45:22
538
原创 寻找最大的子串(分治法)
O(nlgn)#!/usr/bin/python'''file name: maxsum.py --P71 --find maximum subarray sum, divide-and-conquer O(nlng) --author: zevolo, 2012.05.11'''def find_max_across_mid(list, low, high,
2012-05-29 17:43:35
1237
原创 计算逆序对的个数
!/usr/bin/python'''file name: inversion.py --P41 --calculate the inversion number in nlgn for the worse situation --author: zevolo, 2012.05.07'''global countdef merge_sort(list, s, e):
2012-05-28 16:39:06
1161
原创 插入排序的实现
#!/usr/bin/python'''file name: insertion_sort.py --P18 --insertion sort --author: zevolo, 2012.04.28 --modify on 06.07 for stable issue '''def insert(list): for i in range(1, len
2012-05-28 16:32:00
363
原创 qt tips
--本地数据信息位置看到调用openDatabaseSync,保存数据库信息~/.local/share/data/Nokia/QtQmlViewer/QML/OfflineStorage/Databases/--qmake cache在一个交叉编译中的环境运行qmake,生成的Makefile总是有问题原来qmake会从当前目录下逐层向上,查找是否有.qmake.cach
2012-04-10 17:16:51
567
原创 qml学习1 --c++扩展qml
看了一些例子,记录了一些要点,只是一点笔记,并不是一个完整的文档。例1 c++输出对象cpp文件qmlRegisterType("Charts", 1, 0, "PieChart"); //c++对象名,参数:模块名,版本号,版本号2,对象名view.setSource(QUrl::fromLocalFile("app.qml")); //加载qml文件class P
2012-04-10 14:43:23
841
原创 warning when convertion
type enum { enum_0, enum_1,} ENUM_NAME;int main(){ ENUM_NAME a = enum_0; int *p1 = (int *)(&a); //(1) int *p2 = &a; //(2) return 0;}
2012-03-30 11:25:03
497
原创 thunderbird migration in ubuntu
migration ubuntu thunderbird2 to thunderbird3backup the old mail#####################################cd ~/.mozilla-thunderbird/XXXXX.default#tar czvpf mail.tgz abook.mab prefs.js ImapMai
2011-11-10 11:22:56
328
原创 1009
The program isn't pass, and the result is RE-- run time error.although it can pass for the example data.I can't find the error. I felt i
2011-09-26 14:18:06
486
原创 1008
Maya Calendarhttp://poj.org/problem?id=1008#include char *maya[19] = { "pop", "no", "zip", "zotz", "tzec", "xul", "yoxkin",
2011-09-13 15:32:56
373
原创 1007
DNA Sortinghttp://poj.org/problem?id=1007this is ok#include #include struct{ char s[51]; int sort;} item[100];int mai
2011-09-13 14:46:08
559
原创 1006
#include int main(int ac, char**av){ int a23 = 28 * 33 * 6; int a28 = 23 * 33 * 19; int a33 = 23 * 28 * 2; int a, b, c, s
2011-09-12 15:34:36
376
原创 1005
#include #define PI 3.1415926int main(int argc, char **argv){ int n; scanf("%d", &n); float x1, x2; int i = 0; for (i
2011-09-12 15:33:27
308
原创 1004
#include int main(int argc, char**argv){ double sum = 0; int n = 12; float in; while (n--) { scanf("%f", &in); sum +
2011-09-12 15:32:26
313
原创 1003
#include typedef struct _PAIR{ float value; int n;} PAIR;PAIR data[200] = {{0.0, 0}};int main(){ double sum = 0; in
2011-09-10 13:38:42
428
原创 1002
#include #include int char2int[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
2011-09-09 10:47:33
334
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人