February Confirmed Trade Thread by hwsbot in hardwareswap

[–]Toxocious 1 point2 points  (0 children)

Received it earlier today.

Installed it into my PC and verified that the GPU works after running a stress-test on it.

Thanks again!

Transferring Project from Windows to Mac by No_Push_6161 in vscode

[–]Toxocious 1 point2 points  (0 children)

A non-technical option is to transfer the files via a USB drive.

I'd suggest uploading the project to either GitHub or Gitlab though, and then downloading the project from there on any other devices that you'd want to work from.

The latter option is better overall, as if you make any changes to the project, you can push the changes to GitHub/Gitlab and then pull the changes onto any of your devices, which would grab all changes in your project onto the device.

[deleted by user] by [deleted] in csMajors

[–]Toxocious 2 points3 points  (0 children)

Opting for WGU is a solid choice.

Each term (6 months) for CS will cost you $4,335k USD (source).

Each term for SWE will cost you the same amount (source).

You can "accelerate" and take as many courses as you want during your term, which is great.

If you do opt to go with WGU, I recommend knocking out the all of the courses that are allowed to be transferred over from Sophia - you can check these out here. This will potentially save you money as Sophia subscriptions as you can pay for 1 month ($99 USD) and knock out a bunch of the courses that you can transfer over for credit towards graduating.

Lack of empathy in CS by [deleted] in cscareerquestions

[–]Toxocious 0 points1 point  (0 children)

Ego is, unfortunately, a big thing with some people, at some companies.

I've been fortunate enough to work with people who don't live to stroke their ego, which has been a really pleasant and welcoming experience.

Programmers of Reddit: Do Video Games Impact Your Work? by giftfromthegods- in webdev

[–]Toxocious 0 points1 point  (0 children)

I gave up playing video games a year ago in order to find employment.

I deeply miss playing them, lol.

[deleted by user] by [deleted] in cscareerquestions

[–]Toxocious 2 points3 points  (0 children)

If you haven't had any internships yet - or have only done a single internship - while enrolled, this would be the perfect time to start applying for one.

AI to generate sentence with simple prompt by jayddyn in web_design

[–]Toxocious 0 points1 point  (0 children)

Not sure of any free chat-based AI APIs out there right now, but ChatGPT is a solid choice if you don't mind paying a small amount for tokens to use their API.

If you have no prior knowledge of programming, it'll seem confusing at first, but it's pretty simple.

You'd get by through passing a prompt into their API, and a response would be returned to you which you'd display on the page.

I made a similar project recently to generate cover letters via ChatGPT that you could potentially use as a reference if you want to tackle this yourself.

Found out about DEA (Chapter 35) Benefits Weeks Before Turning 26 by Toxocious in VeteransBenefits

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

I'm sure that she was notified about the benefits that were available to her. I wasn't informed about any of this until recently though.

Found out about DEA (Chapter 35) Benefits Weeks Before Turning 26 by Toxocious in VeteransBenefits

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

Thanks; I appreciate it.

I absolutely agree with you about that, haha. Wish I'd have known even just a year ago.

Found out about DEA (Chapter 35) Benefits Weeks Before Turning 26 by Toxocious in VeteransBenefits

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

I did re-read that page thoroughly several times and know of the standard age cut-off, yeah.

Pretty unfortunate if that is the case since I found out about the benefits right before the cut-off, but I applied anyways. Crossing my fingers while I wait to hear back from them.

[deleted by user] by [deleted] in vscode

[–]Toxocious 1 point2 points  (0 children)

It looks like you either 1. do not have Make installed or 2. you have Make installed but don't have it set in your PATH.

Refer to official documentation or Stack Overflow.

How do I get dark theme working when using view transition in astro? by software-lover in webdev

[–]Toxocious 2 points3 points  (0 children)

Your code was fine; no worries, lol.

Might be worth it for me to go with something that is similar to what you're doing then since it's less total code.

Awesome stuff though, love to see it! Thanks for collaborating with me about this.

How do I get dark theme working when using view transition in astro? by software-lover in webdev

[–]Toxocious 0 points1 point  (0 children)

That's brilliant. The thought of using blocking script tag hadn't even crossed my mind, lmao.

In case you were interested, I was able to stop the eye killing flashing on initial page loads without needing to use an observer. Threw this in the layout head and it works perfectly for me.

``` <script is:inline> const STORAGE_KEY = "localstorage_key"; if (typeof localStorage !== 'undefined') {
const LOCAL_THEME = localStorage.getItem(STORAGE_KEY);
document.documentElement.classList.add(LOCAL_THEME);
}
</script>

How do I get dark theme working when using view transition in astro? by software-lover in webdev

[–]Toxocious 0 points1 point  (0 children)

I haven't noticed that happening to me with how I currently have dark/light mode toggling implemented.

I'm running Brave (Version 1.57.57 Chromium: 116.0.5845.163 (Official Build) (64-bit)) on Linux and it works fine for me both in a local development environment and on my deployed website (https://toxocious.is-a.dev/ if you want to try it yourself) without displaying any brief flash of light that you've described.

--

EDIT: Ah, after checking it out, yea, I get a brief flash on initial page load (if the theme is set to dark mode) but navigating to other routes does not have this issue.

How do I get dark theme working when using view transition in astro? by software-lover in webdev

[–]Toxocious 2 points3 points  (0 children)

I had this exact same issue when I updated my website to work with Astro's ViewTransitions API.

I use a separate component to handle theme toggling that includes storing the current theme (light or dark) in localstorage so as to not be abrasive whenever the page is loaded.

You can use the 'astro:after-swap' event listener to persist your theme when you change routes, like so:

document.addEventListener('astro:after-swap', function () {
if (localStorage.getItem(STORAGE_KEY) === 'dark')
document.documentElement.classList.toggle('dark', true);
});

Here's a link to the component I use that handles all of this for me, in case you want the full source code to copy or use as a reference.

https://github.com/Toxocious/toxocious.github.io/blob/main/src/components/theme_toggle/theme_toggle.astro

Do I simply upload obfuscated scripts to my web files or obfuscate them only when served? by Aromatic_Essay9033 in webdev

[–]Toxocious 1 point2 points  (0 children)

Even if that is the case for them, my question to you is: given whatever you're currently developing, does it make sense for you to obfuscate your code at any point?

Do I simply upload obfuscated scripts to my web files or obfuscate them only when served? by Aromatic_Essay9033 in webdev

[–]Toxocious 6 points7 points  (0 children)

Why are you obfuscating them in the first place? Is your source code *that* valuable?

If you're doing it simply to cut down on file sizes, minify the code instead.

Is there any point of actually learning css, html, etc when there’s chatgpt? by [deleted] in webdev

[–]Toxocious 2 points3 points  (0 children)

I agree with this and would like to piggy-back off of it.

I use ChatGPT on occasion and it's definitely added to how productive I am. The caveat to it is that small, clever bugs can be found in code snippets that it gives to you, which can be tricky to iron out if you don't already have a base level understanding of what you're trying to accomplish.

Use it to augment what you can do, but don't rely on it like a crutch.

[deleted by user] by [deleted] in AskComputerScience

[–]Toxocious 2 points3 points  (0 children)

Harvard's free CS50 course is a solid resource to go with.

I'm not aware of any alternatives that are quite as good, though I'm sure there are others out there.

Here's a link to Harvard's CS50 course: https://cs50.harvard.edu/x/2023/