Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by trevelluk

  1. Yes, we'll definitely need a URL to be able to provide help with this.
  2. There's an HTML Validator extension available for Firefox at http://users.skynet.be/mgueury/mozilla/ Once you've installed it, a list of validation errors will appear at the bottom of the View Page Source window.
  3. This looks a bit unusual here, as it looks to me as though the second line (if it wasn't commented out) would be the one initialising sessionFactory.I would have thought you'd need something like:sessionFactory = new Configuration().configure().buildSessionFactory();Session session = sessionFactory.getCurrentSession(); Otherwise there's nothing to initialise sessionFactory, and so it will be a null pointer.
  4. Would I be correct in thinking that the 1st and 2nd items both have the same date, and 3rd one is different? If that's the case, you've probably run into this "feature" of the the_date() function: See http://codex.wordpress.org/Template_Tags/the_date for more info on this.
  5. One thing to bear in mind about this technique is that a lot of email clients and web-based email providers (Hotmail, GMail etc) will not load remote images unless they are specifically asked to, precisely to prevent this sort of tracking. So just bear in mind that the open rates you see will most likely be lower than the actual open rates.
  6. I think the problem is that after each rewrite, then all of the rewriting rules are by default applied again to the re-written URL, so I think what's happening is something like this:Someone visits mystyle/index.phpThis matches your rewrite rule, and is rewritten to styles/index.php?id=mystyleBUT, this also matches your rewrite rule, and so gets rewritten again to styles/index.php?id=stylesWhich then matches again, but I'd imagine that at this point then the web server sees that it would rewrite to the same URL and so stops to avoid an infinite loop.There's a couple of options:1. Change the rule so that it won't match if ?id is already present. The $ sign means "end of input", so the rule will only match if index.php is the very last thing in the URL: RewriteRule ^([^/]+)\/index.php$ styles/index.php?id=$1 [NC] 2. Prevent multiple rewrites from happening, so that as soon as one re-write has occured, rewriting will stop. You do this by adding the L (for Last) option to your rewrite flags: RewriteRule ^([^/]+)\/index.php styles/index.php?id=$1 [NC,L]
  7. By default then the XML parser will convert all element names to uppercase. You can change this with the xml_parser_set_option() function. See http://uk3.php.net/manual/en/function.xml-...-set-option.php
  8. #expertRO :hover { The space in the selector is the problem, as this will set the hover style for elements withing #expertRO rather than for #expertRO itself. Try changing the selector to: #expertRO:hover{
  9. That should work absolutely fine. Unless you're deliberately trying to hide the text (e.g. by setting the font color and background color the same) then there shouldn't be any SEO consequences either.
  10. trevelluk

    number format

    The second parameter to number_format controls the number of digits to display after the decimal point. The manual page at http://uk3.php.net/number_format provides more information.
  11. It looks as though the problem is that the file copy (via the imagejpg(), imagegif() and imagepng() calls) happens inside the if statement: if ($w > $width || $h > $height) So, if $w is less than $width AND $h is less than $height, you'll jump straight down to: imagedestroy($orig); without actually doing anything to the file.I'd suggest adding an else statement at the end of your size check, which just does a straight file copy. Something like: if ($w > $width || $h > $height){... all of your current resizing code ...}else{copy($orig, $dst);}imaegdestroy($orig); This means that if the source image is already below the specified dimensions, it will be copied as-is to the appropriate location.
  12. First of all, this is a Javascript question, not a Java question (despite the similarity of the names, they're very definitely not the same thing). You're certainly not the first to make that mistake though!I suspect that the problem is that you're including two copies of JQuery, which is a widely used JavaScript library: <script src="datepicker/development-bundle/jquery-1.5.1.js"></script>.....<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script> Try removing one of those lines (it probably doesn't matter which one) and see if that fixes things.
  13. The more usual approach would be to have two tables, weight_class and fighter. Add a primary key to weight_class, and then add a weight_class_id column to fighter containing the primary key of the appropriate weight class. E.g. something like this: weight_class---------------id | name---------------1 | heavyweight2 | middleweight3 | lightweight----------------fighter---------------------------weight_class_id | name---------------------------3 | small guy1 | big guy--------------------------- So from this, you could tell that "big guy" is in the heavyweight class, and "small guy" is in the lightweight class.The big advantage of this scheme is you don't need to add a new table every time you want to add a new weight class.
  14. While I'm far from an SEO expert, I'm fairly sure that at least some of the major search engines will ignore hidden text (which presumably would include links).
  15. With CSS, no, as that is only used to control the presentation of what's already on the page, rather than adding new things to the page.Javascript is a possibility, provided there is consistency in how the HTML files for each chapter are named. E.g. if the files are called something like "chapter1.html", "chapter2.html" then it shouldn't be too tricky. If this is the case then I can provide a few pointers (and I'm sure others will be along to help as well). If there isn't any consistency in the naming then I think you're out of luck with JS as well.
  16. I'm not sure how appropriate this would be for your situation, but could you try turning the problem round? What I mean by that is, rather than checking where the mouse cursor is at a particular time, check what the time is when you mouse over the required element, and perform whatever you want to do if the current time is the time you want. From the user's point of view, the effect should be the same, if I've understood what you're asking properly.
  17. Probably the easiest way is to wrap the particular sentence you want to have a background colour in a <span> with a class you can target to set the background colour.
  18. Even inside a link URL then ampersands need to be escaped as &The htmlspecialchars() function is probably what you need.
  19. trevelluk


    Actually, you can use these words as table or column numbers, provided that they are always enclosed in back-ticks, e.g. SELECT `FROM` FROM `SELECT` WHERE `WHERE`=1; is valid syntax.
  20. Try putting the arguments in double quotes, i.e. java EightPuzzle -s BreadthFirst "< file_that_takes_14_moves_to_solve" Otherwise, the < sign is interpreted by the shell to mean "take the contents of file_that_takes_14_moves_to_solve and send it to the program's standard input"
  21. trevelluk


    To get business. If interacting with PayPal was difficult to do, far fewer sites would offer PayPal as a payment option, and so PayPal would get less income.
  22. If all the CSS and background images are using relative URLs (which is what you seem to be saying) then SSL shouldn't make any difference to CSS or image loading. Could you provide a link to the site so we can take a look?
  23. In case you haven't found it already, take a look at the mysql_real_escape_string() function to deal with the apostrophe problem. http://uk3.php.net/mysql_real_escape_string
  24. You could try appending the current timestamp as another GET parameter. This will make the URL unique each time and so the caching should be bypassed. Try something like: xmlhttp.open("GET", "recordPoint.php?lat=" + this.extractedLat.value + "&time=" + new Date().getTime(), false);
  25. It looks as though those functions will simply cut the file up into chunks, without trying to understand the file contents. You could certainly use that to get the first 30% (or whatever) of an MP3 file, but, as Dilated was saying, the result won't necessarily be playable.
  • Create New...