В обувной магазин пришли необычные покупатели

И жуки и пауки
Покупали башмаки.
Восемь ног у паука,
На две меньше у жука.
У жуков и паучков
Вместе двадцать семь голов,
И всего они купили ровно двести башмаков.
Сколько было там жуков?

У паука 4 пары ног, у жуков – 3 (8 и 6 ног соответственно).
Пусть x – жуки, y – пауки
8x + 6y = 200 (сокращать не будем)

\[ \begin{cases} \text{x + y = 27} \\ \text{8x + 6y = 200} \\ \end{cases} \]

следовательно x + y = 27, откуда следует x = 27 – y
8 * (27-y) + 6y = 200
216 – 8y + 6y = 200
216 – 2y = 200
200 + 2y = 216
216 – 200 = 2y
2y = 16
y = 16/8
y = 8
x = 27 – 8
x = 19

Проверяем: 8*19 + 6*8 = 200
(152 + 48 = 200)

Ответ: 19 пауков и 8 жуков

Реакция на нажатие кнопки Raspberry Pi

Добавим к предыдущей схеме кнопку, чтобы моторчик работал только когда нажата кнопка.

debwrt rspro

Embedded-роутер, который поддерживает полноценный Debian – debWrt (Debian 9 Stretch)

2017-Lede-ar71xx-generic-ubnt-rspro-squashfs-factory.bin
2017-Lede-ar71xx-generic-ubnt-rspro-squashfs-sysupgrade.bin

Project (3D-printer)

interface
debwrt-rootfs-sid-mips-trunk.tar.bz2

IRL:

debwrt-headers-mips-ar71xx-generic-4.4.45-trunk.tar.gz
debwrt-modules-mips-ar71xx-generic-4.4.45-trunk.tar.gz

Exchange with R3 via OData

In order to get info using OData, we need to download and build
https://www.odata.org/libraries/#cpp –>> https://github.com/OData/odatacpp-client
and
– CPPREST library – https://github.com/Microsoft/cpprestsdk (known as Casablanca) – vcpkg shows v2.1.19

ODataCpp-Client serves as client and client side proxy generation (code gen) aspects of OData.

#pragma comment(lib, “odata_cleint.vs12d.lib”)
#pragma comment(lib, “cpprest143d_2_1”)
or

UPD: I have packed newest cpprestsdk.2.1.19 into nuget package (but as cpprestsdk.2.1.0.nuget & v143) ‘cause odatacpp required it.
The archive also contains cpprest143d_2_1_win32.lib & cpprest143d_2_1_x64.lib (MSVC v143 — VS2022 x64/x86)
Download: cpprestsdk.2.1.19.nupkg.cab

Added multipart/mixed; boundary=batch header.
Requested URI: /sap/opu/odata/sap/yinfosatz/$batch

no: /sap/opu/odata/sap/mein-dienst/$record

(test variant: /sap/opu/odata/sap/yinfosatz/recordSet(210, “TEST”))

UPD:

Даша и Маша пропалывают грядку за 15 минут

Две девочки, Маша и Даша, пропалывают грядки. Известно, что Маша, работая одна, пропалывает грядку за 25 минут. А если Маша и Даша работают вместе, то пропалывают грядку за 15 минут. За сколько минут Даша одна прополет грядку?
//////////////////////////////////////////////////

Это аналог задачи на скорость и расстояние, где расстояние – это длина грядки, а скорость – это доля длины грядки, которая пропалывается в минуту.

Задачи на работу делятся на два типа:
– задачи, в которых выполняется раздельная работа – эти задачи решаются аналогично задачам на движение.
– задачи на совместную работу.

Обозначим длину грядки за 1.
Пусть время прополки грядки Дашей составляет X минут. Тогда скорость работы Даши составляет 1/X грядки в минуту.

По условию Маша пропалывает грядку за 25 минут. Тогда скорость работы Маши составляет 1/25 грядки в минуту.
Совместная скорость работы двух девочек равна 1/X + 1/25
Получаем уравнение: 1/X + 1/25 = 1/15
Перенесем неизвестное влево, а числа вправо: 1/X = 1/15 – 1/25
1/15 – 1/25 = 5/75 – 3/75 = 2/75

\[ \frac{1}{X}=\frac{2}{75}=\frac{1}{37,5} \]

откуда X = 37.5 минут
Ответ: Даша одна прополет грядку 37 минут и 30 секунд

Effective Modern C++ by Scott Meyers

»If you’re an experienced C++ programmer and are anything like me, you initially approached C++11 thinking, “Yes, yes, I get it. It’s C++, only more so.” But as you learned more, you were surprised by the scope of the changes. auto declarations, range-based for loops, lambda expressions, and rvalue references change the face of C++, to say nothing of the new concurrency features. And then there are the idiomatic changes. 0 and typedefs are out, nullptr and alias declarations are in. Enums should now be scoped. Smart pointers are now preferable to built-in ones. Moving objects is normally better than copying them.«

– Effective Modern C++ by Scott Meyers

Уююки

Two functions to encode and decode UUE (Uuencode)

Arduino җырлары: Шуралар Җөмһүриятләр Берлегенең гимны

Простыня:
Read the rest of this article

winralter

Небольшая портативная программа, которая создана стать заменой стандартной функции Windows “Выполнить” – но с бОльшим количеством возможностей.
winralter имеет очень маленький размер, лог команд (история) ведется в ini-файл.

Alternative to standard Windows Run-Dialog
Download: winralter_v1.01.cab

winralter is a small, portable windows program and created as an alternative to the standard Windows Run-Dialog. In this program you will find a number of improvements e.g. the function run as administrator

Features:
– Very small program
– Arbitrary Windows shortcut
– Execute programs via the command line
– Run commands as administrator
– Supports removing commands from the history (Ctrl+Shift+Del)
– Portable

Sources:
github/winralter

RFC Server (С++ classes)

Добавляем в свойства компилятора -DSAPwithUNICODE а в свойства линковщика lib\sapnwrfc.lib lib\libsapucum.lib

sapnwrfc.ini:

github.com/rfc-server
Read the rest of this article

Insert math as
Block
Inline
Additional settings
Formula color
Text color
#333333
Type math using LaTeX
Preview
\({}\)
Nothing to preview
Insert