View Full Version : The programming/developement help wanted/needed thread
samh16
07-14-2010, 02:58 PM
Lots of IT college students on here, aswell as people workng in the industry, so this thread is the place to post if you need help, whether it be programming, web dev, assignments or personal projects.
Be specific in your question, give as much detail as possible, and give snippets of code when needed!
And maybe everyone could say what they're experienced in, so we could get a list of people to go to with specific problems?
EDIT: I'll update the OP with various links and tutorials for all sorts of dev'ing.
http://www.dreamincode.net/ --- Lots of languages, really good place to have a look around.
http://codingbat.com/ --- Programming questions you can answer in Python or Java.
http://projecteuler.net/ --- Lots of math problems, you can use any language you want to solve them.
http://developer.android.com/index.html --- Anybody wanting to make android apps, start here. (You should have a good grasp of Java before you start)
http://developer.apple.com/iphone/index.action --- Same as above, except for iOS. (Pretty sure they use Objective C, but I could be wrong)
http://sourceforge.net/ --- Lots of free, open source software, aswell as dozens of projects you can get involved in. Any Language.
Books for iPhone/Mac Development (Courtesy of Boatski) :
Programming in Object-C 2.0 by Stephen Kochan
Cocoa Programming for Mac OS X by Aaron Hillegass
Core Animation for Mac OS X and the iPhone by Bill Dudney
Feel free to post more and I'll add them to the list!
Bkcmart
07-14-2010, 03:14 PM
I still have all my old programming 101 projects if anyone needs something...although it would be best just to help that way people learn...lol. Mostly Java stuff, but some VB also.
Alephz
07-14-2010, 03:18 PM
Definitely going to keep my eye on this thread. I'm not fantastic but I know a bit with java and prolog.
Boatski
07-14-2010, 03:19 PM
i know cobol, it's ok
deadforaminute
07-14-2010, 03:21 PM
cool
Veldy
07-14-2010, 03:53 PM
Dabbled in Matlab last year for a class..
So if anyone is taking an intro level Matlab course and needs some help..
I also know some people who know a lot more about it than I do, so I can ask them if need be
circusmidget
07-14-2010, 06:26 PM
I'm studying IT at the moment. I'm not an expert by any stretch of the imagination, but I have tinkered in the following languages (some more than others):
C, C++, Java, C#, Perl (dear gods, how I loathe), Python, M68k asm, x86 asm. I think that's it.
I've also tinkered with XHTML, CSS, XML (+DTD/W3C Schemas), PHP and SQL (my).
neilsabo
07-14-2010, 08:25 PM
i suggest we compile a list of links for tutorials in various tools/languages in the OP
if i knew any, i'd start, lol...
brahdawg
07-14-2010, 09:10 PM
Remember kids, its not so much the language you know but the programming concepts that are important.
For learning basic web stuff the w3schools has a bunch of useful little tutorials.
http://www.w3schools.com/
EasTexan
07-15-2010, 12:22 AM
This thread should blow up once the fall semester starts. I know I'll post here for sure. I'm taking an "Internet Technologies" class over the summer for my IT minor, basically how to make webpages, should be an easy A.
Majoring in computer science and minoring in IT.
Mustaine14
07-15-2010, 12:31 AM
Sup brahs
PHP/MySQL/JavaScript/CSS/XHTML/Java programmer here... Also looking to learn C# soon and a non web-oriented language. Doing this in my free time, no courses.
Coal Man
07-15-2010, 01:52 AM
Wassup guys. I'm a noob here so forgive me.
I'm trying to do a simple html web form for practice (contact information).
Some of the fields, however, require validation using javascript.
So is it possible to do all my forms under one form tag and use one script to validate the fields that need validation, or should I just paste in all the forms together and post separate validations for each one?
Considine
07-15-2010, 01:55 AM
HTML, CSS, PHP and still tinkering with Flash (inb4 "HTML 5 FGT").
jQuery is so awesome. Gives me boners guise.
Rambo26
07-15-2010, 01:56 AM
Sup brahs
PHP/MySQL/JavaScript/CSS/XHTML/Java programmer here... Also looking to learn C# soon and a non web-oriented language. Doing this in my free time, no courses.
I don't do any coding at the moment but you should like C#, very similar syntax to Java
Aussie Flare
07-15-2010, 02:09 AM
I'm currently going through some ASP.NET 3.5 textbooks. Have done a bit of VB.net and am now learning C#.
samh16
07-15-2010, 02:12 AM
Wassup guys. I'm a noob here so forgive me.
I'm trying to do a simple html web form for practice (contact information).
Some of the fields, however, require validation using javascript.
So is it possible to do all my forms under one form tag and use one script to validate the fields that need validation, or should I just paste in all the forms together and post separate validations for each one?
Is it multiple forms , or one form with multiple fields?
I'm guessing it's the latter, in which case you could use a for loop to run through the form while checking each piece of info.
Have a look here : http://www.elated.com/articles/form-validation-with-javascript/
And here is some code from that page that handles multiple fields at once :http://www.elated.com/res/File/articles/development/javascript/form-validation-with-javascript/complex_form_source.html
Coal Man
07-15-2010, 02:33 AM
Is it multiple forms , or one form with multiple fields?
I'm guessing it's the latter, in which case you could use a for loop to run through the form while checking each piece of info.
Have a look here : http://www.elated.com/articles/form-validation-with-javascript/
And here is some code from that page that handles multiple fields at once :http://www.elated.com/res/File/articles/development/javascript/form-validation-with-javascript/complex_form_source.html
sick, this helps me understand alot more!!! Reps.
samh16
07-15-2010, 02:45 AM
sick, this helps me understand alot more!!! Reps.
Any time, that's what the thread's for.
And btw, is it cool if I PM you with sites to add to the OP every now and then? I can't edit after 24 hours...
Coal Man
07-15-2010, 03:07 AM
Any time, that's what the thread's for.
And btw, is it cool if I PM you with sites to add to the OP every now and then? I can't edit after 24 hours...
sure thing.
samh16
07-15-2010, 03:20 AM
sure thing.
Cool.
Back on topic: Anybody in the middle of any projects/assignments atm?
Coal Man
07-15-2010, 04:45 AM
Yep me, pretty soon I'll have to do up some web pages for an assignment.
Ok javascript is almost done. I've been tinkering around with it and the last part is pissing me off. I put in validations for the fields but the javascript to validate the zip code is very tricky.
I got the code from this site http://javascript.internet.com/forms/val-zip-code.html
but when I put it in, it doesn't work and disables the rest of the script from working :mad:
This is what I have so far, just need the zip code help:
<head>
<script type="text/javascript">
<!--
function validate_form ( )
{
valid = true;
if ( document.contact_form.title.selectedIndex == 0 )
{
alert ( "Please select your Title." );
valid = false;
}
if ( document.contact_form.firstname.value == "" )
{
alert ( "Please fill in the 'Your Name' box." );
valid = false;
}
if ( document.contact_form.lastname.value == "" )
{
alert ( "Please fill in the 'Last Name' box." );
valid = false;
}
if ( document.contact_form.usrname.value == "" )
{
alert ( "Please fill in the 'Username' box." );
valid = false;
}
if ( document.contact_form.pwd.value == "" )
{
alert ( "Please fill in the 'Password' box." );
valid = false;
}
if ( ( document.contact_form.membertype[0].checked == false ) && ( document.contact_form.membertype[1].checked == false ) )
{
alert ( "Please choose your Member Type: Normal or Premium" );
valid = false;
}
if ( document.contact_form.address.value == "" )
{
alert ( "Please fill in the 'Address' box." );
valid = false;
}
if ( document.contact_form.city.value == "" )
{
alert ( "Please fill in the 'City' box." );
valid = false;
}
if ( document.contact_form.terms.checked == false )
{
alert ( "Please check the Terms & Conditions box." );
valid = false;
}
return valid;
}
//-->
</script>
</head>
<body>
<form name="contact_form" action="html_form_submit.asp" method="get" onSubmit="return validate_form ( );">
<form action=""><h3>Title:</h3>
<select name="title">
<option>Mr.</option>
<option>Mrs.</option>
<option>Miss</option>
<option>Other</option>
</select>
<br />
<br />
<h3>First Name(Required):</h3>
<input type="text" name="firstname" size="20" />
<br />
<h3>Last Name(Required):</h3>
<input type="text" name="lastname" size="40" />
<br />
<br />
<h3>Username(Required):</h3> <input type="text" name="usrname" />
<br />
<br />
<h3>Password(Required):</h3> <input type="text" name="pwd" />
<br />
<br />
<h3>Member Type(Required):</h3>
<input type="radio" name="membertype" value="Normal" /> Normal Membership<br />
<input type="radio" name="membertype" value="Premium" /> Premium Membership<br />
<br />
<br />
<h3>Contact Type:</h3>
<input type="radio" name="contacttype" value="Home" /> Home<br />
<input type="radio" name="contacttype" value="Work" /> Work<br />
<br />
<br />
<h3>Best time to contact me:</h3> <input type="text" name="contacttime" />
<br />
<br />
<h3>Address(Required):</h3>
<input type="text" name="address" size=100 />
<br />
<br />
<h3>City(Required):</h3>
<input type="text" name="city" size=50 />
<br />
<br />
<h3>Country:</h3>
<input type= "text" name="country" size=50 />
<br />
<br />
<h3>Phone Number:</h3>
<input type= "text" name="phone" size=20 />
<br />
<br />
<h3>Email:</h3>
<input type="text" name="email" size=50 />
<br />
<input type="submit" value="Submit this form"
onclick="formvalidation(contact_form);return false;" />
</form>
</body>
Otherwise this is my first form and it's pretty fun :)
samh16
07-15-2010, 05:29 AM
@CoalMan, the last part should be
<input type="submit" value="Submit this form"
onclick="validate_form(contact_form);return false;" />
because 'validate_form' is the name of the validation script you have, when the button is pressed it calls the script and excecutes it.
Any javascript ninja's have any idea about the zip code part?
Boatski
07-15-2010, 05:31 AM
Coal, can you post what you're using with the Zip stuff on it? I don't see anything from what you posted above.
Try this maybe.
http://www.zparacha.com/validate-zip-code-using-javascript-regular-expression/
Coal Man
07-15-2010, 06:25 AM
@CoalMan, the last part should be
<input type="submit" value="Submit this form"
onclick="validate_form(contact_form);return false;" />
because 'validate_form' is the name of the validation script you have, when the button is pressed it calls the script and excecutes it.
Any javascript ninja's have any idea about the zip code part?
Thanks will edit the submit button now.
Coal, can you post what you're using with the Zip stuff on it? I don't see anything from what you posted above.
Try this maybe.
http://www.zparacha.com/validate-zip-code-using-javascript-regular-expression/
I left the zip code text field and the javascript out.
The funny thing is when I copy the code they say to copy here:
http://javascript.internet.com/forms/val-zip-code.html
and paste it in a text file by itself, it works.
I just don't know how to incorporate it into my text file with everything else.
Coal Man
07-15-2010, 06:35 AM
@CoalMan, the last part should be
<input type="submit" value="Submit this form"
onclick="validate_form(contact_form);return false;" />
Ok here's the difference when I try this.
The way I had it before, the alert for each empty field popped up once which is what it's supposed to do.
When I changed formvalidate to validate_form, the the same thing happened, but it looped again and all alerts came up twice.
samh16
07-15-2010, 07:03 AM
Ok here's the difference when I try this.
The way I had it before, the alert for each empty field popped up once which is what it's supposed to do.
When I changed formvalidate to validate_form, the the same thing happened, but it looped again and all alerts came up twice.
<form name="contact_form" action="html_form_submit.asp" method="get" onSubmit="return validate_form ( );">
That's why. Is that return statement needed? Either remove that one or the one at the bottom.
Coal Man
07-15-2010, 07:34 AM
<form name="contact_form" action="html_form_submit.asp" method="get" onSubmit="return validate_form ( );">
That's why. Is that return statement needed? Either remove that one or the one at the bottom.
Ok I get you.
So how about if I put "onSubmit="return validateZIP(this.zip.value)" in the initial statement and leave validate_form in the submit button. Will that fix the zip code problem?
Boatski
07-15-2010, 07:38 AM
http://developer.apple.com/iphone/index.action --- Same as above, except for iOS. (Pretty sure they use Objective C, but I could be wrong)
Objective-C is correct.
Some good books for Mac/iPhone development would be:
Programming in Object-C 2.0 by Stephen Kochan
Cocoa Programming for Mac OS X by Aaron Hillegass
Core Animation for Mac OS X and the iPhone by Bill Dudney
Aaron Hillegass has a new one out, but cannot think of the title.
ONpump17
07-15-2010, 08:22 AM
in and subbed. I plan on learning at least one new language this summer, probably C++ or something. My schools program isn't the best, so I'm learning as much as possible.
my submission to this 'pool of knowledge'
(Coal Mayne if this goes against the rules plz just delete post thx)
http://i29.tinypic.com/rhinw9.jpg
Boatski
07-15-2010, 08:38 AM
in and subbed. I plan on learning at least one new language this summer, probably C++ or something. My schools program isn't the best, so I'm learning as much as possible.
my submission to this 'pool of knowledge'
(Coal Mayne if this goes against the rules plz just delete post thx)
[img]http://i29.tinypic.com/rhinw9.jpg[img]
C++ is definitely a good one to learn and be proficient in.
another book for Mac/iPhone is:
Beginning iPhone 3 Development Exploring the iPhone SDK by Dave Mark and Jeff LaMarche
edit:
once you understand object-oriented programming, picking up other OO languages should be fairly easy.
IE C++ to Objective-C. They're very similar.
Nutella!
07-15-2010, 09:23 AM
Ok I get you.
So how about if I put "onSubmit="return validateZIP(this.zip.value)" in the initial statement and leave validate_form in the submit button. Will that fix the zip code problem?
it should. Javascript is funny like that in it will stop and not finish the rest of the code after an error. On firefox you can view the error console under tools. I bet it's stopping right before the zip part because of the code above. Once that is fixed it should work.
I want to try and learn a language. My major is Math so I don't really have many programming courses. I just know a bit of python, and obviously a bunch of Unix commands, but that doesn't really count.
Any suggestions on what I should go for first?
Boatski
07-15-2010, 10:25 AM
I want to try and learn a language. My major is Math so I don't really have many programming courses. I just know a bit of python, and obviously a bunch of Unix commands, but that doesn't really count.
Any suggestions on what I should go for first?
java
Considine
07-15-2010, 10:26 AM
in and subbed. I plan on learning at least one new language this summer, probably C++ or something. My schools program isn't the best, so I'm learning as much as possible.
my submission to this 'pool of knowledge'
(Coal Mayne if this goes against the rules plz just delete post thx)
http://i29.tinypic.com/rhinw9.jpg
I love Sitepoints books. I got jQuery: From Novice to Nina and it's pretty cool.
I want to try and learn a language. My major is Math so I don't really have many programming courses. I just know a bit of python, and obviously a bunch of Unix commands, but that doesn't really count.
Any suggestions on what I should go for first?
I'd say just the basic HTML and CSS. from there you can learn Javascript or Flash (fairly similar languages).
reyalp
07-15-2010, 10:35 AM
Coal Man you need a regex for the zip code
function isValidZipCode(value) {
var re = /^\d{5}([\-]\d{4})?$/;
return (re.test(value));
}
samh16
07-15-2010, 10:40 AM
I want to try and learn a language. My major is Math so I don't really have many programming courses. I just know a bit of python, and obviously a bunch of Unix commands, but that doesn't really count.
Any suggestions on what I should go for first?
It depends on what you want to do.
If you want to make desktop applications / web applets / some mobile development, go with java.
For websites, look towards HTML, CSS, javascript.
There's lots of places to start, just pick a language and go with it. It's the logic behind programming that's difficult, not the syntax of the language.
reyalp
07-15-2010, 10:45 AM
I want to try and learn a language. My major is Math so I don't really have many programming courses. I just know a bit of python, and obviously a bunch of Unix commands, but that doesn't really count.
Any suggestions on what I should go for first?
Start with some good old C
It will make you appreciate Python when you get back to Python.
circusmidget
07-15-2010, 08:05 PM
Start with some good old C
It will make you appreciate Python when you get back to Python.
asm would do a better job of that haha.
I'm not sure. I suppose since he's already been exposed to OO programming concepts in python, C could be a good idea. Don't get me, wrong, I love C -- that's the problem though for me, I think. C was one of the first languages I learned, and I got stuck with "procedural thinking" for far too long. OO is where it's at these days. I would think it'd be better to stick with something OO. I'd probably suggest C++, except I dislike it. Maybe it's a reasonable compromise though; OO but it doesn't baby you like Java and the rest.
Otherwise, I'd probably suggest C# or Java if you're looking for a language with more commercial opportunities. Seems to be where it's at these days, at least where I live.
hawaiian robots
07-15-2010, 08:28 PM
The languages I know / am Competent at:
Java
C
C++
C#
VB
ASPX
PHP
HTML
XHTML
JavaScript
Python
Perl
SQL
Any questions/requests just direct to my inbox.
hawaiian robots
07-15-2010, 08:33 PM
Coal man, if you use FF download the addon "Firebug". If will help greatly with debugging both HTML and JavaScript.
samh16
07-16-2010, 02:16 AM
Anybody involved in any open source stuff? I've been looking to get into something but have no idea what to do / where to go. Tried sourceforge, but I couldn't find anything decent...
SuperDL
07-16-2010, 02:42 AM
Hey guys,
Know some HTML and CSS, right now reading the CSS Anthology to increase my CSS know how. Aim is to become a full blown web developer.
samh16
07-16-2010, 05:14 AM
Hey guys,
Know some HTML and CSS, right now reading the CSS Anthology to increase my CSS know how. Aim is to become a full blown web developer.
You run any websites?
SuperDL
07-16-2010, 05:47 AM
You run any websites?
I did run SuperSwole.Com a fitness website but sold it ages ago.
reyalp
07-16-2010, 06:04 AM
Anybody involved in any open source stuff? I've been looking to get into something but have no idea what to do / where to go. Tried sourceforge, but I couldn't find anything decent...
Are you wanting to contribute code?
If so you can always do bug fixes.
samh16
07-16-2010, 06:20 AM
Are you wanting to contribute code?
If so you can always do bug fixes.
I'd love to, yeah. Got any suggestions?
B-Neva
07-16-2010, 06:25 AM
O sup nerds,
Network programming in C here.
reyalp
07-16-2010, 06:39 AM
I'd love to, yeah. Got any suggestions?
Is there anything in particular that you have a particular affinity for?
ie Photo management, Xorg, Backups, Telephony, Configuration tools, etc
Ubuntu has a pretty big pile of bugs on their bugtracker but they are hard to sort through.
circusmidget
07-16-2010, 06:44 AM
O sup nerds,
Network programming in C here.
Can you elaborate more, out of curiosity?
B-Neva
07-16-2010, 07:22 AM
Can you elaborate more, out of curiosity?
Tcp/ip, Socket level programming on Linux. Basically all my assignments are just different client/server models. Like using select, epoll etc
I actually just learned how to make covert channels, i have made a port forwarder, chat clients, streaming audio and some others
circusmidget
07-16-2010, 07:37 AM
Tcp/ip, Socket level programming on Linux. Basically all my assignments are just different client/server models. Like using select, epoll etc
I actually just learned how to make covert channels, i have made a port forwarder, chat clients, streaming audio and some others
Sounds like fun! Been a long time since I did any *NIX socket programming. I remember having good times in the past doing it though.
SuperDL
07-16-2010, 08:26 AM
Since there are a few programmers on here why not create an app for Miscing? It could hold a number of copy pastas and you just have to drag and drop it into the posting input form.
samh16
07-16-2010, 08:56 AM
Since there are a few programmers on here why not create an app for Miscing? It could hold a number of copy pastas and you just have to drag and drop it into the posting input form.
I'll have a go at an android one if there's any interest...
reyalp
07-16-2010, 09:21 AM
I'll have a go at an android one if there's any interest...
I wrote a Greasemonkey script once that would automatically fill the quick reply box with a random GIF.
I decided I didn't want that much traffic on my web server though.
erftbll81
07-16-2010, 11:50 AM
Hai Guize. I'm doing computer engineering so i have done some C and C++. I will be taking Object Oriented Programming next quarter, any tips?
samh16
07-16-2010, 12:37 PM
WTF at 2 star thread
That's fukin horse****
EasTexan
07-16-2010, 12:39 PM
Hai Guize. I'm doing computer engineering so i have done some C and C++. I will be taking Object Oriented Programming next quarter, any tips?
Start reading up on OO now to get ahead of the curve.
http://en.wikibooks.org/wiki/Object_Oriented_Programming
SmallyBiggs92
07-16-2010, 07:39 PM
Subbed and lovin the info, im currently in the process of learning some languages in hope to pursue a career in computer sciences and technology
JesseV87
07-17-2010, 09:53 AM
I'd love to, yeah. Got any suggestions?
I did some work on Firefox a couple of years ago, Mozilla has an amazing support system for anyone looking to contribute. A couple of my buddies actually work there now.
https://bugzilla.mozilla.org/ bug database
http://irc.mozilla.org/ info for connecting to their IRC server, most of their developers are on there often.
samh16
07-18-2010, 03:35 AM
I did some work on Firefox a couple of years ago, Mozilla has an amazing support system for anyone looking to contribute. A couple of my buddies actually work there now.
https://bugzilla.mozilla.org/ bug database
http://irc.mozilla.org/ info for connecting to their IRC server, most of their developers are on there often.
I'll take a look. Thanks alot :)
@Coal Man, get the javascript working?
samh16
07-20-2010, 09:48 AM
Brah's, I've got an interview for a database/network admin internship tomorrow. Any advice on stuff to brush up on?
DeTazMan
07-20-2010, 10:52 AM
Brah's, I've got an interview for a database/network admin internship tomorrow. Any advice on stuff to brush up on?
I would say Database Optimization and normalization. Load balancing across the network. Security, and adding users with permissions. Also if it is a MS network, look at active directory
DaFeesh
07-20-2010, 12:16 PM
Brah's, I've got an interview for a database/network admin internship tomorrow. Any advice on stuff to brush up on?
Good luck brah. Be sure to give us a detailed account afterwords.
kubakuba
07-21-2010, 02:32 AM
Awesome thread. I'm a marketing major and lately I've been coding websites for my sister, a freelance graphic designer / web designer, so I've had the pleasure of working with jQuery and AJAX which has been a lot of fun. I also played in UnrealScript (somewhat similar to C++) for a couple months after Epic released the Unreal Development Kit to the public and began to put together a little prototype birds-eye-view hack-and-slash RPG (Diablo like, ill try to get a screen cap or fraps vid if anyone is interested in seeing it). My biggest problem has been that I can't seem to commit to any one field, I'll shift from gfx design, web design, game programming, web development, 3d modeling/sculpting, texture artist, etc. etc. Recently I've considered settling on UI design as it often involves not only gfx design but programming as well, but I haven't sold myself on it just yet... Anyone else have this problem?
samh16
07-21-2010, 03:12 AM
Awesome thread. I'm a marketing major and lately I've been coding websites for my sister, a freelance graphic designer / web designer, so I've had the pleasure of working with jQuery and AJAX which has been a lot of fun. I also played in UnrealScript (somewhat similar to C++) for a couple months after Epic released the Unreal Development Kit to the public and began to put together a little prototype birds-eye-view hack-and-slash RPG (Diablo like, ill try to get a screen cap or fraps vid if anyone is interested in seeing it). My biggest problem has been that I can't seem to commit to any one field, I'll shift from gfx design, web design, game programming, web development, 3d modeling/sculpting, texture artist, etc. etc. Recently I've considered settling on UI design as it often involves not only gfx design but programming as well, but I haven't sold myself on it just yet... Anyone else have this problem?
pics/vids nao!
kubakuba
07-21-2010, 06:46 AM
pics/vids nao!
Here's a quick vid, kept it short and low res to keep file size down. Also just noticed that the lighting looks a bit off in the recording but running it at full resolution and with high quality light maps the graphics/tech are easily on par with diablo 3's. I'd even venture as far as to say the UE3 engine's gfx/tech surpass D3's. Anyway my project included several custom classes including a camera class, player controller, pawn, and HUD (which I didn't toggle on in the vid) but basically to give you an idea of what my code consisted of, the UDK by default plays just as Unreal Tournament 3 does, so I had to code a FPS WASD free mouse into a third person point-and-click. As for the video- First few seconds show the custom coded camera (mouse wheel zooms in and out), the playercontroller sends the pawn to mouseclick and also has the pawn follow the mouse when mousebutton is held down. The pawn has collisions and physics that (somewhat) accurately handle the pawn moving over different leveled terrain (end of vid). Anyway that was from an old version of the UDK. In a more recent version I also had the player connecting into and accessing data from an external database and also had basic PlayerAttacking and PlayerCasting states for the player.
GfLgLOLkyAw
**EDIT** Here's a slightly higher-res vid that can be viewed in 720p, viewing full screen you get a better idea of the gfx.
RH8M-a2canQ
samh16
07-21-2010, 08:55 AM
Good luck brah. Be sure to give us a detailed account afterwords.
Went pretty good. Chatted about general stuff for awhile, then some college projects I've done, then asked some "what would you do if.." questions.
Back for another one tomorrow! There were at least 10 others getting interviewed for the internship, only talked to two guys who got called back. Looking good!
kubakuba
07-21-2010, 08:58 AM
Went pretty good. Chatted about general stuff for awhile, then some college projects I've done, then asked some "what would you do if.." questions.
Back for another one tomorrow! There were at least 10 others getting interviewed for the internship, only talked to two guys who got called back. Looking good!
Nice, best of luck.
SuperDL
07-24-2010, 03:01 AM
What code editor are you guys using?
mehldau
07-24-2010, 04:07 AM
What code editor are you guys using?
you mean what are we using to write our programs? i'm learning java and i use eclipse
circusmidget
07-24-2010, 04:12 AM
What code editor are you guys using?
vim / notepad (yes, small projects).
samh16
07-24-2010, 04:19 AM
What code editor are you guys using?
Eclipse for android stuff, otherwise vim/textmate.
SuperDL
07-24-2010, 05:44 AM
Eclipse for android stuff, otherwise vim/textmate.
I just got gVim and how the hell do you use it?
Ripht
07-24-2010, 05:50 AM
C++/C#/C programmer over here. Currently at uni, did 2 years of games programming but there aren't enough jobs with good pay out there so switching over too normal application type programming.
SuperDL
07-25-2010, 04:00 AM
I just got gVim and how the hell do you use it?
Bump
samh16
07-25-2010, 05:54 AM
Bump
There's lots of tutorials out there, just google it.
There's also help docs built into vim. When you start it up, press the escape button, the press ":", then type help. Should get you the tutorials on how to use it.
What code editor are you guys using?
vim / notepad (yes, small projects).
yea vim and notepad seem to be everyone's favorite. I'm a software dev intern and the projects I work on make it impossible for a dev to get much of anything done with notepad and vim. I use eclipse at work for the awesome tools it provides... like class search, files search(with partial regular expressions), etc.
when you work with things that have thousands of files... it really gets annoying looking for them.
SuperDL
07-25-2010, 07:29 AM
There's lots of tutorials out there, just google it.
There's also help docs built into vim. When you start it up, press the escape button, the press ":", then type help. Should get you the tutorials on how to use it.
Yeah I'll have to look into it more when I have time.
Ripht
07-25-2010, 07:58 AM
I use visual studio, its really helpful and the intellisense program it uses is amazing at helping you program. I get it free from uni luckily
Buster McFats
08-01-2010, 07:28 AM
Are programming jobs really hurt by outsourcing as much as I hear?
I'm interested in programming and I'm not sure if it's something I should go back to school for or teach myself in my off time. I would like to work in the field, but also being able to develop your own programs and be an entrepreneur with low overhead has really got me interested.
ONpump17
08-01-2010, 07:33 AM
I hear that right now lots of companies are starting up in Toronto making apps for phones.
Nutella!
08-01-2010, 08:04 AM
Are programming jobs really hurt by outsourcing as much as I hear?
I'm interested in programming and I'm not sure if it's something I should go back to school for or teach myself in my off time. I would like to work in the field, but also being able to develop your own programs and be an entrepreneur with low overhead has really got me interested.
A lot of companies still want in house english speaking programmers.
Boatski
08-01-2010, 08:08 AM
I use visual studio, its really helpful and the intellisense program it uses is amazing at helping you program. I get it free from uni luckily
anyone going to college can get VS for free, along with other MS software
dreamspark.com
samh16
08-01-2010, 09:13 AM
Just found this on youtube : http://www.youtube.com/view_play_list?p=9D558D49CA734A02
Lectures on programming paradigms from Standford. There's tons of programming coursework on MIT opencourseware aswell if anybody's interested.
Buster McFats
08-01-2010, 09:31 AM
A lot of companies still want in house english speaking programmers.
That's what I figured... just wanted to make sure.
I've only ever taken 2 programming classes and those were in high school. I struggled quite a bit though. I don't know if it's cause I was lazy or because I was retarded.
Boatski
08-01-2010, 11:01 AM
Just found this on youtube : http://www.youtube.com/view_play_list?p=9D558D49CA734A02
Lectures on programming paradigms from Standford. There's tons of programming coursework on MIT opencourseware aswell if anybody's interested.
They have a lot of videos on iTunes U as well.
StudentDan
08-01-2010, 03:13 PM
What code editor are you guys using?
Been doing some c++, mainly use "Code::Blocks IDE" on linux and windows as it has everything I need and is free!
Natural.Lifter
08-01-2010, 07:12 PM
Since there are a few programmers on here why not create an app for Miscing? It could hold a number of copy pastas and you just have to drag and drop it into the posting input form.
No need. The best solution for this is to provide a separate mobile stylesheet… which BB.com has already done. :)
-N.L
ausluke
08-01-2010, 09:14 PM
import java.util.Scanner;
public class OddOrEven {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
int input;
Scanner scanner = new Scanner(System.in);
System.out.println("Welcome to Odd or Even ");
System.out.println("Please enter a positive integer ");
input = scanner.nextInt();
if(input % 2==0) {
System.out.println("Integer is an even number");
}
else if (input % 2==1) {
System.out.println("Integer is an odd number");
}
while (input >0);
}
}
total noob at java, but obviously its just giving me the same message over and over because once you're entered the input it just keeps using that value in the loop.
anyone know how i can get it too ask the user for another value within the loop? or am should i be using a for while loop for this kind of situation?
any help would be greatly appreciated! :P
EasTexan
08-01-2010, 09:44 PM
You could initialize 'input' (something greater than 0 obviously) and then stick the 'input = scanner.nextInt()' and everything below it in your while loop. That should work.
ausluke
08-01-2010, 10:43 PM
import java.util.Random;
import java.util.Scanner;
public class GuessingGame {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Random gen = new Random();
Scanner scanner = new Scanner(System.in);
int remaining;
int chances;
int guess;
int rand = gen.nextInt(10);
rand++;
System.out.println("Welcome to guesser!");
System.out.println("How many chances do you want?: ");
chances = scanner.nextInt();
moved this: System.out.println("Enter a guess: ");
guess = scanner.nextInt();
for (int i = 0; i < chances; i++ ) {
to here: System.out.println("Enter a guess: ");
guess = scanner.nextInt();
if (guess == rand) {
System.out.println("Correct!");
System.exit(0);
}
else {
remaining = chances - i -1;
System.out.println("Inorrect, you have" +remaining + "guesses left");
}
}
System.out.println("The number was: " + rand);
}
}
same problem as before, because im asking for the input number before the loop it just resuses that value over and over! how do I put the scanner into the loop? doesn't seem to let me.
edit: fixed it by doing the bolded, there goes an hour of my time over something so simple and easy :(
circusmidget
08-01-2010, 11:03 PM
How's about this...
while (1 == 1)
{
System.out.print("Please enter a positive integer: ");
try
{
input = scanner.nextInt();
}
catch (InputMismatchException e)
{
System.out.println("That was not a positive integer.");
scanner.nextLine();
continue;
}
if (input < 1)
{
System.out.println("That was not a positive integer.");
continue;
}
if (input % 2 == 0)
{
System.out.println("That integer was even.");
}
else
{
System.out.println("That integer was odd");
}
}
import java.util.Scanner;
public class OddOrEven {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
int input;
Scanner scanner = new Scanner(System.in);
System.out.println("Welcome to Odd or Even ");
System.out.println("Please enter a positive integer ");
input = scanner.nextInt();
if(input % 2==0) {
System.out.println("Integer is an even number");
}
else if (input % 2==1) {
System.out.println("Integer is an odd number");
}
while (input >0);
}
}
total noob at java, but obviously its just giving me the same message over and over because once you're entered the input it just keeps using that value in the loop.
anyone know how i can get it too ask the user for another value within the loop? or am should i be using a for while loop for this kind of situation?
any help would be greatly appreciated! :P
Bryce.MacLaren
08-02-2010, 08:08 AM
can anyone tell me what I need to learn to make desktop applications
do i start with visuall C++? c#?
samh16
08-02-2010, 08:23 AM
can anyone tell me what I need to learn to make desktop applications
do i start with visuall C++? c#?
That's a pretty impossible question to answer. There's no definitive language you should use to make desktop programs. They all have their own pro's and cons, you've gotta make a decision based on what you're looking to develop.
Anything more specific than "desktop applications"?
Have you any programmed before?
Buster McFats
08-02-2010, 03:28 PM
I want to start teaching myself to program. Would I benefit more by taking a class or starting to teach myself? If I should just teach myself, what's a good starting point? I've programmed in C++ before, but that was about 7 years ago, so I'm more or less a complete newbie.
edit: I'd also like to start teaching myself some web design too.
Buster McFats
08-02-2010, 09:07 PM
I want to start teaching myself to program. Would I benefit more by taking a class or starting to teach myself? If I should just teach myself, what's a good starting point? I've programmed in C++ before, but that was about 7 years ago, so I'm more or less a complete newbie.
edit: I'd also like to start teaching myself some web design too.
bump before sleep...
samh16
08-03-2010, 01:57 AM
bump before sleep...
It depends on whether or not you're able to learn by yourself, or feel more comfortable in a classroom enviornment. Everything they teach you in college is available on the web. Start with C, google for tutorials, and practice making programs and writing code. That's the only way to properly learn how to program. You can't read something and assume you can do it, you've gotta actually put it into practice.
Boatski
08-03-2010, 05:54 AM
One of my comp science this fall is using Java, I'm hoping it isn't starting with Hello World terminal stuff :( If so, I'll be bored outta my mind.
samh16
08-03-2010, 07:11 AM
One of my comp science this fall is using Java, I'm hoping it isn't starting with Hello World terminal stuff :( If so, I'll be bored outta my mind.
Just work ahead of everbody else / study for a different class :)
Bryce.MacLaren
08-03-2010, 07:55 AM
sorry for the vagueness - I just have C, Java, matlab and MicroC experiance from college doing engineering. However I've always wanted to make small simple desktop apps such as real time data plotters that could read data from a virtual com port assinged to a USB input.
something to get started with. I know the visual studio site has forums and guides for windows based application development.
I dunno i'd try to learn during the very little free time i have with work and all.
ishy4life
08-03-2010, 02:58 PM
Hai Guise!
I'm a developer, main languages are C# and Delphi. Did Java a long time ago in college. I do a lot of ASP.Net web svcs also.
In the process of learning GWT, seems decent enough. Anyone have experience with it?
OraOcon
08-25-2010, 09:48 AM
sorry for the vagueness - I just have C, Java, matlab and MicroC experiance from college doing engineering. However I've always wanted to make small simple desktop apps such as real time data plotters that could read data from a virtual com port assinged to a USB input.
something to get started with. I know the visual studio site has forums and guides for windows based application development.
I dunno i'd try to learn during the very little free time i have with work and all.
Haha. This is about the synopsis of languages I know. I want to get into some fun stuff like asp.net or c++. We use java and c++ here at work. So between knowing Java and C, I can understand the c++. SQL is not really too hard, have semi-taught myself and it has become very useful.
I never coded in a job, always been that IT/Business liaison, just coded projects and for fun. Thinking about doing some more schooling to get a better understanding of the SQL communication with the database using c++ and java.
ausluke
09-05-2010, 07:59 PM
ok complete noob question here but how do i make a jtextfield input to be an integer?
heres a few sections of code
private JTextField petIDTextField;
fieldsPanel.add(new JLabel("Pet ID:"));
petIDTextField = new JTextField(20);
fieldsPanel.add(petIDTextField);
and obviously im getting an error here as a data mismatch
private void save (){
Pet Pet = new Pet();
int ID = petIDTextField.getText();
reps to whoever trys helping
ok complete noob question here but how do i make a jtextfield input to be an integer?
heres a few sections of code
private JTextField petIDTextField;
fieldsPanel.add(new JLabel("Pet ID:"));
petIDTextField = new JTextField(20);
fieldsPanel.add(petIDTextField);
and obviously im getting an error here as a data mismatch
private void save (){
Pet Pet = new Pet();
int ID = petIDTextField.getText();
reps to whoever trys helping
what does system.out.println(petIDTextField.getText()); print out? if it's a number... you might just need to cast it and change the data type to be Integer.
Integer ID = (Integer)petIDTextField.getText();
Ace Thedics
09-05-2010, 10:44 PM
Where was this thread when I was taking java?! This should be of plenty help in a few weeks.
vietcong666
09-06-2010, 01:06 AM
never knew this thread existed. i do a lot of development with c++ so I can probably help people with c++ related things.
SkinnyFatPhil
09-28-2010, 10:28 PM
Anyone who can help with some code? Super new at this, taking first programming class.
I was given code that makes the LEDs loop going right to left. (black) line)
I'm trying to modify it so they light up from outside to in (grey line), then keep looping back and forth. I posted the code I was given, and what I changed it to. Can someone tell me if it will work the way I want it to? (Only get this class twice a week, can't test again for a few days)
http://imgur.com/MJ8zk.jpg
// Project 5 - LED Chase Effect
// Create array for LED pins
byte ledPin[] = {4, 5, 6, 7, 8, 9, 10, 11, 12, 13};
int ledDelay(65); // delay between changes
int direction = 1;
int currentLED = 0;
unsigned long changeTime;
void setup() {
// set all pins to output
for (int x=0; x<10; x++) {
pinMode(ledPin[x], OUTPUT); }
changeTime = millis();
}
void loop() {
// if it has been ledDelay ms since last change
if ((millis() - changeTime) > ledDelay) {
changeLED();
changeTime = millis();
}
}
void changeLED() {
// turn off all LED's
for (int x=0; x<10; x++) {
digitalWrite(ledPin[x], LOW);
}
// turn on the current LED
digitalWrite(ledPin[currentLED], HIGH);
// increment by the direction value
currentLED += direction;
// change direction if we reach the end
if (currentLED == 9) {direction = -1;}
if (currentLED == 0) {direction = 1;}
}
MODIFIED
// Create array for LED pins
byte ledPin[] = {4, 5, 6, 7, 8};
int ledDelay(65); // delay between changes
int direction = 1;
int currentLED = 0;
unsigned long changeTime;
// Create array for LED pins
byte ledPin2[] = {13, 12, 11, 10, 9};
int ledDelay2(65); // delay between changes
int direction2 = 1;
int currentLED2 = 0;
unsigned long changeTime2;
void setup() {
// set all pins to output
for (int x=0; x<10; x++) {
pinMode(ledPin[x], OUTPUT); }
changeTime = millis();
// set all pins to output
for (int x=0; x<10; x++) {
pinMode(ledPin2[x], OUTPUT); }
changeTime2 = millis();
}
void loop() {
// if it has been ledDelay ms since last change
if ((millis() - changeTime) > ledDelay) {
changeLED();
changeTime = millis();
}
if ((millis() - changeTime) > ledDelay) {
changeLED();
changeTime = millis();
}
}
void changeLED() {
// turn off all LED's
for (int x=0; x<10; x++) {
digitalWrite(ledPin[x], LOW);
}
for (int x=0; x<10; x++) {
digitalWrite(ledPin2[x], LOW);
}
// turn on the current LED
digitalWrite(ledPin[currentLED], HIGH);
digitalWrite(ledPin2[currentLED], HIGH);
// increment by the direction value
currentLED += direction;
// change direction if we reach the end
if (currentLED == 4) {direction = -1;}
if (currentLED == 0) {direction = 1;}
// increment by the direction value
currentLED2 += direction;
// change direction if we reach the end
if (currentLED2 == 9) {direction = -1;}
if (currentLED2 == 5) {direction = 1;}
}
Resonator
10-01-2010, 11:03 PM
ok complete noob question here but how do i make a jtextfield input to be an integer?
heres a few sections of code
private JTextField petIDTextField;
fieldsPanel.add(new JLabel("Pet ID:"));
petIDTextField = new JTextField(20);
fieldsPanel.add(petIDTextField);
and obviously im getting an error here as a data mismatch
private void save (){
Pet Pet = new Pet();
int ID = petIDTextField.getText();
reps to whoever trys helping
Try this:
int ID = Integer.parseInt(petIDTextField.getText());
deadforaminute
11-10-2010, 06:18 PM
for anyone who is familiar with writing java applets...
i am trying to use a .gif file that is hosted at school
how can i use the image file from my applet? i think there is a security problem
when doing a regular java program i use this
Image coolface = Toolkit.getDefaultToolkit().getImage("coolface.jpg");
doesn't work for applet please help!
i hosted the file at school and did this
URL url = new URL("http://blahblabhlah");
Image coolface = Toolkit.getDefaultToolkit().getImage(url);
still doesnt work...
for anyone who is familiar with writing java applets...
i am trying to use a .gif file that is hosted at school
how can i use the image file from my applet? i think there is a security problem
when doing a regular java program i use this
Image coolface = Toolkit.getDefaultToolkit().getImage("coolface.jpg");
doesn't work for applet please help!
i hosted the file at school and did this
URL url = new URL("http://blahblabhlah");
Image coolface = Toolkit.getDefaultToolkit().getImage(url);
still doesnt work...
sounds like you need something that can actually make an http request and get http responses. Not sure what java mechanisms allow that. Simply defining a URL won't work...
Nutella!
11-10-2010, 07:44 PM
for anyone who is familiar with writing java applets...
i am trying to use a .gif file that is hosted at school
how can i use the image file from my applet? i think there is a security problem
when doing a regular java program i use this
Image coolface = Toolkit.getDefaultToolkit().getImage("coolface.jpg");
doesn't work for applet please help!
i hosted the file at school and did this
URL url = new URL("http://blahblabhlah");
Image coolface = Toolkit.getDefaultToolkit().getImage(url);
still doesnt work...
Image coolface = getImage(new URL("http://blahblabhlah.com/coolface.gif"));
what you are trying to do is outside of applets I believe.
Boatski
11-10-2010, 08:34 PM
damn forgot all about this thread
deadforaminute
11-11-2010, 02:22 PM
Image coolface = getImage(new URL("http://blahblabhlah.com/coolface.gif"));
what you are trying to do is outside of applets I believe.
this throws a nullpointerexception...
i read somewhere that applets have access to all files in their same folder. so i put coolface in the same folder as the applet because i plan to do this anyway when i host the applet. coolface shows up. but now im having problems with my JPanel classes..
should i be using paintcomponent in a different way for an applet?
Phenom01
11-11-2010, 06:02 PM
anyone who wants to get a good career needs to learn Client/ Server Architecture. Start with C# and ADO.net. Extremely easy to learn, and you can find a job anywhere with these skills.
Bad Words
11-11-2010, 07:56 PM
anyone who wants to get a good career needs to learn Client/ Server Architecture. Start with C# and ADO.net. Extremely easy to learn, and you can find a job anywhere with these skills.
Help a broke engineering student and yourself, by using "AOA001" discount code...
Hmm...
(I actually use C# at work, and used to use ADO.NET)
deadforaminute
11-16-2010, 07:01 PM
im making pacman with java and need to find the shortest distance between pacman and the ghosts.. can somebody tell me an easy way to do this?
we are learning about trees. would a tree be usefull in this situation somehow?
anybody know of a good programming forum that might help me with this question?
EasTexan
11-16-2010, 07:21 PM
http://en.wikipedia.org/wiki/Antiobjects
Read that, then each ghost only requires a simple algorithm for moving toward pacman.
Spetsnazos
11-17-2010, 02:26 AM
Cool.
Back on topic: Anybody in the middle of any projects/assignments atm?
yes creating a lap simulation program using MatLab.
Having one hell of a time...Trying to see how I can redo a certain loop...
Boatski
11-17-2010, 08:59 AM
I gotta come up with a project to write in java. Some have suggested a simple IM client. Not sure what I'll do yet. I got a month til it's due lol
BigV11
11-28-2010, 05:37 PM
Need some C/C++ programming help for reps.
The problem is: Write a program that asks the user to enter a list of integers. The program is to determine the largest value entered and the number of times it was entered.
I'm having some trouble with it and some help would be great.
Bad Words
11-28-2010, 05:40 PM
Need some C/C++ programming help for reps.
The problem is: Write a program that asks the user to enter a list of integers. The program is to determine the largest value entered and the number of times it was entered.
I'm having some trouble with it and some help would be great.
This can easily be done in O(n) by having one variable store the current largest, then walk through the list comparing each item to the current largest, and another variable for the count that resets to 1 each time a new largest is found.
BigV11
11-28-2010, 05:54 PM
This can easily be done in O(n) by having one variable store the current largest, then walk through the list comparing each item to the current largest, and another variable for the count that resets to 1 each time a new largest is found.
Ok, can you explain a little more on how to exactly do that? Thanks.
Bad Words
11-28-2010, 05:59 PM
Ok, can you explain a little more on how to exactly do that? Thanks.
What part are you having difficulty with? You can read the variables with cin << and cast them to integers, have a loop to read each one with a method of escape or a preset number of items (for loop in that case).
So before the loop starts is where you would define your variables, then on the first iteration just set the counter to 1 and the largest to whatever the value of the first is.
After you've escaped the loop, print out the values of your variables.
ausurfer
11-28-2010, 06:41 PM
Ok, can you explain a little more on how to exactly do that? Thanks.
Have these variables:
highNum
highCount
then basically set a loop going through the array..
for(i=0; i<10; i++)
then have an if statement to check if the current number in the array is the same as the var highNum
if(numbers[i] == highNum)
if it is then you want to increment the count
HighCount++;
then an if else to satisfy if it isn't the same
else if(numbers[i] > maxNum)
then just declare maxNum to the current number if it's higher ..
maxNum = numbers[i];
also reset the count
highCount = 1;
then once you have iterated through the loop you can just print the variables maxNum and highCount..
Phenom01
11-28-2010, 06:58 PM
heres a quick pseudo code:
int currentNum, entries;
int previousNum = 0;
int count = 0;
promt "Enter amount of digits"
Get amount of digits
for (int i =0; i < entries; i++)
{
promt "Enter number: "
set currentNum = value;
if( currentNum > previous)
{
currentNum = previous;
count++;
}
}
EDIT: If you decide to use an array you can sort out the array and the last element would be the highest number
Spetsnazos
11-28-2010, 07:14 PM
subbed
I can help with VBA and MatLab. I dont know the syntax for C++ anymore but I can help program outside of syntax :) lol
EasTexan
11-28-2010, 08:46 PM
Have to code an I/O driver (fake I/O from a file) that implements an elevator type algorithm... waited until tonight to start, it's due tomorrow morning. Damn thanksgiving break!!
deadforaminute
12-21-2010, 11:42 PM
still working on my java pacman ...
ive got my ghosts moving and the whole level setup and working. keeps your score, everything works except the ghost / pacman interactions are sketchy. im checking if the ghost and pacman are in the same coordinates based on a coordinate system created from a two dimensional array that contains x's for walls and spaces for blank space.
the problem is that pacman and the ghosts move at different speeds so there are times when they can walk right past eachother without hitting eachother...
id like to find a way to detect pacman and ghosts touching eachother that is based on a pixel range of the image..
any ideas?
also i was wondering if anyone on here has ever used python for anything? ive just started playing with it today and im blown away .. its the simplest programming language i have ever seen... little kids could write python programs
samh16
01-31-2011, 05:27 AM
bump
Boatski
01-31-2011, 05:36 AM
You guys working on anything?
I'm trying to get my job to let me write a program that'll keep track of barcodes for them. They said one place wanted $12k to do it. I lol'd and told em I'd do it on the cheap.
Also, do any of you know of a service that will let me query for an album and see how many songs are on that album? I want to write something so I can see what albums in my library are missing songs.
samh16
01-31-2011, 05:46 AM
You guys working on anything?
I'm trying to get my job to let me write a program that'll keep track of barcodes for them. They said one place wanted $12k to do it. I lol'd and told em I'd do it on the cheap.
Also, do any of you know of a service that will let me query for an album and see how many songs are on that album? I want to write something so I can see what albums in my library are missing songs.
Maybe play around with the API's of some online music sites and query them for album/artist details?
http://blog.programmableweb.com/2008/02/21/25-music-apis/
Lilluda_5
01-31-2011, 05:50 AM
Any informatics majors in here? I'm wondering on what the MISC's opinion is about that major. Is it worthwhile or should I just go for a CS degree?
Thanks.
Muckle_Ewe
01-31-2011, 06:17 AM
also i was wondering if anyone on here has ever used python for anything? ive just started playing with it today and im blown away .. its the simplest programming language i have ever seen... little kids could write python programs
Lol you've clearly never used Maple then... Literally just type what you want to do.
In on thread anyway.
Used Maple for a while, generally write code in such a way that it can be used with Compiler:-Compile so that it runs on the Microsofts internal C thing. (i.e. no in built maple functions used, all loops, if statements etc...)
Currently working on orbital dynamics problems in Matlab and about to start learning C++ on Wednesday at a programming seminar.
Any project euler folk here? I've solved 112 in Maple but think I could solve a fair bit more if I was profficient in another language, some of the problems are just out of Maples capability (as in, without running a program for hours)...
Boatski
01-31-2011, 06:52 AM
I started on Euler last week. Though, I've only done one lol.
Spetsnazos
01-31-2011, 01:28 PM
doing hella programming in MatLab could use help if there is anyone in here who knows the syntax
Muckle_Ewe
01-31-2011, 01:37 PM
doing hella programming in MatLab could use help if there is anyone in here who knows the syntax
Ok first question...
How do I get Matlab to use digits greater than 2^32?
Spetsnazos
01-31-2011, 01:50 PM
Ok first question...
How do I get Matlab to use digits greater than 2^32?
why would you ever need to have something like that...and doesnt it express it in scientific notation
xdestron
01-31-2011, 01:53 PM
Sup brahs, I'll try to help out where I can here. Im currently halfway thru a Master's in CS, currently taking Object Oriented Software Development. Ive taken quite a few Java classes and also overall programming language concept classes.
I might post a question or 2 myself =P
Cronoh
01-31-2011, 02:12 PM
sup brahs, self proclaimed (3 years working in industry professionally) php/mysql/javascript/css expert. Build stuff like amazon.com from the ground up. If you need any help with some php/database or front end stuff let me know. (Pro with jquery)
samh16
02-01-2011, 12:04 PM
sup brahs, self proclaimed (3 years working in industry professionally) php/mysql/javascript/css expert. Build stuff like amazon.com from the ground up. If you need any help with some php/database or front end stuff let me know. (Pro with jquery)
Any links to sites you've made/helped develop?
Muckle_Ewe
02-01-2011, 12:40 PM
why would you ever need to have something like that...and doesnt it express it in scientific notation
Project Euler problems. Can go as high as 2^64.
gatovolador
02-01-2011, 02:16 PM
anybody got an IOS experience? I'm unable to save data into the main context, and it's puzzling the **** out of me. Not being able to look at core data easily is tough!
Spetsnazos
02-01-2011, 08:44 PM
anybody got an IOS experience? I'm unable to save data into the main context, and it's puzzling the **** out of me. Not being able to look at core data easily is tough!
nice tri bike bro
communistpanda
02-01-2011, 09:29 PM
sup guys? currently a freshman in an accounting and computer information systems double major.
i know a little bit of python and html but that's all.
Boatski
02-02-2011, 07:49 AM
anybody got an IOS experience? I'm unable to save data into the main context, and it's puzzling the **** out of me. Not being able to look at core data easily is tough!
I've been reading through a book for it, but I'm not really experienced with it. Working with it is definitely different from the desktop.
A_Hard_Rain
02-02-2011, 09:22 AM
i want to make an iphone app, don't have that much experience with programming though. i've taken basic c++/c classes, a data structures class, and i'm taking an OOP class right now. no experience with graphics/audio stuff. gonna read up on the basics on the apple site, do you guys think i know enough basics or am i screwed?
gatovolador
02-02-2011, 11:12 AM
re ios just go through the tutorials. if you are ok/like ui stuff it's great. I've never been a ui guy so it's a pain
cabUK
02-04-2011, 09:15 AM
i want to make an iphone app, don't have that much experience with programming though. i've taken basic c++/c classes, a data structures class, and i'm taking an OOP class right now. no experience with graphics/audio stuff. gonna read up on the basics on the apple site, do you guys think i know enough basics or am i screwed?
Try the tutorials here.
http://www.dreamincode.net/forums/forum/128-iphone-development/
fcb1012
02-05-2011, 11:19 PM
in need of some c++ help, although it is a little to much. But would like some matlab help. Pretty much intro to matlab help with some small stuff. Let me know bros
samh16
02-06-2011, 03:05 AM
in need of some c++ help, although it is a little to much. But would like some matlab help. Pretty much intro to matlab help with some small stuff. Let me know bros
So C++ and Matlab?
Do you have a specific question are just looking for guides/tutorials?
Boatski
02-07-2011, 06:09 AM
Do any of you know any good resources for learninga bout heaps/stacks?
EasTexan
02-07-2011, 09:27 AM
Do any of you know any good resources for learninga bout heaps/stacks?
Youtube is a good start to get a grasp on the basic concepts.
xdestron
02-08-2011, 07:45 AM
Got a quick Java question... for one of my programming classes the instructor provided a pre-compiled .class file to use within our solution. I have the file saved to the same classpath as my solution file. However, when I reference the class.method() within my solution, my file will not recognize the class.
Does anyone know how to get this to recognize? Using eclipse if that makes a difference.
willgreenzilla
02-08-2011, 11:20 AM
I'm studying IT at the moment. I'm not an expert by any stretch of the imagination, but I have tinkered in the following languages (some more than others):
C, C++, Java, C#, Perl (dear gods, how I loathe), Python, M68k asm, x86 asm. I think that's it.
I've also tinkered with XHTML, CSS, XML (+DTD/W3C Schemas), PHP and SQL (my).
I'm working on learning Perl now for work... Lol... Good times! ;)
A_Hard_Rain
02-08-2011, 11:59 AM
Do any of you know any good resources for learninga bout heaps/stacks?
i've always found one of my old professors site pretty useful
http://cs.uah.edu/~rcoleman/CS221/Lists/StackSample.html
Boatski
02-08-2011, 05:57 PM
Got a quick Java question... for one of my programming classes the instructor provided a pre-compiled .class file to use within our solution. I have the file saved to the same classpath as my solution file. However, when I reference the class.method() within my solution, my file will not recognize the class.
Does anyone know how to get this to recognize? Using eclipse if that makes a difference.
Did you create an instance of that class before you call its method?
Opine
02-09-2011, 09:33 AM
Got a quick Java question... for one of my programming classes the instructor provided a pre-compiled .class file to use within our solution. I have the file saved to the same classpath as my solution file. However, when I reference the class.method() within my solution, my file will not recognize the class.
Does anyone know how to get this to recognize? Using eclipse if that makes a difference.
Only learning java also but I think unless it's a static (class) method you have to create an instance of the class.
e.g. Person xdestron = new Person;
Then you can say
e.g. xdestron.getAge();
or whatever method you have.
Boatski
02-09-2011, 09:55 AM
Only learning java also but I think unless it's a static (class) method you have to create an instance of the class.
e.g. Person xdestron = new Person();
Then you can say
e.g. xdestron.getAge();
or whatever method you have.
Fixed!
A_Hard_Rain
02-09-2011, 10:14 AM
you guys with CS degrees in the real world: are these classes like discrete structures and digital logic useful? just feels pretty unrelated, it's easy enough stuff though. made an XOR circuit yesterday in a lab, was pretty fun
Opine
02-09-2011, 06:52 PM
Fixed!
Thanks
I always forget that when i'm coding, fúck!
compile...
1 error found, line 12
aaaaaaarrrrrrgggghhhh !
EasTexan
02-09-2011, 07:02 PM
Taking a COBOL class, woo woo. :/ It's amazingly simple so far...
Boatski
02-09-2011, 07:24 PM
Thanks
I always forget that when i'm coding, fúck!
compile...
1 error found, line 12
aaaaaaarrrrrrgggghhhh !
Haha, we all forget something somewhere.
Taking a COBOL class, woo woo. :/ It's amazingly simple so far...
I'm sorry.
Discovered cocos2d. Stuff is really cool
Supadude
02-09-2011, 07:42 PM
you guys with CS degrees in the real world: are these classes like discrete structures and digital logic useful? just feels pretty unrelated, it's easy enough stuff though. made an XOR circuit yesterday in a lab, was pretty fun
It depends on what you do. Your university gives you a broad education, but most people specialize. You should at least be have a high level knowledge of the concepts. Questions about fundamentals have a tendency to show up on interview questions.
Supadude
02-09-2011, 07:46 PM
Got a quick Java question... for one of my programming classes the instructor provided a pre-compiled .class file to use within our solution. I have the file saved to the same classpath as my solution file. However, when I reference the class.method() within my solution, my file will not recognize the class.
Does anyone know how to get this to recognize? Using eclipse if that makes a difference.
I don't program in Java, but you probably have to import the class?
EasTexan
02-09-2011, 08:04 PM
I'm sorry.
Discovered cocos2d. Stuff is really cool
Haha.
I really want to get into app development for phones, I just have to find the time. I have a droid though so I'd start out on android.
Boatski
02-09-2011, 08:16 PM
Haha.
I really want to get into app development for phones, I just have to find the time. I have a droid though so I'd start out on android.
Mobile Development is the reason I own a Macbook and an iPad. Almost ready to go with this game, just need my friend who is an artist to get on board.
MiKey4
02-10-2011, 04:59 AM
Anyone know some good introductions to object-oriented programming? My friend once described it to me in such a bad way that I am forever confused at what is going on.
I do a lot of MATLAB which is just like a load of lines executed one after another, makes a lot of sense to me, so I can't imagine a different way of working.
Boatski
02-10-2011, 07:18 AM
You have a Car class. There are many types of Cars, which are objects. Every Car can have attributes or variables such as color, name, etc. Every Car can do something such as accelerate, stop, etc.
That's about as basic as you can get imo
Opine
02-10-2011, 07:25 AM
Anyone know some good introductions to object-oriented programming? My friend once described it to me in such a bad way that I am forever confused at what is going on.
I do a lot of MATLAB which is just like a load of lines executed one after another, makes a lot of sense to me, so I can't imagine a different way of working.
It's basically just re-using code that has already been written by yourself or someone else. You can write a method which you can call in several other different programs and use it without having to write the whole method each time. You just reference it.
e.g. you write a method called maxOfThree in a class called MyMath which finds the highest of 3 ints that you pass into it.
Now wherever you want to do that you can just type MyMath.maxOfThree(x, y, z) and it will return the largest of x, y or z. Instead of writing out the entire method everytime you want to use it.
Supadude
02-10-2011, 08:50 AM
It's basically just re-using code that has already been written by yourself or someone else. You can write a method which you can call in several other different programs and use it without having to write the whole method each time. You just reference it.
e.g. you write a method called maxOfThree in a class called MyMath which finds the highest of 3 ints that you pass into it.
Now wherever you want to do that you can just type MyMath.maxOfThree(x, y, z) and it will return the largest of x, y or z. Instead of writing out the entire method everytime you want to use it.
eh, theres a lot more to it than that
EasTexan
02-10-2011, 09:13 AM
To elaborate on what Boatski said:
You would have a car class with several attributes and methods. Generic attributes such as color, hp, 4WD/2WD, etc. Then, some methods to set and retrieve these attributes within the class.
So for example, sudo-code for a generic car class:
Car{
color = " ";
hp = 0;
4WD = T;
getColor()
getHP()
getWD()
getColor()
getHP()
getWD()
}
You could then use this generic class to instantiate (create) objects for specific vehicles without having to rewrite or set aside variables for every different car you wanted to create.
Example:
Car nissanTitan= new Car(); //Creates new car object named nissan that will contain all the attributes and methods from the Car class. It is an object.
Car fordRanger = new Car();
Car vwBeetle = new Car();
etc. This allows you to create many objects of the same type without having to write a lot of code. You would then use the methods within the class to set or retrieve the attributes for each specific car object. Ex. nissanTitan.setColor("Green") (calls method setColor within the nissanTitan object to set the "color" attribute to green.
I obviously didn't write out the methods and I omitted constructors, but maybe this will make the concept of objects a little more clear? I'm between classes and bored. Writing this up is a good way to kill time.
There is more to it than this obviously, but that's the basics. You can then go into encapsulation, polymorphism, inheritance, etc...
Opine
02-10-2011, 09:15 AM
eh, theres a lot more to it than that
Yeah creating classes and objects and stuff, but I'm only learning the concepts myself, and when you break it down to the simplest level it can be described as re-using code already written.
Supadude
02-10-2011, 09:23 AM
Yeah creating classes and objects and stuff, but I'm only learning the concepts myself, and when you break it down to the simplest level it can be described as re-using code already written.
I would describe it more of a shift to a different paradigm of thinking. You shift from programming in the language of the computer to the language of the problem. A higher level of abstraction allows you to ignore much more of the lower level details and concentrate on the algorithms instead.
Opine
02-10-2011, 10:56 AM
I would describe it more of a shift to a different paradigm of thinking. You shift from programming in the language of the computer to the language of the problem. A higher level of abstraction allows you to ignore much more of the lower level details and concentrate on the algorithms instead.
_GlgIoTFXwk&feature=related
nicely put, repped, just started taking an algorithms module this semester.
C411911
02-10-2011, 11:03 AM
I am just getting into Linux
What are some advantages you guys have gained learning Linux? I am just curious? We are using Fedora. I know this isn't really programming but related close enough.
Supadude
02-10-2011, 07:58 PM
I am just getting into Linux
What are some advantages you guys have gained learning Linux? I am just curious? We are using Fedora. I know this isn't really programming but related close enough.
You'll learn much more about how operating systems, hardware devices, and drivers work?
Linux is a very good programming environment and comes out of the box with tons of extremely useful tools and utilities.
Boatski
02-11-2011, 08:35 AM
Finally got a response from the ppl here at work on this software they need. It's looking promising. Hopefully they let me start developing this soon, what I do now is boring!
C411911
02-11-2011, 12:11 PM
stuck on this question its pretty easy for the average linux guy but I am a noob:
From the unit3 directory, create a file in your home directory called whos_on that contains the output of the who command
I believe in the current directory it would be who > whos_on
but how do I get it to the home directory? I have Googled but haven't found the answer
hitongirls
02-11-2011, 04:03 PM
Your home directory is denoted by the tilde (~) symbol. So how would you change your working direct to the home directory if the home direct is '~' (without the single quotes)?
But from your assignment it doesn't make it clear whether you need to change to your home directory first, or if you can just do everything from the unit3 directory.
Phenom01
02-11-2011, 07:22 PM
Finally got a response from the ppl here at work on this software they need. It's looking promising. Hopefully they let me start developing this soon, what I do now is boring!
What is your job title and what language do you use?
ezrafitch1990
02-11-2011, 07:51 PM
hey brahs i want to make an iphone app, have a guide but in the guide it says ill need to pay for developer status to be able to get the app onto my iphone. found a cracked version of the SDK but it's for firmware 3.1.2, wuld i need to get firmware specific iphone sdk? im on 4.2.1 on my 3g
circusmidget
02-11-2011, 07:57 PM
stuck on this question its pretty easy for the average linux guy but I am a noob:
From the unit3 directory, create a file in your home directory called whos_on that contains the output of the who command
I believe in the current directory it would be who > whos_on
but how do I get it to the home directory? I have Googled but haven't found the answer
who > ~/whos_on
A_Hard_Rain
02-14-2011, 09:36 AM
looking to get a co-op, this is what they're looking for
Requirements:
- Student pursuing a degree in Computer Science or Computer Engineering
- Interest in Linux and open source software
- Interest in C and/or Python programming on Linux
- Work well in a team environment
- Strong written and oral communication skills
Desired:
- Experience working in an open source development environment
- Experience using Linux
- Experience with C and/or Python programming on Linux
i've played around with linux some in the past, never programmed on it, can't imagine it's terribly different though. i've used C before, got that down. never used python though, but i can't imagine it's that different from any other language.
what do they mean by open source though? i need to sound like i know what i'm doing in my cover letter
samh16
02-14-2011, 09:59 AM
looking to get a co-op, this is what they're looking for
Requirements:
- Student pursuing a degree in Computer Science or Computer Engineering
- Interest in Linux and open source software
- Interest in C and/or Python programming on Linux
- Work well in a team environment
- Strong written and oral communication skills
Desired:
- Experience working in an open source development environment
- Experience using Linux
- Experience with C and/or Python programming on Linux
i've played around with linux some in the past, never programmed on it, can't imagine it's terribly different though. i've used C before, got that down. never used python though, but i can't imagine it's that different from any other language.
what do they mean by open source though? i need to sound like i know what i'm doing in my cover letter
Open source software. Pretty much code that is made publicly available. So if a program is classed as open source, you can find it's source code and do what you want with it. You can't if it's closed source.
http://en.wikipedia.org/wiki/Open_source
Boatski
02-14-2011, 11:03 AM
hey brahs i want to make an iphone app, have a guide but in the guide it says ill need to pay for developer status to be able to get the app onto my iphone. found a cracked version of the SDK but it's for firmware 3.1.2, wuld i need to get firmware specific iphone sdk? im on 4.2.1 on my 3g
Login, download a legit copy.
http://developer.apple.com/devcenter/ios/index.action
You only need to pay the $99 to put the app on your iphone or the app store.
samh16
02-14-2011, 01:00 PM
Finally got a response from the ppl here at work on this software they need. It's looking promising. Hopefully they let me start developing this soon, what I do now is boring!
What type of software is it brah? Are you a developer atm?
Boatski
02-14-2011, 01:03 PM
hey brahs i want to make an iphone app, have a guide but in the guide it says ill need to pay for developer status to be able to get the app onto my iphone. found a cracked version of the SDK but it's for firmware 3.1.2, wuld i need to get firmware specific iphone sdk? im on 4.2.1 on my 3g
What type of software is it brah? Are you a developer atm?
It's just a simple program that will store barcode information and track where those barcodes go. I work here part-time as Quality Control and go to school full-time.
They really need a way to track their inventory and I presented them with this solution.
samh16
02-14-2011, 01:07 PM
It's just a simple program that will store barcode information and track where those barcodes go. I work here part-time as Quality Control and go to school full-time.
They really need a way to track their inventory and I presented them with this solution.
I'm assuming it's not a software company?
Decided on what language / build environment you're gonna go with?
Boatski
02-14-2011, 01:11 PM
I'm assuming it's not a software company?
Decided on what language / build environment you're gonna go with?
It's an HVAC company. I'll probably go with Java. I gotta figure out how to implement an SQL database, but that shouldn't be too difficult.
I was hoping to get a reply on it today, but it'll probably be another month before I hear about it.
fcb1012
02-15-2011, 05:46 PM
bro's, need some matlab help. It is really more of intro matlab stuff. Stuck on two questions....anyone free to help?
Muckle_Ewe
02-15-2011, 06:11 PM
bro's, need some matlab help. It is really more of intro matlab stuff. Stuck on two questions....anyone free to help?
It's 2am, I'm fairly new to matlab and I'm nearly asleep but post your problem and if I know how to solve it I'll help.
fcb1012
02-15-2011, 06:20 PM
It's 2am, I'm fairly new to matlab and I'm nearly asleep but post your problem and if I know how to solve it I'll help.
first one:
generate x(n)=3cos(0.1*pi*n+pi/3)+2sin(0.5*pi*n) ; n=0:10
So, what I did at first was use a for loop, not sure if I even need to use a for loop:
for n=0:10 %but then not sure if x(0) can be done so start at 1?
x(n)=equation; %This is the error I get when I run it, something wrong when I put the %equation above in here
a=[num2str(x(n))];
disp(a)
end
A_Hard_Rain
02-15-2011, 06:22 PM
my experience with matlab is limited to putting matrices in and doing simple operations. and it still made me rage, good luck with that
Muckle_Ewe
02-15-2011, 06:35 PM
first one:
generate x(n)=3cos(0.1*pi*n+pi/3)+2sin(0.5*pi*n) ; n=0:10
So, what I did at first was use a for loop, not sure if I even need to use a for loop:
for n=0:10 %but then not sure if x(0) can be done so start at 1?
x(n)=equation; %This is the error I get when I run it, something wrong when I put the %equation above in here
a=[num2str(x(n))];
disp(a)
end
Probably can be done without a for loop but I'm on my iPod and can't test anything so I'll play it safe...
x=[];
for n=0:10
x = [x equation]
end;
Remember the * between the 3 and cos and 2 and the sin
EDIT: changed loop
EDIT2: just realised this might not do exactly what the problem states (x(1) would be equation with n=0 for ex) but If thread us still up in morning i can do it in matlab.
Muckle_Ewe
02-15-2011, 06:41 PM
Another way is to do...
x=[1:11] (can matlab start indexing at 0? Can't remember of top of my head)
Then use the . for listable operations (though I think it will be anyway)
So it might be...
x = equation
Where you replace n by x(: )-1
(hugely unsure if that would work, dont think it will but its hard to do this stuff without matlab in front of me, if not that than something similar can be put together.)
fcb1012
02-15-2011, 07:01 PM
Another way is to do...
x=[1:11] (can matlab start indexing at 0? Can't remember of top of my head)
Then use the . for listable operations (though I think it will be anyway)
So it might be...
x = equation
Where you replace n by x(: )-1
(hugely unsure if that would work, dont think it will but its hard to do this stuff without matlab in front of me, if not that than something similar can be put together.)
Yea, that is why I stated to start at 1 because dont think it can start at 0. I have put things in but the error I remember getting(at school) was an error with my equation. Never stated what the reason was, just had my equation in red. Maybe I am entering it in incorrectly but I just input the equation in
x(n)=3*cos(0.1*pi*n+pi/3) + 2*sin(0.5*pi*n);
fcb1012
02-16-2011, 09:07 AM
I am going to try to take
for n = 1:10;
x = 3*cos(0.1*pi*n+pi/3) + 2*sin(0.5*pi*n);
Not sure if it will work.
Also, my other problem:
Plot real valued exponential sequence x(n)=0.9^n u(n) ; n=0:10
My code:
for loop
for n=1:10
x(n)=0.9^n*u(n);
Not sure if it correct, I think I would need to create matrix to store values of n and there values of x(n) and for loop to store the values and plot it. Anyone help?
Muckle_Ewe
02-16-2011, 10:13 AM
I am going to try to take
for n = 1:10;
x = 3*cos(0.1*pi*n+pi/3) + 2*sin(0.5*pi*n);
Not sure if it will work.
Also, my other problem:
Plot real valued exponential sequence x(n)=0.9^n u(n) ; n=0:10
My code:
for loop
for n=1:10
x(n)=0.9^n*u(n);
Not sure if it correct, I think I would need to create matrix to store values of n and there values of x(n) and for loop to store the values and plot it. Anyone help?
Can you copy and paste the EXACT code you're using. The above one doesn't work since u is not defined and you don't have and end for example.
In the first code you posted...
for n = 1:10;
x = 3*cos(0.1*pi*n+pi/3) + 2*sin(0.5*pi*n);
end
This will only produce one output value since it redefines x at every stage of the loop.
fcb1012
02-16-2011, 11:45 AM
Can you copy and paste the EXACT code you're using. The above one doesn't work since u is not defined and you don't have and end for example.
In the first code you posted...
for n = 1:10;
x = 3*cos(0.1*pi*n+pi/3) + 2*sin(0.5*pi*n);
end
This will only produce one output value since it redefines x at every stage of the loop.
For the bolded, the second question I posted, I am not sure about my code because of the u(n). I am confused on what this is for, as posted in my question.
For the first question I posted. I used x(n) = equation (above) but I get an error on my equation. I know x= will not work for what i did as I need n to run through.
Muckle_Ewe
02-16-2011, 12:36 PM
For the bolded, the second question I posted, I am not sure about my code because of the u(n). I am confused on what this is for, as posted in my question.
For the first question I posted. I used x(n) = equation (above) but I get an error on my equation. I know x= will not work for what i did as I need n to run through.
Well I don't think I can help you with that one as unless u(n) is just exp(n) I'm not sure what it could stand for. But if you figure it out then just create 2 vectors, one being [1:10] and the other your function then plot them against each other.
fcb1012
02-16-2011, 06:30 PM
Well I don't think I can help you with that one as unless u(n) is just exp(n) I'm not sure what it could stand for. But if you figure it out then just create 2 vectors, one being [1:10] and the other your function then plot them against each other.
Got it all worked out bro.
shroomdizzle
02-16-2011, 07:55 PM
i wanna start programming whats the best way to start? can you find stuff on the internet? how do you choose a language?
EasTexan
02-16-2011, 07:58 PM
i wanna start programming whats the best way to start? can you find stuff on the internet? how do you choose a language?
Sure can. Hit up youtube for tutorials to get started.
shroomdizzle
02-16-2011, 08:03 PM
well i figured that brah lol i just want to know what to look for to get started on
A_Hard_Rain
02-16-2011, 08:10 PM
i wanna start programming whats the best way to start? can you find stuff on the internet? how do you choose a language?
are you in college? there are usually intro to programming classes. best way to learn imo, teaching yourself online can suck
shroomdizzle
02-16-2011, 08:22 PM
Senior in HS brah i just wanna do some poking around and see what its about you know
fcb1012
02-16-2011, 08:48 PM
Senior in HS brah i just wanna do some poking around and see what its about you know
I started in c++ and in the major I am in I have taken two courses with c++ and another still to take. The basics and intro will be fun, then once you get into pointers, classes etc it can get tougher and so on.
fcb1012
02-16-2011, 08:50 PM
If c++ is something you would like to try, cplusplus .com is a great site to learn.
http://www.cplusplus.com/doc/tutorial/
Boatski
02-16-2011, 09:03 PM
I started in c++ and in the major I am in I have taken two courses with c++ and another still to take. The basics and intro will be fun, then once you get into pointers, classes etc it can get tougher and so on.
pfft pointers and classes are easy!
Supadude
02-16-2011, 09:23 PM
pfft pointers and classes are easy!
so is X86 Assembly
fcb1012
02-16-2011, 09:37 PM
pfft pointers and classes are easy!
not when you first learn them smartass. Can be very confusing until you code and code using them.
Boatski
02-17-2011, 08:02 AM
not when you first learn them smartass. Can be very confusing until you code and code using them.
You didn't learn to ride a bike by reading a book on HOW to ride a bike did you?
No, you got on the bike and tried riding it yourself.
The same goes for many other things.
Variables and loops "can be very confusing until you code and code using them".
erftbll81
02-17-2011, 12:33 PM
You didn't learn to ride a bike by reading a book on HOW to ride a bike did you?
No, you got on the bike and tried riding it yourself.
The same goes for many other things.
Variables and loops "can be very confusing until you code and code using them".
its true, variables loops and classes are easy as ****, but the first time i looked at them it was confusing as ****. Its not the easiest thing to understand the first time you are exposed to it.
Tunes
02-17-2011, 03:23 PM
Hey guys,
This might be a bit of a stretch but I will ask. I am looking to turn on 802.11 PSM (in code) on my HTC Magic running 2.2. I've been running some tests where the wifi radio should be going to sleep, but it is not.
Reggie20x6
02-18-2011, 08:44 AM
Would any of you say that it would be worth going to a technical school as an avenue to getting into the IT field? Or is anything less than a 4-year degree worthless?
I have a Bachelor's and an MBA, but neither are related to computers.
I don't know what my dream job would be, but I know that not being in an office is something I continually keep coming back to. I know IT is an avenue that is a lot easier to do out of the house, so I'm definitely wanting to throw myself into it.
Thanks.
samh16
02-20-2011, 08:51 AM
Would any of you say that it would be worth going to a technical school as an avenue to getting into the IT field? Or is anything less than a 4-year degree worthless?
I have a Bachelor's and an MBA, but neither are related to computers.
I don't know what my dream job would be, but I know that not being in an office is something I continually keep coming back to. I know IT is an avenue that is a lot easier to do out of the house, so I'm definitely wanting to throw myself into it.
Thanks.
There are tons of different area's within the 'IT' field. Have you any specific interest within IT?
If not being in an office is a big priority, then I don't think IT is gonna suit you too much. A lot of IT work is done from an office, especially if you're working for a company. If you go freelance, then you can do stuff from home, and I'm sure there are places that would let you work from home, but I'd imagine the majority would want you in an office with co-workers working on similar projects.
Ace Thedics
02-20-2011, 10:07 AM
Can anyone here program well in Java?
$100...pm me only if srs...don't want a flake
kevin3636
02-20-2011, 08:36 PM
ttt
MiKey4
02-21-2011, 12:31 AM
To elaborate on what Boatski said:
You would have a car class with several attributes and methods. Generic attributes such as color, hp, 4WD/2WD, etc. Then, some methods to set and retrieve these attributes within the class.
So for example, sudo-code for a generic car class:
Car{
color = " ";
hp = 0;
4WD = T;
getColor()
getHP()
getWD()
getColor()
getHP()
getWD()
}
You could then use this generic class to instantiate (create) objects for specific vehicles without having to rewrite or set aside variables for every different car you wanted to create.
Example:
Car nissanTitan= new Car(); //Creates new car object named nissan that will contain all the attributes and methods from the Car class. It is an object.
Car fordRanger = new Car();
Car vwBeetle = new Car();
etc. This allows you to create many objects of the same type without having to write a lot of code. You would then use the methods within the class to set or retrieve the attributes for each specific car object. Ex. nissanTitan.setColor("Green") (calls method setColor within the nissanTitan object to set the "color" attribute to green.
I obviously didn't write out the methods and I omitted constructors, but maybe this will make the concept of objects a little more clear? I'm between classes and bored. Writing this up is a good way to kill time.
There is more to it than this obviously, but that's the basics. You can then go into encapsulation, polymorphism, inheritance, etc...
Cheers. I think I need to practice it in real life. Are there any books/online tutorials you can recommend, and any way I can actually practice coding without having to buy an expensive compiler?
Muckle_Ewe
02-21-2011, 05:27 AM
Cheers. I think I need to practice it in real life. Are there any books/online tutorials you can recommend, and any way I can actually practice coding without having to buy an expensive compiler?
My laptops 10 years old and I can still program with C++, Matlab, etc on it. Just torrent the software (or buy it if you're a student, C++ is free though), and use it on your laptop.
If you wan't to get into heavy programming you'll probably need something powerful (e.g. if you want to say, simulate the evolution of the solar system), but you should be fine for learning stuff on a laptop.
Edit: Just saw you said compiler, thought you said computer lol.
Torrent man, else if you are a student you can get most programming stuff for really cheap.
Boatski
02-21-2011, 05:27 AM
Cheers. I think I need to practice it in real life. Are there any books/online tutorials you can recommend, and any way I can actually practice coding without having to buy an expensive compiler?
Java:
http://www.eclipse.org/
Also download the JDK
C++:
http://www.codeblocks.org/
Download the mingw version to install the compiler
What do you guys think of MS Visual C++ 2010 Express? I've been using it to teach myself C++ for a couple of weeks now and everything seems pretty straight forward, but I'm wondering if it's the best program to use?
C++ is the first language I'm learning, I was told that would be the best way to go if I want to be a software engineer.
EasTexan
02-21-2011, 07:14 AM
Cheers. I think I need to practice it in real life. Are there any books/online tutorials you can recommend, and any way I can actually practice coding without having to buy an expensive compiler?
I just realized my example has two sets of 'get' methods. Should be a set of 'get' methods and a set of 'set' methods...
Boatski hooked you up. My program centers around java so that is what I'm most familiar with. Java JDK and your favorite IDE will work. As for examples or books, the only books I've used are a textbook for a java class I took and a data structures class, but I'm sure there are better resources out there that focus more specifically on OOP. I don't have experience with any.
Boatski
02-21-2011, 07:18 AM
I just realized my example has two sets of 'get' methods. Should be a set of 'get' methods and a set of 'set' methods...
Haha, I was wondering when you were going to notice that.
rektt
02-21-2011, 07:00 PM
I'm trying to make a BMI calculator in VB for my intro to software development class I've been doing fine up until this point.
The whole "ByVal and ByRef" is like Chinese to me. Can anyone one look at this and tell me what I did wrong?
Thanks
Module Module1
Sub Main()
'Program: Chapter 3 Question 6
'Programmer: Evan Smith
'Date: February 21, 2011
'Description: Computes a person's BMI using the
'person's height and weight.
'Declaration
Dim decHeight As Decimal = 0
Dim decWeight As Decimal = 0
'Input
ShowIntro()
getHeight(decHeight)
getWeight(decWeight)
'Processes
showBMI(decHeight, decWeight)
showTermination()
End Sub
Private Sub showIntro()
Console.WriteLine("Hey! Let us see what your BMI is today! ;)")
Console.WriteLine()
End Sub
Private Sub getHeight(ByVal decHeight As Decimal)
Console.Write("Enter your height in inches ")
decHeight = CDec(Console.ReadLine())
End Sub
Private Sub getWeight(ByVal decWeight As Decimal)
Console.Write("Enter your weight in pounds ")
decWeight = CDec(Console.ReadLine())
End Sub
Private Sub showBMI(ByVal decHeight As Decimal, ByVal decWeight As Decimal)
Dim DecBMI As Decimal = 0
DecBMI = decHeight + decWeight
Console.WriteLine("Your BMI is " & DecBMI)
End Sub
Private Sub showTermination()
Console.WriteLine()
Console.WriteLine("Press the enter key to close the program")
Console.Read()
End Sub
End Module
C411911
02-22-2011, 03:43 PM
What do you guys think of MS Visual C++ 2010 Express? I've been using it to teach myself C++ for a couple of weeks now and everything seems pretty straight forward, but I'm wondering if it's the best program to use?
C++ is the first language I'm learning, I was told that would be the best way to go if I want to be a software engineer.
That will work
I personally use Dev C++
bbreader
02-22-2011, 07:15 PM
rektt,
See if this makes difference:
Private Sub getHeight()
Console.Write("Enter your height in inches ")
decHeight = CDec(Console.ReadLine())
End Sub
Private Sub getWeight()
Console.Write("Enter your weight in pounds ")
decWeight = CDec(Console.ReadLine())
End Sub
bbreader
02-22-2011, 07:18 PM
Also read up about ByVal and ByRef in MSDN library notes as those are usually pretty good at explaining stuff.
I would suggest that you learn C# instead of VB.net . VB is easy in beginning but is painful when things get complex or advanced.
fcb1012
02-23-2011, 10:33 PM
edit
java568
02-24-2011, 12:10 AM
c++ help with a stack. I have all the functions written except the max/min/peek. Need some help.
struct Node
{
Node* next;
Node* previous;
int info;
}
class Stack
{
private:
Node* top;
public:
stack,push,pop,top,isempty,isfull,
size,makeempty,max,min,peek
}
Needing help with the max: int Max() const; , int Min() const, and the int Peek(int x) const.
Peek: returns stack level x levels down from top of stack.
Max/min finds max and min in stack without modifying stack.
max/min = go through the nodes with a while loop (either by incrementing and checking against size or just by checking that the node next pointer doesn't equal null) and then constantly check if the info is lower/greater than whatever was previously recorded as the max/min
peek = while x > 0 pop from the stack and x-- then return stack
bbreader
02-24-2011, 06:00 AM
fcb1012: In addition to what's been said above, check the Link List Sort algorithm. In your function create temp variables to store position of current Max value node. Compare it to the node->next.
fcb1012
02-24-2011, 10:24 AM
Got it. Removing code
bbreader
02-24-2011, 03:45 PM
probably something like this:
peek(int x)
{
// check x
if(x<0 || x>Size()-1) return 0;
tmp=top;
// get value at index x-1,
for (int i=0;i<x;i++)
{
tmp=tmp->next;
}
return tmp->val;
}
xdestron
02-25-2011, 07:46 AM
Hey guys, I am coming into the second half of my Master's program in CS and I need to choose a specialization. Which area do you guys think is the best to specialize in and why?
I can choose:
-Software and Systems Development
-Theory
-Database Systems
-Artificial Intelligence
-Software Engineering
-Security
-Multimedia
I'm leaning towards Software engineering ATM.
Boatski
02-25-2011, 07:53 AM
The best one is the one you enjoy the most.
Supadude
02-25-2011, 08:57 AM
Hey guys, I am coming into the second half of my Master's program in CS and I need to choose a specialization. Which area do you guys think is the best to specialize in and why?
I can choose:
-Software and Systems Development
-Theory
-Database Systems
-Artificial Intelligence
-Software Engineering
-Security
-Multimedia
I'm leaning towards Software engineering ATM.
Security, Databases, or software systems
Security is huge, So are databases. Systems software is more in demand than applications software.
EasTexan
02-25-2011, 09:28 AM
I've always been interested in AI. I don't know why.
Sidenote: COBOL is so damn boring to code in... I hate this class.
Boatski
02-25-2011, 02:54 PM
I've always been interested in AI. I don't know why.
Sidenote: COBOL is so damn boring to code in... I hate this class.
There's a reason why no one uses it, unless it was already implemented into their biz 30 yrs ago.
EasTexan
02-25-2011, 05:41 PM
There's a reason why no one uses it, unless it was already implemented into their biz 30 yrs ago.
Yeah.
This is a "File structures" class so we aren't "learning COBOL", simply using it as a tool to learn about files... we haven't made it to files yet.
Human.Shield
02-25-2011, 05:58 PM
can you still be a good programmer if you suck at math?
Boatski
02-25-2011, 06:18 PM
can you still be a good programmer if you suck at math?
Yes, higher math is used more for game programming and science/research stuff. Biz applications don't use much more than basic algebra
can you still be a good programmer if you suck at math?
You may not use much math once you have a career, but I think most CS degrees require at least Calculus 1 & 2, and some other math classes. I had to take: Calc 1, Calc 2, Matrices (extremely easy class, no problem), and an upper-division math class. For the UDV, I took "Numerical Analysis" which is approximating functions that have irrational answers. It wasn't too hard despite what it sounds like, the formulas were straightforward but did require understanding of calculus. We used MATLAB, and the programs were not hard at all.
Like the poster above said, it depends a lot on field you want to get into. No matter what field though, you need to be able to get through your college math classes. Anybody can pass a math class if they try hard, so don't let that stop you.
Hey guys, I am coming into the second half of my Master's program in CS and I need to choose a specialization. Which area do you guys think is the best to specialize in and why?
I can choose:
-Software and Systems Development
-Theory
-Database Systems
-Artificial Intelligence
-Software Engineering
-Security
-Multimedia
I'm leaning towards Software engineering ATM.
Theory is probably not a good idea, I would say don't do that one unless you just want to teach or write proofs all day long.
To me, databases are boring as F, but I'm sure it is a decent field.
Of course AI would be cool, but I bet the field is very competitive and there are fewer jobs in that sector than other areas. This is just my intuition though, I could be wrong.
Software engineers are, I believe, in high demand and this is probably the one I personally would choose.
I dunno about security or multimedia or "software and systems" development.
Like that other guy said though, pick the one that interests you the most.
Alephz
02-28-2011, 07:32 PM
Would any brahs be able to give me some tips on C.
I have a program I've created which is a number guessing game where you input the number a number from 1 to 128 and it helps you guess it by telling you if it's high or low. The game can be cancelled at any time by entering 0 and it asks if you would like to play again when you win.
Here's the code:
#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
#include <time.h>
int game(int number);
int main(void)
{
int x = 1;
while(x == 1)
{
srand(time(NULL)); //seeding a random number by altering the randomization algorithm
int random = (rand()%128) + 1; //Gives a random number in the range of 1-128
printf("Starting Guessing Game...\n");
x = game(random);
}
printf("Game ended \n");
getch();
}
int game(int number)
{
int guess;
int bkmk = 0; //Bookmarking variable
printf("The number is between 1 and 128\n");
printf("Please enter a guess --- 0 to stop playing\n");
for(int n = 0; n != -1; n++)
{
scanf("%d", &guess);
if(guess == number)
{
printf("Congratulations, you guessed correctly!\n");
printf("Enter 1 to play again\n");
scanf("%d", &bkmk);
n = -2;
}
else if(guess == 0)
{
n = -2;
}
else if(guess < number)
{
printf("The number is larger than your guess\n");
}
else if(guess > number)
{
printf("The number is smaller than your guess\n");
}
}
return bkmk;
}
The problem I have is I need to implement a way to calculate the average number of guesses for every game played. This would be easy except the assignment says I must make use of the malloc(), realloc() and free() functions and I don't really know how.
Is it because in theory, there could be an infinite amount of games and that will cause problems if a variable keeping track of the number of games became too large? Likewise for a variable which keeps count of the number of guesses.
If someone could point me in the right direction that would be great. Cheers
Phenom01
02-28-2011, 07:37 PM
Would any brahs be able to give me some tips on C.
I have a program I've created which is a number guessing game where you input the number a number from 1 to 128 and it helps you guess it by telling you if it's high or low. The game can be cancelled at any time by entering 0 and it asks if you would like to play again when you win.
Here's the code:
#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
#include <time.h>
int game(int number);
int main(void)
{
int x = 1;
while(x == 1)
{
srand(time(NULL)); //seeding a random number by altering the randomization algorithm
int random = (rand()%128) + 1; //Gives a random number in the range of 1-128
printf("Starting Guessing Game...\n");
x = game(random);
}
printf("Game ended \n");
getch();
}
int game(int number)
{
int guess;
int bkmk = 0; //Bookmarking variable
printf("The number is between 1 and 128\n");
printf("Please enter a guess --- 0 to stop playing\n");
for(int n = 0; n != -1; n++)
{
scanf("%d", &guess);
if(guess == number)
{
printf("Congratulations, you guessed correctly!\n");
printf("Enter 1 to play again\n");
scanf("%d", &bkmk);
n = -2;
}
else if(guess == 0)
{
n = -2;
}
else if(guess < number)
{
printf("The number is larger than your guess\n");
}
else if(guess > number)
{
printf("The number is smaller than your guess\n");
}
}
return bkmk;
}
The problem I have is I need to implement a way to calculate the average number of guesses for every game played. This would be easy except the assignment says I must make use of the malloc(), realloc() and free() functions and I don't really know how.
Is it because in theory, there could be an infinite amount of games and that will cause problems if a variable keeping track of the number of games became too large? Likewise for a variable which keeps count of the number of guesses.
If someone could point me in the right direction that would be great. Cheers
im confused. You could just use a counter variable inside the loop to count the number of guesses.
Boatski
02-28-2011, 07:48 PM
Would any brahs be able to give me some tips on C.
I have a program I've created which is a number guessing game where you input the number a number from 1 to 128 and it helps you guess it by telling you if it's high or low. The game can be cancelled at any time by entering 0 and it asks if you would like to play again when you win.
Here's the code:
#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
#include <time.h>
int game(int number);
int main(void)
{
int x = 1;
while(x == 1)
{
srand(time(NULL)); //seeding a random number by altering the randomization algorithm
int random = (rand()%128) + 1; //Gives a random number in the range of 1-128
printf("Starting Guessing Game...\n");
x = game(random);
}
printf("Game ended \n");
getch();
}
int game(int number)
{
int guess;
int bkmk = 0; //Bookmarking variable
printf("The number is between 1 and 128\n");
printf("Please enter a guess --- 0 to stop playing\n");
for(int n = 0; n != -1; n++)
{
scanf("%d", &guess);
if(guess == number)
{
printf("Congratulations, you guessed correctly!\n");
printf("Enter 1 to play again\n");
scanf("%d", &bkmk);
n = -2;
}
else if(guess == 0)
{
n = -2;
}
else if(guess < number)
{
printf("The number is larger than your guess\n");
}
else if(guess > number)
{
printf("The number is smaller than your guess\n");
}
}
return bkmk;
}
The problem I have is I need to implement a way to calculate the average number of guesses for every game played. This would be easy except the assignment says I must make use of the malloc(), realloc() and free() functions and I don't really know how.
Is it because in theory, there could be an infinite amount of games and that will cause problems if a variable keeping track of the number of games became too large? Likewise for a variable which keeps count of the number of guesses.
If someone could point me in the right direction that would be great. Cheers
does the number need to be calculated while the program is running? for example if you play 10 games, close the program, play 10 more, should it count all 20 games? or just the 10 each?
Alephz
02-28-2011, 07:49 PM
im confused. You could just use a counter variable inside the loop to count the number of guesses.
I know I can do that. But the assignment sheet says explicitly that I have to utilise C's dynamic memory allocation. I think the reason for this is in the case where the number of games becomes very large.
Like, an integer is 4 bytes in size, so in the case where the number of games is a value greater than 4 bytes in size.
I mean, I'm going to ask my lecturer tomorrow, but I 100% cannot just put a variable counter in. it's not that straightforward.
does the number need to be calculated while the program is running? for example if you play 10 games, close the program, play 10 more, should it count all 20 games? or just the 10 each?
While the program is running. So if you closed it and ran it again, the first game would be game 1. It doesn't carry over.
Boatski
02-28-2011, 07:57 PM
Have you checked out a C API for malloc, realloc, and free?
Alephz
02-28-2011, 08:01 PM
Have you checked out a C API for malloc, realloc, and free?
No I haven't. How would I go about doing that? Google search didn't seem to help me too much.
Just to clarify, I do know what these functions do, I just don't really know how to implement them in the context of my problem.
Boatski
02-28-2011, 08:11 PM
malloc() creates a pointer to a specific place in memory. Basically allocate a small amount of memory in bytes. Whatever you determine to be something big enough to hold up to a 3? digit number.
http://www.cplusplus.com/reference/clibrary/cstdlib/malloc/
realloc() basically expands the amount of memory allocated by malloc() without losing data.
http://www.cplusplus.com/reference/clibrary/cstdlib/realloc/
free() will release all of that memory that you allocated.
http://www.cplusplus.com/reference/clibrary/cstdlib/free/
If you ever allocate memory in C or C++ (and other languages) you need to be sure to release that memory so you prevent memory leaks.
2.13.3.2 free
Declaration:
void free(void *ptr);
Deallocates the memory previously allocated by a call to calloc, malloc, or realloc. The argument ptr points to the space that was previously allocated. If ptr points to a memory block that was not allocated with calloc, malloc, or realloc, or is a space that has been deallocated, then the result is undefined.
No value is returned.
2.13.3.3 malloc
Declaration:
void *malloc(size_t size);
Allocates the requested memory and returns a pointer to it. The requested size is size bytes. The value of the space is indeterminate.
On success a pointer to the requested space is returned. On failure a null pointer is returned.
2.13.3.4 realloc
Declaration:
void *realloc(void *ptr, size_t size);
Attempts to resize the memory block pointed to by ptr that was previously allocated with a call to malloc or calloc. The contents pointed to by ptr are unchanged. If the value of size is greater than the previous size of the block, then the additional bytes have an undeterminate value. If the value of size is less than the previous size of the block, then the difference of bytes at the end of the block are freed. If ptr is null, then it behaves like malloc. If ptr points to a memory block that was not allocated with calloc or malloc, or is a space that has been deallocated, then the result is undefined. If the new space cannot be allocated, then the contents pointed to by ptr are unchanged. If size is zero, then the memory block is completely freed.
On success a pointer to the memory block is returned (which may be in a different location as before). On failure or if size is zero, a null pointer is returned.
stanlee010178
02-28-2011, 09:09 PM
I know I can do that. But the assignment sheet says explicitly that I have to utilise C's dynamic memory allocation. I think the reason for this is in the case where the number of games becomes very large.
Like, an integer is 4 bytes in size, so in the case where the number of games is a value greater than 4 bytes in size.
I mean, I'm going to ask my lecturer tomorrow, but I 100% cannot just put a variable counter in. it's not that straightforward.
While the program is running. So if you closed it and ran it again, the first game would be game 1. It doesn't carry over.
You would only need memory (de)allocation if the number of games played in that session is larger than the size of the storage type. If you say that an integer is 4 bytes (I'll assume unsigned for now), that is a very large amount (2^32) of games to be playing. Why not use a larger storage type in this case? Are you sure the memory allocation is not for something else?