Upload messages using the Telegram API. Where to start

On the Internet, you can find many descriptions and examples of creating telegram bot. But Telegram Bot Api has limited functionality. To solve the task of unloading messages from Telegram by keyword, you must use the Telegram API. The library was used as a basis. TLSharp . It should immediately be clarified that further work is possible only for registered users in Telegram.
The start of working with the API is registering the application:
We go to the site Telegram and enter your phone number. Enter the verification code.
Upload messages using the Telegram API. Where to start
We f...
GitHub / C# / .NET

Profiling: measurement and analysis

Profiling: measurement and analysis
Hi, I'm Tony Albrecht, an engineer at Riot. I like to profile and optimize. In this article, I'll talk about the basics of profiling, and I will also analyze an example of C ++ code during its profiling on a Windows machine. We'll start with the simplest and gradually go deeper into the gut of the CPU. When we are faced with opportunities to optimize - we will implement changes, and in the next article we will analyze real examples from the code base of the game League of Legends. Go!
Dear Imgui and Vectormath from ...

We study parallel computations with OpenMPI and supercomputer on the example of hacking neighbor WiFi

At the time of writing the dissertation one of the research directions was the parallelization of the search in the state space on computing clusters. I had access to a computational cluster, but there was no practice in programming for clusters (or HPC - High Performance Computing). Therefore, before proceeding to the combat mission, I wanted to practice something simple. But I'm not a fan of abstract hello world without real practical tasks, so this task was quickly found.
We study parallel computations with OpenMPI and supercomputer on the example of hacking neighbor WiFi
Everyone knows that full search is the most inefficient way to find passwords. However, with the advent of supercomputers, it was ...

Lessons that can be learned from the LLVM /Clang

Lessons that can be learned from the LLVM /Clangcode base. From the translator: in the article I bring to your attention, the authors examined the LLVM /Clang code base using the CppDepend code analysis tool, which allows calculating various code metrics and analyzing large projects in order to improve the quality of the code.   Time has proven that Clang is the same mature C and C ++ compiler as GCC and the compiler from Nicrosoft, but what makes it special is that it's not just a compiler. This is the infrastructure for creating tools. Due to the fact that its architecture is based on the use of libraries, the reuse and integration of functionality ...

Let's explore the minor features of C # 7

C # 7 adds a number of new features and focuses on data consumption, code simplification and performance. The biggest features have already been considered - tuples , local functions , comparison with sample and throw expression . But there are other new opportunities, both large and small. They all combine to make the code more efficient and understandable, so that everyone is happy and productive.
Let's look at the rest of the features of the new version of C #. So! Let's start!

Out variables are

Currently in C # use out parameters ...[/h]
.NET / C#

Learn OpenGL. Lesson 4.9 - Geometric shader

Learn OpenGL. Lesson 4.9 - Geometric shader

Geometrical Shader

Between the stages of vertex and fragment shader execution there is an optional stage designed to perform the geometric shader. At the entrance to the geometric shader, there is a set of vertices that form one of the primitives allowed in OpenGL (points, triangles, ). As a result of its work, the geometric shader can transform this set of vertices at its own discretion before transferring it to the next shader stage. In this case, it is worth noting the most interesting feature of the geometric shader: in the course of its work the set of input vertices can be transformed to represent ...[/h]

Optimizing the code in the mind, or "Well, it's also definitely faster"

The other day working on one mistake in one open-source project, I saw how a colleague (also working in parallel over the same problem) flooded such a commit.[31a078bec7] :
- * Select the list item based on the index. Negative operand means
- * end-based indexing (-? ), and -1 means out of range.
+ * Decode end-offset index values.
* /
- if (opnd < -1) {
.- index = opnd + 1 + objc;
.-} else {
.-- index = opnd;
+ index = opnd + (opnd <= TCL_INDEX_END)*(objc - 1 - TCL_INDEX_END);
.pcAdjustment = 5;

The change itself is correct (now TCL_INDEX_END is the constant ...

You can not just take and edit the subtitles

You can not just take and edit the subtitles
How many people use subtitles around the world? Probably very much. For educational purposes or simply because of the love for the original voice acting, on the Internet you can find subtitles almost to any film and in many languages. All this is created in special programs. As in most programs, Subtitle Edit did not do without surprises in the form of bugs.
Subtitle Edit - Free editor with a huge list of features. This is a large open source C # project. The program is very popular and is issued in the first lines of search engine results, many awards are listed on the project website. In the ...

The static code analyzer PVS-Studio ??? is adapted for ARM-compilers (Keil, IAR)

The static code analyzer PVS-Studio ??? is adapted for ARM-compilers (Keil, IAR)

PVS-Studio is a static code analyzer for searching for errors and potential vulnerabilities in the code of programs in C, C ++ and C #. We have long pleased readers of our blog by checking open projects and analyzing the errors found. Our articles have the potential to become more interesting, since the analyzer has learned to check the code of embedded devices. We supported several ARM-compilers, which you will learn more about from the article. Errors in embedded devices and robots can be more spectacular than in applications. An error in the built-in device is not just a drop /hang of the program ...

Asynchronous HTTP requests in C ++: incoming through RESTinio, coming through libcurl. Part 3

In the previous article we disassembled the implementation of a two-threaded bridge_server. On the same thread, incoming HTTP requests are processed asynchronously by RESTinio . On the second thread, asynchronous requests to the delay_server are executed by libcurl in the form curl_multi using the functions curl_multi_perform and curl_multi_wait .
Today we will look at another implementation of bridge_server, which asynchronously ...