Environmental variables for Calligra

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
PWD_DIR=/home/work/kde/calligra/build
INST_DIR=$PWD_DIR/installed
 
export XDG_DATA_DIRS=$INST_DIR/share:$XDG_DATA_DIRS
export XDG_CONFIG_DIRS=$INST_DIR/etc/xdg:$XDG_CONFIG_DIRS
export PATH=$INST_DIR/bin:$PATH
export QT_PLUGIN_PATH=$INST_DIR/lib64/plugins:$INST_DIR/lib/plugins:$INST_DIR/lib/x86_64-linux-gnu/plugins:$QT_PLUGIN_PATH
export QML_IMPORT_PATH=$INST_DIR/lib64/qml:$INST_DIR/lib/qml:$INST_DIR/lib/x86_64-linux-gnu/qml
export QML2_IMPORT_PATH=$INST_DIR/lib64/qml:$INST_DIR/lib/qml:$INST_DIR/lib/x86_64-linux-gnu/qml
 
export XDG_CONFIG_HOME=$HOME/kde/Settings
export KDETMP=/tmp/kdedev-$USER
export KDEVARTMP=/var/tmp/kdedev-$USER
export KDESYCOCA=$KDEVARTMP/ksycoca
 
mkdir -p $KDETMP
mkdir -p $KDEVARTMP

refer to:
https://community.kde.org/Calligra/Building/3

Change hyperlink color in QT

1
2
3
4
5
6
	// ui->btnEdit is a QLabel.
	ui->btnEdit->setText(QString("<a href=\"localhost\"><font color=\"#ff0000\">") + tr("Edit") + QString("</font></a>"));
	ui->btnEdit->setAlignment(Qt::AlignLeft | Qt::AlignVCenter);
	connect(ui->btnEdit, &QLabel::linkActivated, [=, this](QString url) {
		...
	});

refer to:
https://www.lmlphp.com/user/507/article/item/13949

ERROR 2003 (HY000): Can't connect to MySQL server on ... 113

1
2
3
4
5
6
7
8
9
telnet 192.168.1.165 3306
 
# firewall in ubuntu
sudo ufw disable
 
# or found ip changed
vi /etc/mysql/mysql.conf.d/mysqld.cnf
systemctl restart mysql
systemctl status mysql

refer to:
https://blog.csdn.net/zhangasas/article/details/89432832

西方科学年表

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
1451-1506	Cristoforo Colombo 哥伦布
1452-1519	Leonardo da Vinci 达芬奇
1473-1543	Mikołaj Kopernik 哥白尼
1499-1557	N.Fontana 三次方程求根公式 / Tartaglia 口吃者 / 意法战争 / J.Cardan 卡丹 / L.Ferrari 四次方程求根公式
1548-1600	Giordano Bruno 布鲁诺
1564-1642	Galileo 伽利略
1596-1650	René Descartes 笛卡尔
1643-1727	Isaac Newton 牛顿
1654-1705	Jakob Bernoulli‎ 雅各布第一·伯努利
1667-1748	Johann Bernoulli 约翰第一·伯努利
1707-1783	Leonhard Euler 欧拉
1700-1782	Daniel Bernoulli 丹尼尔第一·伯努利
1736-1813	Joseph-Louis Lagrange 拉格朗日
1777-1855	Johann Carl Friedrich Gauß/Gauss 高斯
1789		French Revolution 法国大革命
1822-1895	Louis Pasteur 巴斯德
1831-1879	James Clerk Maxwell
1853-1928	Hendrik Antoon Lorentz 洛伦兹

refer to:
《古典数学难题与伽罗瓦理论》徐诚浩著

Recording video or audio in Windows

1
2
3
4
5
6
7
8
9
10
11
ffmpeg -f dshow -list_devices true -i dummy
 
# can only play one instance simultaneously
ffplay -f dshow -i video="Integrated Webcam"
 
# can play multiple instances
ffmpeg -f dshow -i audio="Microphone (Realtek(R) Audio)" out2.wav
 
# record screen sound,
# if "Stereo Mix..." is not displayed, activate it in Sound Settings of Windows Control Panel.
ffmpeg -f dshow -i audio="Stereo Mix (Realtek Audio)" C:\Users\fatiw\Desktop\Audio\output.mp3

refer to:
https://blog.csdn.net/qq_43627907/article/details/124416450
compiled ok in Qt5.15.2.

https://blog.csdn.net/how0723/article/details/77418421
https://zhuanlan.zhihu.com/p/31348306
search 'QAudioOutput' in Qt Creator Examples.

https://blog.csdn.net/jlf521521/article/details/106689503
QT5使用QCustomplot绘制频谱瀑布图并封快速傅里叶变换fft类
https://blog.csdn.net/u013915524/article/details/122288358

https://www.addictivetips.com/windows-tips/record-system-sound-with-ffmpeg-on-windows-10/

QTimeLine starts very slowly

Need to set the time line execution curve as linear.

1
2
3
4
5
	m_time_line.reset(new QTimeLine(m_span_msecs * count, this));
	m_time_line->setFrameRange(0, count);
	m_time_line->setEasingCurve(QEasingCurve::Linear);
	// below is deprecated
	//m_time_line->setCurveShape(QTimeLine::LinearCurve);

refer to:
http://www.wjhsh.net/rickyk-p-4044875.html