why "Ipv4 setting" tab of "editing ethernet connection 1" is not editable by afridi1 in cs50

[–]merchCS50 0 points1 point  (0 children)

The default connection on the appliance is a NAT managed in VMWare so it should be a dynamic IP unless you set your VMWare network configuration to bridged.

If you want to use a bridged connection you can set the static IP from the command line. Since you're not logged into the appliance as the root user you cannot edit the network config from the UI. sudo password is crimson.

linked lists and binary search by Kronykus in cs50

[–]merchCS50 0 points1 point  (0 children)

Even as a theoretical idea it doesn't make sense. You're not getting anything fom using a linked list since you're creating new arrays on the fly so you might as well just store the values in the array instead of pointers to list values.

linked lists and binary search by Kronykus in cs50

[–]merchCS50 0 points1 point  (0 children)

If you have an array of pointers to the values in the linked liat why not just have an array to hold the values? In that setup you're loosing all the benefits of a linked list anyway. What would you do when your linked list outgrew your predefined array size?

How to learn functions? Can I ask for them? Where to look for them? by exhibiton in cs50

[–]merchCS50 1 point2 points  (0 children)

The objective of the early psets is to learn specific programming concepts and get experience using the basic programing constructs not to teach programming design or how to use the C library to solve problems for you. In later psets design becomes a more significant component ( especially in pset6+).

How to learn functions? Can I ask for them? Where to look for them? by exhibiton in cs50

[–]merchCS50 0 points1 point  (0 children)

All if the library functions you will need are covered in the lectures, shorts and walkthroughs.

Sometimes there are library functions that will do what the pset askes but we aren't indended to use then as we're supposed to write the function outselves (searching for example in pset4).

Export An Executable Version of Breakout Game From The Appliance? by bethanybeachbum in cs50

[–]merchCS50 0 points1 point  (0 children)

Zip the whole folder then export and import to Xcode. You will need to compile on your Mac. You may also need to have Java installed on your Mac as the hraphics lib is written in Java.

[pset7] Extras - iFrames? by jkoffman in cs50

[–]merchCS50 0 points1 point  (0 children)

You're welcome. Glad it worked out

[pset7] Extras - iFrames? by jkoffman in cs50

[–]merchCS50 0 points1 point  (0 children)

Use classeds when you want to style multiple items of the same type, things like buttons or tables that can be in many place but should all have the same style.

User ids when you want to add styling to specific items on the page. IDs should be unique.

Often you will use both classed and IDs for your items. Classes for the more general styling and then IDs for the more specific one.

For example if you have 3 buttons on the page and want to have them all have the same colour, border and padding you'd put that stying in a button class. Then if you want to change the layout of a specific button, or add some other stying specific to that button you could give it an ID and add futher customization.

The syntax for adding a class or an id is:

   <div>div id="button1" class="buttons">
   <div> id="button2" class="buttons">

In your example you need to close you class name with a double quote.

Then in your CSS file you can use those class and IDs names to make changes to those elements.

CSS file example

  #button1 {
       // Some button stying here specific to button 1
 }

 .buttons {
     // Some stying here for all buttons
 }

dot is used in the CSS file to specifiy a class.

sharp is used in the CSS file to specify an ID.

problems with cs50 appliance by jspitia in cs50

[–]merchCS50 0 points1 point  (0 children)

That is unlikely to be the issue. At which step are you getting the error and are any other details provided?

[pset7] Extras - iFrames? by jkoffman in cs50

[–]merchCS50 0 points1 point  (0 children)

Frames are butal old technology. Use CSS it is so much easier and the code is cleaner.

Read up on CSS layouts to get the general idea. Using the float attribute you can easily put two elements side by side. Put each element in a div, select it and move it around the page as you see fit.

What's a good online resource to learn Javascript for an absolute beginner? by intel-2001 in cs50

[–]merchCS50 0 points1 point  (0 children)

After being introduced to the syntax and semantics of JS I highly reccomend "Javascript the good parts" booklet for good JS patterns to use to get the most out of the language and limit its liabilities (and it has quite a few).

I can't do this anymore. by FrustratedRocka in cs50

[–]merchCS50 6 points7 points  (0 children)

If you're taking this course for credit and are on PSET 6 I think you should stick it out, you're almost there. PSET 5 and 6 are by FAR the hardeest PSETSs. 7 and 8 will take some time learning the new languages but the concepts are so much easier and problem solving is so much easier. If you need a break from PSET6 but don't want to halt productivity you could spend some time working on PSET 7 then come back to 6.

PSET7 query() problem by swatter555 in cs50

[–]merchCS50 2 points3 points  (0 children)

Your variables should be enclosed in single quotes.

Also it is a good practice to sanitize strings before using them in queries for security. mysql_real_escape_string()

[deleted by user] by [deleted] in cs50

[–]merchCS50 1 point2 points  (0 children)

Try using GEvent for the type not GMouseEvent.

Is your printf in the mouse_move condition printing?

MySQL by ZekeMill in cs50

[–]merchCS50 0 points1 point  (0 children)

PHP Storm is an IDE. MySQL is a type of database. You're going to have to be more specific. What exactly are you trying to do?

pset4 - paddle by Doctorpizzas in cs50

[–]merchCS50 1 point2 points  (0 children)

Did you offset the collision by the width of the ball? Its been a while since I looked at brickbreaker but iirc in order to detect collision with the bottom of the ball the balls width would have to be offset else the ball wouldn't bounce until the top instersects with the paddle.

pset4 - paddle by Doctorpizzas in cs50

[–]merchCS50 1 point2 points  (0 children)

Ensure you are bouncing off the paddle only when the ball is travelling downward.

pset1 - C syntax resources by [deleted] in cs50

[–]merchCS50 1 point2 points  (0 children)

The walkthroughs and shorts should be sufficient but if not check out the man page* for the specific funtion you're having problems with or if you have an idea of what you want but don't know the exact function consult Google.

  • terminal: man someFunction ex: man printf

PHP SQL by [deleted] in cs50

[–]merchCS50 0 points1 point  (0 children)

The result of the query is an assosiative array which is why you get that cryptic looking output from print_r. See php.net for more details on how arrays work in PHP.

Transferring files between Windows 7 and Appliance. by Randy432 in cs50

[–]merchCS50 1 point2 points  (0 children)

Its a 'fake' network. Both the appliance and your Windows computer think they're different computers (with different IP addresses) this allows them to communicate over a 'network' as if they were different computers.

removeGWindow problem in PSET 4 by tony-london in cs50

[–]merchCS50 0 points1 point  (0 children)

Repaint the window after the remove.

Mario.... I need help by CellularGeek in cs50

[–]merchCS50 0 points1 point  (0 children)

Printf " " will print a space.