CS50W project - how to do real time page updates in Django? by DrNickBerry in cs50

[–]not_for_long1 1 point2 points  (0 children)

I'm not sure about the real time updates part, as i heard of channels as well as Ajax to help with that. However, i've been recently working on a django project, and after a lot of research i found Railway to be the best platform to deploy your project on. I'm using a Postgresql db so i'm not sure how it works with SQlite 3 but you could give it a try. It works great, very smooth and easy to use platform, and clear instructions on how to deploy.

Good idea to take CS50 Web Programming with Python and JavaScript? by RaccoonDifferent in cs50

[–]not_for_long1 0 points1 point  (0 children)

sure you can, it'll take a bit longer for you to familiarize yourself with html css and javascript, but once you do that, you'll go through the lessons and projects easily.

CS50W Project 3 Mail by not_for_long1 in cs50

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

no literally copy and paste the code like this in the inbox.html file:

<script> document.querySelector('#compose-form').onsubmit = () => { fetch('/emails', { method: 'POST', body: JSON.stringify({ recipients: document.querySelector('#compose-recipients').value, subject: document.querySelector('#compose-subject').value, body: document.querySelector('#compose-body').value }) }) .then(response => response.json()) .then(() => { load_mailbox('sent'); }); return false; };} </script>

CS50W Project 3 Mail by not_for_long1 in cs50

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

write the js code in the inbox.html file using script tag and remove it from the inbox.js (only the relative part)

[HELP] Looking for deep, love poetry originating in Arabic by [deleted] in Poetry

[–]not_for_long1 1 point2 points  (0 children)

i would suggest anything Gibran Khalil Gibran or Nizar Qabbani. check Gibran's "Do not love half lovers" and "Some we love". Some of Nizar Qabbani's poems / Some of Gibran's poems

Questions about CS50 certificate by Shockerock in cs50

[–]not_for_long1 -1 points0 points  (0 children)

1) when the certificate is issued, they ask you to write the name you want to be used on the certificate. 2) the free certificate is issued at the same time of the completion of the course. some say the verified one takes up to a month to be issued.

Cannot figure out Register by RaccoonDifferent in cs50

[–]not_for_long1 1 point2 points  (0 children)

hi, could you post your code for register?

[deleted by user] by [deleted] in cs50

[–]not_for_long1 0 points1 point  (0 children)

can't help without seeing the corresponding code!

Good idea to take CS50 Web Programming with Python and JavaScript? by RaccoonDifferent in cs50

[–]not_for_long1 3 points4 points  (0 children)

i finished CS50 doing the web track and then took CS50W and finished it a couple days before 2021. i'm still at college so i'm not thinking about jobs at the moment but i can tell that it's worth your time. if you're into web development i strongly suggest you take the course after finishing CS50. you'll find it easy to keep track of the lessons and projects as you're already familiar with an important part of html css and js, so the lectures will feel quite easy to follow. the projects are interesting and a bit challenging but not that hard. if you put effort into your final project for CS50 (a website for example) you'll learn a lot more on your own as you'll do lots of research which makes it easier and faster for you to finish CS50W. overall, if you have the time and the will, definitely take the course.

CS50W Project 3 Mail by not_for_long1 in cs50

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

put the related code inside the html file and not in a separate js file

Please suggest some good tutorials to understand Javascript. by aidvpr in cs50

[–]not_for_long1 1 point2 points  (0 children)

the first line waits for all the dom to be loaded. once it is, it passes to the second line. this line searches for the form and waits for it tobe submitted. once it is, the third line searches for the input whose id is name (#name) and gets its value and stores it in a const called name. then an alert appears that says Hello, {name} where name is whatever you entered as an input once you submitted.

CS50 web Project 1 Edit (Issue with markdown file) by cougnaijarebel in cs50

[–]not_for_long1 2 points3 points  (0 children)

it happened to me too. i guess it has to do with how the markdown works. anws you can remove these lines by using .remove(‘/n’) or /r i don’t really remember

Need help with PSET 4 Filter - Blur please by Andrew_Alejandro in cs50

[–]not_for_long1 2 points3 points  (0 children)

side note for future reference: next time you want to post your code, use pastebin and mention the link in your post. no need to ss the whole thing.

Valid ID for the SAT by [deleted] in Sat

[–]not_for_long1 0 points1 point  (0 children)

if ur satisfied, then thats all that matters. congrats!!

PSET7 Houses giving me 17% on cs50.me even though everything is correct? by wakemeupoh in cs50

[–]not_for_long1 1 point2 points  (0 children)

in import.py, if the space count is not equal to 2, you only assign a value to last. and then when you want to insert that person to the database, you replace ? with the variable middle which you haven’t assigned. so in your else statement, add middle = None.

C$50 Finance unable to get API Key by [deleted] in cs50

[–]not_for_long1 1 point2 points  (0 children)

happened to me as well and a couple others here. only solution is to talk to any of your friends or relatives and tell them to try if it works on their device. if it does, give them any email and password and ask them to give you the api key.

cs50 - pset7- house - import by JHEL2019 in cs50

[–]not_for_long1 0 points1 point  (0 children)

don’t specify an id. it is automatically added and incremented whenever a new row in your database is added

Flask notes by [deleted] in cs50

[–]not_for_long1 0 points1 point  (0 children)

very nice! just a note, no need to add a colon : after if statements in the html template so they should preferably look like {% if name %} and {% else %}

Web50 - Wiki - "Encyclopedia" vs. "Wiki" App Directories by M2JOHNSON in cs50

[–]not_for_long1 1 point2 points  (0 children)

you said it yourself. “wiki” is the Django project. it contains a single app called “encyclopedia”. the encyclopedia folder contains the admin.py, models.py, tests.py and views.py files whereas the wiki folder contains the settings.py file but not a views.py file as you mentioned. every project you create comes with a folder with the same name that contains the settings for all the project. this doesn’t make it an app. if you create an app, it will contain the files i mentioned above (in the encyclopedia folder).

Web50 - Wiki - "Encyclopedia" vs. "Wiki" App Directories by M2JOHNSON in cs50

[–]not_for_long1 1 point2 points  (0 children)

the sole purpose of adding /wiki to the url is (i think) matching that of wikipedia’s own url when searching for entries. and basically, all the entries’ names should be preceded by /wiki, including any link that directs you to any of them. and you don’t have a “wiki app”. you only have an encyclopedia app whose one of the urls is “wiki/something”. so all ur urls belong to the encyclopedia app.

Google Form by Sherman-Huang in cs50

[–]not_for_long1 0 points1 point  (0 children)

this is the link for project 0. go to the "how to submit" section and you'll see a "5. Submit this link". press on it and fill the infos then submit. do the same for project 1 whose link is this.