C++ → C++14 - lambda function with cached return value
C++14, lambda, auto, cache, C++
Suppose we wrote a function that calculates some value or uses a function to calculate this value, while the function_ which calculates the value is quite expensive to calculate and works for a long time. In this case, we call …
ReadC++ → C++14 - unnamed structure as auto value returned by function
Let's look at an interesting construction from the C++14 standard, which allows you to return the structure used in one place of the code, but you need to return an object with named fields.
Such a construction can serve as …
ReadQt → Qt Design Studio 1.3 Beta released
Qt, Releases, Qt Design Studio, design
Qt Design Studio is a UI design and development tool that enables designers and developers to rapidly prototype and develop complex UIs. Both designers and developers use Qt Design Studio and this makes collaboration between the two a lot simpler …
ReadQt → Using QTime to display milliseconds in the current minute of the day
Snippet program code. Task Get the number of milliseconds in the current minute of the day. Used operator remainder of division.
Read#include <QCoreApplication> #include <QTime> #include <QDebug> int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); QTime time = QTime::currentTime(); …
Algorithms → Dijkstra's algorithm
Dijkstra's algorithm allows us to find the shortest path between any two vertices in a graph.
It differs from a minimum spanning tree in that the shortest distance between two vertices may not include all vertices in the graph.
How …
ReadCMake → Using variables declared in CMakeLists.txt inside C ++ files
I propose to consider the option of using variables declared in the CMakeLists.txt file in C ++ code.
To begin with, what is it for? For example, you want to specify the version of the program and some other auxiliary …
ReadDevelopment diaries → IMpos project. Part 011. Viewing the names of fuel. Export results to xlsx file.
QTableWidget, Qt, xlsx, export
View fuel names.
After processing requests for names, we form a table to display information to the user.
Indication of the process of executing queries to the petrol station databases will be used not only for viewing, but also when …
ReadDevelopment diaries → IMpos project. Part 010. Obtaining names of fuel
We received a list of gas stations with which we will perform further actions.
We create a slot called when clicking on the CheckBox on the GroupBox Actions.
Readvoid FuelNameDialog::on_groupBoxActions_clicked(bool checked) { if(checked){ //Очищаем список терминалов передаваемых для дальнейшей обработки …
Development diaries → IMpos project. Part 009. Change of fuel names. Terminal selection
QTableWidget, qcheckbox, QDialog
Dialog for changing fuel names.
Dialog appearance.
The dialog was completely created in Qt Designer.
In the main menu, add the
Utilities
section with the item
Fuel names
, and add the corresponding button to the toolbar.
Dialog call slot …
Algorithms → Dynamic programming
Dynamic programming is a computer programming technique that helps to efficiently solve a class of problems that have overlapping subproblems and optimal substructure properties.
Such problems include repeatedly calculating the value of the same subproblems to find the optimal solution. …
ReadDevelopment diaries → Simple Tracker project. Part 8: the formation of the distribution and the results
Iscander Che, Simple Tracker, C++, Qt
In conclusion, we will prepare the files obtained during compilation for distribution. It doesn't matter if the project is local. It is more convenient to have an installer handy, just in case. With it, you can, for example, automatically clean …
ReadQt → Updating CMake project support in Qt Creator
Over the past few weeks, developers have been working on improving CMake support in Qt Creator, Qt Company would like to highlight some of the new features.
Fileapi support
The CMake project has announced a new IDE integration mechanism version …
Read- Akiv Doros
- Nov. 11, 2024, 2:58 p.m.
C ++ - Test 004. Pointers, Arrays and Loops
- Result:50points,
- Rating points-4
- molni99
- Oct. 26, 2024, 1:37 a.m.
C ++ - Test 004. Pointers, Arrays and Loops
- Result:80points,
- Rating points4
- molni99
- Oct. 26, 2024, 1:29 a.m.
C ++ - Test 004. Pointers, Arrays and Loops
- Result:20points,
- Rating points-10