15

Another student, in whose appliance the gedit-plugins package was missing, found that the following two commands solved the problem: sudo apt-get install -o Dpkg::Options::="--force-overwrite" gedit-plugins sudo apt-get install -o Dpkg::Options::="--force-overwrite" --reinstall appliance50 One issue is that both gedit-plugins and appliance50 install a file ...


9

Try CTRL-C, that should make your program stop whatever it is currently doing.


9

Yes. To force-exit a running program, press Ctrl + C from your keyboard!


7

The shortcut Ctrl + L should do the job either.


7

The terminal in the bottom of the gedit window is termed as Embedded Terminal. To get it in gedit, Open gedit, click View, enable Bottom Panel. Now click Edit, go to Preferences, then Plugins. Enable Embedded Terminal. If you don't find that option, then try sudo apt-get install gedit-plugins in terminal, and repeat the process again.


5

Sorry, beginner error: But now if we try to print_name(s) in our main function, we still get an error. And that’s because the compiler reads from top to bottom, in order, so at the time main calls print_name, it doesn’t exist yet. So we need to declare it with something called a prototype first: #include <cs50.h> #include <stdio.h> ...


4

Are you running that in the terminal? (ie, not inside sqlite3)? A common problem is trying to run it at the sqlite3 prompt. ~/pset7/movies/ $ cat 2.sql | sqlite3 movies.db birth 1988 ~/pset7/movies/ $


4

If you're using macOS you have to use ⌘ + k instead of the ctrl + k command which was suggested by a few other users :)


4

This line causes it: for (spaces = height - rows; spaces <= height; --spaces). While spaces is less than height, print a space and make spaces smaller. It is an infinite loop.


3

if you want to "list the functions in a library", you should look at the header file(s) aka .h file(s). if you wanna search for functions in the standard library, you could execute man -f keyword to search for man pages referenced by keyword or man -k keyword to search man page descriptions and names for keyword as a regular expression. ex: man -...


3

To kill a program prematurely, use CTRL + C.


2

Press the key (to make sure you are in Normal mode). Type: :q! . This exits the editor, DISCARDING any changes you have made. Save the file with changes and exit Vim with: :wq :x :xit Like ":wq", but write only when changes have been made. When 'hidden' is set and there are more windows, ...


2

clear word is used to clear the contents in the terminal window, although it does not literally clear things, scroll up to see the previous things inside the terminal.


2

If you are already in the ~/Dropbox directory, at your prompt, simply run wget http://cdn.cs50.net/2013/fall/psets/3/pset3/pset3.zip If you are not in the ~/Dropbox directory, first type: cd ~/Dropbox press enter. That puts you into the directory. Now you can do the wget. If you type cd ~/Dropbox wget etc. all in one command as you have done, it won'...


2

At pset3 recover/resize, they introduce the CS50 IDE at cs50.io, which I used. The lab has been unreliable for me, so I used that instead, pulling required files from https://github.com/cs50/labs/tree/2019/x


2

To see the console press F6, to open a new tab in the terminal Alt + T


1

I have no idea what this code is doing. But that doesn't really matter. You said that the intent is to test the chars in argv[1] to see if they're digits. Well, there's absolutely no code here to do that. I don't see any calls to isdigit() or anything that checks argv[1][i]. Looks like there's a bunch of missing code here that has yet to be added. ;-) If ...


1

1. Edit the Makefile From DESTDIR ?= /usr/local MANDIR ?= share/man/man3 To DESTDIR = /data/data/com.termux/files/usr/local MANDIR = /data/data/com.termux/files/usr/share/man/man3 In the Makefile, the question mark equal sign (?=) is for asking if the variable isn't defined. In this case just force it to use the specified path. 2. Build & Install ...


1

just click ctrl+d you can come out of the python shell. or you can type exit().


1

You can close the interactive Python shell by calling the function exit() There are a few more, like quit(), which is an alias for exit(), and on Stack Overflow you can find a few more.


1

check50 gave me problems like this: :( outputs "MB" for "Milo Banana" \ expected output, but not "MB\u0000\n" This means you are printing the M and the B and then the null character that signifies the end of the string (which will be invisible in your terminal). Make sure you don't iterate past the end of the string.


1

This has every indication of being an infinite loop somewhere after the code that takes in the data. Look in any loops that follow. There's also a chance that it's waiting for input without having written a prompt, but unlikely. If this answers your question, please click on the check mark to accept. Let's keep up on forum maintenance. ;-)


1

Your username in the Terminal shell is ubuntu. This is true for everyone, regardless of what your Cloud 9 IDE username is. Have you tried typing ls to list the contents of your home directory? It should return a list of folders, something like: module1/ module2/ module3/ module4/ module5/ module6/ module7/ module8/ pset1/ pset2/ pset3/ pset4/ pset5/ pset6/ ...


1

The floating-point exception typically happens because of a division by 0. You get that because of your risky usage of the remainder operator. I'll let you play with this a little more to figure out exactly which line causes that. Here are a couple more hints: you should move to the next key in the keyword if and only if the current character in the ...


1

When your program outputs something like this, it's likely that you're NOT outputting valid printable char values due to wrong calculations or something. The printable char values are from 32 to 126 in the ASCII table (inclusive). To check the value of a char you may write something like printf("%i\n", c); where c is the char variable that you wanna ...


1

If you want the screen to be cleared literally and want to keep the history of the commands too, then better use reset command.


1

Kellen - if you are downloading GEdit to use in conjuction with taking the course, you would be better off following the instructions for downloading and setting up the virtual appliance. David & the CS50 staff have made some environment configurations that your personal setup may not be able to mirror completely, and that could cause trouble down the ...


1

vim (aka vi) is a command-line text editor. You can open up an exiting file or creating a new one by executing vi fileName.extension To start editing your file, you have to hit i from your keyboard to enter the INSERT mode. To save your file and exit, hit ESC from your keyboard and type :wq. To exit without saving, hit ESC from your keyboard and type :q!. ...


1

To exit vim and save your changes, type :x or ZZ The complete Vim help documents are found here: http://vimdoc.sourceforge.net/htmldoc/usr_toc.html


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