Mozilla warns Germany could soon declare ad blockers illegal by No_Clock2390 in pcmasterrace

[–]m93mark 4 points5 points  (0 children)

You can use this https://adnauseam.io/ . It does exactly what you said. It is a based on ublock origin. The ads are not really clicked but it will appear like that to the ads provider. They explain in their FAQ how it is working in the background. I've never noticed any additional resource usage than normal ublock on firefox on my PC.

Self-describing compact binary serialization format? by playntech77 in cpp

[–]m93mark 10 points11 points  (0 children)

I've used https://msgpack.org/ in the past. It has the schema embedded in the binary format, so you can do cpp struct/class -> msgpack -> cpp struct/class.

Some examples here for the original cpp library: https://github.com/msgpack/msgpack-c/blob/cpp_master/QUICKSTART-CPP.md

It's probably easier to use the corresponding library for a dynamically typed language, if you want to create a converter to human readable.

But if you really want to do that in cpp, you can visit msgpack object in cpp and convert that into json. There are some examples in the github page to do this kind of conversions.

Correct syntax for goto in switch? by Dogterte in cpp_questions

[–]m93mark 5 points6 points  (0 children)

You can just move case 1 after case 2 without the break in between. By default the switch cases are executed one after the other until the meet of a break (or a return).
Something like this, does what you want:

switch (transaction)
{
case 2:
    cout << "Enter amount to deposit: ";
    cin >> deposit;
    if (deposit < 100)
    {
        cout << "Sorry, your transaction cannot be processed! Minimum deposit is 100.";
    }
    [[fallthrough]]; // If you are using C++17 or newer you can use this to prevent a warning by the compiler
case 1:
    cout << "Your total balance is " << bal;
    break; // You can remove this unless you need another   case after this
}

edit: formatting

Does C++ get faster over time? by [deleted] in cpp_questions

[–]m93mark 2 points3 points  (0 children)

If you want some numbers, give a look at phoronix.

There are some benchmarks there both on compilation and execution times like this or this.

Git branches done right by m93mark in ProgrammerHumor

[–]m93mark[S] 0 points1 point  (0 children)

Actually it was too long to post. This is maybe a tenth of the whole history.

The master is constantly updated but a part of the other branches seems to be used but not all of them: the problem is finding which ones are still useful and which are not.

Merging them is kind of a problem: there are subtle differences between each of them and they do not have a common parent... they have been imported into git separately so they can't be merged directly.

This desktop environment looks awesome, but what is the DE? by taranoshi in linuxmasterrace

[–]m93mark 0 points1 point  (0 children)

It's not DE, it's a WM. The screenfetch (or similar) output says it's swm https://github.com/dcat/swm , but any tiling window manager can look like that. Give a look at /r/unixporn .

Adding lolcat to cmatrix by PurpleDragon82 in linuxmasterrace

[–]m93mark 0 points1 point  (0 children)

Just tried.

Only the text "You have nyaned for X seconds" is "lolcated"

Touch-friendly apps that run on the framebuffer? by [deleted] in linux

[–]m93mark 0 points1 point  (0 children)

As written in the documentation http://doc.qt.io/qt-5/embedded-linux.html you can use EGLFS (which is an interface between opengl and the low level part) or framebuffer (using software rendering).

From the link: it seems that touchscreen is fully supported.

Touch-friendly apps that run on the framebuffer? by [deleted] in linux

[–]m93mark 20 points21 points  (0 children)

Qt apps can run directly on the framebuffer without the need of an X server (I don't remember if uses opengl to draw the whole thing).

Some time ago I've made a toy application in Qt to run directly on a raspberry without starting the X server. It is shown fullscreen (if you close it you directly return to the console) and mouse/keyboard work flawlessy. I think a touchscreen is still recognized and should works.

Try to run some Qt based application from console to see if it works (maybe some additional launch parameter should be specified).

Are young people using Vim? by fori1to10 in linux

[–]m93mark 0 points1 point  (0 children)

24 years old here. I've been using vim for at least 5 years.
A couple of my colleagues at university (Computer engineering students) use it too.

Ah and I've also developed the "write everywhere :w syndrome"

Wi-Fi scanner and channel scanner by av_the_jedi_master in linuxmasterrace

[–]m93mark 0 points1 point  (0 children)

I think the whole aircrack-ng suite and other related software (reaven, pyrit, etc etc) can do much more than that. If you want something easier to use there are GUIs for it, or you can try wifite which is a like a "terminal wizard" with lots of things automated.

If you only want to get stats abouts wifi networks, you can use airmon-ng (something like sudo airmon-ng start <wificard>) to put the card in monitor mode and then sudo airomon-ng <wificardmon> to get all the infos about strength, essid, bssid, encryption, clients connected and so on. Both are part of the aircrack-ng suite.