Countdown in days

Not a lot of code needed, just a small helper function to calculate days difference and then a replace content with whatever you want. Full sample: <html> <div id=”counter” /> <script type=”text/javascript”> function daysDifference($startDate, $endDate) { oneDay = 24*60*60*1000; return Math.ceil(($endDate.getTime() – $startDate.getTime()) / oneDay); } // 2015/01/01 $startDate = new Date(2015, 0, 1); // … Read more

Simple counters not working in C

ok so for start when using #define x y you simply say “change all the reference to ‘x’ with ‘y’” so when you have #define C_Range (60-69) and then if (input == C_Range ); it iterputes as if (input == (60-69)); which makes no sense, plus you have the “;” at the end of the … Read more