This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| if(isset($_POST['zipcode']) && is_numeric($_POST['zipcode'])){ | |
| $zipcode = $_POST['zipcode']; | |
| }else{ | |
| $zipcode = '50644'; | |
| } | |
| $result = file_get_contents('http://weather.yahooapis.com/forecastrss?p=' . $zipcode . '&u=f'); | |
| $xml = simplexml_load_string($result); | |
| //echo htmlspecialchars($result, ENT_QUOTES, 'UTF-8'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http://www.calculatorsoup.com/calculators/time/decimal-to-time-calculator.php | |
| function decimalDayToTime($dec) { | |
| $hours = $dec*24/1; | |
| $stringArray = explode('.',$hours); | |
| $hour = $stringArray[0]; | |
| $min = '0.'.$stringArray[1]; | |
| $minutes= $min * 60 /1; | |
| $stringArray = explode('.',$minutes); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT | |
| iar_d AS date_5_num, /* numbers like: 40479, 40298, 39038, 41075 */ | |
| DATE('1899-12-30') + INTERVAL iar_d DAY AS normal_date /* converted dates */ | |
| FROM registry_private_clinics | |
| WHERE iar_d REGEXP '^[0-9]{5}$' /* only rows with NNNNN format, where N is [0-9] */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function cevir(sayi, separator) { | |
| sayarr = sayi.split(separator); | |
| var str = ""; | |
| var items = [ | |
| ["", ""], | |
| ["BIR", "ON"], | |
| ["IKI", "YIRMI"], | |
| ["UC", "OTUZ"], | |
| ["DORT", "KIRK"], | |
| ["BES", "ELLI"], |