Jump to content

RussellReal

Members
  • Posts

    1,773
  • Joined

  • Last visited

Everything posted by RussellReal

  1. <?php function statistics($array) { $c = 100; $stats = array(); $loop = 0; foreach ($array as $val) { if ($loop != (count($array) - 1)) $c = ($c - ($e = rand(0,($c / (count($array) - $loop++))))); else $e = $c; $stats[] = $e; } shuffle($stats); return array_combine($array,$stats); } $arr = array( 'Strawberry', 'Cherry', 'Vanilla' ); print_r(statistics($arr)); ?>
  2. it might be the capitol F.. try isfeat or you could do something like this: SELECT etc etc, (@isfeat:=SIGN(feat.featuredtill-NOW())) As isfeat... etc FROM table WHERE @isfeat = 1
  3. yes they can if you give him/her a lil bit of what my avatar is havin'
  4. foreach ($tsname as $key => $value) { foreach ($value as $key => $value) { echo "<p>$key - $value</p>"; } } firstly your code looks like it shouldn't work secondly, I don't understand how you can have more than 1 name as a key.. in the same array (probably came from another dimension of the first array. thirdly how I would do it, is like this: <?php $overall = array(); foreach ($tsname as $v) { foreach ($v as $key => $value) { $overall[$key] = ((array_key_exists($key,$overall))? $overall[$key].',':'').$value; } } print_r($overall); ?>
  5. this answer is PROBABLY a little off topic here, HOWEVER, due to browser security in some areas and some browsers you really are limited with javascript, from your user to your server thats 1 request your server handles then from your server to the server getting pinged.. its really pointless to have your server handling all these requests per visit, What you SHOULD do is set up a 1px by 1px flash app and set up an externalInterface callback so that javascript can tell the flash file to do the socket opening and if it opens with no errors, thats a good thing, you need a crossdomain.xml file on their site ONLY IF you're planning to receive data, sending data to them is perfectly fine, however to accomplish what I'm saying you need to do neither of the two. Just connect, no errors, GOOD, errors? BAD. close connection and wait for more instructions. This way you're not wasting bandwidth, you're not overusing your server.. The user is making all of the requests.. and for them it'd be faster than waiting for a server that is handling 4,000 requests to serve them, they're using their own network connection to test it. and with flash you can send a javascript call aswell to display whether its active or not.. its really nifty I could write one up for you but then it wouldn't be considered helping
  6. OMG NO Wa...wait, that was sarcasm.. haha ok.. *secretly checks google anyway* ahh ok.. good.. what would the world do without google?! I'm pretty sure China would love to find out
  7. current_timestamp() is an int not a date, so increasing it by an interval will probably not work. try CURRENT_TIMESTAMP() + (60 * 60 * 24)
  8. Which is what this bit.... $this.val(0) does. wow jquery does it all huh.. so val() actually returns the updated element after the value change? I personally never used jQuery
  9. mapquest? I'm sure if you put "Image provided by MapQuest" they won't sue you.. they've got more important things to do with their time.. like enjoy jello shots with the newest escorts in their local neighborhood while cruising in their 35billion dollar corporate jets in the back by the full fledged bar table with a dressed up 12,000 dollar an hour bartender.
  10. jQuery is a library created by someone, you need to get the jQuery js file but you can do it without jQuery, and probably with the same amount of code Edit: Well, probably a couple lines more, but thats not the reason for my edit.. Thorpe's example (which is probably the only way to do it anyway.. minus the jquery) would set checked attribute to true, which will literally tick the checkbox you'd want to ALSO set the value of the checkbox to 0.. just a sidenote
  11. trust me.. Be as vague as possible, like fit all the rules into the table, and if the airlines don't have those rules, then leave it blank.. #2 have 1 small table, 1 super long table not 1 table for each airline, and 1 table with just airline information like.. id, telephone number, fax number, customer support number, state, county, town, zip whatever would go in there then the super long table would be Airline ID, Class, Checked Bags, max Dimensions, Max Weight, remarks the first table mentioned, the smaller one.. should be just Airline ID, LuggageType, Quantity, Maximum Dimensions, Maximum Weight and in each table you put information from the airlines.. based on their Airline id number, which will be set up in the first table.. then you just when you go to luggageInfo.php?airlineId=1 // 1 being United Airlines then you grab from the big table and small table and display the info its quite simple
  12. in older versions of IE with an element with a position of absolute is completely ripped of the page, then placed back at the top left of the page, unless the containing div is also relatively positioned then it will be positioned or fixed to teh top-left portion of that div or container.. however, that is all normal to most browsers, the problem with older IE is not how it positions it, but your overlay will assume 100% of the height of the document not the height of the height of the affective area. understand? if your page is 1000px tall.. and your browser has only 700px of space to browse thru, than your div stretched 100% tall will stretch 1000px tall.. your best bet is to simply open the overlay like you're doing, give it a FIXED height and FIXED width, then putting that inside another div stretcting 100% wide then centering it inside there, and then giving the contained dim effect a top: value of like 100px; just to pull it off the top of the border.
  13. encase your attributes' values in quotes #1, and #1 the video directory should work.. otherwise your htaccess file is in the main directory, in which case you'd need to modify your htaccess.
  14. cags, hes not trying to get the value hes trying to redirect all subdomains to a single folder, no use in capturing data that won't be used
  15. you can re-size an image even before you copy the file from the temp directory to the permanent directory
  16. grrr no dice Kazzie, thanks anyway
  17. what is the name of the mov file you want to be played? what is the html code you're using to create the link? ^^ answer me both questions and I can help you.
  18. *Daniel0 is awesome. haha gimme guru or recommended I have a supporter!
  19. directly from a file would be faster than from a database but a database is pretty much easier to use. Its your call, just don't over-do the queries in any event.
  20. Welcome to the community!
  21. Haha I wish the admins listen, the best admin left the admin team for whatever reason (thorpe) Daniel0 is alright too I guess. Hey you can add me to MSN or whatever create a network of sorts? I'm currently in a self-propelled race (against myself! Ha!) to get 1,000 contacts on MSN, currently I'm at 647 contacts Making progress slowly but surely!
  22. did you change your href attribute to reflect the path to your mov file?
  23. use an image map and create the area elements with javascript that would be the simplest alternative.. and flash would be the next easiest, where in flash it would be way easier to moderate whether the land is passable or not flash instructions would be simple, create each possible grid square.. E.G Water Boulder House Grass Sand and then instead of images you compile a list of number values corresponding to the tiles.. then you just send that to flash or to javascript then with javascript send it to flash.. you put the tiles next to eachother building the map, and you add onclick events or whatever. would be easier in the long run to use flash. and would be faster loading of the next map in flash aswell as you'd only be sending numeric values instead of an actual image. Well, anyway hope I helped.
  24. its quite simple really, you're using single quotes, which DO NOT evaluate variables.. use double quotes (")
×
×
  • 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.