原创 The position of a point

Question: Specify, design, and implement a class that can be used to keep track of the position of a point in three-d

原创 TOEFL wordlist 6

1. obsess [əbˈses] phrase. If something obsesses you of if you obsess about something, you keep thinking about it and f

原创 The + operator of statisticians

Question:     Overload the + operator to allow you to add two statisticians from the previous project. If s1 and s2 are

原创 The Statistician Class

Question:     Specify, design, and implement a class called statistician. After a statistician is initialized, it can b

原创 動態類的注意事項

如果我們的類用到了動態存儲,請注意這四條規則: 1)某些類成員是指針。 2)成員函數按需分配和釋放內存。 3)重寫類的自動生成的值語義(the automatic value semantics of the class),否則可能會出現

原创 QT學習(10) QPixmap和QImage的相互轉換

QPixmap轉爲Image: void Widget::paintEvent(QPaintEvent *) { QPainter p(this); QPixmap pixmap; pixmap.load("..

原创 QT學習(9) 繪圖設備之QPicture

和之前的用法很類似了,仍然是交給畫家(QPainter)來作畫。 本例畫家先在Widget的構造函數中把圖畫好,並保存。 Widget::Widget(QWidget *parent) : QWidget(parent),

原创 TOEFL wordlist 5

1. envelop [ɪnˈveləp] v. If one thing envelops another, it covers or surrounds it completely. More dense atmosphere gra

原创 QT學習(8) 繪圖設備之QImage

繼續討論繪圖設備,QImage適合多線程繪圖。可以執行像素點操作。 重寫Widget構造函數如下: Widget::Widget(QWidget *parent) : QWidget(parent), ui(new Ui

原创 TOEFL wordlist 4

1. expertise [ˌekspɜ:ˈti:z] n. Expertise is special skill or knowledge that is acquired by training, study, or practice

原创 隨機變量的熵的取值範圍

熵(entropy)是表示隨機變量不確定性的度量.設X是一個取有限個值的離散隨機變量,其概率分佈爲P(χ=xi)=pi,i=1,2,…,nP(\chi = x_i) = p_i, i = 1, 2, \dots, nP(χ=xi​)

原创 QT學習(7) 繪圖設備之QPixmap

延續前面的話題,繼續討論繪圖。 這裏使用QPixmap繪圖設備,不是在paintEvent中使用的,而是直接在Widget的構造函數中使用。 Widget::Widget(QWidget *parent) : QWidget(p

原创 知識圖譜基本概念梳理

《知識圖譜技術綜述》整理知識圖譜基本概念前言知識圖譜的定義和架構知識圖譜的定義知識圖譜的架構知識圖譜的邏輯結構知識圖譜的體系架構知識圖譜的關鍵技術知識抽取知識表示知識融合知識推理 知識圖譜基本概念 前言 本文內容整理自文獻1。 “We

原创 QT學習(5) 手動窗口重繪

仍然關注paintEvent,在上例中,它自動調用了。 這裏想要手動調用paintEvent,該怎麼做呢?   官方文檔說,可以通過調用repaint或者update方法來重繪窗口。 在UI設計窗口添加一個按鈕,當我們按下這個按鈕時,讓

原创 QT學習(6) QBitMap和QPixmap的區別

官方文檔上面說: QPixmap is designed and optimized for showing images on screen. QBitmap is only a convenience class that inher