# PlanetCpp

Members

18

## Community Reputation

10 Neutral

• Rank
Quark
• Birthday 12/14/1979

## Contact Methods

• Website URL
http://www.PlanetCpp.com

## Profile Information

• Location
staten island, ny
• Biography
23 yr old college student/c++ programmer
1. ## Guess this code, win a prize!

15 lines??? the original code I put was one line, thats why im saying guess this code. it's a bubble sort algorithm written on one line, the other post was just a small example so you can see what it's doing, if thats the program your talking about then it's more then 15 lines anyway but it doesn't matter now does it.
2. ## How to a just my sleeping patterns?

waking up at 1pm isnt bad at all really. ive had sleep problems much worse, at times i had my days and night completely reversed, if not then id be on a 4pm to 5am schedule. my habits are normal now because since the beginning of june i been waking up at 5am mon-thursday to go to a summer class in the morning. now, no matter how late i stay up i wake up at exactlly 11am, always 11am (assuming no work or school), like an internal alarm clock. ive been drinking more water latley too, i only drink water now and that is supposed to help

4. ## how did this happen?

it is, thats what he said sin²t + cos²t = 1 the t might have made it look different, the problems ive been doing have been in respect to t, not x, because this is parametric equations, not based on cartesian coordinates (x,y) but the coordinates based on time. sad part is i understand all the new stuff we are learning but its the old stuff that still confuses me, things from years ago. so when an integral has simple simplification (simple to you), i go blank. sux but ;o\ what ya gonna do
5. ## how did this happen?

i expanded it like you did but when i saw all that i was like i thought it did something really wrong. i see what you did. my problem is that im not confident in math and need to just take things in small steps to eliminate the hard looking problems. btw i dont have to integrate it, this is a parametric length problem that just needed to be simplified, it said not to do anything but set it up. thank you!
6. ## Calculus 101?

bob millers calc for the clueless alone the book might not do too much since theres a lack of examples and questions, it's meant as an add on. it's very good and in english, bob miller is supposed to be the best professor in the world for calculus, funny thing is that im taking calc 2 this summer and having a hard time with it, calc 1 wasnt bad but calc 2 is much harder for me and the shortened semester is making it too fast, but bob miller is supposed to be teaching at the college im taking the class at ,City College of New York (CCNY), wouldnt it have been REALLY nice if HE could have been my prof. that book is good though, if i had taken calc 2 in a normal semester and known about the book form day one.. it would hae been MUCH easier.
7. ## how did this happen?

hey guys, like i've said before i really don't like math..well i do when i understand it. when something goes right it feels the same as when i program i write works. but this is crazy HOW DID IT DO THIS??? im bad with simplifying radicals, really bad. thanks for any help. btw i understand that cos²x+sin²x = 1 i dont see how it was split, the way im looking at ti looks wierd. how can i hust take a t out of (t + ***)² its not the same as (t(****))², it needs to be expanded right? :confused:
8. ## Lightning? any reason for me to fear??

wouldnt you know i've been thinking of moving to florida for a few years after college i saw a show where this lady in ohio or iowa, somethin like that, was in her kitchen and a bolt came through a crack in the window and hit her foot, but ny doesnt get anything like that at least not here i guess i shouldnt worry if the odds are 1 in 500,000 and i came close before, if i ever do get hit...im buying a lottery ticket. speaking of moving to florida, whats the salaries for soft developers there like? they look good on salary websites, i have a friend who moved there with no degree and is making good money in computers and i have been offered a job for good money (good for not having a degree yet, but im staying here to get it), i know florida pays less for most professions, but compared to ny salaries for developers florida is only 10-15 grand a year off (but ny salaries for developers are really good) if you take the difference but take in mind the much lower cost of living, it seems like a good idea to move there for a few years then come back up here. anyway, i have a choice of getting a small apartment for 1200 a month, buying a house (which is VERY small) here for 500,000 ,and im not kidding ;o(, or going there and getting myself a pool, garage, and all for less then half ;o)
9. ## Lightning? any reason for me to fear??

since this is a "what are the chances" type of question i figured this forum would suffice. There is lightning outside so i just though of this.. you can skip the story if you want go down to the //////////'s when i was 10 yrs old i was staying at a summer house my grandmother has that is in pennsylvania. the house is pretty high up on a mountain and is surrounded by trees. one day it was gloomy, not really raining much, just very cloudy and light drizzle here and there. so i was bored and i went out to play with my trucks (stop laughing at me i was 10) my grandmother was on the right side of the house and called for me to go to her, so i started walking and when i got to the side of the house me and my grandmother were 10 feet apart, i looked up (god knows why) at the trees and saw a blue flash heard a crackle sound (sounded like someone mashing dry leaves) then a HUGE explosion, the lightning hit the house 5 feet i front of me and 5 in back of my grandmother, it hit a nail and made a 90 degree turn (they said thats unheard of) hit another nail went 90 degrees down and hit a water pipe, huge water pipe, that was the explosion, it dug up a hole 20 feet across and a good 4 feet down and 2 feet wide, that all fell on my head //////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// needless to say im still hiding from lightning, i wont go outdoors and i even don't like being in my room on the second floor. it's so bad i made my friends stop at a motel on our way to new orleans on a road trip cause there was a lightning storm (and i wasnt even driving) , then again nyc doesnt get storms like there, that was crazy what is the chance outside of getting struck, keeping in mind that i already almost got struck before. and am i in any danger in my room on the second floor of an area not really above sea level?? are there any realistic dangers or am i just bein a pansy ass????
10. ## Definition of life

It's hard to say that any machine is "living" but i was going to say that something has life if it knows right from wrong, but as faf mentioned, single celled organisms are living, but obviouslly don't know right from wrong. I've seen a lot of programs that were said to be living, one good example is A.L.I.C.E programmed by Dr. Wallace (i think i got that right) you can find her here at http://alice.sunlitsurf.com/a.l.i.c.e./ (warning: shes addicting) as real as that can be at times it's still just good code and a BIG list of phrases and responses. hardly alive. so i think i would say that a program/machine is "living" if it does any task that you havent programmed it to do. There was a professor that created a progam of little beings, just dots really. and each one was a class object and they were really only supposed to go around reproducing and eating. i forgot all the details but basically he said he ran the program and saw the little dots doing things that were no where near what he programmed them to do, they were alive to him. but even in that case some programs exhibit traits that you dont expect while coding. one funny example is a bunch of game programmers were working on a huge game, the game had many characters roaming around a world. after they created one character they noticed a big problem..it would just sit in the same spot moving around very oddly, then die. they couldnt figure out why it would be shaking then die for no reason. turns out that they programmed each character to have 2 things, a nutrition value for predators and a leve of needed nutrition. the animal they created was the most nutritious organism in the game at that point and i was eating itself, that explained the wierd activity. theres my point of view if it even ammased to one
11. ## Guess this code, win a prize!

#include <iostream> using std::cout; using std::cin; using std::endl; int main() { int i,x,arraysize=0,tmp=0; int arry[50]={0}; //initiate array of 50 integers cout<<"Enter in integer values, use negative # to stop\n"; cin>>tmp; while(tmp>=0) //loop till # is negative { arry[arraysize]=tmp; arraysize+=1; //increment counter cin>>tmp; } for(i=0,x=1;i<arraysize,x<arraysize;i++,x++){if(arry>arry[x]){arry[x]^=arry;arry^=arry[x];arry[x]^=arry;}if(x<(arraysize-1)){i--;}else{x=i+1;}} for(i=0;i<arraysize;i++) //show array cout<<arry<<endl; return 0; } Help?
12. ## Ages and Occupations?

im 23 and trying to finish college, i live in ny and go to CSI, College of Staten Island, which is CUNY. im going to City College this summer for calc II, its ok but just annoying to get to, aaaall the way uptown 138th st ;o( i hate math with a passion, im getting a BS in comp sci and want to be a programmer (i like the term software developer better), c++. oh yea and i have a million programs half done that school takes time away for me to finish them
13. ## Im finally doing some calculus @ college...

i cant imagine ANYONE likeing calc 2, i hated calc 1 but ill take it anyday over this ;o( maybe calc 2 wouldnt be so bad in a whole semster, im taking it in the summer. if your good with trig, and i mean really good then you might actually like calc 2, but you have to remember things like sin²x+cosx/tan2x+tan²x can be substituted by: 1=cosx-2sin²x(tanxsecx)-(sin^(-1)x) thats wrong (fake) or whatever but you get the drift 3 more classes to go calc 3, linear algebra, and probability oh god i cant wait!!! im gonna erase every bit of math knowledge from my brain once i walk out of the probability final:D
14. ## Guess this code, win a prize!

ok there no prize.. sorry. still want to try? ok try not to use the compiler of course just try to follow what it's doing, i won't add the inputted data, unless noone gets it then ill write the whole program. this is a one-liner i wrote last year. /////code for(i=0,x=1;i<arraysize,x<arraysize;i++,x++){if(arry>arry[x]){arry[x]^=arry;arry^=arry[x];arry[x]^=arry;}if(x<(arraysize-1)){i--;}else{x=i+1;}} /////end code ?
15. ## Another Question For You Guys

size doesnt matter so that -1^-1^-1 = -1
×