Tetris on C # in 100 lines

Tetris on C # in 100 lines 
3r3-31. Recently I had an idea - to write a simple game in the minimum number of lines. My choice fell on Tetris. In this article I will describe my code.
To begin with, it is worth noting that in my implementation I included only the basic features: 3r3333368.  
movement of figures left /right;
the fall of the figures;
turn figures;
deleting filled figures;
ending the game.
So, first add a PictureBox to the form and create a timer.
Also, the game will need:
public const int width = 1? height = 2? k = 15; //Size of the field and size of the cell in pixels
public ...
+ 0 -

Destructive exceptions

 3r3615. 3r3-31.
Once again about why it is bad to throw exceptions in destructors 3r33597. 3r3-3598.  3r3615. 3r3600. Many C ++ experts (for example, 3r337. Sutter's coat of arms
) Teach us that throwing exceptions in destructors is bad, because you can get into the destructor during stack promotion with an exception already thrown, and if at that moment another exception is thrown, the result will be called r3r3591. std :: terminate ()
. The standard of the C ++ 17 language (hereinafter I refer to the freely accessible version of the draft ...
+ 0 -

Thoughts on Rust 2019

 3r3304. 3r3-31. Colleagues, good evening to all!
 3r3304. We are pleased to offer you a translation of a truly programmatic article from 3r3-36. Rafa Levin
whose titanic work on the development of the Rust language evokes respect and piety:
 3r3304. Thoughts on Rust 2019  3r3304.
 3r3304. Without false modesty and without hatefulness, the author substantively and enthusiastically responded to the call of the Rust community, published by reference at the beginning of this article. We hope it turned out interesting and life-affirming.
 3r3304. ...
+ 0 -

The story of one experiment with Cython and C ++ vector

 3r33424. 3r3-31. 3r33333. One
warm r3r3255. on a cold winter evening, I wanted to warm up in the office and test the theory of one colleague that the C ++ vector could cope with the task faster than the CPython list. 3r33232.  3r33424. In the company we are developing products based on Django and it so happened that it was necessary to process one large array of dictionaries. A colleague suggested that the implementation in C ++ would be much faster, but I had the feeling that Guido and the community were probably a little steeper than us in C and probably already decided and avoided all the pitfalls...
+ 0 -

Checking the LibrePCB project using PVS-Studio inside the Docker container

Checking the LibrePCB project using PVS-Studio inside the Docker container 3r38080. 3r3669.  
This is a classic article about how our team checked the open LibrePCB project with the help of the PVS-Studio static code analyzer. However, the article is interesting because the check was carried out inside the Docker container. If you are using containers, we hope that the article will demonstrate another simple way to integrate the analyzer into the development process. 3r3669.  
3r3654. LibrePCB
LibrePCB - this is free software for designing electronic circuits and printed circuit boards. The program code is written in C ++, and Qt5 is used ...
+ 0 -

The amazing performance of parallel C ++ 17 algorithms. Myth or Reality?

The amazing performance of parallel C ++ 17 algorithms. Myth or Reality? 3r31192. 3r3-31. Good evening! 3r31175.  3r31192. 3r31175.  3r31192. From our course "Developer C ++" We offer you a small and interesting study about parallel algorithms. 3r31175.  3r31192. 3r31175.  3r31192. Go. 3r31175.  3r31192. 3r31175.  3r31192. With the advent of parallel algorithms in C ++ 1? you can easily update your “computational” code and get the benefit of parallel execution. In this article, I want to consider an STL algorithm that naturally uncovers the idea of ​​independent computing. Can we expect a 10-fold acceleration in the presence of a 10-core processor? Maybe more? ...
+ 0 -

ASP.NET Core 2.2 has been released. What's new? (2 of 3)

December ? came out
ASP.NET Core ???r3r36. It is included in the delivery of .NET Core 2.2. About .NET Core 2.2 i I wrote recently and now you need to open the topic in depth. Let's see what's new for us.
ASP.NET Core 2.2 has been released. What's new? (2 of 3) from the usual place and use both on your development machine and servers. New Windows Server hosting, runtime installers and binary archives for updating servers are available there.
This release is dedicated to updating 3r330. .NET Core
, ASP.NET Core and Entity Framework Core up to version ???. The new version of the SDK is ???. The following requirements for the Visual Studio version ...
.NET / C#
+ 0 -

Docker Remote API with certificate authentication with revocation checking

Problem Description
For the needs of remote control of Docker, Docker can provide web API.
This API can either not require authentication at all (which is highly discouraged), or use certificate authentication.
The problem is that native certificate authentication does not provide for certificate revocation checking. And this can have serious consequences.
I want to tell how I solved this problem.
Solution of the problem 3r3203.
First you need to say what to say, I will be about Docker for Windows. Maybe Linux is not so bad, but now is not about that.
What we have? We have ...
.NET / C# / DevOps
+ 0 -

And back into space: like the unicorn, Stellarium visited

And back into space: like the unicorn, Stellarium visited 3r31093. 3r3-31. For all the time of its existence, people have made a tremendous amount of effort to study almost the entire area of ​​the starry sky. To date, we have considered hundreds of thousands of asteroids, comets, nebulae and stars, galaxies and planets. To see all this beauty on your own, it’s not necessary to leave the house and buy a telescope for yourself. You can install on the computer Stellarium - a virtual planetarium, and look at the night sky, lying comfortably on the couch But with the comfort? To find out the answer to this question, check Stellarium for errors in the computer ...
+ 0 -

Internal and external linking in C ++

Good day everyone! 3r33737.  3r33770. 3r33737.  3r33770. We present to you a translation of an interesting article that was prepared for you as part of a 3-3-38 course. C ++ Developer
. We hope that it will be useful and interesting for you, as well as our listeners. 3r33737.  3r33770. 3r33737.  3r33770. Go. 3r33737.  3r33770. 3r33737.  3r33770. Have you ever come across the terms internal and external communication? Want to know what the extern keyword is used for, or how does declaring something static affect the global scope? Then this article is for you. 3r33737.  3r33770. 3r33737.  3r33770...
+ 0 -