Jump to content

akitchin

Staff Alumni
  • Posts

    2,515
  • Joined

  • Last visited

    Never

Everything posted by akitchin

  1. you're over-simplifying the issue: http://www.break.com/index/understanding-the-turbo-encabulator.html
  2. i have a tough time telling if you're joking about twitter, but for the record, it's tourette's. if you can get a suppository so far up that it's in your rectum, you've either got incredibly long fingers or an uncomfortable level of dedication to the task.
  3. somewhat more on-topic, i'm 24 and i think i saw geocities at its apex. we had a series of personal sites from 97-99, mostly between angelfire/tripod/geocities (as someone said, the free ones), that we poured our hearts into. i remember one of the big stepping stones was getting frames (OH MY! FRAMES!) implemented, since that was the first thing we had to manually hack in and couldn't use the in-page editor for. i didn't realize geocities was running past 2000. i believe nadeem wins an award for the most posts thinly veiled as relevant in order to trumpet one's own horn.
  4. well, my guess is that you're using incorrect syntax to refer to the element of interest. this line: this.getElementById('ImgDiv1').style.display='block'; is probably spitting back an unknown method error. that's because technically, the div object you're referring to with "this" doesn't have that method. it's a method of the document object. if you want to use "this," you don't even need to use getElementById() because you're already referring to the div object: this.style.display='block'; if you want to stick with the getElementById(), you need to use the document object instead: document.getElementById('ImgDiv1').style.display='block';
  5. well, i'll give you the math, which you can try to put into your script: 1. keep track of how much each document is worth. a handy way of doing this would be in the format: $grade_weights[DOCUMENT_NUMBER] => DOCUMENT_POINT_WORTH 2. put the total number of points possible into a local variable. if you stored the weights in an array as per #1, this is merely a matter of using array_sum(). 3. here you have a few options. you can either: a) divide each item in the $grade_weights array by the total calculated in #2, or b) leave the array as-is and begin parsing through each student's line. 4. depending on whether you went the 3a or the 3b route, for each student: a) multiply each document grade by the corresponding percent coefficient in $grade_weights, and simply sum those numbers, or b) multiply each document grade by the point weight, divide by the total from #2, and sum those numbers. a) and b) routes are completely arbitrary, as the only difference between them is the order of operations. try to plug that math into your script and come back if you run into any troubles.
  6. a few issues i see: 1. you use the onmouseuut event in the first one. that event doesn't exist. 2. you are using getElementsById(). surely you mean getElementById()?
  7. it would certainly help to see the syntax error PHP is giving you.
  8. it isn't really a straightforward calculation when your weights are 100, 100, and 50. what do those weights actually mean?
  9. if you're grabbing this information from a database, you can use some of MySQL's native functions to help you out and unburden PHP a bit.
  10. out of curiosity, which came first: PHP development, or the MA? they seem rather divergent. (i'm not criticizing of course, considering i have a BSc in chemistry...)
  11. ... what is that lonely "c" doing right in the middle of that section? that's why the T_IF is unexpected - it is tripping up when you just tell it to do "c" especially without a semicolon.
  12. @nadeem: i'm pretty sure you completely missed the subtext of salathe's and cags' posts. let's just bury this all and get back to the point of the thread: introducing ourselves. @salathe: go ahead and introduce yourself! we all know the regex forum can be rather lonely.
  13. i would suggest a different way of structuring your forms. since your user will only be hitting one of these buttons at a time, why not nestle each one of them into their own unique form with a hidden input that designates the member's id and action to be taken? for example: <form action="whatever.php"> <input type="hidden" name="member_id" value="MEMBER_ID_ECHOED_HERE" /> <input type="hidden" name="action_to_take" value="ACTIVATE_OR_DEACTIVATE|SUSPEND_OR_UNSUSPEND" /> <input type="submit" name="submit" value="ACTIVATE_OR_DEACTIVATE|SUSPEND_OR_UNSUSPEND MEMBER MEMBER_ID_ECHOED_HERE" /> </form> this requires really only one processing function, which looks in $_POST['action_to_take'] for the procedure to perform, and $_POST['member_id'] for the id of the member on whom the operation should be performed. it should be noted that the user can change any of these POST values, so it would be wise to make sure you run checks to verify that the operation is possible for the given member (eg. that they aren't trying to unactivate an inactive user).
  14. this can be fetched using a simple inner join: SELECT f.*, p.* FROM flags f INNER JOIN products p ON f.product=p.id ORDER BY f.id here's a pretty good explanation of joins in wikipedia: http://en.wikipedia.org/wiki/Join_(SQL) as always, it's good practise to trim the returned columns from a query to only the columns you intend to use, rather than the whole row.
  15. it would seem all you need to do is add a key to your foreach() assignment, and use that key to access the equivalent entry in the additional array: foreach ($response->authority as $k => $result) { echo "authority is {$result->nsdname}, additional is {$response->additional[$k]->nsdname}"; } i don't know if that object notation will work, but the principle remains the same (using the key in the foreach to access the matching object in the additional array).
  16. handling arrays is actually a rather basic concept, and one that would be good to familiarize yourself with. here's a good section in the PHP manual on how to deal with arrays in PHP: http://us2.php.net/manual/en/language.types.array.php have a read-through of that, play around, and come back if you run into any problems implementing the code. this is really the sort of thing you're best off tinkering with yourself.
  17. are you saying that you would like any PHP file to be parsed as PHP and store its output, but any file that ISN'T PHP to be read as a binary document?
  18. i believe that a select element with multiple option selections will return an array. in that case, if you want to send an individual e-mail for each address, you'll need to loop through $_POST['Services'] with a foreach() loop. if you want to send one bulk e-mail with a length header To: or CC: field, you can either construct that list using a foreach() loop or the implode function.
  19. one option would be to set a session variable (assuming you're okay with using sessions) that contains the total number of results (or pages). then when you go to run the procedure for storing the lastrun value, you can check the current page/limit against the stored maximum and decide from there. if you decide to update it, don't forget to clear the session variable so that future "new results only" queries experience no interference.
  20. that would be a diplomatic way of putting it, yes.
  21. do you ever stop to read what you post, or do you just sorta "go for it?"
  22. This is a joke, right? No joke. Even though a lot of people can't be bothered with giving details about their problem or following advice, etc.. the customer is nonetheless always right. Therefore we expect all staff members to be psychic, in order to cater to this. That way, users not posting relevant stuff is no longer an issue. in fact, there is an administration thread with good books about mastering psychic clairvoyance. i recommend "Psychic Reading in 30 Days" from O'Reillly. great read. best part is, if you've been paying attention, roughly halfway through you can already surmise what the rest of the book contains using the skills you've learned!
  23. no you are bored and trying to stir an argument and i have no reason to listen to you. if you actually have some helpful suggestions i will be all ears. your definition of "helpful suggestion" differs greatly from the generally accepted one. you define "helpful suggestion" as anything you will agree with. isedeasy had nothing but helpful intentions regarding your scaling issue. there's no need to be outright dismissive or contentious.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.