I found that deleted post over on reddit with an answer from delipity. But the user continued to have problems. I unzipped a fresh pset7, and did these chmods and finally got RockRolld! (oops. Spoiler :). I then removed pset7 and reinstalled, then followed this list and got the same (positive) result. I am running IDE 62. Full disclosure, I did not reinstall ...
This is the same solution as posted in Reddit, simply with clean code ready for copy/paste to terminal. Please note that you have to start in "workspace" directory.
chmod 711 pset7
chmod 755 public
chmod 711 css fonts img js
chmod 644 css/* fonts/* img/* js/*
chmod 711 includes vendor views
chmod 644 includes/* ...
Someone else posted some helpful solutions I will summarize here... I can't remember who (sorry).
chmod -R 755 pset8
(or chmod -R 755 pset7 ... I had the same Forbidden error with pset7)
This opens up lots of permissions and could be security issue in real world, I imagine. But, if you need to get working on the pset...
Also, since ...
I had the same problem. The only way I've been able to use the graphical interface is to run debug50 ./programname from the terminal.
An alternative would be to use gdb from the terminal which there's a CS50 section on: https://www.youtube.com/watch?v=y5JmQItfFck
EDIT September '16
The latest version of the IDE (69-ish) has a new utility called debug50.
I can't find a way to get the button back, but you can run the GUI debugger this way:
In View uncheck Less Comfortable. That will give more options in menu bar, specifically a Run tab and the green "> Run" button. When I tried the green Run, it did in fact invoke ...
This happens sometimes. I've seen rare cases take 3 or 4 minutes to load, more is possible. Try again later and see if it persists. (Sometimes its also a function of how long its been since the last time you used the IDE, or a function of server load.) If it persists, contact someone from cs50 staff and/or leave a message on the cloud9 forum under support. ...
for version edX 2015 (aka Harvard fall/2014), it's recommended to use appliance 2014 because some of the psets in this version of the course are not solvable in the CS50 IDE (e.g., breakout). to download and install appliance 2014, see manual.cs50.net/appliance/2014!
for the version of the course currently being taken at Harvard as well as Yale (version ...
Good job reaching that point and giving a shot to the hacker pset too! Don't be dismayed if you don't succeed with the first try, keep trying!
Now to your question.
First of all when you declare a variable, you don't have to put it in parentheses like you have:
Something like that is more readable and used mostly:
long long cc;
It's probably safe to assume the first block is not a jpg sig otherwise what would be the point of the exercise? At the first fread, what happens if it doesn't find a jpg sig? Control goes here fwrite(&chunk,1,512,outptr);. What is outptr? It is NULL. Program cannot write to NULL. It gives seg fault. You'll need to add logic to only write data when you ...
You are writing these commands into a file, while they are meant to go into a terminal window.
There are multiple ways to open one, "File"->"New Terminal", using the + button of one of the panels and "New Terminal", or right-clicking on a directory in the tree on the left, choosing "Open Terminal Here". The last one would open the terminal in this specific ...
I'm afraid there is no way for the SPL to work on the CS50 IDE the same way it works on the appliance. what you can do though is to download VMware's alternative, Oracle's VirtualBox, which is free of charge, import your appliance there, then use it as much as you want.
follow the steps here for specific instructions on how to set things up with VBox!
From the pset instructions:
Know that index.php is the
file that’s loaded by default when you visit a URL like https://ide50-username.cs50.io/.
...which calls (redirects to) login.php (via config.php) if empty($_SESSION["id"]), which presumably it is when first called.
Recall from the implemention of indexes() in pset6's server, how index.php or index....
There is no "Internal web browser" for the CS50 IDE. To preview your .html or .php files the IDE will open a new tab on your current browser and launch the code.
You can still play with the configs and try to make this happens. For this, go to:
Preferences > User Settings > Preview. Then you will be able to change those settings:
You can also check out ...
TL; DR: If you are having permission issues on pset7, you can fix them with the following three commands:
find ~/workspace/pset7/ -type d |xargs chmod 755
find ~/workspace/pset7/ -name *.php |xargs chmod 640
sudo find /var/lib/php5 -name sess_* |sudo xargs chown www-data:www-data
The Long Version:
There is definitely a problem with permissions on PHP ...
Don't worry -- nothing bad will happen if you rename the file. The point of naming it import rather than import.php is just to show you that this isn't a regular PHP web app file to be executed by the Apache2 server, this is a PHP-CLI (command-line interface) script, so it doesn't require the .php extension.
It does, however, need to start with a "shebang" ...
What IDE version? It is displayed in the menu bar next to the cloud9 icon. You can version50 at the command line. Current version is 94 as of this writing. Did you run update50 as per the Updating section of pset1 specification? update50 should do the trick.
It looks like there's some work to be done here. The frequency() function is supposed to "return as an int the note’s corresponding frequency, rounded to the nearest integer" according to the spec. The code that you referenced has a bunch of return true statements and at least one return false statement. True and false are bools. False will always return ...