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
<label for="accessible"> | |
<input type="radio" value="accessible" name="quality" id="accessible"> <span>accessible</span> | |
</label> | |
<label for="pretty"> | |
<input type="radio" value="pretty" name="quality" id="pretty"> <span>pretty</span> | |
</label> | |
<label for="accessible-and-pretty"> | |
<input type="radio" value="pretty" name="quality" id="accessible-and-pretty" checked> <span>accessible and pretty</span> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script type="text/javascript"> | |
window.location="http://liviusimion.com"; | |
</script> | |
</head> | |
<body> |
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
$sql = "BEGIN TRANSACTION;"; | |
$sql .= "INSERT INTO table1 (name1) VALUES (value1);"; | |
$sql .= "INSERT INTO table2 (name2) VALUES (value2);"; | |
$sql .= "COMMIT;"; |
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
// Allow the editor to edit theme options | |
function add_theme_caps() { | |
// gets the editor role | |
$role = get_role( 'editor' ); | |
// This only works, because it accesses the class instance. | |
// would allow the editor to edit options posts for current theme only | |
$role->add_cap( 'manage_options' ); | |
} | |
add_action( 'admin_init', 'add_theme_caps'); |
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 id="packageOption"> | |
<option value="">None</option> | |
<option value="package1">Package1</option> | |
<option value="package2">Package2</option> | |
<option value="package3">Package3</option> | |
</Select> | |
<div id="package1" class="packages" > Package1 </div> | |
<div id="package2" class="packages" > Package2 </div> | |
<div id="package3" class="packages" > Package3 </div> |
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
refreshWeather(); | |
setInterval(refreshWeather, 600000); // Recall every 10 min |
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
var dateString = Date.parse("2016-08-01T12:00:00+0000"); | |
var fbSince = dateString / 1000; | |
document.write(fbSince); |
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
$.getJSON('http://api.wunderground.com/api/API_KEY/conditions/q/CITY_NAME.json', function(Weather) { | |
var weatherInfo = Weather.current_observation; | |
var weatherIcon = '<span id="weatherIcon" class="meteoIcon" data-icon="1">'; | |
if(weatherInfo.weather === 'Partly Cloudy') { | |
weatherIcon = '<span id="weatherIcon" class="meteoIcon" data-icon="3">'; | |
} | |
else if (weatherInfo.weather === 'Mostly Cloudy') { | |
weatherIcon = '<span id="weatherIcon" class="meteoIcon" data-icon="5">'; | |
} | |
else if (weatherInfo.weather === 'Rain') { |
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
$.getJSON('http://api.wunderground.com/api/API_KEY/conditions/q/CITY_NAME.json', function(Weather) { | |
var weatherInfo = Weather.current_observation; | |
console.log(weatherInfo.temp_c); | |
document.getElementById('weatherTempC').innerHTML = weatherInfo.temp_c; | |
}); |