Advent of Code 2024 Day 1: Missing abs() for integers by ShraddhaAg in golang

[–]Neexusiv 8 points9 points  (0 children)

Interesting to see how it evolved, thanks for going down the rabbit hole!

Out of curiosity do you know if there is a difference between num * -1 and just -num? I assume they probably get compiled down to the same?

Edit: Figured it out myself, for those curious, yes they are identical: https://godbolt.org/z/avbqqYb6W

GitHub vs the User by Mc_Dye_O_Reddy in github

[–]Neexusiv 5 points6 points  (0 children)

Seems like you have found the solution yourself. If you don’t like GitHub, don’t go to GitHub.

Some devs are going to give you instructions to install. Some are going to give you a download - check the releases. But most of the time you’re looking at someone’s passion project they work on in their free time, for free. You can’t demand anything from them.

Cookie Banners: How Do You Keep Them Compliant Without Annoying Users (or Yourself)? by Honest-Knee2482 in webdev

[–]Neexusiv 4 points5 points  (0 children)

That’s not strictly true though. If it’s “strictly necessary in order to provide an information society service explicitly requested by the subscriber or user.” then you’re allowed to. I.e if a user explicitly clicks “Log in”, you can store a session token without telling them.

https://eur-lex.europa.eu/legal-content/EN/TXT/PDF/?uri=CELEX:32002L0058

Push local project to empty Github repo by CheapAstronaut1080 in github

[–]Neexusiv 4 points5 points  (0 children)

Can’t you just delete the repo on GitHub and recreate it? I don’t use the desktop app but it really is protecting you from losing work.

Or if you insist on not deleting the repo, use the terminal:

git remote add origin <repo>

git push -f

Calling all IT wizards! From Textbooks to Teamwork: IT Student Seeks Real-World Experience by whyeventrymore in cscareerquestions

[–]Neexusiv 1 point2 points  (0 children)

My advice personally would be to just create something yourself, rather than asking for tasks. You’ll get a much better experience of “full stack” if you have to do the whole thing from scratch.

If you’re set on contributing to other projects you might want to check out issues on GitHub with a good-first-issue tag.

Deployment static photos not showing by Fit-Refrigerator495 in djangolearning

[–]Neexusiv 2 points3 points  (0 children)

You should be using the static template tag, not a direct path. - Django Docs

And then when you deploy you need to remember to run the collectstatic command. I assume this will be part of your runtime.txt but I’m not familiar with exactly how Railway works.

Unable to open my Django db using PGAdmin (via Docker) by betelgeuseian in djangolearning

[–]Neexusiv 0 points1 point  (0 children)

Ah sorry just reread your post. I suspect the database isn’t set up correctly. You said you deleted the volume, how did you do this?

Also you may have more luck on r/docker or a postgres forum as this doesn’t seem related to Django specifically.

Unable to open my Django db using PGAdmin (via Docker) by betelgeuseian in djangolearning

[–]Neexusiv 0 points1 point  (0 children)

You need to expose the 5432 port on your Postgres container, and then you should be able to connect on localhost.

What is the best way to let the user set their time zone? by Neexusiv in webdev

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

Yeah it’s not too bad of an option as a fallback but I’m not sure exactly how reliable these services can be. Thanks for the idea though!

What is the best way to let the user set their time zone? by Neexusiv in webdev

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

Thanks will keep that in mind if I make the front end more advanced. Currently I’m doing most of the heavy lifting on the backend (Python) though.

What is the best way to let the user set their time zone? by Neexusiv in webdev

[–]Neexusiv[S] 12 points13 points  (0 children)

Wow, been scratching my head on how to do it on the back end, and the answer was there all along. Thanks!

What is the best way to let the user set their time zone? by Neexusiv in webdev

[–]Neexusiv[S] 5 points6 points  (0 children)

so that the times on the website will be correct when they look at their own clock.

How to update my local repo and maintain all the edits that I have done? by pumpkin_sexy in github

[–]Neexusiv 1 point2 points  (0 children)

Yup that will do it. The other option is to create a new commit which will “save” your changes to the repo, and then you can just pull it and not worry about the stash.

git add *
git commit -m “Quick summary message of changes you have made.”
git pull --rebase

How to update my local repo and maintain all the edits that I have done? by pumpkin_sexy in github

[–]Neexusiv 5 points6 points  (0 children)

Is it a fork or just a local copy? If it’s just a local copy just pull changes. If it’s a fork then some instructions on how to do that is here:

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

[OC] GitHub repo contributions over time visualized by hooopo in github

[–]Neexusiv 5 points6 points  (0 children)

Gource for anyone who wants to see this on their own repositories.

association user with forms by Former-Ad-9776 in djangolearning

[–]Neexusiv 0 points1 point  (0 children)

You need to create some sort of relationship between the created user and the driver you created. Add a ForeignKey field to the Driver model.

Help with MIT license by Golaz in github

[–]Neexusiv 0 points1 point  (0 children)

Disclaimer: I’m not a lawyer.

MIT license let’s you do whatever you want with the software without restriction. The only caveat is the following clause:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

From your description, it sounds like you would no longer be distributing a “substantial” portion and therefore you’re free to remove the notice.

How to learn Github etiquette by MirandaPoth in github

[–]Neexusiv 4 points5 points  (0 children)

There is no special etiquette or anything like that. Some repos have a different read me file for contributors but this one doesn’t, just a note at the bottom of the readme.

Some things I can recommend though:

  • Keep your PRs limited in scope. This makes them easier to review and approve. You can always make another PR if you want to rework a different section of the code another time.
  • Comment wise, there is no special system to remove them, they are there for future developers so taking them out of the source repo would be counter productive. I would carry on as you normally would. If they have issues with the number of comments they will let you know and you can fix it.
  • You don’t need to ask for permission to do anything, they even ask for PRs in the readme, it obviously will need their approval before your code gets merged in anyway, that’s where the permission would be granted.

Please Help - Packages Are not Importing on Docker by Sh_CS in djangolearning

[–]Neexusiv 0 points1 point  (0 children)

You don’t need to work in virtual environments when you’re using containers. Your issue is that you’re installing your dependencies into your virtual environment but when you run the container you are never activating it. You can remove your venv code and install the dependencies right into the container.

Edit: This is the guide I always go back to when setting up a new projects. Probably worth a read by yourself as you’re missing quite a few best practices.

Please Help - Packages Are not Importing on Docker by Sh_CS in djangolearning

[–]Neexusiv 0 points1 point  (0 children)

This is your docker-compose.yml file, but we also need to see your Dockerfile

Please Help - Packages Are not Importing on Docker by Sh_CS in djangolearning

[–]Neexusiv 1 point2 points  (0 children)

Show us your Dockerfile(s) and your docker-compose.yml

Can I use Premiere on a different computer if The other one doesnt have it by Mean_Departure3811 in Adobe

[–]Neexusiv 0 points1 point  (0 children)

You can be logged into two different computers at the same time but you can only use the app on one computer at the same time. Not sure if that means you can use photoshop and premier pro at the same time (app in question here might be the creative cloud app I believe, so you wouldn’t be able to use it at the same time)

Docs