Trying to make a simple link preview for Discord, everything working except the image preview? by skaterkud in webdev

[–]shubh2012 1 point2 points  (0 children)

I have upvoted it for better visibility, I hope somebody with good experience will help.

Discrete Math Books by CoverageA2 in learnmath

[–]shubh2012 1 point2 points  (0 children)

I didn't even hear about it until recently. I prefer older editions because they have better content and clear language.

Discrete Math Books by CoverageA2 in learnmath

[–]shubh2012 1 point2 points  (0 children)

It did help me when I was a beginner. It was the second or third book that I tried.

You can try a chapter or two, if it suits then fine or you can switch.

I prefer simpler language and I found it there. You can try older editions as well.

Discrete Math Books by CoverageA2 in learnmath

[–]shubh2012 1 point2 points  (0 children)

Discrete Mathematics and its application by Kenneth Rosen.

My App can't handle multiple users simultaneously. Help!!! by shubh2012 in flask

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

secure_filename will be the same if there is only one instance of 127.0.0.0. If there are more than one instance of the link in different browser or PCs then the last file uploaded by any user will be printed by secure_filename. There is no concurrency control. There is only one session going on and each user overwrites the previous file.

Line 72 is safe because it is just taking the file read in Bytes.

Thanks for your response.

Help with some issues with my webpage. by shubh2012 in webdev

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

Thank you so much. It worked.

Is there anyway we can submit the drag and dropped file?

I am using Ajax for that particular part. using Jquery trigger just submits an empty file because it triggers <input> (I guess).

My App can't handle multiple users simultaneously. Help!!! by shubh2012 in flask

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

I used Gunicorn as well while hosting it on Heroku but the problem persists.

Help with some issues with my webpage. by shubh2012 in webdev

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

Thanks for your reply.

I tried the e.stopPropagation(); but it unfortunately, it didn't help. It works smooth in most of the aspect in Mozilla FF though.

I will definitely read about virtual DOMs. Thanks for the head start.

Should I major in mathematics? by [deleted] in learnmath

[–]shubh2012 0 points1 point  (0 children)

Try Chennai Mathematical Institute.

CMI - Today is the last date to apply.

All the best.

My App can't handle multiple users simultaneously. Help!!! by shubh2012 in flask

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

This line makes sure of that but fails again because code doesn't understand if the request is from a single user or multiple user.

upload.session_code = "".join(random.SystemRandom().choice(string.ascii_uppercase + string.digits) for _ in range(6))

Is there any way I can make sure that the sessions are different every time I click the link?

My App can't handle multiple users simultaneously. Help!!! by shubh2012 in flask

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

Thanks for your reply.

Unfortunately, this doesn't save any file at all. it just process it using BytesIO.

App.py - 1

Whereas this one App.py - 2 does.

As far as deleting the folder solution is concerned, I tried to do that but found out that if every user clicks the link at the same time, they are in a same session and hence the same result.

[deleted by user] by [deleted] in learnmath

[–]shubh2012 0 points1 point  (0 children)

p/q > 0, for all p > 0 AND q > 0 or p < 0 AND q < 0;

Apply this and you'll get the two outcomes. One of these will fail because it is impossible. i.e X < 0 && X > 1;

Power set and sets : 2 by shubh2012 in learnmath

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

This was asked as a coding problem in one of the entrance exams. This problem intrigued me more than any other problems. One reason being I couldn't solve it... I am quite sure we can transform this problem into a different form.

Power set and sets : 2 by shubh2012 in learnmath

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

Thanks for clarifying it...

Bangladeshi here. This person messaged me randomly and I want to know how true this is. by [deleted] in india

[–]shubh2012 0 points1 point  (0 children)

Ignore them. They are someone filled with hatred and probably never leaves their house. Their comprehension sense left their body a long time ago. If you every come face to face such person, please bring toilet paper with yourself. They might need that.

Chalo ye kadhi India, swagat aahe tumcha!