Search results

  1. toastyman

    Can I format my sd card on Android?

    I think that really depends on how each app is coded.. some apps will realise there's no data and act accordingly, others will expect data and just crash. Bottom line is if you're going to format the SD card then some apps will be fine and just reset as though you've just installed them, others...
  2. toastyman

    MySQL optimisation

    Cheers guys, thanks for clarifying that. I'll go with #3 then as disk space won't be much of an issue. To get into more detail, could the table structure be optimised further? Would the order of the field names make any difference (selecting fields from the end of a table, returning a field...
  3. toastyman

    MySQL optimisation

    Hi guys, I'm developing a high performance, heavy traffic web application and I want to make sure that I get the database structure perfect before I begin. The database could contain several million records and be queried thousands of times each second so optimisation and speed is essential...
  4. toastyman

    mod_rewrite trouble

    Hi all, Having a few issues with the following mod_rewrite statements.. RewriteCond ^app/wwwroot$%{REQUEST_FILENAME} -d RewriteCond ^app/wwwroot$%{REQUEST_FILENAME} -f RewriteRule ^(.*)$ app/wwwroot/$1 [L] RewriteRule ^(.*)$ app/wwwroot/index.php?url=$1 [QSA,L] So the idea is that if a...
  5. toastyman

    Looking for a bluetooth transmitter..

    It's for developing an indoor positioning system that can be used by general mobile phones (hence the decision to use bluetooth as it's a common technology). The idea is that a mobile phone would move around a building and it's position could be worked out by reading the IDs of nearby bluetooth...
  6. toastyman

    Looking for a bluetooth transmitter..

    Evening all. I'm not sure if this product exists so I'm wondering if anyone on here has heard of it or something similar.. I'm in search of a cheap bluetooth transmitter. All it should do is broadcast it's id and no other functionality. It should have a usb adapter on it so that the...
  7. toastyman

    JQuery / PHP Help

    With checkboxes you'll basically get an array returned of any checkboxes that have been ticked. If a checkbox hasn't been ticked it won't appear in the array. To distinguish between the checkboxes give each one a unique id. E.g. <input type="checkbox" name="VAT[]" id="check_1" value="1"...
  8. toastyman

    MySQL output hours in a day

    That last one worked great, thanks very much! Just to be a real pain i've created another small problem. I've taken that query and added it to my other query.. the theory with this one is that it wouldn't just return the records for one page but would now return the records for lots of pages...
  9. toastyman

    MySQL output hours in a day

    I quite liked the bob bit which is why I kept it! Absolutely stumped on the group_concat.. struggling to try and find a workaround :(
  10. toastyman

    MySQL output hours in a day

    Fantastic, did the trick nicely! Just got to remember to have all the hours in the other table.. Here's the final query.. SELECT bob.timestamp, Max( bob.count ) AS pagetraffic FROM ( SELECT timestamp, 0 AS count FROM stats_hours UNION SELECT s.timestamp, s.count FROM stats_pagetraffic s WHERE...
  11. toastyman

    MySQL output hours in a day

    I'm wondering if it can be done by having a subquery which lists the timestamps for 0am to 23pm. You could then do some sort of join to lookup the dates in the statistics table. The problem there is I have no idea how to go about writing that subquery to list the timestamps! I'm using PHP but...
  12. toastyman

    MySQL output hours in a day

    Evening all! I'm after a bit of advice with a query I'm writing as I'm not sure if it's possible.. I want to return a list of numbers representing the hour in the day, showing the value of the record if it exists and 0 if it doesn't. Table (stats_pagetraffic): page_id | timestamp | count 1 |...
  13. toastyman

    mod_rewrite problem

    Evening all! I've got a bit of a problem with htaccess.. Options +FollowSymLinks -Indexes RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)/$ /$1 [R=301,L] RewriteCond %{REQUEST_FILENAME} !-s RewriteCond %{REQUEST_FILENAME} !-d RewriteRule (.*) index.php If a user...
  14. toastyman

    CSS Footer

    Sussed! Turns out the footer div wasn't inside the container div, which was critical to the whole thing as it set the height to 100%. Thanks anyway!
  15. toastyman

    CSS Footer

    I've been trying to position a footer at the bottom of the browser window, but it sits in front of the other divs (as its absolute positioned) when the height of the browser isn't enough. Ideally it should sit below the content as shown on http://www.alistapart.com/d/footers/footer_css3.html...
  16. toastyman

    regular expression

    Sorted :D var str = 'The :fox jumped over the :gate into the field'; var re = new RegExp(/:\w+/igm); var m = str.replace(re,function(mo,key,value) { return "'+$('#"+mo.substr(1)+"').val()+'" }); alert(m); Cheers guys!
  17. toastyman

    regular expression

    Hi there, Unfortunately all that seems to do is take the first letter of each match.. f, g etc..
  18. toastyman

    regular expression

    Almost there! var str = 'The :fox jumped over the :gate into the field'; var re = new RegExp(/:[a-z]+/ig); var m = str.replace(re,"'+ $('#$&').val()+'"); alert(m); I just need to work out how to remove the : from the output.. in PHP I would have used preg_replace_callback to remove...
  19. toastyman

    regular expression

    Fantastic, thanks! I've just tried using that reg expr and it does seem to work, but it only seems to replace the first match... var str = 'The :fox jumped over the :gate into the field'; var re = new RegExp(/:[a-z]+/i); var m = str.replace(re,'cow'); alert(m); //outputs 'The cow jumped over...
  20. toastyman

    regular expression

    Hi all, I've got a simple regular expression in JavaScript but I can't get it working. I'm simply trying to search a string for words that match a certain format, and then replace them with a bit of code. For example, it'd search this string.. The :fox jumped over the :gate into the field...
Back
Top Bottom