Work With Text Files in C++: A Guide in Programming

In this guide, we will learn the features of text files and learn how to use them in C++ programming.

Opening and closing text files

A text file is a collection of strings with the character of a changeable length. Each line ends with the end marker of the string – a special pair of control characters, the codes of which are: 13 (carriage return) and 10 (newline). At the end of the file, there is always an end of file marker – a control character with code 26. Continue reading

Python Email Example – An Easy Instruction


In our Python email example, we write about creating email using Python. In the modern world people get a lot of letters, and some even have several mailboxes. All this complicates the process of administration, which forces us to seek solutions to the problem. Motherboard editor Michael Byrne wrote a story on how to send emails to different mailboxes using Python. Even if you do not want to create a letter sorting program, managing emails as a set of data is quite interesting. Byrne decided to use Python to solve the problem, since this language is good for easy and intuitive creation of such things, and is suitable even for non-programmers. Continue reading

Spectral Graph Theory Sample


The spectral graph theory studies the properties of graphs by means of an analysis of eigenvalues / eigenvectors / of characteristic polynomials of matrices that are connected with graphs (conjugacy matrix, Laplace matrix, unsigned Laplace matrix, etc.). The theory was actively developed in the 1970s, but now finds application in the analysis of graphs of social networks. The theory is related to the detection of communities and the partitioning of graphs. The sample that you will find below will be devoted to theoretical aspects (even proofs), and will be useful for applicants to understand why certain methods of generating features (based on spectra) are working. Continue reading

Histogram Example for Math Students

The histogram example is used to display the interval series. In order to construct a histogram from the data of the variational series at equal intervals, as for the construction of the polygon, the values of the argument are plotted on the abscissa axis and the frequencies or relative frequencies are plotted on the ordinate. Next, rectangles are constructed whose bases are segments of the abscissa, whose lengths are equal to the lengths of the intervals, and the heights are segments whose lengths are proportional to the frequencies or relative frequencies of the corresponding intervals. Continue reading