Micronaut Framework 4.0 sets a baseline for Java to 17.
Micronaut Framework 4.x supports Apache Groovy 4.0
Micronaut Framework 4.0 sets a baseline for Java to 17.
Micronaut Framework 4.x supports Apache Groovy 4.0
package demo | |
class Note { | |
String msg | |
} | |
package demo | |
import grails.gorm.transactions.ReadOnly | |
import grails.gorm.transactions.Transactional |
<?php | |
function custom_upload_mimes ( $existing_mimes = array() ) { | |
// add your extension to the array | |
$existing_mimes['gpx'] = 'application/application/gpx+xml'; | |
$existing_mimes['kml'] = 'application/vnd.google-earth.kml+xml'; | |
// or: $existing_mimes['ppt|pot|pps'] = 'application/vnd.ms-powerpoint'; | |
// to add multiple extensions for the same mime type | |
// add as many as you like | |
// removing existing file types |
def cityByIP = { ip, provider, apikey -> | |
if(provider == "ip-api") { | |
String urlStr = "http://ip-api.com/json/${ip}?callback=yourfunction" | |
try { | |
def data = new URL(urlStr).getText() | |
int indexOfCity = data.indexOf('city') | |
indexOfCity += 'city":"'.size() | |
int indexOfCountry = data.indexOf('country') | |
indexOfCountry -= '","'.size() |
function getViewPortHeight() { | |
var viewportheight; | |
if (typeof window.innerWidth != 'undefined') { | |
viewportheight = window.innerHeight; | |
// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document) | |
} else if (typeof document.documentElement != 'undefined' && typeof document.documentElement.clientWidth != 'undefined' && document.documentElement.clientWidth != 0) { | |
viewportheight = document.documentElement.clientHeight; | |
} else { | |
viewportheight = document.getElementsByTagName('body')[0].clientHeight; | |
} |
$(function () { | |
$(document).ready(function() { | |
var padding = 10; | |
$('img').each(function () { | |
changeElementWidthAndHeightToFitParentSize($(this),padding); | |
}); | |
$('iframe').each(function () { | |
changeElementWidthAndHeightToFitParentSize($(this),padding); | |
}); | |