Skip to content

Instantly share code, notes, and snippets.

<?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');
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);
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] */
function cevir(sayi, separator) {
sayarr = sayi.split(separator);
var str = "";
var items = [
["", ""],
["BIR", "ON"],
["IKI", "YIRMI"],
["UC", "OTUZ"],
["DORT", "KIRK"],
["BES", "ELLI"],