Why does the serial number on Google's certificate as returned by Java's SSL differ from that returned from Firefox and
By : Svet L
Date : March 29 2020, 07:55 AM
This might help you Your Firefox certificate info shows the certificate for www.google.com, while your Java code displays the certificate for google.com. Those two sites have different certificates, and therefore different serials.
|
How do you set the number of decimal places of a value returned in a msgbox after doing a simple calculation in VBA exce
By : Richard Xia
Date : March 29 2020, 07:55 AM
To fix this issue Here you go. This applies a format with two decimal places and a thousands separator: EDIT: Wrapped in an IF to skip if num = 0. code :
Sub CalcmsgboxHect()
Dim num As Double
num = Application.InputBox(prompt:="Please Enter The Number Of Acres You Would Like To Calculate Into Hectares ", Type:=1)
If num <> 0 Then
MsgBox Format(num * 0.404686, "#,##0.00") & " Is the Number Of Hectares."
End If
End Sub
|
PHP: Round a number upto 2 decimal places and if the number is a whole number then add trailing zeros
By : James Sanders
Date : March 29 2020, 07:55 AM
Any of those help Question , You can try like this: code :
sprintf("%0.2f",$number);
$rounded_value = number_format($number,2);
|
Google Maps places API - How to get Country, Postal-code, Number, Website URL with Google map search box on multiple res
By : jahnavi
Date : March 29 2020, 07:55 AM
This might help you Google Maps places gives you a reference, and an ID. You can use that id to request extra details. I added this to your code: code :
// make sure this variable is accesible where you need it (scope)
var service = new google.maps.places.PlacesService(map);
// request details
service.getDetails(place, function(result, status) {
if (status !== google.maps.places.PlacesServiceStatus.OK) {
console.error(status);
return;
}
$('#website').html('<a target="_blank" href="'+ result.website +'">'+ result.website +'</a>');
});
places.forEach(function (place) {
...
<span id="website"></span>
...
}
<script>
// This example adds a search box to a map, using the Google Place Autocomplete
// feature. People can enter geographical searches. The search box will return a
// pick list containing a mix of places and predicted search terms.
function initAutocomplete() {
var map = new google.maps.Map(document.getElementById('map'), {
center: {
lat: -33.8688,
lng: 151.2195
},
zoom: 13,
mapTypeId: google.maps.MapTypeId.ROADMAP
});
// Create the search box and link it to the UI element.
var input = document.getElementById('searchInput');
var searchBox = new google.maps.places.SearchBox(input);
map.controls[google.maps.ControlPosition.TOP_LEFT].push(input);
// Bias the SearchBox results towards current map's viewport.
map.addListener('bounds_changed', function () {
searchBox.setBounds(map.getBounds());
});
var markers = [];
// srvice for PLACE details
var service = new google.maps.places.PlacesService(map);
// [START region_getplaces]
// Listen for the event fired when the user selects a prediction and retrieve
// more details for that place.
searchBox.addListener('places_changed', function () {
$('#mapContent').html("");
var places = searchBox.getPlaces();
if (places.length == 0) {
return;
}
// Clear out the old markers.
markers.forEach(function (marker) {
marker.setMap(null);
});
markers = [];
// For each place, get the icon, name and location.
var bounds = new google.maps.LatLngBounds();
places.forEach(function (place) {
var icon = {
url: place.icon,
size: new google.maps.Size(71, 71),
origin: new google.maps.Point(0, 0),
anchor: new google.maps.Point(17, 34),
scaledSize: new google.maps.Size(25, 25)
};
// Create a marker for each place.
var marker = new google.maps.Marker({
map: map,
icon: icon,
title: place.name,
position: place.geometry.location
});
google.maps.event.addListener(marker, 'click', function (evt) {
//document.getElementById('coordinates').value = marker.getPosition().toUrlValue(6);
alert(this.placeId)
});
markers.push(marker);
if (place.geometry.viewport) {
// Only geocodes have viewport.
bounds.union(place.geometry.viewport);
} else {
bounds.extend(place.geometry.location);
}
$('#mapContent').append('<ul id="geoData">' +
'<li>Full Address: <span id="location">'+ place.formatted_address +'</span></li>'+
'<li>Postal Code: <span id="postal_code"></span></li>'+
'<li>Country: <span id="country">'+ +'</span></li>'+
'<li>Latitude: <span id="lat">'+ place.geometry.location.lat() +'</span></li>'+
'<li>Longitude: <span id="lon">'+ place.geometry.location.lng() +'</span></li>'+
'<li>Website: <span id="website"></span></li>'+
'<li>Contact Number: <span id="number"></span></li>'+
'<li>Rating: <span id="rating"></span></li>'+
'</ul>');
// request details
service.getDetails(place, function(result, status) {
if (status !== google.maps.places.PlacesServiceStatus.OK) {
console.error(status);
return;
}
$('#website').html('<a target="_blank" href="'+ result.website +'">'+ result.website +'</a>');
});
});
map.fitBounds(bounds);
});
// [END region_getplaces]
}
</script>
|
Google Places API - Counting the total number of places in a given radius around a lat / long?
By : Agung Firdausi Ahsan
Date : March 29 2020, 07:55 AM
|