Jump to content

fooDigi

Members
  • Posts

    250
  • Joined

  • Last visited

Everything posted by fooDigi

  1. Oh, this is with html divs? Sorry, can't help further... maybe html5 and canvas? good luck!
  2. found the 'drawStar' function below from stack overflow user licson, made this script draw random stars... is this more of what you need? Edit: sorry, misread what you said.... this draws stars. still a good function though, lol. How do you plan to determine the boundaries, or the dynamics of each polygon? // function grabbed from user "licson" on stackoverflow.com function drawStar($img,$x,$y,$radius,$sides,$color,$spikness=0.5) { $point =array(); $t = 0; for($a = 0;$a <= 360;$a += 360/($sides*2)) { $t++; if($t % 2 == 0) { $point[] = $x + ($radius * $spikness) * cos(deg2rad($a)); $point[] = $y + ($radius * $spikness) * sin(deg2rad($a)); }else{ $point[] = $x + $radius * cos(deg2rad($a)); $point[] = $y + $radius * sin(deg2rad($a)); } } return imagefilledpolygon($img,$point,$sides*2,$color); } $im = imagecreate(500, 500); $black = imagecolorallocate($im, 0, 0, 0); $white = imagecolorallocate($im, 255, 255, 255); for($i=0; $i<10; $i++) { drawStar($im, rand(0,500), rand(0,500), rand(20,50), rand(5, , $white); } // output image to browser header('Content-Type: image/jpeg'); imagejpeg($im,"",100); // destroy the image imagedestroy($source); imagedestroy($im);
  3. If you are working within an image you can use the GD functions to draw lines... http://php.net/manual/en/function.imageline.php you would have to figure out exactly where each line begins and ends (x,y coordinates), and you can specify color. hope this helps.
  4. assuming you are trying to use jquery and you have the libraries included already.... $(.linkclick).click(function(){ window.location.href = "/MainPage.php?value=" + $("#searchvalue").val(); }); <input type="text" id="searchvalue" /> <a href="javascript:;" Class="linkclick">click</a>
  5. fooDigi

    PHP Query

    but you can use the '%' like WHERE Department LIKE '%:dept%'
  6. fooDigi

    PHP Query

    Might have better luck posting this in the mysql forum http://forums.phpfreaks.com/forum/15-mysql-help/
  7. Because that would be too easy... lol, You had very good suggestions, and OP should listen to you. I shouldn't be clogging up the flow. first time i've used this site in years.
  8. I could be wrong, but I was assuming the issue was with the join of the tables... the date filter can be added later. well, let's see if he fixed it...
  9. SELECT r.roomID R, rb.roomID RB FROM rooms r LEFT OUTER JOIN roomsbooked rb ON r.roomID = rb.roomID WHERE rb.roomID IS NULL should query all room records that are not booked.... i think thanks psycho, for the correction.
  10. You should probably try joining the tables more like this... SELECT * FROM rooms r LEFT OUTER JOIN roomsbooked rb ON r.roomID = rb.roomID where rb.roomID = NULL if that makes any sense... I threw this out there, and obviously havent tested...
  11. odd are the line breaks are being stored, but when parsed as html they are run together. try echo'ing your content with nl2br()
  12. yes, i believe so. it has been a while since i have worked with my gd scripts... should resample it making them smoother.
  13. if you absolutely needed something to run every second, you could write a script that loops 50-60 times with your functionality with a sleep(1) command, and call that script every minute or so.
  14. well, you do have a table background color that can be confused as a border... it worked for me. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <style> <?php $mypage = $_GET['mypage']; echo " td.$mypage { border-top: 1px solid #999999; border-left: 1px solid #999999; border-right: 1px solid #999999; border-bottom: 1px solid white; } "; ?> </style> </head> <body> <table id='nav_profile'> <tr> <td class='mypage' bgcolor='white'>MyPage</td> </tr> </table> </body> </html>
  15. your "#nav_profile td" border definition seems to be overriding the class. just remove the line where you set the border there.
  16. yeah, that worked fine for me. not to say that it's a proper solution, but i get accurate results.
  17. look into imagecopyresampled(). it may make the images more clear.
  18. i was confused by this also... similar issues. take a look at my post http://www.phpfreaks.com/forums/index.php/topic,278344.msg1317542.html particularly the warning on this page ... http://www.php.net/manual/en/language.types.float.php
  19. SOLVED... had to replace the /boot/initrd.img... file with a backup that happened to be there... and, that was it...
  20. well... booted knoppix and am able to read most things from the hard drive so far...
  21. getting an error message when trying to boot to ubuntu... has been working fine until i needed to reboot, had uptime of nearly a year... hard drive failure??? here are the errors... thanks for any insight... Starting up ... Loading, please wait... /scripts/init-top/brltty: 19: grep: not found FATAL: Error inserting capability (/lib/modules/2.6.22-14-generic/kernel/security/capability.ko): Invalid argument Gave up waiting for the root device. Common problems: - Boot args (cat /proc/cmdline) - Check rootdelay= (did the system wait long enough?) - Check root= (did the system wait for the right device?) - Missing modules (cat /proc/modules; ls /dev) ALERT! /dev/disk/by-uuid/32786yha-long-id-blah does not exist. Dropping to a shell! (initramfs) _
  22. k, so even though when i print the sum of $charge_amount and $amount_paid, it returns 214.54, and $order_total is 214.54, their internal values may not be as exact?? confusing, what would be the best and most accurate way to avoid this? changing it to the following worked, but not sure if it is best... echo round($charge_amount + $amount_paid,2) - $order_total; also, i have been running this code for some time, and this is the first time this issue has arose...
  23. Can someone tell me why i get this absurd number when doing simply addition and subtraction? thx $charge_amount = 34.55; $amount_paid = 179.99; $order_total = 214.54; // returns 2.84217094304E-14 ... should be zero echo $charge_amount + $amount_paid - $order_total;
  24. garethp, correction in your last post... i know it's small, but why not be accurate... the plus(+) actually matches the previous expression ONE or MORE times, not more than one
×
×
  • 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.