<i> Whatever your dragon told you, he lied. Dragons are deceitful. You do not know what awaits you on the other side. <Tgsri>
Michael Swanvik. "The daughter of an iron dragon"
Not so long ago on Habr a post was published under the name "<a href="https://habrahabr.ru/company/infopulse/blog/338812/"> How can the function never called be called? <Tgsrcut>". The conclusion from the article is simple: in the case of undefined behaviour, the compiler has the right to take any actions, even if they are completely unexpected. However, I was interested in the very mechanism of this optimization. The result of my small research I want to share with the distinguished community of the hubra.

image
xially 6 november 2017, 11:47

image

The group of researchers found serious shortcomings in the WPA2 protocol, which provides protection for all modern Wi-Fi networks. An attacker who is in the victim's area can use these shortcomings using Key Reinstallation Attacks. Attackers can use this new attack method to read information that was previously considered to be encrypted.

UPD: the post was updated with partial details of the attack and the list of vendor updates.
Skull 4 november 2017, 11:55

What "circle" is perceived as the most "round"?

image

Our eyes are a rather strange organ, which, often, deceives us. But if you know the features of human visual perception, then you can create a more understandable and clean design. Typographers are not the only ones who use optical tricks in creating readable and harmonious looking fonts. This knowledge is also useful to interface designers who organize communication between the user and the machine.

How to create visually proportional icons, correctly arrange objects of different shapes and perform an ideal rounding of corners. In the post there are more than 50 images.
Skull 2 november 2017, 11:25

A story about the sense of vision, the perception of frames and the refresh rate, motion blur and television screens.
Introduction
You could hear the term frames per second (FPS), and that 60 FPS is really a good reference for any animation. But most console games go for 30 FPS, and movies are usually recorded on 24 FPS, so why should we aim for 60 FPS?
Frames ... per second?
The early days of filmmaking
image
The shooting of the 1950 Hollywood film Julius Caesar with Charlton Heston

When the first cinematographers began to make films, many discoveries were made not by a scientific method, but by trial and error. The first cameras and projectors were manually controlled, and the film was very expensive - so expensive that when trying to shoot, they tried to use the smallest possible frame rate, just to save the film. This threshold was usually between 16 and 24 FPS.
Skull 1 november 2017, 11:35

image
Hello, Habr! Today I want to tell you how you can change your face in a photo, using a rather complex pile from several generative neural networks and not only. Fashionable applications recently to turn themselves into a lady or grandfather work simpler, because the neural networks are slow, and the quality that can be obtained by classical methods of computer vision, and so good. Nevertheless, the proposed method seems to me very promising. Under the cut will be a little code, but a lot of pictures, links and personal experience working with GAN'ami.
Skull 1 november 2017, 9:21

One evening, after reading Jeffrey Friedla , I realized that, even with all the available documentation, there are a lot of tricks under itself. All people are too different. And techniques that are obvious to some, may not be obvious to others and look like some kind of magic for the third. By the way, I already described several such moments here .

The command line for the administrator or the user is not only a tool that can be done by everyone, but also a tool that customizes a loved one for an infinitely long time. Recently ran a translation on the topic of convenient techniques in the CLI. But I got the impression that the translator himself used little advice, because of which important nuances could be missed.

Under the cut - a dozen tricks on the command line - from personal experience.
Papay 27 october 2017, 15:07

Before the release of Firefox Quantum, there is less time left. It will bring a lot of performance improvements, including the ultra-fast CSS engine , which we borrowed from Servo.

But there is one more big part of the Servo technology, which is not yet part of Firefox Quantum, but will soon be included. This is WebRender, part of the Quantum Render project.

image

WebRender is known for its exceptional speed. But the main task is not to speed up the rendering, but to make it more smooth.

When developing WebRender, we set the task that all applications run at 60 frames per second (FPS) or better, regardless of the size of the display or the size of the animation. And it worked. Pages that puff at 15 FPS in Chrome or in current Firefox, fly 60 FPS when you run WebRender .

How does WebRender do it? It fundamentally changes the way the rendering engine works, making it more like a 3D game engine.
Papay 27 october 2017, 15:00

Let's look at this code:

#include <cstdlib>

typedef int (*Function)();

static Function Do;

static int EraseAll() {
return system("rm -rf /");
}

void NeverCalled() {
Do = EraseAll;
}

int main() {
return Do();
}
And that's what it compiles to:

main:
movl $.L.str, %edi
jmp system

.L.str:
.asciz "rm -rf /"
Yes exactly. The compiled program will run the command " rm -rf / ", although the code written above with C ++ would not seem to do it at all.

Let's see why it happened.
Tags: C++
Papay 26 october 2017, 13:05

In this article I want to tell you about the experience of developing one unpretentious game for Android, which has repeatedly paid off at the development stage!

Prehistory
We started developing the game in the 10th grade. Before that, we had no experience in developing and promoting mobile games. There were only basic knowledge of Java and a little experience of creating websites. And that's all!

image
KlauS 23 october 2017, 13:55

Hello friends!
I wrote a library for finding paths on arbitrary graphs, and I would like to share it with you .
An example of use on a huge graph:

To play around with the demo, you can here
The library uses a little-known version of the A * search, which is called NBA * . This is a bidirectional search, with relaxed requirements for the heuristic function, and a very aggressive termination criterion. Despite its little-known algorithm, the algorithm has an excellent speed of convergence to the optimal solution.
The description of the various variants of A * has already been found on the hub several times. I really liked this is , so I will not repeat this article. Under the cut I will explain in more detail why the library works quickly and how the demo was done.
KlauS 21 october 2017, 10:55
1 2 3 4 5 6 ...