#unitsystem
Explore tagged Tumblr posts
Photo
#repost @foxfire_jp #photobyme @sinh11.f ・・・ 【ACROMOVE JACKET】 オールマイティな秋冬シーズン用の全天候型ゴアテックスジャケット。 2レイヤーの総裏仕立てで、別売のダウンやフリースをファスナーで連結できるユニットシステムにも対応しており、防寒性能に優れます。 短めの着丈やポケットデザイン、フーデッド仕様などで、マウンテンジャケット��雰囲気を醸し出しながらも、多様なシーンで���用可能です。 https://www.foxfire.jp/onlinestore/groups/3222 #アクロムーブジャケット #クラシックフラップキャップ #マウンテンパーカー #ゴアテックス #全天候対応 #ユニットシステム #フォックスファイヤー #mountainparka #goretex #unitsystem #foxfire https://www.instagram.com/p/CJyNjQAJXa8/?igshid=rlkrp6kxaduo
#repost#photobyme#アクロムーブジャケット#クラシックフラップキャップ#マウンテンパーカ��#ゴアテックス#全天候対応#ユニットシステム#フォックスファイヤー#mountainparka#goretex#unitsystem#foxfire
0 notes
Text
It’s The Middle Of March Already!
New Post has been published on https://theautismdada.com/its-the-middle-of-march-already/
It’s The Middle Of March Already!
It seems a little odd that I’ve not really updated any posts since the Christmas time one. The truth is, I’ve been a combination of busy and lazy.
I’ve been busy through the day time with work then looking after little Mr and not so little Miss. Then I’ve been lazy, in that I wanted to rest, during the evening. I’ve been reading my writing muscle and am now ready to try flexing it again.
Lot’s has happened
The be honest, a lot has happened during the time I’ve not written. Quite a bit I can’t remember.
For a start, there was home schooling since the Christmas and New Year break. Not so much for little Mr as he is on a discovery curriculum which means the work we have done with him has more been learn through play still.
Not so little Miss though went up to secondary school last year - so this lock down was more sitting at her desk for the day, doing live lessons and assignments. We were monitor and teacher, along side me working from home also.
More recently, myself and my wife had our first vaccine jab. That was fun. Well, the jab was fine and perfectly painless - it was the side effects the day after...
There have also been less significant things such as my purchase of a better lens for my camera which I hope to get out with once all this lockdown restriction stuff is done. I’m looking forward to seeing if we can get out to Portland this year.
We also cancelled an April break to the Isle Of Wight. We had originally booked for last April, then moved to this one. We didn’t want to move it to next years April as just going on and on. So, also hoping we can book a short get away later this year.
The most recent thing we have done is go through the ECHP for little Mr. This year was certainly different as involved calls with teach to talk through targets and a Teams Meeting to do the actual ECHP. I’m not sure if better or worse. We got more time talking through targets but on the teams call it seemed to rush through. Definitely different.
As I say, lot going on. Sure everyone reading this can say the same.
Post lockdown
The current though now is post lockdown. As schools have now been open for a few weeks and plans been told about the opening of shops and other ventures. The thought of getting out and about is digesting in our minds.
Add to that the fact that the company I work for is now introducing work from the office in rotations starting April. It is going to be 1 week in office, 3 at home. I’m both looking forward to it, but at the same time having been working out of home (well working bug also out of work around this time last year) for a year - it’s also an alien thought - actually going into work.
Again, I know many of you are thinking - I’ve been working in the <enter place of work here> for most of the year - but not me.
So it is going to be another adjustment. Especially seeing I decked out my home office with a UltraWide Monitor, 4K webcam and custom keyboard for less stress on fingers. Though all of that stuff will still be used in my writing (even if I am doing this from my iPad at the moment).
So there you have it...
There is me since the last post. I’ve not going into the nitty gritty of things such as going out for walks for exercise, little Mr’s 3 time a week evening drives, all the work we have started to do in the garden and all that.
To be honest, these last 3 months have gone quick and I do think to myself - what did I actually do. Again, I believe many of you are thinking the same.
I just wanted to share a post t show I am still here. I’m also hoping to continue revamping this site this year - I started to rebuild it using Oxygen Builder. So more on that to come.
function clearValidity($this) const $parent = jQuery($this).closest('.piotnetforms-field-subgroup'); const $firstOption = $parent.find('.piotnetforms-field-option input'); $firstOption.each(function() jQuery(this)[0].setCustomValidity(''); ); function piotnetformsAddressAutocompleteInitMap() var inputs = document.querySelectorAll('[data-piotnetforms-address-autocomplete]'); inputs.forEach(function(el, index, array) var autocomplete = new google.maps.places.Autocomplete(el); var country = el.getAttribute('data-piotnetforms-address-autocomplete-country'); var map_lat = el.getAttribute('data-piotnetforms-google-maps-lat'); var map_lng = el.getAttribute('data-piotnetforms-google-maps-lng'); var zoom = el.getAttribute('data-piotnetforms-google-maps-zoom'); if(country == 'All') autocomplete.setComponentRestrictions('country': []); else autocomplete.setComponentRestrictions('country': country); var $mapSelector = el.closest('.piotnetforms-fields-wrapper').querySelectorAll('[data-piotnetforms-address-autocomplete-map]'); if($mapSelector.length>0) var myLatLng = lat: parseFloat(map_lat), lng: parseFloat(map_lng) ; var map_zoom = parseInt(zoom); var map = new google.maps.Map($mapSelector[0], center: myLatLng, // center: lat: -33.8688, lng: 151.2195, zoom: map_zoom ); var infowindow = new google.maps.InfoWindow(); var infowindowContent = el.closest('.piotnetforms-fields-wrapper').querySelectorAll('.infowindow-content')[0]; infowindow.setContent(infowindowContent); var marker = new google.maps.Marker( map: map, anchorPoint: new google.maps.Point(0, -29) ); autocomplete.addListener('place_changed', function() infowindow.close(); marker.setVisible(false); var place = autocomplete.getPlace(); if (!place.geometry) // User entered the name of a Place that was not suggested and // pressed the Enter key, or the Place Details request failed. window.alert("No details available for input: '" + place.name + "'"); return; // If the place has a geometry, then present it on a map. if (place.geometry.viewport) map.fitBounds(place.geometry.viewport); else map.setCenter(place.geometry.location); map.setZoom(17); // Why 17? Because it looks good. marker.setPosition(place.geometry.location); marker.setVisible(true); var address = ''; if (place.address_components) '') ].join(' '); infowindowContent.children['place-icon'].src = place.icon; infowindowContent.children['place-name'].textContent = place.name; infowindowContent.children['place-address'].textContent = address; infowindow.open(map, marker); ); autocomplete.addListener('place_changed', function() var place = autocomplete.getPlace(); el.setAttribute('data-piotnetforms-google-maps-lat', place.geometry.location.lat()); el.setAttribute('data-piotnetforms-google-maps-lng', place.geometry.location.lng()); el.setAttribute('data-piotnetforms-google-maps-formatted-address', place.formatted_address); el.setAttribute('data-piotnetforms-google-maps-zoom', '17'); var $distanceCalculation = document.querySelectorAll('[data-piotnetforms-calculated-fields-distance-calculation]'); $distanceCalculation.forEach(function(el, index, array) if (el.getAttribute('data-piotnetforms-calculated-fields-distance-calculation-from') !== null) var origin = el.getAttribute('data-piotnetforms-calculated-fields-distance-calculation-from'); else var $origin = document.getElementById( el.getAttribute('data-piotnetforms-calculated-fields-distance-calculation-from-field-shortcode').replace('[field id="', 'form-field-').replace('"]','') ); var origin = $origin.getAttribute('data-piotnetforms-google-maps-formatted-address'); if (el.getAttribute('data-piotnetforms-calculated-fields-distance-calculation-to') !== null) var destination = el.getAttribute('data-piotnetforms-calculated-fields-distance-calculation-to'); else $destination = document.getElementById( el.getAttribute('data-piotnetforms-calculated-fields-distance-calculation-to-field-shortcode').replace('[field id="', 'form-field-').replace('"]','') ); var destination = $destination.getAttribute('data-piotnetforms-google-maps-formatted-address'); if (origin != '' && destination != '') var distanceUnit = el.getAttribute('data-piotnetforms-calculated-fields-distance-calculation-unit'); calculateDistance(origin, destination, el.closest('.piotnetforms-field-container').querySelector('.piotnetforms-calculated-fields-form__value'), distanceUnit, el); ); ); ); // calculate distance function calculateDistance(origin, destination, $el, distanceUnit, $input) if (origin != '' && destination != '') var service = new google.maps.DistanceMatrixService(); service.getDistanceMatrix( origins: [origin], destinations: [destination], travelMode: google.maps.TravelMode.DRIVING, unitSystem: google.maps.UnitSystem.IMPERIAL, // miles and feet. // unitSystem: google.maps.UnitSystem.metric, // kilometers and meters. avoidHighways: false, avoidTolls: false , function (response, status) if (status != google.maps.DistanceMatrixStatus.OK) // console.log(err); else var origin = response.originAddresses[0]; var destination = response.destinationAddresses[0]; if (response.rows[0].elements[0].status === "ZERO_RESULTS") // console.log("Better get on a plane. There are no roads between " + origin + " and " + destination); else var distance = response.rows[0].elements[0].distance; var duration = response.rows[0].elements[0].duration; // console.log(response.rows[0].elements[0].distance); var distance_in_kilo = distance.value / 1000; // the kilom var distance_in_mile = distance.value / 1609.34; // the mile var duration_text = duration.text; var duration_value = duration.value; var event = new Event("change"); if (distanceUnit == 'km') $el.innerHTML = distance_in_kilo.toFixed(2); $input.value = distance_in_kilo.toFixed(2); jQuery($input).change(); else $el.innerHTML = distance_in_mile.toFixed(2); $input.value = distance_in_mile.toFixed(2); jQuery($input).change(); ); // get distance results function callback(response, status) if (status != google.maps.DistanceMatrixStatus.OK) console.log(err); else var origin = response.originAddresses[0]; var destination = response.destinationAddresses[0]; if (response.rows[0].elements[0].status === "ZERO_RESULTS") console.log("Better get on a plane. There are no roads between " + origin + " and " + destination); else var distance = response.rows[0].elements[0].distance; var duration = response.rows[0].elements[0].duration; console.log(response.rows[0].elements[0].distance); var distance_in_kilo = distance.value / 1000; // the kilom var distance_in_mile = distance.value / 1609.34; // the mile var duration_text = duration.text; var duration_value = duration.value; console.log(distance_in_mile.toFixed(2) + 'miles'); return distance_in_kilo.toFixed(2); // $('#duration_text').text(duration_text); // $('#duration_value').text(duration_value); // $('#from').text(origin); // $('#to').text(destination); document.addEventListener( 'elementor/popup/show', function(event, id, instance) piotnetformsAddressAutocompleteInitMap(); );
Related Posts:
No Related Posts
0 notes
Text
It's Christmas Eve And The Fridge Is Getting Full...
New Post has been published on https://www.theautismdada.com/its-christmas-eve-and-the-fridge-is-getting-full/
It's Christmas Eve And The Fridge Is Getting Full...
The fridge is certainly full. We had pre-ordered our food for Christmas Day and picked it up today - Christmas Eve.
Santa looking fir his dinner
The last few years we had spent Christmas away at Butlins and last year at Christmas we thought we would do it this year at home. That said, just before Butlin's decided to close for Christmas we did look at some amazing and tempting deals - but we would have needed to go yesterday and missed out on our lovely food we ordered.
When we decided to not go this year, and decided to order food, we thought we would splurge and buy some nice M&S Christmas selection. Though I have to say that when we went out to the local Lidl last night we thought we could have go the entire Christmas Day dinner for less than we paid for the Turkey Crown - doh... But it was a little treat to ourselves after the shocking year of 2020.
Christmas 2020 has to be something to remember and enjoy. A nice Christmas lunch followed by a lovely walk - if not wet and raining. Just incase we all end up in a lockdown.
But, this all means that for today our fridge is just chocker - full to the brim. Full to almost falling out. In fact, after I took the image for this post, we added another 4-5 items. It's like a game of jenga each time we go to the fridge.
Now, I know this is not technically a ASD post. I just wanted to do a quick post and say - jeez that fridge is full.
One thing I can say is, that, we all went out for a lovely hour at the garden centre before our food pickup and little Mr loved the time out - looking at a few of the decorations - though more enjoying the juice and cookie.
Anyhow, my real intension here is to say I hope you all have a lovely Christmas 2020 and a brilliant New Years.
Let us hope that 2021 brings us all a little more fun and joy.
function clearValidity($this) const $parent = jQuery($this).closest('.piotnetforms-field-subgroup'); const $firstOption = $parent.find('.piotnetforms-field-option input'); $firstOption.each(function() jQuery(this)[0].setCustomValidity(''); ); function piotnetformsAddressAutocompleteInitMap() var inputs = document.querySelectorAll('[data-piotnetforms-address-autocomplete]'); inputs.forEach(function(el, index, array) var autocomplete = new google.maps.places.Autocomplete(el); var country = el.getAttribute('data-piotnetforms-address-autocomplete-country'); var map_lat = el.getAttribute('data-piotnetforms-google-maps-lat'); var map_lng = el.getAttribute('data-piotnetforms-google-maps-lng'); var zoom = el.getAttribute('data-piotnetforms-google-maps-zoom'); if(country == 'All') autocomplete.setComponentRestrictions('country': []); else autocomplete.setComponentRestrictions('country': country); var $mapSelector = el.closest('.piotnetforms-fields-wrapper').querySelectorAll('[data-piotnetforms-address-autocomplete-map]'); if($mapSelector.length>0) var myLatLng = lat: parseFloat(map_lat), lng: parseFloat(map_lng) ; var map_zoom = parseInt(zoom); var map = new google.maps.Map($mapSelector[0], center: myLatLng, // center: lat: -33.8688, lng: 151.2195, zoom: map_zoom ); var infowindow = new google.maps.InfoWindow(); var infowindowContent = el.closest('.piotnetforms-fields-wrapper').querySelectorAll('.infowindow-content')[0]; infowindow.setContent(infowindowContent); var marker = new google.maps.Marker( map: map, anchorPoint: new google.maps.Point(0, -29) ); autocomplete.addListener('place_changed', function() infowindow.close(); marker.setVisible(false); var place = autocomplete.getPlace(); if (!place.geometry) // User entered the name of a Place that was not suggested and // pressed the Enter key, or the Place Details request failed. window.alert("No details available for input: '" + place.name + "'"); return; // If the place has a geometry, then present it on a map. if (place.geometry.viewport) map.fitBounds(place.geometry.viewport); else map.setCenter(place.geometry.location); map.setZoom(17); // Why 17? Because it looks good. marker.setPosition(place.geometry.location); marker.setVisible(true); var address = ''; if (place.address_components) ''), (place.address_components[1] && place.address_components[1].short_name infowindowContent.children['place-icon'].src = place.icon; infowindowContent.children['place-name'].textContent = place.name; infowindowContent.children['place-address'].textContent = address; infowindow.open(map, marker); ); autocomplete.addListener('place_changed', function() var place = autocomplete.getPlace(); el.setAttribute('data-piotnetforms-google-maps-lat', place.geometry.location.lat()); el.setAttribute('data-piotnetforms-google-maps-lng', place.geometry.location.lng()); el.setAttribute('data-piotnetforms-google-maps-formatted-address', place.formatted_address); el.setAttribute('data-piotnetforms-google-maps-zoom', '17'); var $distanceCalculation = document.querySelectorAll('[data-piotnetforms-calculated-fields-distance-calculation]'); $distanceCalculation.forEach(function(el, index, array) if (el.getAttribute('data-piotnetforms-calculated-fields-distance-calculation-from') !== null) var origin = el.getAttribute('data-piotnetforms-calculated-fields-distance-calculation-from'); else var $origin = document.getElementById( el.getAttribute('data-piotnetforms-calculated-fields-distance-calculation-from-field-shortcode').replace('[field id="', 'form-field-').replace('"]','') ); var origin = $origin.getAttribute('data-piotnetforms-google-maps-formatted-address'); if (el.getAttribute('data-piotnetforms-calculated-fields-distance-calculation-to') !== null) var destination = el.getAttribute('data-piotnetforms-calculated-fields-distance-calculation-to'); else $destination = document.getElementById( el.getAttribute('data-piotnetforms-calculated-fields-distance-calculation-to-field-shortcode').replace('[field id="', 'form-field-').replace('"]','') ); var destination = $destination.getAttribute('data-piotnetforms-google-maps-formatted-address'); if (origin != '' && destination != '') var distanceUnit = el.getAttribute('data-piotnetforms-calculated-fields-distance-calculation-unit'); calculateDistance(origin, destination, el.closest('.piotnetforms-field-container').querySelector('.piotnetforms-calculated-fields-form__value'), distanceUnit, el); ); ); ); // calculate distance function calculateDistance(origin, destination, $el, distanceUnit, $input) if (origin != '' && destination != '') var service = new google.maps.DistanceMatrixService(); service.getDistanceMatrix( origins: [origin], destinations: [destination], travelMode: google.maps.TravelMode.DRIVING, unitSystem: google.maps.UnitSystem.IMPERIAL, // miles and feet. // unitSystem: google.maps.UnitSystem.metric, // kilometers and meters. avoidHighways: false, avoidTolls: false , function (response, status) if (status != google.maps.DistanceMatrixStatus.OK) // console.log(err); else var origin = response.originAddresses[0]; var destination = response.destinationAddresses[0]; if (response.rows[0].elements[0].status === "ZERO_RESULTS") // console.log("Better get on a plane. There are no roads between " + origin + " and " + destination); else var distance = response.rows[0].elements[0].distance; var duration = response.rows[0].elements[0].duration; // console.log(response.rows[0].elements[0].distance); var distance_in_kilo = distance.value / 1000; // the kilom var distance_in_mile = distance.value / 1609.34; // the mile var duration_text = duration.text; var duration_value = duration.value; var event = new Event("change"); if (distanceUnit == 'km') $el.innerHTML = distance_in_kilo.toFixed(2); $input.value = distance_in_kilo.toFixed(2); jQuery($input).change(); else $el.innerHTML = distance_in_mile.toFixed(2); $input.value = distance_in_mile.toFixed(2); jQuery($input).change(); ); // get distance results function callback(response, status) if (status != google.maps.DistanceMatrixStatus.OK) console.log(err); else var origin = response.originAddresses[0]; var destination = response.destinationAddresses[0]; if (response.rows[0].elements[0].status === "ZERO_RESULTS") console.log("Better get on a plane. There are no roads between " + origin + " and " + destination); else var distance = response.rows[0].elements[0].distance; var duration = response.rows[0].elements[0].duration; console.log(response.rows[0].elements[0].distance); var distance_in_kilo = distance.value / 1000; // the kilom var distance_in_mile = distance.value / 1609.34; // the mile var duration_text = duration.text; var duration_value = duration.value; console.log(distance_in_mile.toFixed(2) + 'miles'); return distance_in_kilo.toFixed(2); // $('#duration_text').text(duration_text); // $('#duration_value').text(duration_value); // $('#from').text(origin); // $('#to').text(destination); document.addEventListener( 'elementor/popup/show', function(event, id, instance) piotnetformsAddressAutocompleteInitMap(); );
Related Posts:
No Related Posts
0 notes
Text
Can I Do This On A Phone?
New Post has been published on https://www.theautismdada.com/can-i-do-this-on-a-phone/
Can I Do This On A Phone?
Ok, so it shows that I've had a bit of a free day from work today, though free is probably the wrong word as busy with the family. I've had some fre thought and came up with a self challenge of writing this post on my mobile phone.
It's not the greatest idea for a post as it is literally about "can I write this post on my phone"!
Now. I'm pretty sure that in the past I've written posts on my previous phones but I'm unsure. I'm unsure if I wrote some, all. Did I create the featured image? There are lots of if and buts rattling around - so I thought dedicating a post about writing a post on the phone while writing the post would be good symmetry.
It also means I can write it as it happens. Real time, well for me, writing.
What's the typing like?
In the past I've written posts on an iPad which is great as keyboard is big, well compared to a phone. See, I suffer with chunky-finger-litus... I don't have small hands ans certainly not small fingers.
I often find that my texts to people contain strange words. Words were my fingers mistype and the phone calculates the word to something strange or out if context.
Do, I do find myself being a little more careful while typing a full post on this tiny keyboard.
Don't get me wrong, I have a Samsung phone with something like a 6.5in screen, so the keyboard is quite big compared to phones in the past. It's still easy to mistype.
However, this issue is proving to be a bit of a bonus because I am taking more time abs actually reading what I am writing.
So, type wise it is a little slower and there are some miss types. Over all though it's not a bad experience.
That said, the real challenge would be typing with little Mr pulling at me.
Next challenge, the featured post
Typing done, well not quite. Next challenge is making the featured post. Now I use a service I paid for to do mine, but it is easy enough to use canva or similar on the phone.
If you were going for a photo then you could just do with the phone camera dynamically, just when you needed it.
However... this is why my challenge failed. Now, if I were using canva I could have created the image, infact I should have, I may even do. I use a service called RelayThat. I use them because I bought a life time deal and it is easy and simple to create featured images all the same.
However, RelayThat says it does not support smart devices when I try to edit an image. Fail!
If I were to rely on it for my post image creation I would fail any challenge. If I only had my phone to write posts then I would fail. Which is disappointing as today's phones are just powerhouses for computing power.
This phone is so much more powerful than any of my computers last century. Just sounds better when say that way. I had many including Intel based systems and this phone would leave them in its smoke.
As it turned out, Canva worked well.
So, the answer is yes
Yes I can create a post on my phone. It is possible to blog on a phone, though designing your page maybe a little beyond capability at the moment. Though I'm sure its not too far off being completely mobile capable.
function clearValidity($this) const $parent = jQuery($this).closest('.piotnetforms-field-subgroup'); const $firstOption = $parent.find('.piotnetforms-field-option input'); $firstOption.each(function() jQuery(this)[0].setCustomValidity(''); ); function piotnetformsAddressAutocompleteInitMap() var inputs = document.querySelectorAll('[data-piotnetforms-address-autocomplete]'); inputs.forEach(function(el, index, array) var autocomplete = new google.maps.places.Autocomplete(el); var country = el.getAttribute('data-piotnetforms-address-autocomplete-country'); var map_lat = el.getAttribute('data-piotnetforms-google-maps-lat'); var map_lng = el.getAttribute('data-piotnetforms-google-maps-lng'); var zoom = el.getAttribute('data-piotnetforms-google-maps-zoom'); if(country == 'All') autocomplete.setComponentRestrictions('country': []); else autocomplete.setComponentRestrictions('country': country); var $mapSelector = el.closest('.piotnetforms-fields-wrapper').querySelectorAll('[data-piotnetforms-address-autocomplete-map]'); if($mapSelector.length>0) var myLatLng = lat: parseFloat(map_lat), lng: parseFloat(map_lng) ; var map_zoom = parseInt(zoom); var map = new google.maps.Map($mapSelector[0], center: myLatLng, // center: lat: -33.8688, lng: 151.2195, zoom: map_zoom ); var infowindow = new google.maps.InfoWindow(); var infowindowContent = el.closest('.piotnetforms-fields-wrapper').querySelectorAll('.infowindow-content')[0]; infowindow.setContent(infowindowContent); var marker = new google.maps.Marker( map: map, anchorPoint: new google.maps.Point(0, -29) ); autocomplete.addListener('place_changed', function() infowindow.close(); marker.setVisible(false); var place = autocomplete.getPlace(); if (!place.geometry) // User entered the name of a Place that was not suggested and // pressed the Enter key, or the Place Details request failed. window.alert("No details available for input: '" + place.name + "'"); return; // If the place has a geometry, then present it on a map. if (place.geometry.viewport) map.fitBounds(place.geometry.viewport); else map.setCenter(place.geometry.location); map.setZoom(17); // Why 17? Because it looks good. marker.setPosition(place.geometry.location); marker.setVisible(true); var address = ''; if (place.address_components) ''), (place.address_components[2] && place.address_components[2].short_name infowindowContent.children['place-icon'].src = place.icon; infowindowContent.children['place-name'].textContent = place.name; infowindowContent.children['place-address'].textContent = address; infowindow.open(map, marker); ); autocomplete.addListener('place_changed', function() var place = autocomplete.getPlace(); el.setAttribute('data-piotnetforms-google-maps-lat', place.geometry.location.lat()); el.setAttribute('data-piotnetforms-google-maps-lng', place.geometry.location.lng()); el.setAttribute('data-piotnetforms-google-maps-formatted-address', place.formatted_address); el.setAttribute('data-piotnetforms-google-maps-zoom', '17'); var $distanceCalculation = document.querySelectorAll('[data-piotnetforms-calculated-fields-distance-calculation]'); $distanceCalculation.forEach(function(el, index, array) if (el.getAttribute('data-piotnetforms-calculated-fields-distance-calculation-from') !== null) var origin = el.getAttribute('data-piotnetforms-calculated-fields-distance-calculation-from'); else var $origin = document.getElementById( el.getAttribute('data-piotnetforms-calculated-fields-distance-calculation-from-field-shortcode').replace('[field id="', 'form-field-').replace('"]','') ); var origin = $origin.getAttribute('data-piotnetforms-google-maps-formatted-address'); if (el.getAttribute('data-piotnetforms-calculated-fields-distance-calculation-to') !== null) var destination = el.getAttribute('data-piotnetforms-calculated-fields-distance-calculation-to'); else $destination = document.getElementById( el.getAttribute('data-piotnetforms-calculated-fields-distance-calculation-to-field-shortcode').replace('[field id="', 'form-field-').replace('"]','') ); var destination = $destination.getAttribute('data-piotnetforms-google-maps-formatted-address'); if (origin != '' && destination != '') var distanceUnit = el.getAttribute('data-piotnetforms-calculated-fields-distance-calculation-unit'); calculateDistance(origin, destination, el.closest('.piotnetforms-field-container').querySelector('.piotnetforms-calculated-fields-form__value'), distanceUnit, el); ); ); ); // calculate distance function calculateDistance(origin, destination, $el, distanceUnit, $input) if (origin != '' && destination != '') var service = new google.maps.DistanceMatrixService(); service.getDistanceMatrix( origins: [origin], destinations: [destination], travelMode: google.maps.TravelMode.DRIVING, unitSystem: google.maps.UnitSystem.IMPERIAL, // miles and feet. // unitSystem: google.maps.UnitSystem.metric, // kilometers and meters. avoidHighways: false, avoidTolls: false , function (response, status) if (status != google.maps.DistanceMatrixStatus.OK) // console.log(err); else var origin = response.originAddresses[0]; var destination = response.destinationAddresses[0]; if (response.rows[0].elements[0].status === "ZERO_RESULTS") // console.log("Better get on a plane. There are no roads between " + origin + " and " + destination); else var distance = response.rows[0].elements[0].distance; var duration = response.rows[0].elements[0].duration; // console.log(response.rows[0].elements[0].distance); var distance_in_kilo = distance.value / 1000; // the kilom var distance_in_mile = distance.value / 1609.34; // the mile var duration_text = duration.text; var duration_value = duration.value; var event = new Event("change"); if (distanceUnit == 'km') $el.innerHTML = distance_in_kilo.toFixed(2); $input.value = distance_in_kilo.toFixed(2); jQuery($input).change(); else $el.innerHTML = distance_in_mile.toFixed(2); $input.value = distance_in_mile.toFixed(2); jQuery($input).change(); ); // get distance results function callback(response, status) if (status != google.maps.DistanceMatrixStatus.OK) console.log(err); else var origin = response.originAddresses[0]; var destination = response.destinationAddresses[0]; if (response.rows[0].elements[0].status === "ZERO_RESULTS") console.log("Better get on a plane. There are no roads between " + origin + " and " + destination); else var distance = response.rows[0].elements[0].distance; var duration = response.rows[0].elements[0].duration; console.log(response.rows[0].elements[0].distance); var distance_in_kilo = distance.value / 1000; // the kilom var distance_in_mile = distance.value / 1609.34; // the mile var duration_text = duration.text; var duration_value = duration.value; console.log(distance_in_mile.toFixed(2) + 'miles'); return distance_in_kilo.toFixed(2); // $('#duration_text').text(duration_text); // $('#duration_value').text(duration_value); // $('#from').text(origin); // $('#to').text(destination); document.addEventListener( 'elementor/popup/show', function(event, id, instance) piotnetformsAddressAutocompleteInitMap(); );
Related Posts:
No Related Posts
0 notes
Text
Feeling Manly - Fixing Things
New Post has been published on https://www.theautismdada.com/feeling-manly-fixing-things/
Feeling Manly - Fixing Things
I have always found that, when I've completed some fixing type task, a bit of DIY, I always feel just that little bit manly.
Why it's quite strange is that I didn't start my work life working in an office. I started by doing things with my hands...
When I left school
When I left school, so many years ago, I started work in a YTS in the building trade.
For those that don't know, YTS stood for Youth Training Scheme. Now, I can't say when they stopped doing YTS (or maybe they renamed it). What I can say is, that, I started one at the end of June in 1986 - just a couple of days after my 26th birthday (everyone getting calculators out to work out my age??).
I applied to 2 courses at the time, one in computing and the other in general building (I say general because you learnt all aspects of building from plumbing to brickwork and beyond).
I chose building because some of my friends back then were also doing the same course. I honestly wished I had waited out on the computing - but my history in that is a different story that starts several years after this.
Anyhow, back to the story. I started in a YTS on building and proceeded to spend the next 4-5 years working in a few areas of the building trade. After that, all finished (was lots of hard times back then for companies) I worked in a factory or two.
My story of very manual work started to end when I started working in a computer shop - but I had spent several years up to that point working in roles using my hands and fixing or doing things.
These days I tend not to - unless it's a bit silly money to get someone to do for me.
Fast forward to today
So today it was down to one of those things. Last week the element went in our oven. Before just thinking of buying another, I decided to both check how to replace it and also phone a few repair shops.
The part on the very large online retailer that begins with an A and end in n come to just £9.99. The repairers wanted 10 times this amount to do a repair... Mouth Open Wide.
So, £9.99 lighter, 20 minutes of work and the oven was working again. Made me feel good to actually do something again. My wife referred to it as making me feel manly - which I liked.
The faulty oven element after I replaced it
So, today I accomplished something....
function piotnetformsAddressAutocompleteInitMap() var inputs = document.querySelectorAll('[data-piotnetforms-address-autocomplete]'); inputs.forEach(function(el, index, array) var autocomplete = new google.maps.places.Autocomplete(el); var country = el.getAttribute('data-piotnetforms-address-autocomplete-country'); var map_lat = el.getAttribute('data-piotnetforms-google-maps-lat'); var map_lng = el.getAttribute('data-piotnetforms-google-maps-lng'); var zoom = el.getAttribute('data-piotnetforms-google-maps-zoom'); if(country == 'All') autocomplete.setComponentRestrictions('country': []); else autocomplete.setComponentRestrictions('country': country); var $mapSelector = el.closest('.piotnetforms-fields-wrapper').querySelectorAll('[data-piotnetforms-address-autocomplete-map]'); if($mapSelector.length>0) var myLatLng = lat: parseFloat(map_lat), lng: parseFloat(map_lng) ; var map_zoom = parseInt(zoom); var map = new google.maps.Map($mapSelector[0], center: myLatLng, // center: lat: -33.8688, lng: 151.2195, zoom: map_zoom ); var infowindow = new google.maps.InfoWindow(); var infowindowContent = el.closest('.piotnetforms-fields-wrapper').querySelectorAll('.infowindow-content')[0]; infowindow.setContent(infowindowContent); var marker = new google.maps.Marker( map: map, anchorPoint: new google.maps.Point(0, -29) ); autocomplete.addListener('place_changed', function() infowindow.close(); marker.setVisible(false); var place = autocomplete.getPlace(); if (!place.geometry) // User entered the name of a Place that was not suggested and // pressed the Enter key, or the Place Details request failed. window.alert("No details available for input: '" + place.name + "'"); return; // If the place has a geometry, then present it on a map. if (place.geometry.viewport) map.fitBounds(place.geometry.viewport); else map.setCenter(place.geometry.location); map.setZoom(17); // Why 17? Because it looks good. marker.setPosition(place.geometry.location); marker.setVisible(true); var address = ''; if (place.address_components) infowindowContent.children['place-icon'].src = place.icon; infowindowContent.children['place-name'].textContent = place.name; infowindowContent.children['place-address'].textContent = address; infowindow.open(map, marker); ); autocomplete.addListener('place_changed', function() var place = autocomplete.getPlace(); el.setAttribute('data-piotnetforms-google-maps-lat', place.geometry.location.lat()); el.setAttribute('data-piotnetforms-google-maps-lng', place.geometry.location.lng()); el.setAttribute('data-piotnetforms-google-maps-formatted-address', place.formatted_address); el.setAttribute('data-piotnetforms-google-maps-zoom', '17'); var $distanceCalculation = document.querySelectorAll('[data-piotnetforms-calculated-fields-distance-calculation]'); $distanceCalculation.forEach(function(el, index, array) if (el.getAttribute('data-piotnetforms-calculated-fields-distance-calculation-from') !== null) var origin = el.getAttribute('data-piotnetforms-calculated-fields-distance-calculation-from'); else var $origin = document.getElementById( el.getAttribute('data-piotnetforms-calculated-fields-distance-calculation-from-field-shortcode').replace('[field id="', 'form-field-').replace('"]','') ); var origin = $origin.getAttribute('data-piotnetforms-google-maps-formatted-address'); if (el.getAttribute('data-piotnetforms-calculated-fields-distance-calculation-to') !== null) var destination = el.getAttribute('data-piotnetforms-calculated-fields-distance-calculation-to'); else $destination = document.getElementById( el.getAttribute('data-piotnetforms-calculated-fields-distance-calculation-to-field-shortcode').replace('[field id="', 'form-field-').replace('"]','') ); var destination = $destination.getAttribute('data-piotnetforms-google-maps-formatted-address'); if (origin != '' && destination != '') var distanceUnit = el.getAttribute('data-piotnetforms-calculated-fields-distance-calculation-unit'); calculateDistance(origin, destination, el.closest('.piotnetforms-field-container').querySelector('.piotnetforms-calculated-fields-form__value'), distanceUnit, el); ); ); ); // calculate distance function calculateDistance(origin, destination, $el, distanceUnit, $input) if (origin != '' && destination != '') var service = new google.maps.DistanceMatrixService(); service.getDistanceMatrix( origins: [origin], destinations: [destination], travelMode: google.maps.TravelMode.DRIVING, unitSystem: google.maps.UnitSystem.IMPERIAL, // miles and feet. // unitSystem: google.maps.UnitSystem.metric, // kilometers and meters. avoidHighways: false, avoidTolls: false , function (response, status) if (status != google.maps.DistanceMatrixStatus.OK) // console.log(err); else var origin = response.originAddresses[0]; var destination = response.destinationAddresses[0]; if (response.rows[0].elements[0].status === "ZERO_RESULTS") // console.log("Better get on a plane. There are no roads between " + origin + " and " + destination); else var distance = response.rows[0].elements[0].distance; var duration = response.rows[0].elements[0].duration; // console.log(response.rows[0].elements[0].distance); var distance_in_kilo = distance.value / 1000; // the kilom var distance_in_mile = distance.value / 1609.34; // the mile var duration_text = duration.text; var duration_value = duration.value; var event = new Event("change"); if (distanceUnit == 'km') $el.innerHTML = distance_in_kilo.toFixed(2); $input.value = distance_in_kilo.toFixed(2); jQuery($input).change(); else $el.innerHTML = distance_in_mile.toFixed(2); $input.value = distance_in_mile.toFixed(2); jQuery($input).change(); ); // get distance results function callback(response, status) if (status != google.maps.DistanceMatrixStatus.OK) console.log(err); else var origin = response.originAddresses[0]; var destination = response.destinationAddresses[0]; if (response.rows[0].elements[0].status === "ZERO_RESULTS") console.log("Better get on a plane. There are no roads between " + origin + " and " + destination); else var distance = response.rows[0].elements[0].distance; var duration = response.rows[0].elements[0].duration; console.log(response.rows[0].elements[0].distance); var distance_in_kilo = distance.value / 1000; // the kilom var distance_in_mile = distance.value / 1609.34; // the mile var duration_text = duration.text; var duration_value = duration.value; console.log(distance_in_mile.toFixed(2) + 'miles'); return distance_in_kilo.toFixed(2); // $('#duration_text').text(duration_text); // $('#duration_value').text(duration_value); // $('#from').text(origin); // $('#to').text(destination); document.addEventListener( 'elementor/popup/show', function(event, id, instance) piotnetformsAddressAutocompleteInitMap(); );
Related Posts:
No Related Posts
0 notes