Compare commits

...

22 Commits

Author SHA1 Message Date
494c9f31d6 update 2020-04-11 19:44:15 +03:00
2bcf387ba4 update 2020-04-11 18:07:10 +03:00
5bf5a20624 update 2020-04-11 16:19:35 +03:00
fff4e996d2 update 2020-04-11 15:13:41 +03:00
218f22c8d2 Merge branch 'master' of git.246060.ru:/f1x1t/dsp-site 2020-04-11 15:10:08 +03:00
d931b5aaea update 2020-04-11 14:57:13 +03:00
ec16a3a380 update 2020-04-10 18:13:06 +03:00
c41683d9e2 update 2020-04-10 18:10:40 +03:00
2abd41f429 update 2020-04-10 10:59:43 +03:00
f0cba8e7f6 update 2020-04-09 20:59:56 +03:00
8e1b48e868 update 2020-04-09 20:43:02 +03:00
d3fe32a96b update 2020-04-09 20:41:13 +03:00
62ab8db450 update 2020-04-09 20:39:10 +03:00
2af67616c8 update 2020-04-09 20:35:09 +03:00
d07e6a66f8 update 2020-04-09 20:10:52 +03:00
51adf6eb5a update 2020-04-09 19:23:16 +03:00
007afda3d1 update 2020-04-08 20:09:58 +03:00
3355f9185e update 2020-04-06 08:49:00 +03:00
1e5b6aa485 update 2020-04-04 11:51:36 +03:00
679bf869e8 Merge branch 'adoc' 2019-08-30 09:31:00 +03:00
1aaacb1df7 cmake 2019-08-29 17:34:57 +03:00
1068f502bb update 2019-07-15 21:47:09 +03:00
8 changed files with 595 additions and 371 deletions

View File

@ -1,8 +1,8 @@
build:
pelican -s pelicanconf.py
pelican --ignore-cache -s pelicanconf.py
web:
pelican -s pelicanconf-web.py
pelican --ignore-cache -s pelicanconf-web.py
clean:
rm -rf cache __pycache__

View File

@ -1,6 +1,5 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
import os
class i18n(object):

View File

@ -1,6 +1,5 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
import os
class i18n(object):
@ -13,7 +12,7 @@ class i18n(object):
LANGUAGES = ['ru']
NEWSTYLE = True
__name__ = 'i18n'
__name__ = 'pelicanconf.i18n'
def register(self):
from pelican.signals import generator_init

View File

@ -13,14 +13,14 @@
[source,sh]
----
sudo apt-get install clang-tidy-6.0
sudo apt-get install clang-tidy-10
----
Использование:
[source,sh]
----
cmake "-DCMAKE_CXX_CLANG_TIDY=/usr/bin/clang-tidy-6.0" path/to/source
cmake "-DCMAKE_CXX_CLANG_TIDY=/usr/bin/clang-tidy-10" path/to/source
----
В каталоге проекта нужно создать файл `.clang-tidy` в формате YAML со
@ -30,12 +30,25 @@ cmake "-DCMAKE_CXX_CLANG_TIDY=/usr/bin/clang-tidy-6.0" path/to/source
----
---
Checks: '-*,
clang-diagnostic-*,
readability-*,
modernize-*,
cppcoreguidelines-*,
google-*,
bugprone-*'
bugprone-*,
clang-analyzer-*,
cppcoreguidelines-*,
google-*,
llvm-*,
misc-*,
modernize-*,
readability-*,
performance-*,
portability-*,
-cppcoreguidelines-owning-memory,
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
-readability-magic-numbers,
-readability-else-after-return,
-modernize-use-trailing-return-type,
-modernize-avoid-c-arrays,
-performance-no-automatic-move,
'
CheckOptions:
- key: readability-identifier-naming.ClassCase
value: CamelCase
@ -124,7 +137,7 @@ cmake -DCMAKE_LINK_WHAT_YOU_USE=TRUE ..
[source,sh]
----
sudo apt-get install clazy clang-6.0
sudo apt-get install clazy clang-9
----
Использование:
@ -132,7 +145,6 @@ sudo apt-get install clazy clang-6.0
[source,sh]
----
CLAZY_CHECKS=level2 cmake -DCMAKE_CXX_COMPILER=clazy ..
CLANGXX=clang++-6.0 make
CLANGXX=clang++-9 make
----
=== PVS-Studio

View File

@ -3,15 +3,35 @@
:category: Программирование
:tags: программирование, git,
Если у подмодуля, находящегося в каталоге `thirdparty/example` нужно
заменить адрес синхронизации и имя используемой ветки, то в каталоге с
файлом `.gitmodules`, в котором содержится информация об этом подмодуле,
нужно выполнить команды:
Если у подмодулей необходимо заменить адрес синхронизации и/или
имя используемой ветки, то можно отредактировать в корневом
каталоге проекта файл `.gitmodules` и выполнить данный скрипт:
[source,sh]
----
git config --file=.gitmodules submodule.thirdparty/example.url https://github.com/username/ABC.git
git config --file=.gitmodules submodule.thirdparty/example.branch new-branch-name
git submodule sync --recursive
git submodule update --init --recursive --remote
#!/bin/bash
# Замена адресов для подмодулей:
# 1. Отредактировать файл .gitmodules
# 2. Запустить этот скрипт
#
# Параметры:
# - имя подмодуля (если присутствует, то замена
# адреса производится только для данного подмодуля)
M="#"
[ ! -z $1 ] && M="$1"
cat .gitmodules | while read s; do
s=${s/\*/}
s=${s/path = /}
if [ "$M" = "#" -o "x$M" = "x$s" ]; then
rm -rf .git/modules/$s
rm -rf $s
fi
done
git submodule sync
git submodule update
----

View File

@ -137,7 +137,7 @@ participant remote as "Удалённый репозиторий\n(remote reposi
[-> workspace : <font color=red>Начало работы</font>
activate workspace
remote -> local : <font color=red>Получение изменений с сервера</font>\n<b>git fetch</b>
remote -> local : <font color=red>Обновление подмодулей</font>\n<b>git submodule update --remote</b>
remote -> local : <font color=red>Обновление подмодулей</font>\n<b>git submodule update --recursive --init</b>
workspace <-> local : <font color=red>Просмотр информации</font>\n<b>git status</b>
workspace <-> local : <font color=red>Переход на ветку master</font>\n<b>git checkout master</b>
local -> workspace : <font color=red>Слияние с удалённой веткой</font>\n<b>git merge origin/master</b>

View File

@ -19,11 +19,16 @@ CREATE TABLE example (
----
const char cart[] = {0x04, 0x43, 0x00, 0x9A};
QByteArray binDataArray(QByteArray::fromRawData(cart, 4));
QSqlQuery query;
query.prepare(QString("INSERT INTO example (id, bin_data) VALUES(:id, :bin_data)");
query.bindValue(":id", 10, QSql::In);
query.bindValue(":bin_data", binDataArray, QSql::In | QSql::Binary);
query.exec();
QSqlQuery query1;
query1.prepare(QString("INSERT INTO example (id, bin_data) VALUES(:id, :bin_data)");
query1.bindValue(":id", 10, QSql::In);
query1.bindValue(":bin_data", binDataArray, QSql::In | QSql::Binary);
query1.exec();
QSqlQuery query2;
query2.exec(QString("INSERT INTO files VALUES(%1, %2);")
.arg(18)
.arg(db.driver()->formatValue(dataField)));
----
Чтение данных: