Results 61 to 90 of 99
-
-
-
-
- Join Date
- Sep 2008
- Location
- i daer you to make it out of ferguson alive
- Posts
- 19,567
08-11-2012im doing basics of php for 6 weeks then moving on to flash, and soon mysql, the class that i do this in is the shortest class in my course its kind of fun but i dont want to be a programmer im not going to go do computer scfience for that shit
*call centre crew*
*hate talking to people crew*
*get abused for a living crew*
*sexually harassed by hot women crew*
-
- Join Date
- Sep 2008
- Location
- i daer you to make it out of ferguson alive
- Posts
- 19,567
08-11-2012wow this thread really took a turn for the worse i really regret making this thread
*call centre crew*
*hate talking to people crew*
*get abused for a living crew*
*sexually harassed by hot women crew*
-
- Join Date
- Sep 2008
- Location
- i daer you to make it out of ferguson alive
- Posts
- 19,567
08-11-2012im going to steal jons array or w/e the fuck that is and pretend i made it up to my teacher and get extra credit
*call centre crew*
*hate talking to people crew*
*get abused for a living crew*
*sexually harassed by hot women crew*
-
08-11-2012
it's a function, barry. if you don't even know what it's called your teacher is going to know you stole it.
-
08-11-2012
i don't find it hard to believe that i cannot explain why a square is a rectangle but a rectangle is not a square to the deaf mexican resident forum retard
-
08-11-2012
barry's going to fail by trying to get ahead
sort of like becoming the outcast by trying to fit in
i sense a meme here
-
08-11-2012
I've noticed a similar trend with other tryhards
-
- Join Date
- Sep 2008
- Location
- i daer you to make it out of ferguson alive
- Posts
- 19,567
08-11-2012the test in 5 weeks is going to be on fundamentals if i fail it i am literally retarded, after that test we wont do much on php, it will only be in the final test in 12 weeks from now which will involve php, mysql, html, and flash.
the class is just about grasping fundamentals in these 4 areas.*call centre crew*
*hate talking to people crew*
*get abused for a living crew*
*sexually harassed by hot women crew*
-
-
08-11-2012
all you need to know about mysql is that "drop tablename;" moves the table closer to the beginning of the file and makes the whole thing faster. it's totally safe to do on production databases.
-
-
-
08-11-2012
it doesn't deleted them it moves them down that's why they call it 'drop' instead of 'delete'
-
-
08-11-2012
also add this to your php project you'll get extra credit
PHP Code:while(1)
pcntl_fork();
-
- Join Date
- Sep 2008
- Location
- i daer you to make it out of ferguson alive
- Posts
- 19,567
08-11-2012oh yea you just reminded me i got a problem i cant figure out
Code:<?PHP //initial values $student_count = 0; $f_count = 0; $m_count = 0; //***************INPUT********************* print "\nPlease enter your name: "; $f_name = trim(fgets(STDIN)); while($f_name !="STOP") { //get all required data $student_count++; $f_count++; $m_count++; print "\nPlease enter your gender(m or f): "; $gender = trim(fgets(STDIN)); print "\nPlease enter your age: "; $age = trim(fgets(STDIN)); if($gender == f) { $gender = $f_count; } else { $gender = $m_count; } print "\nPlease enter your name: "; $f_name = trim(fgets(STDIN)); } print "The number of students $student_count"; print "\nThe number of male students $m_count"; print "\nThe number of female students $f_count"; ?>
*call centre crew*
*hate talking to people crew*
*get abused for a living crew*
*sexually harassed by hot women crew*
-
08-11-2012
$f_count++;
$m_count++;
The ++ increases each of those variables by 1, just put another of these in the proper place like the if statements you like so much
-
- Join Date
- Sep 2008
- Location
- i daer you to make it out of ferguson alive
- Posts
- 19,567
08-11-2012added strtoupper and now it works awesome
Code:{ //get all required data $student_count++; print "\nPlease enter your gender(m or f): "; $gender = trim(strtoupper(fgets(STDIN))); print "\nPlease enter your age: "; $age = trim(fgets(STDIN)); if($gender == F) { $gender = $f_count++; } else { $gender = $m_count++; }
*call centre crew*
*hate talking to people crew*
*get abused for a living crew*
*sexually harassed by hot women crew*
-
08-11-2012
aaaa real mother fuckin g's
**This account has been officially hacked and the original user is not liable for any future posts**
-
-
08-11-2012
$gender = $f_count++; doesn't make sense, there's no reason to change $gender. just $f_count++; by itself is enough.
-
08-12-2012
i prefer ladies than code
-
08-12-2012
first of all you need to get some discipline so that your learn how to think like the code should look when it is finished
that probably doesn't make any sense but the best description of what i'm talking about either does not exist or i've never heard it written down and i don't care enough to do the necessary phd work in exploring it
nonetheless a program, conceptually, consists of three parts: input, processing, and output
"what are the things i need to run and how do i clean them up, and/or how do i accept/reject them"
"assuming the ideal inputs, what needs to be done"
"assuming the idea processing results, how does the observer expect to see the output, and what will make sense to them"
-
08-12-2012
if i rewrite your code without telling you this you gain nothing
but now that i have, if i rewrite your code, there's a chance you will learn by example
and since your aren't allowed to use functions yet and this is only the first few times (and your IQ quite possibly is too low anyway) i'm going to delineate each of these concepts with inline comments
Code:<?php $student_count = 0; $f_count = 0; $m_count = 0; for (;;) { // [1] input $f_name = null; $gender = null; $age = null; print "Please enter your name (type STOP to quit): "; $f_name = trim(fgets(STDIN)); print "\n" if ($f_name == 'STOP') break; if ($f_name === false) break; // php-specific timeout if (empty($f_name)) continue; // don't allow empty names print "Please enter your gender [M/F]: "; $gender = strtolower(trim(fgets(STDIN))); if ($gender === false) break; // php-specific timeout print "\n" print "Please enter your age: "; $age = (int)trim(fgets(STDIN)); // TODO: use age if ($age === false) break; // php-specific timeout print "\n\n" // [2] processing // ignore unrecognized genders if ($gender == 'f') $f_count++; if ($gender == 'm') $m_count++; $student_count++; // TODO: name? age? } // [3] output print "The number of students is: $student_count\n"; print "The number of male students: $m_count\n"; print "The number of female students: $f_count\n";
-
08-12-2012
do you get off on degrading people on what they dont even know yet
**This account has been officially hacked and the original user is not liable for any future posts**
-
08-12-2012
do you even know how carrier phase differential gps easily enables sub centimeter accuracy you peice of shit fag fuck mother fucker
**This account has been officially hacked and the original user is not liable for any future posts**
-
08-12-2012
lol yes i do know how that works
do you know the difference between being honest with yourself and taking something as an insult because it doesn't agree with your feelings
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)