Compare commits
22 Commits
adoc
...
494c9f31d6
Author | SHA1 | Date | |
---|---|---|---|
494c9f31d6 | |||
2bcf387ba4 | |||
5bf5a20624 | |||
fff4e996d2 | |||
218f22c8d2 | |||
d931b5aaea | |||
ec16a3a380 | |||
c41683d9e2 | |||
2abd41f429 | |||
f0cba8e7f6 | |||
8e1b48e868 | |||
d3fe32a96b | |||
62ab8db450 | |||
2af67616c8 | |||
d07e6a66f8 | |||
51adf6eb5a | |||
007afda3d1 | |||
3355f9185e | |||
1e5b6aa485 | |||
679bf869e8 | |||
1aaacb1df7 | |||
1068f502bb |
4
Makefile
4
Makefile
@ -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__
|
||||
|
@ -1,6 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*- #
|
||||
from __future__ import unicode_literals
|
||||
import os
|
||||
|
||||
class i18n(object):
|
||||
|
@ -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
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -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
|
||||
|
@ -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
|
||||
----
|
||||
|
||||
|
@ -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>
|
||||
|
@ -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)));
|
||||
----
|
||||
|
||||
Чтение данных:
|
||||
|
Reference in New Issue
Block a user