原创 qml學習1 --c++擴展qml

看了一些例子,記錄了一些要點,只是一點筆記,並不是一個完整的文檔。 例1 c++輸出對象 cpp文件 qmlRegisterType<PieChart>("Charts", 1, 0, "PieChart");  //c++對象名,參數:

原创 算法導論(3版)第5章少量習題的解答

算法導論(3版)第5章 習題解答  by zevolo 5.2-3 indicator random variable set X(i) = I(i)     = 1  (when ith dot is show)       0  (w

原创 1007

DNA Sorting http://poj.org/problem?id=1007 this is ok #include <stdio.h> #include <string.h> struct { char s[51];

原创 thunderbird migration in ubuntu

migration ubuntu thunderbird2 to thunderbird3 backup the old mail #################################### #cd ~/.mozilla-

原创 尋找蒙赫陣列(monge array)的每行的最小值

monge array是一個矩陣,滿足第j行的最小值的列號C(j)大於等於第i行的最小值的列號C(i),當j>=i的時候,有如下特性 -- 對於任何行列,正對角線的和<=反對角線的和 #!/usr/bin/python '''file

原创 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

原创 qt tips

--本地數據信息位置 看到調用openDatabaseSync,保存數據庫信息 ~/.local/share/data/Nokia/QtQmlVie

原创 1004

#include <stdio.h> int main(int argc, char**argv) { double sum = 0; int n = 12; float in; while (n--)

原创 尋找最大的子串(分治法)

O(nlgn) #!/usr/bin/python '''file name: maxsum.py --P71 --find maximum subarray sum, divide-and-conquer O(nlng)

原创 計算逆序對的個數

!/usr/bin/python '''file name: inversion.py --P41 --calculate the inversion number in nlgn for the worse situati

原创 1006

#include <stdio.h> int main(int ac, char**av) { int a23 = 28 * 33 * 6; int a28 = 23 * 33 * 19; int a33 = 2

原创 1002

#include <stdio.h> #include <stdlib.h> int char2int[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

原创 1003

#include <stdio.h> typedef struct _PAIR { float value; int n; } PAIR; PAIR data[200] = {{0.0, 0}}; int main(

原创 尋找最大子串(線性方法)

O(n) #!/usr/bin/python '''file name: maxsum.py --P75 --find maximum subarray sum, O(n) --author: zevolo, 2012

原创 算法導論(3版)第4章習題的部分解答

Introduction to algorithms (3rd editon) 第四章部分解答        by zevolo 4.3-1 Show that the solution of T(n) = T(n-1) + n is O