Hot answers tagged

8

This can happen if the info50 script is missing from /usr/bin.* You can execute password50 from a command line to get your mysql password (and similarly, username50). *The footnote is much longer than the answer. I could reproduce this by creating a new workspace using the CS50 template. After running update50, the log ($HOME/lib/ide50.log) reports ...


5

"Find"->"Replace" (or the corresponding Ctrl+H or Alt+Shift+F) would come close, performing simple text replacement. It has modes for matching whole words only, or using regular expressions.


3

On which version of the workspace are you? The current version as of 2017-11-13 is v125. If update50 doesn't end in an error message, you probably are at that version. Also, how do you compile? The default of make hello would use environment variable LDLIBS with content -lcrypt -lcs50 -lm. Here the -lcs50 is relevant, it tells the linker (which is invoked ...


3

I managed to duplicate this. When the save dialog is opened, there is an entry box at the top for the filename and one at the bottom for the directory name. (In windows, that would be the location of a filename dialog box.) The filename box has a default file name of "untitled". If the user enters the desired filename in the directory dialog box, you get ...


3

That's what the executable looks like to a text editor. You opened water not water.c. (The compile "problem" is because it is in the wrong directory, workspace instead of workspace/pset1.


3

Have you tried clearing the browser cache (shift-reload or ctrl-F5)? That will cause the browser to re-download your js file. Since you mention "code from last year" is it possible apache is started in a different "path-to-root" than you expect?


2

The graphical debugger seems to have problems with code that opens other files. You should use the command line gdb instead in these instances.


2

Nevermind, I figured it out. I'll say it here just for future reference. javac filename.java java filename from https://askubuntu.com/questions/145748/how-to-compile-a-java-file-on-ubuntu


2

Type python manage.py runserver 0.0.0.0:8080 and start the server. Then click the web server option in the IDE. After going to the site, remove the -beta from the url and press enter. It will show disallowed host. So now add the url to the allowed hosts like this ["{{the url you got}}", '0.0.0.0']. Then wait for the server to reload or restart the ...


1

It is explained in the Check50 section of the spec.


1

A simple restart of the container instance via CS50 IDE > Restart (the top left corner menu) should in theory revert all files and changes except on /home/ubuntu. If do do wish to delete all files on /home/ubuntu the command rm -rf /home/ubuntu/* should help. Do keep in mind that the aforementioned command rm is irreversible.


1

It's a new program. Start with a new file. You're done with hello.c, but feel free to look at it for any ideas on how to do anything you've done in the past. These instructions are guiding you through how to create a new directory to put that file in.


1

You don't have to create a new terminal window, but you should only start mario if you're finished with hello. If you're in the hello directory, on your terminal, execute: cd, cd pset1, mkdir mario, cd mario. Make sure it's in that order. Don't delete your hello.c work though. If this helps, please click the check mark or upvote it.


1

The function signature has changed. From the CS50 Programmer's Manual char *get_string (const char *format, ...); DESCRIPTION Prompts user for a line of text from standard input and returns it as a string (char *), sans trailing line ending. Supports CR (\r), LF (\n), and CRLF (\r\n) as line endings. Stores string on heap, but library’s ...


1

Not having seen the rest of your application.py code, I'm going to assume you have something like this: # Configure CS50 Library to use SQLite database db = SQL("sqlite:///database.db") near the top. If so, make sure that it comes after your line Session(app) Another student had this deprecation issue and, for some reason I don't yet understand, if ...


1

We're in the process of updating the specs for the new IDE. Try ~cs50/2019/x/pset4/speller dictionaries/large texts/lalaland.txt


1

After sharing your workspace with someone, they need to go to the email that was sent and click the link given to them. At that point, they will have the access you gave them and will be able to see (and/or edit) your code.


1

The IDE has changed since some videos were made. debug50 is the new debugger tool that was introduced in the fall. There is also a section on debug50 in the week2 lecture at around 22 minutes.


1

I had the same problem as you describe in your post. As @Rushil mentioned in his comment, it can be sorted by renaming the file you have named "string.py" in your directory. Seems there is a conflict while importing the cs50 library and at the same time having a file called "string.py" in your folder...


1

Mac, eh? Xcode and Sublime Text are pretty legit. If that's what you're used to, stick with it. If you want a setup similar to the CS50 IDE, it's easy to run Ubuntu Linux in a VM on your Mac. For cross-platform IDE options, try CodeBlocks or Eclipse. Don't just learn to rely on one platform. In case you need to build on a remote server over ssh, you ...


1

The CS50 IDE is based on Ubuntu Linux, and if you are planning to build a web application similar to Mashup or CS50 Finance, the relevant technologies are often abbreviated as LAMP (Linux, Apache, MySQL, PHP). Google for "LAMP server setup" and you will find a lot of information about this. If you want to design a web application, but not host it on the web,...


1

You have moved to ubuntu Directory. Do you see something like this? /home/ubuntu/ $ if you type ls , you will see different directories, one of which should be workspace. You can enter to this directory by typing cd workspace into terminal and then you will see /home/ubuntu/workspace/ $ Then again type cd pset1 in terminal. you will be in pset1 ...


1

So, while I still do not know what happened nor do I understand the solution. I found that another CS50x student had the same problem and posted about it on the Cloud9 community boards here. The 'solution' post reads thus: Hi, problem appears to have resolved using echo > ~/lib/apache2/log/error.log. I have access again And I typed into the terminal: ...


1

There might be a problem with update50. In the meantime, use hostname50 at the command line to see your hostname.


1

If you are having problems with the graphical debugger in the CS50 IDE (as I did!) then you should learn to use GDB from the command line, as others have suggested. There are two reasons to do this: it works better, and you may not have access to the Cloud9 IDE if you find a future job as a C programmer. Google "cs50 gdb youtube" and you should be all set ...


Only top voted, non community-wiki answers of a minimum length are eligible