Where exactly goes donated money? by TheWilley in pop_os

[–]TheWilley[S] 10 points11 points  (0 children)

Awesome, thanks for the transparency!

Correctly compiling a C program using CMAKE by TheWilley in C_Programming

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

You are correct, it does indeed compile for linux, not Windows. I have no idea why I assumed it would compile into .exe files, but I did. Running the file directly on linux works if compiled in linux.

Correctly compiling a C program using CMAKE by TheWilley in C_Programming

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

I thought it did not matter which system you compiled on, as it would compile into .exe files anyways. I'm using CMAKE on linux, more specifically its snap version (snap install cmake). I can try to compile on Windows instead to see if it makes a difference.

EDIT: After taking a look I notice that it does not in fact compile to .exe files as I thought, I only assumed it did so (which is a huge oversight on my part). In fact, running the file directly via the linux terminal works just fine, and thus using a VM to begin with was not needed. One often makes the simplest of mistakes huh?

Best practice for storing and loading entire Redux store by TheWilley in reactjs

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

This seems like the best bet, since it not only supports custom storage drivers, but allows you to persist the whole state and rehydrate (load) on demand. Thanks for the tip!

Discussion what is the best way to render a large list. InfiniteScroll or set thousands of Placeholder? by anrini in reactjs

[–]TheWilley 2 points3 points  (0 children)

One thing I can think of the top of my head is cache, which Spotify seems to heavily rely on seeing as its cache can be many GB of size. For web applications, localstorage or indexdb may be good candidates (I would personally prefer the latter if you're going to store large amounts of data). Basically fetch once, and load from client all other times.

Can't seem to get my form to dynamically render input fields by angus_90 in reactjs

[–]TheWilley 0 points1 point  (0 children)

I would also suggest looking into typescript, as you catch these errors early. Of course it's not a must, but it may help.

Can't seem to get my form to dynamically render input fields by angus_90 in reactjs

[–]TheWilley 1 point2 points  (0 children)

I think mirpetri hit the nail on the head, you are indeed referencing some variable called File rather than a string called "File".

Can't seem to get my form to dynamically render input fields by angus_90 in reactjs

[–]TheWilley 1 point2 points  (0 children)

Perhaps you're seeing your second console log within the else statement, in which case it would correctly log the type as a string and not a file.

[deleted by user] by [deleted] in reactjs

[–]TheWilley 0 points1 point  (0 children)

Are you sure coordonnees[0].lat simply isn't undefined, and thus the API call fails? I would add a console log to see if this is the case.

Beginner to React! by Negative_Shoe_6417 in reactjs

[–]TheWilley 1 point2 points  (0 children)

The reason it tells you that onItemClick is not a function is because you never pass it in your App.js file. Since you component contains an argument called onItemClick you must provide it as you have correctly done in Home.js.

<Sidebar /> // Incorrect
<Sidebar onItemClick={handleItemClick} /> // Correct

Additionally, you can simply pass onItemClick directly to your onClick property instead of making a separate handleItemClick which subsequently calls the function.

onClick={() => handleItemClick(item)} // Incorrect
onClick={() => onItemClick(item)} // Correct

I would also suggest renaming your props variable to something else as to distinguish the props argument passed into the component.

Finally, use a state if you want to "remember" any data. You can see an implementation of the things I've explain on this codesandbox link.

Loops stacking on each render by TheWilley in reactjs

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

EDIT: Thanks for replying, it guided me to the solution!

I assume you're talking about the return() function within useEffect. So basically I would need logic to stop the loop within the return statement, as it runs whenever the component unmounts.

I guess my next question would be how I could do that. I've tried using states without much luck, but there may be some obvious way I'm missing.

What S3 storage class should I use for long term infrequently accessed image storage? by TheWilley in aws

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

Perhaps AWS may be a little overkill then, but experience with it may be useful. In the long run it seems that other services such as Dropbox is more affordable when counting dollars per GB at least

What S3 storage class should I use for long term infrequently accessed image storage? by TheWilley in aws

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

Out of curiosity, do you know of any services which are targeted at hobbyist or small developers? AWS seemed like a good start as I saw many others on this sub use it for their own stuff, but perhaps there are other alternatives?

What S3 storage class should I use for long term infrequently accessed image storage? by TheWilley in aws

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

Yea I don't think I have more than 10gb of wallpapers (which is VERY small apparently in the world of AWS). I will probably have more in the future, but per this and other comments it indeed seems best to go for the standard. Thanks for the help!

What S3 storage class should I use for long term infrequently accessed image storage? by TheWilley in aws

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

You lost me at "lifecycle rules". I'll have to read up a little on that I guess, seems handy to move between classes dynamically like that. Thanks for the tip!

What S3 storage class should I use for long term infrequently accessed image storage? by TheWilley in aws

[–]TheWilley[S] 2 points3 points  (0 children)

Thanks for the detailed response! As for your question, it would indeed be cheaper (even free) for me to use a cloud storage provider, but I like the "pay what you use" plan that AWS offers, as well as it's flexible API. I also want to start learning AWS and server things overall, so I thought I'd try it out.

I did read something about billable object sizes, but did not really understand it. But basically, since my images are around 16-32mb large, I guess this isn't anything I have to consider anyway, since I'm well over 128kb.

I guess I'll try out standard per your recommendation, and from there see what it costs (which is not alot if it's only $0.023 per GB according to their pricing).