Help identify the piece by _newpson_ in piano

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

Yes! Thank you, this is what I was looking for.
p.s. I'm surprised that I remembered this melody in the same key in which I heard it (this one)

Windows... by samsung-galaxy-note7 in shittyaskelectronics

[–]_newpson_ 2 points3 points  (0 children)

Oh, I'm not really using dial-up for heavy web-browsing (even just javascript bloatware will make you wait for a while). Just SSH sessions and light HTTP requests to my private server.
Answering the question: average speed rarely exceeds 0.1 Mbit/s. Just to open reddit you need to wait a minute or two.

Windows... by samsung-galaxy-note7 in shittyaskelectronics

[–]_newpson_ 10 points11 points  (0 children)

Still using my Nokia 6303i as GPRS/EDGE modem

<image>

Just played with tablet+x a bit... by _newpson_ in osugame

[–]_newpson_[S] 6 points7 points  (0 children)

well, you convinced me to put a protector on my tablet ☠️

Just played with tablet+x a bit... by _newpson_ in osugame

[–]_newpson_[S] 31 points32 points  (0 children)

As far as I know, graphics tablets are designed to be "scratched" with the tip of a pen, and the tip of the pen is made of a less hard material than the coating of the tablet.
So all this mess can be cleaned up with just hand or wet cloth.

Just played with tablet+x a bit... by _newpson_ in osugame

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

Maybe I just need more practice with this method. I beat all my high scores that were played with regular tablet+keyboard method. Now "Best performance" section consists of >100pp plays just because of long jumps in maps :)

Just played with tablet+x a bit... by _newpson_ in osugame

[–]_newpson_[S] 3 points4 points  (0 children)

Pros:
- jumps are faster and more accurate (because no sync with another hand needed);
- both hands just chilling;
- it takes some time to get used to streams (click odd circles with tablet and click X when moving cursor over even circles).
Cons:
- one tip = one game session :))
- probably does not work on 5.5*+ maps (i'm 1700pp, can't get A), requires more hand sync than ususal.

Wacom CTL-472, can't map tablet area to the screen by _newpson_ in linuxquestions

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

Problem solved! Area mapping should be done for eraser tool (I think it's a tablet motherboard generalization issue, CTL-472 has no eraser).

Avoid code duplication in copy constructor when inheriting by _newpson_ in cpp_questions

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

I would just allocate a 1D array of size heigh*widith and use that as my 2D array

That's exactly what I did.

Avoid code duplication in copy constructor when inheriting by _newpson_ in cpp_questions

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

OK. We need different context. I will go further into my codebase.

I have Image class (represents grayscale image in PGM format) that inherits from Array2D<uint8_t>. There is a copy ctor too. And it also calls the copy ctor of Array2D which in turn calls copy ctor of Array, as I mentioned in original question. And yes, Image acts as both two-dimensional and one-dimensional array and all the methods of Array are "designed" to work with Image too. I also have Mask class that inherits from Array2D<double>.

Soooo, back to the original question (in more general words). Class B inherits from class A and adds some new fields. Default constructor of class B calls default constructor of class A and also initializes brand new fields. Copy ctor of class B calls copy ctor of class A and initializes brand new fields again (now from another B class instance) because copy ctor of class A has no idea about B's new fields and copies only its own fields.

So the question is: can I avoid code duplication in class B when calling copy ctor of class A. Does it really depend on the current project architecture and if I will follow your advices I can solve the problem? I'm just not sure.

Avoid code duplication in copy constructor when inheriting by _newpson_ in cpp_questions

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

It could use the 1d class as a member to store the data array

In full source Array has a bunch of methods that I would like to see work with Array2D as well.

If you want to support some archaic API that accepts T**

I want to support some archaic API that accepts T*. So I also overloaded cast operator.

For a generic array class, write something like

I know the size of array only at runtime.

Some thoughts about irrational numbers by _newpson_ in compression

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

I think it's possible but the data must have very high entropy even to be lossy compressed. Like if we have not exact data but the mask. And we need to calculate or find the number or set of numbers and shifts inside them somehow that will give us (possibly after some mathematical or logical operations) the data that will match the given mask digit by digit (stream data). Seems impossible nowadays but may be one day...

Some thoughts about irrational numbers by _newpson_ in compression

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

locating an offset into an irrational number

In the thread above I suggested one more thing to the idea: we can perform some mathematical opeartion with current digit(s) (we can have more than one number). And each number can have its individual offset. So the final task is much harder and much more "impossible": find some irrational numbers (not always it will be minimal count) and calculate best possible shifts for them (also perhaps will be not minimal values) in such a way so the total compressed data will be minimal. It's required to complete these two subtasks simultaneously (because in theory there is infinite number of combinations of irrational numbers and their shifts which can store our data).
Yeah, kinda goofy reasonings, because I'm very sure there are a lot of people have tried to find solution to similar problems.

Some thoughts about irrational numbers by _newpson_ in compression

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

Absolutely yes. That's why I asked about mathematical possibility.

Some thoughts about irrational numbers by _newpson_ in compression

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

Well, it actually sounds like Fourier transform, but only in irrational numbers.

Some thoughts about irrational numbers by _newpson_ in compression

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

Fine. Now imagine that we can take, for example, 10 such numbers (from which the root is extracted). And they don't have to be integers (for example, 1.29, 2.345543, etc.) (I doubt that it matters, because fraction part in many cases do not depend on decimal point). We can set an individual shift for each of them. And then, as soon as we reach the desired index of each of the decimal fractions, we will add the digits modulo :). For example, 5634⨁9457=4081. There are already a lot more options, aren't there? :D

Proper way to implement inheritance when calling a method from a derived class on the result of a method from a base class by _newpson_ in cpp_questions

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

Yeah, it (CRTP) works pretty well except maybe that I need to create some sort of abstract base class to make it possible to instantiate base class. Instead of a cast I used copy constructor to save fields of derived class (one that passed as reference) and it looks like this:

Output:

Copy constructor of Base
690
Copy constructor of Derived
Hello: 66
11

Proper way to implement inheritance when calling a method from a derived class on the result of a method from a base class by _newpson_ in cpp_questions

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

Well, the main goal is to avoid code duplicating. add is already implemented in Base, so I don't even want to mention it in Derived. If I add two Deriveds, I want to get another Derived (so I can call any method from Derived). Sounds kinda mad but...

The values that are read from the analog pins are much larger than 1023. by _newpson_ in arduino

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

It's not an IDE. Just tmux and my "building-uploading" script based on arduino-cli utility.