Privacy policyContactsAbout siteOpinionsGitHubDonate
© EVILEG 2015-2018
Recommend hosting
TIMEWEB

Евгений Легоцкой

EVILEG

  • 6
  • 0
Dec. 12, 2018, 8:57 p.m.

Boost

static, Boost, static link

I propose to write a small application that will have two subdirectories. One of which will compile the executable file, and the second will contain a statically linked library.

As a result, the project will look like this.

Dec. 9, 2018, 1:22 p.m.

EVILEG

EVILEG, markdown, ESNF-C

After lengthy attempts to cope with JavaScript and its glitches in different browsers, I refused to write a WYSIWYG editor.

Thanks to the community (a survey was conducted in the public in VKontakte), which also shares my point on this matter. Namely, it is better to add a normal Markdown editor than Wysiwig.

Dec. 4, 2018, 10:47 p.m.

Boost

options, class enum, Program, Boost

A small addition to the article on the use of boost::program_options .

In this appendix I will describe how to use enum enums. Because immediately they do not work. By default, boost::program_options work only with basic types and some types from the standard library, for example std::string .

Dec. 2, 2018, 2:58 p.m.

Linux

Linux, Bash, getopts

When developing a site to automate the deployment process, I wrote several bash scripts.

To customize the behavior of scripts, I use the transfer of arguments, which are handled in the bash script by the getopts library.

Nov. 29, 2018, 7:10 p.m.

Boost

cpp, Boost, linking, C++, static

A small note about static linking Boost, so as not to forget.

Initial data:

  • OS Windows
  • MSVC 2017 64bit
  • Boost 1.68.0
  • CMake project
An example will be shown in the simplest version without special variable settings. Maximum default.

Nov. 25, 2018, 10:11 p.m.

Qt

QLineEdit, max, Qt

Напишем небольшое приложение для получения максимального числа из нескольких полей QLineEdit.

This means that we will have several QLineEdit fields, let's say 4 pieces into which numbers will be entered. And there will be the fifth field QLineEdit in which the result will be displayed. We also have a QPushButton button, by clicking we will get values from all QLineEdit fields and among them we will look for the maximum number that has been entered into these fields.

The application will look like this

Nov. 18, 2018, 2:52 p.m.

Qt

QSequentialAnimationGroup, cpp, Qt, C++, QPropertyAnimation

Let's write a small example of an application in which a button will be moved using property animations. To do this, we use the QSequentialAnimationGroup and QPropertyAnimation classes.

QSequentialAnimationGroup is a class that combines several animations into one group, which allows you to automatically start one animation when the previous QPropertyAnimation has completed.

Animation will be launched by pressing the button and this button will move in the window as shown in the image.

Nov. 18, 2018, 10:57 a.m.

Boost

cpp, Boost, Menu, C++

And here is an article on the boost of my some accumulated materials. I offer you the option of writing a console program with support for the console menu, which is implemented using boost::program_options .

boost::program_options is responsible for processing the arguments passed to the program and sets all the necessary variables without the need to implement long logic from if else branches. This is already implemented inside boost::program_optons .

Suppose our program takes the following data as arguments

  • input file path
  • output file path
  • the size of the block being processed, no matter why, we will not do anything with it, just have such a parameter in the program.

Also, the program will have a help menu, which will be the console menu.

The figure below shows the use of this program.

Nov. 6, 2018, 10:13 p.m.

EVILEG

EVILEG, Развитие, News

After talking with one of the users, I decided to change the policy regarding advertising on the site, although I am not sure about that.

I myself am not pleased with the abundance of advertising banners, but I would like to receive sufficient income from the site in order to switch to part-time work and put more effort into the development of the site. I really enjoy the site, it's interesting. But at the moment you have to choose between a hobby and a job.

Oct. 27, 2018, 11:36 p.m.

Django

Django, Facebook, Social

I added authorization on the site through Facebook.

At the same time collected a couple of pitfalls.

Before Facebook , I already added in authorization through the social network VKontakte and Google . And here I needed to create a privacy policy page, since Facebook requires this page and also requires a user agreement, but I provided a privacy policy page. I think that with the growth of the site I will add a full-fledged page of the user agreement, although it is unknown when it will be. However, the site rules are described in sufficient detail.

Also came across a strict need for https from the site. Generally, if you consider that I have https from Let`s Encrypt , I didn’t think that there would be any problem, but as it turned out, by default django-social-auth forms the return address with HTTP protocol, and for using HTTPS You need to specify this in the settings.

And now let's see how this is done.

Join us in social networks

For registered users on the site there is a minimum amount of advertising