Hot answers tagged

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 ...


6

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.


4

The VirtualBox version of the appliance currently has an issue with the gedit install. Staff are aware of it and are working on a fix. In the meantime, run this: sudo apt-get update sudo apt-get install --reinstall gedit That should get it up and running again.


3

Please read this, it may be the answer to your problems.


3

Try executing the following commands in the terminal sudo apt-get update sudo apt-get install --reinstall gedit the password is "crimson" if you are asked for one.


3

In gedit: Edit>Preferences>View Tab Ensure "Display line numbers" is checked.


2

It sounds like you are trying to open greedy in gedit. greedy is the executable file. If you want to edit the code, you must open greedy.c, make your changes, and then run make greedy to create the updated executable file. Then, you can run ./greedy to see the updated code in action.


2

All of the instructions for the appliance and other files are the first "assignment" in Problem Set 1 (which is found in Week 2).


2

Well, a debugger, as its name suggests, helps you debug your program (i.e., figure out the problems in your code so that you can fix it). The debugger we use for debugging our C programs is named gdb. You may watch the short on gdb for more information!


2

Your main declaration has curly braces around void. Those should be parentheses.


2

That depends on the type of the variable: As a example forn an integer (int): int n = 25; printf("n is equal to %d\n", n); The %d is a placeholder for an integer, when the message inside the double cuotes is printed the %d is replaced by the actual value of the variable that is passed as argument after the coma. Other example with an integer and a ...


1

The command "make" seems to be lacking some flags, try compiling it on your own with the "-lcs50" flag to link the library, i.e. clang credit.c -o credit -lcs50 If you want "make" to behave like it should, you can export the C-flags to something like: export CC=clang export CXX=clang export CFLAGS="-ggdb3 -std=c99 -Wall -Werror" export LDLIBS="-lcs50 -lm" ...


1

I don't know why it works in Codeblock, but the correct condition would be: i <= x && j >= 0 not i <= x, j >= 0 as you have. So your for loop should be: for (i = 0, j = x; i <= x && j >= 0; i++, j-- If this answers your question please accept it by clicking the gray check-mark to the left, so that it becomes green. ...


1

The line number display is a gedit preference. In the gedit menu, choose File > Preferences and then un-tick the first box that says:Display line numbers.


1

Restart the appliance and when it turns on, run sudo apt-get remove gedit and then sudo apt-get update sudo apt-get install gedit then do an update50


1

I had the same problem, I resolved it by reinstalling gedit... be sure to update your appliance before reinstall


1

I got mine working using these commands sudo apt-get update and sudo apt-get install --reinstall gedit


1

Is this a serious problem whenever I use these programs? Why might the programmers who wrote these programs ignore the advice about preventing memory leaks? Check out the top Google result for the search phrase "valgrind ls leaks". It's a bug report made to the GNU project's bug-coreutils mailing list back in 2011 that makes essentially the same claim (...


1

The "tab size" option in gedit only changes how tabs are displayed in the editor window. It has no effect on how the tab character \t gets displayed in the terminal window when you run the program. It seems to be possible to change the display width of a tab character in your shell environment but I wouldn't recommend it and it won't help you to ...


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

You can still use gedit outside of the appliance. You can download it from here. If gedit is a bit too technical, another popular code editor to try is Sublime Text. If you really must choose between Word or Notepad, then Notepad is the better of the two to write code with. While you can edit source files in Word there are some reasons not to: It is easy ...


1

Well, Microsoft Word and Notepad are two different kinds of applications. Microsoft Word is a word processor while Notepad is a text editor as well as gedit. Yes, you can write programs using the three of them and this has nothing to do with compilation errors as long as you're saving your files with the correct extensions and avoiding syntax errors. But ...


1

I run update50 on the terminal and the problem was resolved :D


1

If you haven't already, run update50. There's a bug in the built-in-terminal in gedit that this fixes. Alternatively, use the standalone Terminal app rather than the one in gedit, as that works fine.


1

Yes, the dropdown list in the lower-right corner of the Gedit interface displays and allows for changing the currently selected syntax highlighting option. The purpose of syntax highlighting is to allow for an easier grasp of the structure of a file, and to aid in identifying syntax errors. The same syntax highlighting options can be accessed from the File ...


1

If using the CS50 appliance, you will see a shortcut is already added for gedit on the taskbar. If you directly want to open a code file, say example.c, open the terminal, navigate to its folder and type gedit example.c You can also find it in the menu.


1

You may want to read carefully instructions posted here, but only apply those "patches" if you feel confident messing around with config files. And always create backups first (as in cp file1 file1.bak)


1

Per the pset, the GTK warning is a known bug in Linux fedora. Prof. Malan instructs students encountering this error to try restarting their appliance and try the sudo command again. I had the same error and restarting the appliance and trying again worked for me.


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