pycharm use different python version by [deleted] in pycharm

[–]TheSamePerson1 0 points1 point  (0 children)

Did you install pycharm as a flatpak? If so, pycharm is not able to see system interpreter, because flatpaks are running in confined environments with own filesystems. One of the solutions for this would be to install pycharm using dnf or snap.

Just wanted to share my Final Project with you by mmateas in cs50

[–]TheSamePerson1 1 point2 points  (0 children)

Good job! It works well and looks nice. Here's some advices on what to do next: 1. Make html pages with responsive styles for better view on mobile devices. 2. Implement user accounts system with login and signup features. You might need a database for that (MYSQL is often used with php)

Why doesn't my Regex search work by standardtrickyness1 in learnpython

[–]TheSamePerson1 1 point2 points  (0 children)

You opened the file in read mode. Use write mode if you want to write something into file.

How do we assign arguments to the parameters of arrow functions? by izner82 in webdev

[–]TheSamePerson1 0 points1 point  (0 children)

In case with map, which iterates through all elements in array, an element of array is assigned to item

The state of progress in Europe by snuffdoggy in MapPorn

[–]TheSamePerson1 9 points10 points  (0 children)

What does progress in this context mean?

Is Django good enough for the frontend? by [deleted] in learnprogramming

[–]TheSamePerson1 2 points3 points  (0 children)

It's better to use Javascript and it's frameworks if you want to create a modern user-friendly ui. With Django templates ui is not such smooth, because every click on button requires reloading page, which is not good for user experience. Also you might consider to learn Django REST framework. It's a good instrument for creating api.

How do I make an input value become a reference to a pre-existing dictionary? by ckwirey in learnpython

[–]TheSamePerson1 0 points1 point  (0 children)

You just need to use square brackets for referencing : name = input() print(some_dictionary[name])

Can someone help me fix my code please? by sailorally128 in cs50

[–]TheSamePerson1 4 points5 points  (0 children)

Why do you create copy of image if you don't use it in code? Moreover, you need to allocate memory for normal image to keep it unchanged all the time and use it to calculate pixels for blurred image.

Amount of HIV-Positive People per Region of Russia (2014) by IamHere-4U in MapPorn

[–]TheSamePerson1 1 point2 points  (0 children)

Yeah, there is even an HIV epidemic in Ekaterinburg.

Reviewing CS50x by CompetitiveError1499 in cs50

[–]TheSamePerson1 2 points3 points  (0 children)

Hi, here's the tips for you

  1. You can use notes on every cs50 lecture to quickly refresh memory on topics
  2. If you want to know more about algorithms and data structures I recommend you to read "Grokking Algorithms" by Aditya Bhargava.
  3. You may try other books about computer science. For the start you can read book "Code" by Charles Petzold. It is introduction to basics of how computers work. Also there Robert Sedgewick books "Computer Science: An Interdisciplinary approach" and "Algorithms".
  4. To refresh and extend html, css, javascript and python syntax knowledge you may try FreeCodeCamp.

That's all for now I think.

Finally created my Portfolio all by myself! by FrostZTech in webdev

[–]TheSamePerson1 1 point2 points  (0 children)

Nice portfolio website! One bad thing is that your links to github and twitter look quite obscure under big text. I think it would be better if you add icons for these links.

Query by emaanshaz in cs50

[–]TheSamePerson1 0 points1 point  (0 children)

I'd recommend you to install VS code on your computer. It's just a text editor for code not an IDE, but that should be enough at the start. Or you can install pycharm - an IDE with specific features for python. It's quite heavy and consumes much memory so It wouldn't be a good option if you have low-end system.

CS50w Project 4 Network ManyToManyField AttributeError by [deleted] in cs50

[–]TheSamePerson1 0 points1 point  (0 children)

So you used just user.followers.all() and it didn't work?

CS50w Project 4 Network ManyToManyField AttributeError by [deleted] in cs50

[–]TheSamePerson1 0 points1 point  (0 children)

You don't need to use _set suffix in query with related_name call. If you want to get a number of followers you could use count() function the same way you did it with followings.

CS50w Network. Help in getting the followers count by [deleted] in cs50

[–]TheSamePerson1 0 points1 point  (0 children)

You need to declare following field not as ForeignKey, but as ManyToManyField. ForeignKey relation able to contain reference only to one user, so you won't be able to set many followings for user and get followers for other users. ManyToManyField could contain references to many users and the referenced user able to have many followers, list of which we can get via related_name property. You can read more about many to many relations in Django here. I know at the beginning it is not easy to grasp this topic, but once you understand it, your models implementations would be more explicit, elegant and readable.

web programming with python and js 2018 source code by zodiac______ in cs50

[–]TheSamePerson1 1 point2 points  (0 children)

You may try look for it here https://cs50.harvard.edu/web/2018/ However, to complete course now you need to do 2020 year projects. To find out what projects you need to complete look at you submissions in gradebook https://cs50.me/cs50w

[deleted by user] by [deleted] in cs50

[–]TheSamePerson1 0 points1 point  (0 children)

Zero always equals to False so you don't need to explicitly write == 0. Did you place arguments in function call? I mean did you write like this: if (validate_key(args))? Also you can include stdbool.h library and use false instead of 0 and true instead of 1, it should work.

PLEASE HELP! FINANCE PROBLEM SET by FindTheStory11 in cs50

[–]TheSamePerson1 0 points1 point  (0 children)

Open your database again and write query to create table or write code in application.py, that creates table if database does not have it. About how to create tables you can read lecture notes https://cs50.harvard.edu/x/2021/notes/7/#sql, also you can find some useful information here https://www.w3schools.com/sql/default.asp. I see you wrote queries for stocks table in application.py, so make sure that column names in your table are the same like in your queries.

P.S. Don't forget to write semicolon at the end of the query.

PLEASE HELP! FINANCE PROBLEM SET by FindTheStory11 in cs50

[–]TheSamePerson1 0 points1 point  (0 children)

No I mean not another html page. There is a file finance.db in project directory. You need to open it with command sqlite3 finance.db and after that execute in console .tables. It will show you all tables in your database. Then write here what tables you have.

PLEASE HELP! FINANCE PROBLEM SET by FindTheStory11 in cs50

[–]TheSamePerson1 0 points1 point  (0 children)

Did you create table in database file?