Resources on the Web

indeed, that site is a good find have some practical work sweet. +1
 
I had a conversation at work, three or four years ago, about this. (I'm a software engineer).

Back when I was working on my undergrad (15-20 years ago), and when I first started working, if you wanted to know how to do something, you looked it up in a book.

My office at work used to have TONS of books; everything from administering to advanced algorithms.

I do NOT remember the last time I opened one of those books. Every few months, I'll take some home and put them in my attic.

Now, if I don't remember the syntax or don't know how to do something, I just google it.

What's the params for C++'s STL sort? Umm.. umm.. google to the rescue!

The web is an amazing and wonderful resource.

The link TomSound provided is actually pretty nifty. If you have NO programming experience, JavaScript is a great place to learn/dabble. You don't need a compiler or anything... just need to know the basics of html (and no, html is not programming).
 
Alright. Im stumped on something really simple.

Directions

A function is a way of taking a bunch of code and giving it a name. The code can then be run by using the function's name. That avoids having to retype it and has many more benefits that you will get to know over time.

In the editor you see the definition of a function called square that takes a single input x and calculates the square, i.e. x*x.

To use the function to calculate the square of 5 you would write square(5). This is known as calling a function.

Call the square function to calculate the square of 6.

Code Given

function square(x) {
return x * x;
}

i just dont know what the heck to do. Halp is possible?
 
Alright. Im stumped on something really simple.

Call the square function to calculate the square of 6.

Code Given

function square(x) {
return x * x;
}

i just dont know what the heck to do. Halp is possible?

Before you start with javascript, make sure you understand HTML, and how to create stuff like simple forms.

Below is a quick example i did for ya.

Open note pad, and copy/past the below "code" into it and save it as dd_is_great.html (you can save it as whatever name you want, but make to to save it as a .html)

Use FireFox or IE to open the file. Study how the file works.

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> 

<script type="text/javascript">

function call_square (value_from_form)
{
   alert("You entered " + value_from_form);
   alert("That number squared is " + square(value_from_form));
}

function square(x) {
   return x * x;
}

</script> 

<html>
    <head>   <title>DD Rocks!</title>    </head>
<br>

<form name = "DD_Example" method= "post"
 action="" onSubmit="(call_square(this.num_to_be_squared.value))"/>

 Enter Input : <input type="text" name = "num_to_be_squared" />

<input type = "submit" value = "Square Away!"/>

</form>
</body>
</html>

Keep in mind that TS probably wants to keep this page more for links to resources.. not for questions. Make another thread if you have question??

Good luck!
 
Well, tbh, thats all the lesson says to do, not all the HTML stuff

but ill check it out
 
Another good resource for web coding is http://www.w3schools.com. It has resources for JavaScript, PHP, ASP, CSS, HTML, etc. (though some people would probably not insider the last two to be programming languages.

And if you're working in C++, this will probably come up anyway when you google your question, but http://cplusplus.com is a good resource.

*gets slapped in the face by all hardened coders for mentioning the obvious*
 

Latest posts

Back
Top