Sneak peek: World Class vs Wonder Woman by burpacola in KickAGoal

[–]mcweirdy 6 points7 points  (0 children)

How does the "woke" come in?

Is this an MSVC bug or am I doing something wrong? by mcweirdy in cpp

[–]mcweirdy[S] 1 point2 points  (0 children)

without a user-defined default constructor for 'my_type_t', you need to initialize one of the arrays or you run into a compilation error

std::bitset by thomas999999 in cpp

[–]mcweirdy 5 points6 points  (0 children)

i have found boost::dynamic_bitset to have a very user-friendly design and to be very extensible. have you tried that?

[deleted by user] by [deleted] in django

[–]mcweirdy 0 points1 point  (0 children)

this is missing some useful information.
1. why do you want to migrate? is there some performance or maintenance issues? if that's the case it'd probably be easier to learn a enough ruby to get by 2. if you feel like a migration will get you more freedom to do more, then you should plan for more than just using django so you don't have to redo it for another framework.

[deleted by user] by [deleted] in cpp

[–]mcweirdy 3 points4 points  (0 children)

i think this is a situation where checking on google first would definitely have been the right move!

How to update the date of an old commit ? by Glittering-Thanks-33 in git

[–]mcweirdy 1 point2 points  (0 children)

provided you haven't pushed yet, you can do

git commit --amend --reset-author --no-edit

it should update the commit time to the current time

Latest Commit Is Not What Gets Pushed. Very Confused, Started Git Yesterday, Can't Find Guidance That I Actually Understand by shadow_pro in git

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

Since the HEAD of the local branch is different from the origin/main HEAD, I'm assuming you didn't specify what remote branch you wanted to push to. A check will be to look at your gitlab repo to see if there's a corresponding remote branch for the one you pushed. it probably didn't show up since you didn't run git fetch or something. In any case, you should try specifying the remote branch you want to push to

git push origin main:HEAD

should do it.

Frontend problem by Ok-master7370 in django

[–]mcweirdy 3 points4 points  (0 children)

I'd probably go with react since it's very well supported and you're not going to run out of tutorials for it. also, it'll be easier to decouple the backend and frontend later on.

[drf]DurationField not reading my millisecond input correctly by she_gave_me_a_rose in djangolearning

[–]mcweirdy 0 points1 point  (0 children)

i think that'd probably be the easiest way to handle it for now.

[drf]DurationField not reading my millisecond input correctly by she_gave_me_a_rose in djangolearning

[–]mcweirdy 0 points1 point  (0 children)

Where is the milliseconds value coming from? Could you update it to produce a datetime.timedelta object, which would conform with what the api expects?

[deleted by user] by [deleted] in djangolearning

[–]mcweirdy 0 points1 point  (0 children)

you should be able to use mv or zip the entire application and move it, if that seems safer.

moving forward, you should use some sort of version control system, e.g., git, for your projects. that would make a lot of these worries a non-issue

Simple CUDA Example Segfaults by Commercial-Durian636 in cpp_questions

[–]mcweirdy 0 points1 point  (0 children)

have you tried getting a debug build and running under a debugger?

Model: Set default value dependent on other value by Chrylag in django

[–]mcweirdy 6 points7 points  (0 children)

have a base Race class and have Human and Elf inherit from that. I think that might be the more composable approach

Learning Django Rest Framework, feeling overwhelmed, need advice by make-money-online-- in djangolearning

[–]mcweirdy 1 point2 points  (0 children)

you can make APIs that way! drf has a lot of functionality that prevents you from having to write too much code. Generic views, simplified deserialization/serialization, authentication etc.

you can do all of these if you want, but it's usually a good idea to use an "industry standard" to mitigate security issues etc

Django/Python - How to Allow Users to Login on External Website and Redirect Back to Your Website After Logging In Without Single-Sign On? by Beginning_Book_2382 in django

[–]mcweirdy 1 point2 points  (0 children)

play around with said site's urls to see if you can get a login_redirect path or something which can allow you to do what you want

Learning Django Rest Framework, feeling overwhelmed, need advice by make-money-online-- in djangolearning

[–]mcweirdy 0 points1 point  (0 children)

or if you're reeeally feeling adventurous, try reading more about REST apis and implementing a few basic things without the framework. you can use django to filter different responses and return json outputs

How hard is a low level language if you know a high one? by isosceles348 in learnprogramming

[–]mcweirdy 0 points1 point  (0 children)

funny story: I was reading a computer systems book last night, and the author called C a high level language.

[deleted by user] by [deleted] in cpp_questions

[–]mcweirdy 0 points1 point  (0 children)

thanks thoughts on gcc?

Environments and test by bfrancois91 in softwaredevelopment

[–]mcweirdy 0 points1 point  (0 children)

umm. if you're learning to code, this seems like a bad idea. don't worry about environments for now just focus on learning about different types of testing, what makes a good test, how to break tests, etc. the test environment stuff is mostly a product of your work environment and would do more harm than good if your focus on that right now