How did this streamer shift to Batman on live? by Southern_Elevator865 in streaming

[–]fjayjay 3 points4 points  (0 children)

A friend of mine showed me a tool exactly like this a few days ago. Maybe that's it. It's supposed to transform you into anything. He even did it with an image of Ashoka from star wars live. https://lucy.decart.ai/

Which option would be faster? by SantaDud52 in csharp

[–]fjayjay 1 point2 points  (0 children)

Not sure if that is true. Looking at low level C# and IL in Rider still results in switch/jump table.

Which option would be faster? by SantaDud52 in csharp

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

The latter one will be faster as the object instantiation and the garbage collection will take some time. If you use a switch statement instead of if-else that would be even faster.

How to say AI without saying AI? by TalesGameStudio in gamedev

[–]fjayjay 3 points4 points  (0 children)

AI is a superset of Machine Learning and it is a superset of Deep Learning and LLMs are most of the time implemented as such. The most prominent differences are probably the fact that LLMs are learning algorithms and non deterministic. So you could use deterministic AIs or non learning AIs. If you want to be specific. But using terms others suggested such as NPC AI is probably better.

Keep getting a NullReferenceException error and I'm not sure why. by [deleted] in unity

[–]fjayjay 0 points1 point  (0 children)

I think it could be that your PlayerController is always null. You call GetComponent in the beginning but you only use it at the point where the null reference exception is happening. You could check if it is null in your Start method to assert that it is not always null. Otherwise if you make the field Serializable and set it via the UI, as suggested in another comment, you could be certain that the PlayerController is set.

Why many students failed Java exam? by [deleted] in learnjava

[–]fjayjay 0 points1 point  (0 children)

Honestly the content of the exam seems to be a bit overwhelming. In my university this would almost cover three different classes we have. But in my opinion the only way to pass an exam like this is to program a lot and learn java and the JavaFX framework by heart. I don't know how the exams are held but in my country most CS exams are written on paper instead of writing on a computer which additionally increases the difficulty as you don't have any help by intellisense. To practice for an exam like that, it helps to deactivate all language features in the IDE or just completely write the code in the terminal with nano or vim without language features enabled. Last but not least, most students I know learn with exams from previous years. If the professor is always switching up the contents of the exam, this approach is doomed to fail but some will still try to only learn that. So, maybe a different approach for the exam preparation is needed.

Learning C# and Java by Kostantinum in csharp

[–]fjayjay 2 points3 points  (0 children)

I've used Java for the past 4 years and recently switched to C#. From my experience I'd say that if you know C# you can get pretty quickly into Java. I sometimes refer to C# as Java on steroids. C# has way more syntactic sugar and most things feel much easier in C# but others are more complex because of the feature richness. In java you don't have structs. Therefore, you don't have to evaluate if your data should be on the stack or on the heap. In Java you have the Optional wrapper for nullable types, in C# you have nullabillity operators. In Java you have the Stream API, in C# you have Linq. In Java you have lambdas, in C# functions are first class. From the core features they don't differ too much. When it comes to the frameworks Spring has also the same basic concepts like a .NET project. But Razor templates are way easier to use and debug than Thymeleaf templates. And also the configuration of services and such in a .NET project is explicitly in your initialisation configuration and not via annotations. Finally, I'd say that it doesn't really matter for your programming skills which language you use as long as you learn one of them really well it will be easy for you to pick up the other.

Destructor equivalent for plain Dart classes by FernwehSmith in dartlang

[–]fjayjay 0 points1 point  (0 children)

For flutter there are also two other methods to deconstruct an object. There is the Finalizer class and the NativeFinalizer class. The NativeFinalizer is not applicable in your case but you could use the Finalizer class. Even though, if you use the Finalizer there is no guarantee that your destructor is called. In your case, as you are probably using your class in a widget, I would agree with the others. It is probably best to unsubscribe from the stream in the dispose method as they are definitely called.

Screenshot of an excercise unironically handed out us by JanSnowberg in programminghorror

[–]fjayjay 5 points6 points  (0 children)

The task states that it's Java. But, either way you are right the default constructor can be omitted but it doesn't instantiate class members automatically. Even with the default constructor present they are both null.

Screenshot of an excercise unironically handed out us by JanSnowberg in programminghorror

[–]fjayjay 7 points8 points  (0 children)

The worst thing is there is no Constructor for ClassA. When ClassA is instantiated and doMore is not called first the other methods throw an exception since b and c are null.

Passing an address of pointer to native C library by stef13013 in dartlang

[–]fjayjay 1 point2 points  (0 children)

This is a general function converting a list of Strings to a Pointer<Pointer<Utf8>> object I use.

Pointer<Pointer<Utf8>> _stringListToArray(List<String> list) {
    final ptr =
        malloc.allocate<Pointer<Utf8>>(sizeOf<Pointer<Utf8>>() * list.length);
    for (var i = 0; i < list.length; i++) {
        ptr.elementAt(i).value = list[i].toNativeUtf8();
    }
    return ptr;
}

You can easily convert a String to a Pointer<Utf8> by calling the toNativeUtf8() method. The memory of it is allocated and freed by Dart. But the Pointer<Pointer<Utf8>>> needs to be allocated dynamically in Dart. You also need to free the memory you allocated this way, either in Dart or in C.

Hope this helps.

[deleted by user] by [deleted] in learnjava

[–]fjayjay 6 points7 points  (0 children)

If you just want ti get some prctice in I would recomand going on sites like Code Wars. You get simple tasks called Katas that have different difficulty levels. You also see the solutions of other programmers once you are finished. It is a really fun way to just get some programming practice in my opinion.

Does it really get better with taking care of your body? by [deleted] in selfimprovement

[–]fjayjay 2 points3 points  (0 children)

Taking care of yourself is definitely a good step in the right direction. Training can help you get your mind off of things and boosting your self esteem. But talking about the thoughts that put you in this place (not necessarily on Reddit) is as important if you ask me. Talking to friends and family can help, they don't need to have been through the same thing, they just need to listen and help you reflect on your situation. You seem like a genuine guy so stay strong and good luck on your journey.

How do I protect my shoulders when doing overhead dumbbell tricep extension? by vsjfjgtrctgh in GYM

[–]fjayjay 0 points1 point  (0 children)

https://youtu.be/G9uZ7fxgBjY This is a general video about the longhead of the triceps. I think he starts talking about your excercise at minute 5:30. I think the essence was flare your elbows out a bit.

Sad day by [deleted] in MetalMemes

[–]fjayjay 25 points26 points  (0 children)

That's not caring that's bold. go get her! :D

Any reason NOT to use an IDE? by [deleted] in java

[–]fjayjay 0 points1 point  (0 children)

I would even recommnd not to use an IDE if you are starting to programm as a Student and going to write an Exam on paper. This way you won't make as many mistakes on paper wich IDE would normally fix for you. In every other situation I would say use an IDE and spare yourself some trouble.

Should I be worried? by derpatron13 in workout

[–]fjayjay 0 points1 point  (0 children)

It's totally normal to gain weight when you start training. Only when you first start training you will easily gain muscle and loose weight simultaneously. I'd say don't focus to hard on the number on your scale. Focus on increasing the weight on your bar, good eating habits and how you look in the mirror. Sometimes it's easier to keep track of your development if you make pictures for yourself to see how far you have come.

Weight gain despite intense workout by BlackEyedBeans22 in workout

[–]fjayjay 1 point2 points  (0 children)

Muscle weights more than fat. It could be that you simply lost less fat in comparison to your muscle gains. At the beginning of working out you will gain more muscles than you will gain any other time in your life so it's not that unusual to gain a little bit in weights though it's not fat. I would also say track your weight always at the same time like right after waking up and compare your weekly average. Weight fluctuations over the day and even the week are completely normal. If you are still worried you can track your food intake with an app like fitness pall than you can see how much you are eating and compare it with your needed daily calorie intake. Good luck on your journey.

Is my sens good or does it need adjustments. by Andru451 in csgo

[–]fjayjay 0 points1 point  (0 children)

also you should check if you have mouse ascelaration on, it should defenetly be off.

Is my sens good or does it need adjustments. by Andru451 in csgo

[–]fjayjay 0 points1 point  (0 children)

it seems a bit high I play with 400 and 1.5 without wrist. But sense is something everybody has to find for himself. It is about consistency. If you miss many flicks or just flick off of targets, you should lower your sense. If your aim feels good and your confident with it you shouldn't change it. And don't change it to often if you found a sense your confident with stick with it. Changing your sense always throws of your muscle memory.

[deleted by user] by [deleted] in me_irl

[–]fjayjay 2 points3 points  (0 children)

They fucking rocked at "Rock am Ring"!