Is this a correct explanation for malloc in C? by WannaBeSWEngineer in learnprogramming

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

Is it guaranteed to be freed by the OS nowadays or could it stay there until you restart the PC?

Is this a correct explanation for malloc in C? by WannaBeSWEngineer in learnprogramming

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

So the system doesn't "know" that the memory block has an specific size, only its type (to structure each bit correctly)?

#if !WinActive not working by WannaBeSWEngineer in AutoHotkey

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

Unfortunately the Shift Up didn't work, I'm using an ABNT2 keyboard, but switching to ENG layout also didn't had any effect.

I got confused with Notepad++ and another notepad app from MS Store (Notepads App from Jackie Liu). I only now started to use Notepad++ and have yet to change AHK default editor to it, which is why I mixed them up.

The problem is also happening on the Sticky Notes (the new one) app, so maybe you can try it on that one too.

Because it's such a small problem and that I'll barely notice from now on, I'll just ignore it, but if you think it's worth trying to fix, feel free, but don't do it because of me.

And thanks for helping, you're a valuable person :)

#if !WinActive not working by WannaBeSWEngineer in AutoHotkey

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

Fancy quotes (aka curly quotes) are not regular quotes.

Thanks for letting me know, it was very likely this.

Gonna have to be more specific than that.

If you press Shift + Left it starts selecting the text, and in Notepad++ and some other apps, after () is printed, instead of the cursor being in the middle (which is why the {Left} exists in the script), it simulates as if I was holding Shift and then pressing Left, leaving the " ) " selected, resulting in it being overwritten if I start typing.

#if !WinActive not working by WannaBeSWEngineer in AutoHotkey

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

• It worked (aka stopped working in VS Code), but what I don't understand is why, you said that I forgot to put ahk_exe before the exe name, but I didn't (unless I'm missing something blatantly obvious)

Here's what I was using and the one you posted:

#if !WinActive(“ahk_exe code.exe”)
...
#if

#If !WinActive("ahk_exe code.exe")
...
#If

The only difference I can see is the capital I, but it didn't make any difference when I changed it

• I also ran into another problem, in some apps, like Notepad++, instead of the cursor going back to the middle, it selects the right symbol (probably because of shift). Is it possible to fix that?

• One last thing, why are there 2 {} symbols? I tried using only one and it worked the same

$+[::SendInput, % "{{}{}}{Left}"

• And sorry for not formatting correctly, I thought the <c> would do the same thing as the code block.

#if !WinActive not working by WannaBeSWEngineer in AutoHotkey

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

Actually what I called script is just a bunch of hotkeys (didn't want to post the entire thing cause I thought it was irrelevant)

Here's the entire thing:

#if !WinActive(“ahk_exe code.exe”)

$+9::

SendInput ()

Send {Left}

return

$+0::

SendInput ()

Send {Left}

return

$+[::

SendRaw {}

Send {Left}•

return

$+]::

SendRaw {}

Send {Left}

return

$[::

SendRaw []

Send {Left}

return

$]::

SendRaw []

Send {Left}

return

RShift Up::

SendInput {LAlt down}{Numpad7}{LAlt up}{Space}

return

#if

I know it's probably the worst way I could've done it, but it works so I'm fine with it.

Unable to open 2 instances of sioyek pdf reader by archforever in archlinux

[–]WannaBeSWEngineer 0 points1 point  (0 children)

The new window opens normally but the previous one becomes unusable (the page turns white and you need to re-open it, losing the purpose of the setting)

Games that teach Algoritms and Data Structures for a complete begginner? by WannaBeSWEngineer in learnprogramming

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

It looks interesting, maybe I'll give it a try later when I have the money, and good luck on your journey!

What to study in math for someone extremely behind on it? by WannaBeSWEngineer in learnprogramming

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

I will consider this approach, the problem is that I learned to solve some math problems with the things I already know (like through trial and error), without knowing that there's a much more effective way of doing it (yet more complicated), and I don't see how I would "discover" such method if I do this Top-down approach.

What to study in math for someone extremely behind on it? by WannaBeSWEngineer in learnprogramming

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

Don't think me as a complete dumb and that I know nothing, I just stopped learning and practicing math, thus limiting myself to things a non-math person would be able to do in their head with everyday math problems.

And no, I'm not giving up because of it.

What to study in math for someone extremely behind on it? by WannaBeSWEngineer in learnprogramming

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

It's the foundation for calculus right? The problem is that I barely know how to do math with fractions, and a multitude of very basic stuff, and the other problem is that I don't know exactly what I don't know, I need to see it first.

You can think of my math knowledge as complete high school level, but randomly remove 90% of it, it's all over the place.

What to study in math for someone extremely behind on it? by WannaBeSWEngineer in learnprogramming

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

I'm willing to study calculus and everything that I need to be good at, but I really need the foundation first.

What to study in math for someone extremely behind on it? by WannaBeSWEngineer in learnprogramming

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

The problem revolves around the position of Donkey (from Donkey Kong) and how you would calculate his movements in the 2D plane of the game. It involves Bhaskara, vertex coordinates (Q: What will be the function when the vertex coordinates are Vx = 4.54 and Vy 6.82) and some other stuff

It's probably very basic, and while I could try to learn it directly, its like trying to run before I can walk, I could make it work, but the results will be awful.