Can someone solve this? I would like to challenge this PHP enthusiastic here. Write a script that will display the Christmas date of every 3201 years starting from today, 12/08/2010 and the weeks and moths passed until the year 60000? Can you solve that? Can you also give me a good challenge, something that's almost impossible.
i want you to write a program in php to delete all special char in a string inputted in a box and output on next page (after form submission) a string free from special char.It should not put much load on server means use regular expressions Regards Alex
Its not that hard if you think about it and can be done recursicely, once you avoid the usual pitfalls.... calculate "gods number" for solving any rubiks cube starting position in php ......
I didn't quite understand that question maybe because I don't know what rubiks cube are... but sounds like a very hard question. Is this possible in PHP? Could someone do it if he/she had the time. I don't usually work with Image manipulation in PHP. I think this is possible with ereg_replace() is it not?
That's not really a PHP question but programming in general. lol I'm not sure if I did it correctly, I couldn't understand your question clearly, so here: <?php $date = getdate( ); $weeks = calcWeek($date['yday'], $date['year']); $months = calcMonth($date['yday'], $date['month']); echo "Today is: " . $date['year'] . ", " . $date['month'] . ", " . $date['mday'] . "<br /><br />"; for($year = 2010; $year <= 60000; $year++) { echo "Dec 25 $year, Weeks until Christmas: $weeks<br />"; echo "Dec 25 $year, Months until Christmas: $months<br />"; $weeks = calcWeek((leapYear($year) ? 1 : 0), $year, $weeks); $months = calcMonth((leapYear($year) ? 1 : 0), $year, $months); } function leapYear($year) { if(($year % 4 == 0) && ($year % 100 != 0) || ($year % 400 == 0)) return TRUE; else return FALSE; } function calcWeek($day, $year, $weeks=NULL) { if(isset($weeks)) $christmas = round(((leapYear($year) ? 360 : 359) - $day) / 7) + $weeks; else $christmas = round(((leapYear($year) ? 360 : 359) - $day) / 7); return $christmas; } function calcMonth($day, $year, $months=NULL) { if(isset($months)) $christmas = round(((leapYear($year) ? 360 : 359) - $day) / 31) + $months; else $christmas = round(((leapYear($year) ? 360 : 359) - $day) / 31); return $christmas; } ?> PHP: Calculating leap year is kinda pointless if I think about it now.. lol I could've used this, but there's that millennium bug thing in unix binaries: <?php for($year = 2010; $year <= 60000; $year++) { $date = date('Y-m-d', strtotime("25 December $year")); echo $date . "<br />"; } ?> PHP: I heard that it's 20. You shouldn't use ereg_*, they are deprecated. Use preg_* instead. Somewhat, but not accurate. Check for colour-shadings - brownish light at the center, darker at the edges. And if it's circular, then return true. Something like that.
Doing that is not only going to put your PHP skills to the test but it's gonna push ability to think logically to the limit to the point at which you'll be sat in front of your computer crying and screaming "Why!? Why me!????"
Here's a pretty easy and popular problem: If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000. P.S., don't cheat with Google and explain your thought process during the function(s) required to do this.
Thats possible. Can be done with OpenCV. A good start to read recaptcha would be OCR, also you use can bruteforce and/or use rainbow tables as an attempt to 'crack' an md5 hash but not the algorithm. These are just my suggestions how I would start although...I don't intend on doing so