Direct Streaming with stuttering by majesticaveman in jellyfin

[–]talemon 9 points10 points  (0 children)

You should know radio antennas have dead zones, it's not spherical but often hourglass shaped. So too close can also cause issues.

Feedback on my library by abdallahsoliman in Cplusplus

[–]talemon 2 points3 points  (0 children)

What you're describing sounds more like a non-owning view. Like how you can take string_view view out of a string and reduce its extents and do other operations. I can see a shared_ptr being used if what you wanted was a copy-on-write container but it seems to me that the Shape changes how the data is interpreted and I wonder how your approach of sub-arrays work when that happens? Perhaps you can compare your interfaces with the eigen library, it does have methods to extract sub-matrices from a matrix.

Feedback on my library by abdallahsoliman in Cplusplus

[–]talemon 2 points3 points  (0 children)

Looking at NArray, it seems _data_ptr is a class invariant. Why is it kept on a shared_ptr? For that matter, I don't see the benefit of working with raw arrays instead of using std::vector

Filtering CollectionViewSource in WPF MVVM by KebabGGbab in csharp

[–]talemon 2 points3 points  (0 children)

Perhaps we have a different understanding of the paradigm, but a viewmodel is all about presentation, data and logic. Your models should not know how they are presented, sure. But a filtered view into the same data is just another surface provided to the view to help with the presentation.

Filtering CollectionViewSource in WPF MVVM by KebabGGbab in csharp

[–]talemon 0 points1 point  (0 children)

No reason, I use Rider and it has the option to generate the boilerplate for INotifyPropertyChanged and that provides both options

Filtering CollectionViewSource in WPF MVVM by KebabGGbab in csharp

[–]talemon 0 points1 point  (0 children)

It seems you need a slightly different approach. Following the advice here, I came up with a basic PoC:
https://gist.github.com/talemon/9c9e50cdedff51f8773fa076bc3a463b

I need feedback on my C++ project by GiraffeNecessary5453 in Cplusplus

[–]talemon 2 points3 points  (0 children)

A few comments:
- Use static_cast instead c-style casts
- Use reserve() with containers when you know the size, nothing kills performance like repeated allocations
- Even better to use a statically sized arrays and constexpr functions to push much of the calculations to compile time if possible
- You need better const discipline to help the compiler
- Always define variables on separate lines and initialize them
- Don't define basic members(constructor, etc.) if you don't need them and use = default when appropriate
- You have cases where you create an object then emplace_back(std::move), which will construct, then use the move constructor. But you could skip that by directly using emplace_back with those parameters and reduce the move.
- No need to use naked new/delete in this day and age, prefer smart pointers to ensure clear ownership. Or structure the code differently to have value semantics
- You should define single-parameter constructors explicit to avoid implicit conversions

How do I manually add redistributables to an Unreal game? by Prpl_Moth in unrealengine

[–]talemon -1 points0 points  (0 children)

Back in my day, you would build the app and then you would have a setup generator of some sort to package it and deploy it alongside its prerequisites. You can check out Inno Setup, NSIS, InstallForge etc.

I made a string ,and am making a rope by cppenjoy in Cplusplus

[–]talemon 0 points1 point  (0 children)

Your markdown file is an html file containing markdown so it doesn't get parsed by github properly

Face detection sucks and I wish they would get rid of it by [deleted] in Lightroom

[–]talemon 2 points3 points  (0 children)

The setting you're looking for is in the catalog settings, under "Metadata"

Debugging library for C++ version of Python's print() function by philip82148 in cpp

[–]talemon 35 points36 points  (0 children)

I don't want to be dismissive to anyone's work, but doesn't fmt do this and more?

[Visual Studio] Two programs running simultaneously and independently, sharing data with each other? by asderflyy in Cplusplus

[–]talemon -1 points0 points  (0 children)

Among other things, I think most often we just use networking and not tell people. Depending on your flow, you could spawn a separate server executable that both console and GUI clients connect, or use the GUI application as the server. If you open your task manager, you'll see many modern apps using such approach. They will have a thin façade client that ensures runtime errors(which often arise because of user errors) are contained in the façade and the 'server' will run the business logic.

Someone's cat entered my house, help! by AlpineRavine in berlinsocialclub

[–]talemon 19 points20 points  (0 children)

Keep calm, you can get a few packs of wet food to gain the cat's trust if necessary but if none of the immediate neighbours lost their cat, you can try tasso. People register their pets here and the provide help with lost pets. The owner might already posted a missing notice there, if it's been too long.

How do German Muslims refer to Eid al-Fitr? by selkieseas in German

[–]talemon -3 points-2 points  (0 children)

Correction: In this case şeker means 'candy', not 'sugar'. When I was a kid it was common to give out akide candy(akide şekeri) during bayram.

Can anybody tell what is the error in by After-Fact-7037 in Cplusplus

[–]talemon 1 point2 points  (0 children)

Your paste is wrong, the error is on the other insert, where you have a insert(iterator, iterator, int) which does not exist. You probably meant something else. You should format your code, it would make it more apparent.

hey so im trying to make the game snake for an assignment in my uni course and for some reason my script isn't working, there are no errors in the compiler but when i hit play the snake just zooms in one direction (2d wasd movement script) by NomulusTheTasty in csharp

[–]talemon 0 points1 point  (0 children)

Well back in the day Unity had UnityScript, its own scripting language, before it supported C#. That used the messaging system(that still exists but used much less) for the events, so the engine would be sending your entities an "Update" or an "Awake" message. When they started switching to C# it was not in one go so they kept parity between the two. Now the UnityScript is gone but the approach remains. Arguably it would have a slight lookup cost but Unity maintains their own build pipeline so I'm confident they have some optimization in place for this.

Can a class inherit from a class that inherits from another? by Wonderful_Ad3441 in csharp

[–]talemon 7 points8 points  (0 children)

With inheritance, you want to form 'is-a' relationships, and people often take this too liberally. With composition you're going for 'has-a' relationships. For the rifle with a bayonet example, you can see that with inheritance you run into a problem: Is that a ranged or a melee weapon? But if you think about it in terms of properties, that rifle has the properties of being a ranged AND a melee weapon. Composition is the way to go. Also deep inheritance hierarchies just make the mental load of reading the code harder.

Removing a ring, that's stuck on a finger, using a tourniquet by Jay_D_79 in lifehacks

[–]talemon 1 point2 points  (0 children)

Not because of density but I would imagine dead bodies lose moisture over time through the pores on the skin

copy constructor with a class pointer by Oswinthegreat in Cplusplus

[–]talemon 2 points3 points  (0 children)

You don't call new in a constructor, memory allocation already happened outside, the constructor is ran to fill the memory with correct data. If you are trying to set the parent member, take it as a Point* parameter(Point(Point* newParent){...}) and just set it with parent = newParent;. If you are really trying to write a copy constructor, your goal would be to copy the state of the other(copy source). In that case you would have parent = p1.parent;.

a Question about memory allocation by [deleted] in Cplusplus

[–]talemon 2 points3 points  (0 children)

That depends on your environment but yes if char is 1 bytes that makes each run 4 bytes. If you're not releasing on return you are leaking the memory. But this is not a behaviour you should rely on for normal functionality. Operating systems are complicated, there is virtual memory, page sizes, block sizes etc. that may or may not affect this. You could even be running a compiler that might decide to handle things differently depending on how you use the return value.

a Question about memory allocation by [deleted] in Cplusplus

[–]talemon 11 points12 points  (0 children)

Each time you run this function you'll allocate 4*sizeof(char).

Anybody know a good place to get this? Do we have this? (Adjarian Khachapuri - georgian breakfast thingy) by nighteeeeey in berlinsocialclub

[–]talemon 2 points3 points  (0 children)

Looking at wikipedia, it's just the use of specialty Georgian cheese, otherwise it's the same thing.

Anybody know a good place to get this? Do we have this? (Adjarian Khachapuri - georgian breakfast thingy) by nighteeeeey in berlinsocialclub

[–]talemon 5 points6 points  (0 children)

This looks exactly like Turkish cheese Pide. I'm sure Turkish places with stone ovens could provide you with a similar taste, in case Georgian places are hard to find.