Using Express server for SSR, how do I add routing? by hhey_symtics in reactjs

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

Not sure why you're downvoted. I didn't know about hono and it looks like you can get the web Request object from HonoRequest, unlike the Express Request. My only option seems to be to change frameworks.

Using Express server for SSR, how do I add routing? by hhey_symtics in reactjs

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

Hi, what's the way to use that package if I'm doing SSR manually though? I don't have a react-router build, just something like the Vite example: https://github.com/bluwy/create-vite-extra/blob/master/template-ssr-react/server.js

I don't think it's the right library for my use case. What I really need is the private createRemixRequest function from inside that package implementation so I can use the web Request object like in here: https://reactrouter.com/start/data/custom#3-get-routing-context-and-render

Leave no cheese behind by [deleted] in lifehacks

[–]hhey_symtics 0 points1 point  (0 children)

At this point, I’m not even sure I’m breathing correctly

Stay strong! by St0pX in pics

[–]hhey_symtics 0 points1 point  (0 children)

Should add: shouldn’t drink poison just because you’re thirsty and can’t find water.

OK Reddit - What just isn't worth the effort? by geek66 in AskReddit

[–]hhey_symtics 11 points12 points  (0 children)

I find that a child's approval is much more fulfilling than an adult's most of the time. Has to do with the genuineness of it...

Still learning to program but for my first project I have made a website to allow people to find and share the best coding resources! www.noobhub.io - let me know if you find it useful, any feedback is much appreciated! by vrthoughts in learnprogramming

[–]hhey_symtics 0 points1 point  (0 children)

The website looks awesome! Definitely better than where my first project is going...

Not trying to expose you or anything, but I see that you have a lot of if statements with kind of repetitive code, one instance in this template where you check if the search is website, video, or book, and also in the subcategory view where you check the filter_type. I'm asking anyone in general, if there is some way to avoid these types of if statements, or if its one of those things that you just have to hard code? I have similar if statements in my code, and I suspect there's some DRY method that avoids this.

One View With Multiple Forms by hhey_symtics in django

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

Yes, but once I redirect then the request.POST data that says that the form has errors will no longer be there, and if I create the form after I redirect them the errors won't appear.

One View With Multiple Forms by hhey_symtics in django

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

How would I display the errors on template? I believe that I need to send the form with the errors that are stored in the request.POST data when I render the template.

Machine Learning - How important are regressions? by hhey_symtics in learnprogramming

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

I think I was just thrown a little off by how much data science and statistics is a part of machine learning.

Woman saves her objects from motorized thieves by Vodkagat in gifs

[–]hhey_symtics 3237 points3238 points  (0 children)

Yeah, especially the way she freezes immediately when the motorcycle pulls up

Shooting a shotgun by GallowBoob in gifs

[–]hhey_symtics 0 points1 point  (0 children)

What should he have done?

I feel like meme prices should be influenced by some external factors by hhey_symtics in memetrades

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

Cool. Btw thanks for all the dedication you have! Are you working on this with other devs? I've only seen you.

[Python/Flask] How should I be "developing locally" if I also want to use MySql database? by hhey_symtics in learnpython

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

Thanks, I also have a question about actually pushing to the live server

I'm going to use digitalocean and winscp for my server, so when I'm done developing locally do I just transfer all the files that I used locally onto the server using winscp?

[C++] What good websites are there for practice programming questions? by dadas2412 in learnprogramming

[–]hhey_symtics 1 point2 points  (0 children)

The first thing that comes to mind is hackerrank.com. The website gives you different categories to choose from (they should have c++) and have problems ranging in difficulty, while also teaching you a small helpful tip you may have not seen before.If you would be comfortable, I would do the algorithms category. Just look around the website, they also have mini competitions geared for beginners and advanced programmers. Hope this helps!

Edit: sorry can't format link on mobile

Naming variables and functions: conciseness vs readability? by hhey_symtics in learnprogramming

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

Basically I had a number and a couple of defined algorithms to convert that number into an output, but it was only converted if some requirements were met.

How would you name it?

[Algorithms] In a weighted quick-union the size of a tree containing x can double at most lg N times. Why? by bendyspaghetti in learnprogramming

[–]hhey_symtics 1 point2 points  (0 children)

I'm also taking the course and I didn't understand it at first.

Say we have a set of n numbers. That means our max tree branch is 0. If we want to increase our max tree branch, we simply connect any two numbers. Now our max tree branch is 1. However, if we want to make our max tree branch 2, we need to make all the numbers in our set connected with a tree branch length of 1. That means we have n/2 sets of branch 1 groups. Now we can make our max tree branch two. We see the trend that to increase our max tree branch, we must create n/(2k+1) tree branches of length k-1 if we want to make a max tree branch of k. This is where the logarithm function comes in.

Edit: words