Jump to content

bholbrook

Members
  • Posts

    31
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

bholbrook's Achievements

Member

Member (2/5)

0

Reputation

  1. Okay, please don't flame me for putting this in the wrong forum, I'm trying to get to some of the more advanced peoples out there. My server SEEMS to be randomly changing letters from my programs. From a JS page "scope to scopt" from the MySql DB "Support" to "Suuport", and from PHP "$iStatus" to "$iModule". These are changes that I know for sure were correct to start, and not mistyped. The program I use isn't the culprit, as they're all edited in seperate programs. Is it possible that there is a glitch, virus, or hacker in the server that would do this? ---------------- Now playing: Foo Fighters - What If I Do? via FoxyTunes
  2. The circle was just an example, let's ignore the circle for a minute. We have 4 teams: TEAM 1 went 2 - 1 TEAM 2 went 2 - 1 TEAM 3 went 1 - 2 TEAM 4 went 1 - 2 TEAM 1 DEF. TEAM 2 TEAM 1 DEF. TEAM 3 TEAM 2 DEF. TEAM 3 TEAM 2 DEF. TEAM 4 TEAM 3 DEF. TEAM 4 TEAM 4 DEF. TEAM 1 How am I going to sort these teams? The rankings should be TEAM 1 (Because they are tied for top of the league by their record WITH TEAM 2, who they beat) TEAM 2 (Because they are tied for top of the league by their record WITH TEAM 1, who they lost to) TEAM 3 (Because they are tied for bottom of the league by their record WITH TEAM 4, who they beat) TEAM 4 (Because they are tied for bottom of the league by their record WITH TEAM 3, who they lost to) How do I program this sort because on the logic in the parenthesis'?
  3. Thanks for the reply I understand what you're saying. My problem is in sorting the teams by how they played against each other, specifically how to create the relationship between each team. I cannot change the ranking system as that is defined by the league and not by my program.
  4. Okay, I have a list of 10 teams and I need them sorted top to bottom in order of standing. Calculating their order is where I'm having the problem. I order the teams by: 1. WIN PERCENTAGE 2. POINTS 3. RECORD AGAINST TEAM TIED WITH 4. WINS 5. RUNS DIFFERENTIAL I have all these figured out except #3. I don't even know where to start (thus the no code posting). Assume I can get an array with any and all information needed. Keep in mind this scenerio: TEAM 1 beat TEAM 2 twice TEAM 2 beat TEAM 3 twice TEAM 3 beat TEAM1 twice These three teams are essentially tied and need to revert to tied breaker #4. If you know of an article on this kind of algorithm or if you've done this yourself, please let me know.
  5. You should treat each email address forwarded to as a seperate email (thus each email will have their own parent_id). This will also allow you to track failed emails on an individual address level.
  6. I would 100% disagree with this, especially as we enter the age of Web 2.0 and AJAX websites. Anytime I send an async request, I return my expected value, or an error code (ERR:00190). This error code can then be sent back in to another script as another async request with two parameters, the language and the error number: --using YUI & Javascript YAHOO.util.Connect.asyncRequest("GET","error.php?err=00190&lang=en",{...},null); This will go to error.php which will pull the error in the language requested and can be displayed with your Javascript handler. Goto http://developer.yahoo.com/yui for info on YUI.
  7. You can also use a try/catch block to get the information you need without forcing an error... http://ca.php.net/try try { throw new Exception("This is a message to display"); } catch( Exception $e ) { echo $e->getMessage(); // This is a message to display echo $e->getLine(); // 3 }
  8. @stuffradio: Thanks for the link. I definitely took Google for a spin before posting; I didn't see that website. Good article, however, I am looking for something more complex than simply changing colors and images. Thanks for your efforts.
  9. Hello! I am in charge of creating a large scale website, and for the first time it has to be 100% skinnable. I need to be able to move components and output to different places and in different sizes for different audiences. Does anybody know of a good extensive article on the process of creating a website that allows for complex skinning? Thanks!
  10. I want to create a simple PHP SMS script where someone can text a number and I can return them data. I also want to be able to charge for this. How does this work? I see commericals for this stuff all the time (albeit the use I have is more useful then a joke), but how does it work?
  11. You're running the query to read images from the db before you are saving it and uploading it
  12. Thanks Barand For those interested, we used symblic linking to fic the problem. Symbolic linking allows us to make one filder on the server for classes and then create SYMBOLIC folders in out sites. In a linux shell type: ln -s [SOURCE DIRECTORY] [FOLDER NAME] and the folder will be created linking to the source.
  13. You can use the output buffer. headers can't be modified after they're sent, but you can determine WHEN they're sent. [b]WONT WORK[/b] [code] <html> <? header("location:page.html"); ?> [/code] [b]WILL WORK[/b] [code] <? ob_start(); ?> <html> <? header("location:page.html"); ?> <? ob_end_flush(); ?> [/code] There is more to know on output buffers, I suggest you give it a read. Also, when you change the page location, the first page will finish processing. Make sure to put an exit(); after your header if you dont want that to happen.
  14. Okay, somewhere in my script my session is being altered. I need to know where. I know for sure that it is my problem via the code below. [code] global $strSession; global $intLine; $intLine = 0; function checkSession(){ $GLOBALS['intLine']++; if($GLOBALS['strSession'] != $_SESSION){ echo "<P>"; echo "<strong>".$GLOBALS['intLine']."</strong>"; var_dump($_SESSION); echo "</P>"; $GLOBALS['strSession'] = $_SESSION; } } register_tick_function("checkSession"); declare(ticks=1); [/code] Whenever the session changes, i print it out. The problem is that i dont know WHERE the change is happening. One miht suggest 'start at the top and look for session calls' but that is hard to do with a 10,000 line script (not psgetti coded, there is an entire library i bring in & its an admin side script, so time to load is acceptable). At any rate, i need to know what line of what file the session canges on. exception class doesn't work, only retruns data of where the exception is thrown trigger_error works the same way. ANy ideas?
  15. Most browsers have a maximum 500MB limit, so anything over that is useless. make sure to put a hidden input named "MAX_UPLOAD_FILESIZE" with the value as the max size in bytes.
×
×
  • 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.