tag:blogger.com,1999:blog-216616882024-03-13T16:14:25.458+00:00Andrew Jones - Alquist Consulting LtdMy blog about green energy, offshore wind farms, C, C++, C#, web, programming, electronics, Raspberry Pi/Pico, 3D printing, networking, structured cabling and any other nonsense I fancy writing down.Andrew Joneshttp://www.blogger.com/profile/13107118977345285906noreply@blogger.comBlogger112125tag:blogger.com,1999:blog-21661688.post-49211886125324280162022-12-01T18:53:00.000+00:002022-12-01T18:53:25.700+00:00Setting up Windows 10/11 as an NTP Time Server<p>Instructions to setup a Windows 10 or 11 PC as a NTP time server :</p><p></p><ul style="text-align: left;"><li>Using the <b>Registry Editor</b> change the following two keys</li></ul><p></p><blockquote style="border: none; margin: 0 0 0 40px; padding: 0px;"><p style="text-align: left;"><span style="font-family: courier;">HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\W32Time\Config -> AnnounceFlags = 5</span></p></blockquote><blockquote style="border: none; margin: 0 0 0 40px; padding: 0px;"><p style="text-align: left;"><span style="font-family: courier;">HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\W32Time\TimeProviders\NtpServer -> Enabled = 1</span></p></blockquote><p></p><ul style="text-align: left;"><li>Create inbound firewall rule allowing UDP port 123<br /><br /></li><li>From admin command prompt run <b>sc triggerinfo w32time delete</b> to clear any triggers which prevent the service from starting<br /><br /></li><li>Ensure "Windows Time" service is set to Automatic <br /><br /></li><li>Restart "Windows Time" service</li></ul><p></p>Andrew Joneshttp://www.blogger.com/profile/13107118977345285906noreply@blogger.com0tag:blogger.com,1999:blog-21661688.post-12569193320456644282021-04-14T12:43:00.001+01:002021-04-14T12:53:11.213+01:00What Brexit really costs<p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-RTzwYgGX-TM/YHbSUFjCWaI/AAAAAAAAAas/RVw612BPccsUVfTiBUcSO2HdHWFsu63GACLcBGAsYHQ/s1280/wind-park-2057881_1280.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="853" data-original-width="1280" src="https://1.bp.blogspot.com/-RTzwYgGX-TM/YHbSUFjCWaI/AAAAAAAAAas/RVw612BPccsUVfTiBUcSO2HdHWFsu63GACLcBGAsYHQ/s320/wind-park-2057881_1280.jpg" width="320" /></a></div><br />We make fibre optic test systems that are used to monitor the huge power cables connecting offshore windfarms. A typical system costs between £75,000 and £100,000, we sell or rent them to our customers. Most of our customers are based in the EU and are busy building windfarms in UK waters. Before Brexit we could take our equipment in our own vehicle and install it at the customer's site, there was no admin, no costs and no customs delays. It's taken until now, mid-April, to clarify the costs for supplying <u>rental</u> equipment from the UK to the EU.<br /><br />I've summarised the new costs and admin overhead below.<p></p><p><b>Staff</b></p><p>Thanks to the Trade and Cooperation Agreement (TCA) staff from the UK can work in the EU to deliver a contract between a UK and EU business. There are restrictions on the staff that can do this work, they must be over 21, have been employed for at least a year and have three years experience doing identical work. Self employed staff need six years experience. Individuals can only stay in the EU Schengen zone for a maximum of 90 days from the previous 180 (it's a personal limit that applies regardless if you are on holiday or working). To avoid having to pay National Insurance in the country you are working in you can apply for a "Certificate of continuing liability for National Insurance" - provided the UK has a reciprocal agreement with the country you are working in. All dates working outside the UK have to be reported to HMRC - all <b>additional admin</b> overhead not necessary previously.<br /></p><p><b>Tools and Equipment</b></p><p>We typically travel with around £25,000 of specialist fibre optic tools and test equipment. To travel to the EU all equipment needs it's own "passport" - an ATA Carnet. The cost for an ATA Carnet is <b style="color: red;">£620.50 </b><span style="color: red;">per trip</span>, there is a considerable <b>admin overhead</b> as all equipment must be itemised and listed with serial numbers along with a copy of the original invoice. All the equipment you take from the UK to EU must be returned. Nothing can be missed from the list on your return to the UK or you sacrifice the deposit. In this example the deposit is covered by insurance but without that a deposit of 40% of the full retail value (or bank guarantee for that amount) is required to be paid to the Chamber of Commerce who issues the ATA Carnet.</p><p><b>Shipping</b></p><p>Before Brexit goods and staff could travel freely around the EU transporting our own equipment. Now duties (tariffs and VAT) must be paid when crossing to or from the EU. Rules of origin and safety checks are also made as these potentially alter the payable tariff rates. To have the ability to "pre-clear" customs (to avoid sitting in a queue for as long as it takes) you must be a logistics company as only they have the software and VAT status to use the pre-clearance system. The UK government essentially allow DHL, and companies like them, to police the system on their behalf. The logistics companies are therefore quite conservative and won't touch anything that risks complications (like rentals or returns) as an error in a consignment could block or delay a whole lorry load of goods.<br /><br />The cost of shipping a 300kg pallet to and from the EU by DHL is <b><span style="color: red;">£1,765.00</span></b> and delivery takes around a week. Only logistics companies like DHL have the capability to deal with both the UK and EU customs formalities.</p><p><b>Tariffs and VAT</b></p><p>This is the big one! Being outside the EU and customs union means VAT is payable on delivery when goods are imported from the UK into the EU. In the case of the Netherlands that's at 21%. So the customer must pay 21% of £75,000 (the full retail price even though they are only renting it for a short time) before DHL will deliver the goods. That's <b><span style="color: red;">£15,750.00</span></b> to be paid even if the customer is renting the system for just a few days. When the rental goods are returned to the UK the customer can apply for this VAT to be refunded to them, but they still have to suffer the cashflow impact as it can take a while to arrange the refund.</p><p>I've shown in <span style="color: red;">red </span>the new post-Brexit costs for UK companies delivering a project in the EU. These are considerable costs that an EU supplier would not incur.</p><p>Can someone please explain the benefit the UK gets from being outside the single market and customs union?</p>Andrew Joneshttp://www.blogger.com/profile/13107118977345285906noreply@blogger.com0tag:blogger.com,1999:blog-21661688.post-22949458003548482542021-03-20T23:14:00.005+00:002021-03-21T00:11:19.227+00:00Replace Changeover Valve on a Dyson DC40 - Dyson P/N 922625-03<p>This video shows how to replace a damaged changeover valve on a Dyson DC40. It was working OK from the hose but not sucking very well when in carpet cleaning position. The problem turned out to be a ripped changeover valve (see photo below).</p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-QENmNobA62Q/YFZ5-ePzEoI/AAAAAAAAAaY/V5dOO16NzlUfacjdse9ovTjktSMnzs9eQCLcBGAsYHQ/s2048/IMG_5434.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" src="https://1.bp.blogspot.com/-QENmNobA62Q/YFZ5-ePzEoI/AAAAAAAAAaY/V5dOO16NzlUfacjdse9ovTjktSMnzs9eQCLcBGAsYHQ/s320/IMG_5434.jpg" width="320" /></a></div><br /><p></p><p>I bought a replacement from Amazon for £6 (Dyson P/N <b>922625-03 </b>"COV HOSE ASSY"). It's fairly easy and cheap to replace and only took about 10 minutes. The full video of the whole repair is shown below. You'll need a <b>Torx T8</b> and <b>T15</b> screwdriver bit (something like this).</p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-rFeED8PI2so/YFZ5Xfmyq0I/AAAAAAAAAaQ/DGhqif5Yo4csYPqDH8ue0zzW0VBPqCabgCLcBGAsYHQ/s300/Torx-Bits_T15-T20-T25-T30.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="180" data-original-width="300" src="https://1.bp.blogspot.com/-rFeED8PI2so/YFZ5Xfmyq0I/AAAAAAAAAaQ/DGhqif5Yo4csYPqDH8ue0zzW0VBPqCabgCLcBGAsYHQ/s0/Torx-Bits_T15-T20-T25-T30.jpg" /></a></div><div class="separator" style="clear: both; text-align: left;">I reckon I just saved about £300 on a new Dyson!</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">Please let me know how you got on if you attempted this repair. </div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen="" class="BLOG_video_class" height="266" src="https://www.youtube.com/embed/m41WbGaUDVc" width="320" youtube-src-id="m41WbGaUDVc"></iframe></div><br /><div class="separator" style="clear: both; text-align: left;"><br /></div><br /><p></p>Andrew Joneshttp://www.blogger.com/profile/13107118977345285906noreply@blogger.com0tag:blogger.com,1999:blog-21661688.post-7831846005795784732021-03-06T22:24:00.032+00:002021-03-11T18:07:05.996+00:00How to play R'Méribel, la radiostation on an Amazon Alexa (or Echo) by tapping a single iPhone button<p>This sounds simple but it takes quite a few steps. This is the result, a single "R'Méribel" button on the iPhone Today View screen that you click to play R'Méribel on your Alexa (the screen you see when you swipe right from the left edge of the Home Screen or Lock Screen). I'm using iOS <b>14.4</b> in these instructions, hopefully it'll continue to work in newer versions too.</p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-HbT3DGoZ-9w/YEPjssHGnCI/AAAAAAAAAYM/CFhdFXWwLUcJsFQLyPSz62OBIiqUOGfYwCLcBGAsYHQ/s2001/IMG_5405.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2001" data-original-width="1125" height="320" src="https://1.bp.blogspot.com/-HbT3DGoZ-9w/YEPjssHGnCI/AAAAAAAAAYM/CFhdFXWwLUcJsFQLyPSz62OBIiqUOGfYwCLcBGAsYHQ/s320/IMG_5405.PNG" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;">First a little context. Although UK based we have a house in Méribel (a ski resort in France) which we cannot easily visit at the moment thanks to COVID. It's nice to listen to R'Méribel to remind ourselves of the good times skiing, and, for a French station, they play some surprisingly decent music in the evenings without any DJ's or too many adverts.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><b>Step 1)</b> First you need to install the "myTuner Radio Player App" as an Alexa skill. From the Alexa iPhone app tap the "More" button and select "Skills & Games". Tap the "Search" button and search for "myTuner Radio Player App" tap on it in the results list and then click "Enable to use".<br /><br />In theory this is enough to allow you to say "Alexa, ask mytuner radio to play R'Méribel". In practice I find the apostrophe and é (accent aigu) confuse the voice recognition at least on my Alexa which is set to UK English.<div><br /></div><div>The problem is the station name "R'Méribel" is a play on words, it should really be something like "Radio de Méribel" but it's been shortened to make it look and sound cooler. However, this abbreviation totally confuses the Alexa voice recognition as anything but an exact database match fails to find the station in the mytuner database of stations. I should really pop down and speak to the Alexa software developers as they are just down the road from me in Cambridge. </div><div><br /></div><div>Anyway, to work around this problem we'll add an Alexa "Routine" to bypass the voice recognition so the action can be triggered with a simpler phrase which is hopefully a little easier for Alexa to understand.<p></p><div><b>Step 2)</b> Adding an Alexa Routine: From the Alexa iPhone app tap the "More" button and select "Routines". Tap the "+" button (top right). You should see this screen :<div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-CmdHJ_KLHEA/YEPoYXU0vFI/AAAAAAAAAYU/KEFhfMCmaTcVR4ILzZ8KLUe1PJTU_jbzgCLcBGAsYHQ/s2001/IMG_5406.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2001" data-original-width="1125" height="320" src="https://1.bp.blogspot.com/-CmdHJ_KLHEA/YEPoYXU0vFI/AAAAAAAAAYU/KEFhfMCmaTcVR4ILzZ8KLUe1PJTU_jbzgCLcBGAsYHQ/s320/IMG_5406.PNG" /></a></div><div class="separator" style="clear: both; text-align: left;">Tap on "Enter routine name" and call it anything you like, I called mine <b>Say 'Alexa, Meribel' </b>to remind me what the trigger phrase is.<br /><br />Tap on "When this happens" and tap on "Voice". This allows you to enter a phrase to start the routine. I called mine simply "Meribel" but you can choose any phrase you prefer.<br /><br />Tap on "Add action" and scroll down to "Customised". Enter the specific text "Alexa, ask mytuner radio to play R'Méribel". I've found it's critical to enter the single vertical apostrophe between the R and M (press and hold on the ' key in the iPhone keyboard to get different options) and the e as é (press and hold the e on the iPhone keyboard to get various accents). If you don't enter this precisely as shown it doesn't match to the station name and offers three almost random selections. It took me ages to work this out. Please enter it exactly as shown. <br /><br /></div><div class="separator" style="clear: both; text-align: left;">This step is important as it essentially sends the raw command "Alexa, ask mytuner radio to play R'Méribel" directly to myTuner avoiding the utterly unreliable and inconsistent voice recognition part of Alexa (which rarely works well with my grumpy voice even on a good day).<br /><br />Finally tap "Choose Device" to select which device it will play on.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">With these steps complete you should see this screen.<div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-e2FpqRERl9k/YEPq03_vs9I/AAAAAAAAAYc/ZSKEqEgr9JQOE490YU3uRuxqtnSf-qhgACLcBGAsYHQ/s2001/IMG_5407.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2001" data-original-width="1125" height="320" src="https://1.bp.blogspot.com/-e2FpqRERl9k/YEPq03_vs9I/AAAAAAAAAYc/ZSKEqEgr9JQOE490YU3uRuxqtnSf-qhgACLcBGAsYHQ/s320/IMG_5407.PNG" /></a></div><div class="separator" style="clear: both; text-align: left;"><br /></div>You can tap on the blue play button to trigger any of your routines. Alternatively you can say "Alexa, Meribel" to trigger the routine with a simple voice command.<br /><br />I have found that occasionally nothing will play. I think this is due to a problem sending the audio feed from R'Méribel because the <a href="https://mytuner-radio.com/radio/" target="_blank">myTuner</a> web page also fails to play anything at the same time. I've found there is nothing you can do other than waiting for it to start working again.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">If, like me, you struggle to get Alexa to understand what you are saying it's a bit of a pain having to go into the Alexa app, press "More" then "Routines" just to tap the play button. Wouldn't it be much nicer to have a single button on the iPhone main screen?</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;"><div class="separator" style="clear: both;"><b>TL;DR </b>(too long; didn't read)</div><div class="separator" style="clear: both;">To make it really easy to setup the Alexa Routine above simply click <a href="https://alexa.amazon.com/routines/shared/sq_9zIsOSBeXhHXsnz5CmA">here</a> or point your camera at this QR Code (or tap it) and it'll do everything described above automatically.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://alexa.amazon.com/routines/shared/iDXSDT1-RTuKCakt6WBubg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="299" data-original-width="299" src="https://1.bp.blogspot.com/-eUudMgi2T8I/YEQTEe-xLcI/AAAAAAAAAZs/GHy5Ptre1TQkMjVdhz1stsJiXYmLVHy8ACLcBGAsYHQ/s0/Alexa%2BRoutine%2BRDM.png" /></a></div></div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">If you're happy with this method so far you can stop at this point. If you want to trigger the Alexa action with a single tap of an iPhone button please continue.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;"><b>Steps to add a button on an iPhone to trigger an Alexa routine</b><br /><br /></div><div class="separator" style="clear: both; text-align: left;">We need to install another Alexa skill but before we can do this you need an active <a href="https://www.patreon.com/">https://www.patreon.com/</a> account. Patreon is a payment system for making small regular payments and mainly used for paying musicians or podcast creators. Don't worry, this process is <b>FREE</b> for a single button (you can support the developers by paying a small monthly amount if you want multiple buttons to trigger multiple Alexa actions - this can be helpful for various home automation projects). However, register a Patreon account using your email address and create a new password (don't even think of using the same password everywhere!!!). Once you've completed the registration page don't forget to click on the button at the top of the Patreon web page to send yourself a verification email. Once your Patreon account is fully verified you can continue.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">Next, we need to add the "Virtual Buttons" skill to Alexa. From the Alexa iPhone app tap the "More" button and select "Skills & Games". Tap the "Search" button and search for "Virtual Buttons" tap on it in the results list and then tap "Enable to use". Right after you enable the Virtual Buttons skill you must link it to your Patreon account by entering your email address and Patreon password. At his point Virtual Buttons will send you an email with a long URL in it (from info@virtualbuttons.com - make sure it's not sent to your spam folder). You can use this URL to trigger your Alexa routine from anywhere. Keep it secret as anyone with the URL will be able to trigger the routine. The email will look something like this. We'll need the bit in yellow later.</div><div class="separator" style="clear: both; text-align: left;"><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-5oTMpsKdSF8/YEYAdGfazbI/AAAAAAAAAZ8/pKssb1yzJBQr350KMvdmXPL6ysSHrgCwACLcBGAsYHQ/s737/Capture.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="687" data-original-width="737" src="https://1.bp.blogspot.com/-5oTMpsKdSF8/YEYAdGfazbI/AAAAAAAAAZ8/pKssb1yzJBQr350KMvdmXPL6ysSHrgCwACLcBGAsYHQ/s320/Capture.JPG" width="320" /></a></div></div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">We now need to create another Alexa routine to "Alexa, ask mytuner radio to play R'Méribel" but this time when the "Virtual Button 01" is pressed.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;"><b>TL;DR</b></div><div class="separator" style="clear: both; text-align: left;">You can follow along below with the manual instructions, click <a href="https://alexa.amazon.com/routines/shared/iDXSDT1-RTuKCakt6WBubg" target="_blank">here</a> or simply point your iPhone camera at this QR code (or tap it) to automatically setup the "Virtual Buttons" routine described below.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://alexa.amazon.com/routines/shared/iDXSDT1-RTuKCakt6WBubg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="285" data-original-width="285" src="https://1.bp.blogspot.com/-8boq2z9cuMQ/YEQT_4ui0rI/AAAAAAAAAZ0/iRdukfeWLEsAags-LXagd5VT64tviFykACLcBGAsYHQ/s0/Alexa%2BRoutine%2BVB.png" /></a></div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;"><div class="separator" style="clear: both;">Launch the Alexa app on your mobile device. Tap the more icon (usually lower right part of screen) and select "Routines". Tap the "+" icon in the top right corner. Tap "Enter routine name" and choose a name, I called mine "Virtual Button 01 is pressed". Tap "When This Happens", then tap "Smart Home" and choose the "Virtual Button 01" device and tap "Save". Select "Add action", then select "Customised" and enter "Alexa, ask mytuner radio to play R'Méribel". Tap "Next" in the top right corner. Tap "Choose Device", and then select the Alexa device you want to play on. Tap "Save" in the top right corner.</div><div class="separator" style="clear: both;"><br /></div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-Uo_q_FgAyIQ/YEP0i6wcoDI/AAAAAAAAAYk/6H_D9ShrxmAbG906xWQwqgI_2s4fXXe4QCLcBGAsYHQ/s2001/IMG_5407.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2001" data-original-width="1125" height="320" src="https://1.bp.blogspot.com/-Uo_q_FgAyIQ/YEP0i6wcoDI/AAAAAAAAAYk/6H_D9ShrxmAbG906xWQwqgI_2s4fXXe4QCLcBGAsYHQ/s320/IMG_5407.PNG" /></a></div><br /><div class="separator" style="clear: both;">You can now click on the blue "Play" button next to "Virtual Button 01 is pressed" to test the new routine. It should start playing R'Méribel again.</div><div class="separator" style="clear: both;"><br /></div><div class="separator" style="clear: both;"><b>Adding an Apple Shortcut</b></div><div class="separator" style="clear: both;"><br /></div><div class="separator" style="clear: both;">Finally, we are going to use the Apple Shortcuts app to create a button using the "unique access code" URL that was emailed to us from info@VirtualButtons.com (the bit in yellow in the email). The URL can be used from any device so you could for example start the R'Méribel routine by clicking on the link in the email or adding it as a favourite button in your web browser.</div><div class="separator" style="clear: both;"><br /></div><div class="separator" style="clear: both;">However, we are going to use the Apple Shortcuts app to create an iPhone button. Start the "Shortcuts" app on your iPhone and click on "All Shortcuts". We are going to add a "R'Méribel" shortcut like this (top left).<div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-u3MF-kFFVjI/YEP2UTgYqOI/AAAAAAAAAYs/pZJy31tw9AMQI385ykDKypJtoi_NSmzJwCLcBGAsYHQ/s2001/IMG_5408.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2001" data-original-width="1125" height="320" src="https://1.bp.blogspot.com/-u3MF-kFFVjI/YEP2UTgYqOI/AAAAAAAAAYs/pZJy31tw9AMQI385ykDKypJtoi_NSmzJwCLcBGAsYHQ/s320/IMG_5408.PNG" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">Tap on the "+" (top right) and tap "Add Action" then tap "Apps". You should have a screen something like this (the icons will depend on which apps you have on your phone) :<div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-uWL4UtitO8s/YEP3Ns-W48I/AAAAAAAAAY0/JGcUSzUV52EfskBphZhovB3Ryq_HbxcpwCLcBGAsYHQ/s2001/IMG_5410.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2001" data-original-width="1125" height="320" src="https://1.bp.blogspot.com/-uWL4UtitO8s/YEP3Ns-W48I/AAAAAAAAAY0/JGcUSzUV52EfskBphZhovB3Ryq_HbxcpwCLcBGAsYHQ/s320/IMG_5410.PNG" /></a></div><div class="separator" style="clear: both; text-align: left;">Scroll down and tap "Safari" and then tap "Open URLs".</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">You need to copy the long URL sent in the Virtual Button email and paste it where it says URL in blue. It'll look something like this when you've pasted the URL in.</div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-eXmX1dnvuSg/YEP4NHra17I/AAAAAAAAAY8/mTzSMEE7JDMFPLt9TeSfuCkdmopBN9kjACLcBGAsYHQ/s2001/IMG_5412.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2001" data-original-width="1125" height="320" src="https://1.bp.blogspot.com/-eXmX1dnvuSg/YEP4NHra17I/AAAAAAAAAY8/mTzSMEE7JDMFPLt9TeSfuCkdmopBN9kjACLcBGAsYHQ/s320/IMG_5412.PNG" /></a></div><div class="separator" style="clear: both; text-align: left;">Remember this URL is "secret", anyone who has it can trigger the routine on your Alexa.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">Tap "Next" and enter a name for the shortcut. I called mine R'Méribel and finally tap "Done". You should have a button in the Shortcuts app that you can click on. <div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-23lyyn7JkmU/YEP5cqOSIcI/AAAAAAAAAZE/Dohw1DDcZSIsWtKQfGZSNXbiT8uos5hDgCLcBGAsYHQ/s2001/IMG_5408.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2001" data-original-width="1125" height="320" src="https://1.bp.blogspot.com/-23lyyn7JkmU/YEP5cqOSIcI/AAAAAAAAAZE/Dohw1DDcZSIsWtKQfGZSNXbiT8uos5hDgCLcBGAsYHQ/s320/IMG_5408.PNG" /></a></div><div class="separator" style="clear: both; text-align: left;">When you click on the button you should see the following in the browser which confirms the action has been triggered.<div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/--9fli7tQpHc/YEP5-AVmALI/AAAAAAAAAZM/UdyL1REGg2EWN98wYSARQCFZaejStYASgCLcBGAsYHQ/s2001/IMG_5413.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2001" data-original-width="1125" height="320" src="https://1.bp.blogspot.com/--9fli7tQpHc/YEP5-AVmALI/AAAAAAAAAZM/UdyL1REGg2EWN98wYSARQCFZaejStYASgCLcBGAsYHQ/s320/IMG_5413.PNG" /></a></div><div class="separator" style="clear: both; text-align: left;">The Virtual Button website does it's magic and triggers the "Virtual Button 01 is pressed" Alexa routine. This routine in turn sends "Alexa, ask mytuner radio to play R'Méribel" to the mytuner skill which should start the station playing.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">One final step. Tap and hold on the "R'Méribel" shortcut button in the Shortcuts app and select "Details" from the menu at the bottom (I've found you need to tap and hold directly on top of the shortcut icon, not the three dots, to get the menu to appear). You can now tap "Add to Home Screen" to change the name and possibly the icon (as I did here - I grabbed an image from <a href="https://laradiostation.fr/r-meribel/">https://laradiostation.fr/r-meribel/</a>), finally press "Add" to add the icon as a normal iPhone app button.<div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-nacK48VM218/YEQHT9BGAnI/AAAAAAAAAZk/22dSeO6drTExjxOha7v1w9Ydn0ztdP1ZACLcBGAsYHQ/s2001/IMG_5415.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2001" data-original-width="1125" height="320" src="https://1.bp.blogspot.com/-nacK48VM218/YEQHT9BGAnI/AAAAAAAAAZk/22dSeO6drTExjxOha7v1w9Ydn0ztdP1ZACLcBGAsYHQ/s320/IMG_5415.PNG" /></a></div><br />You can now tap on the button and all the magic happens in the background.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">To get the button on the "Today View" page you need to add the "Shortcuts Widget". Scroll to the bottom of the "Today View" and tap "Edit" then the "+" top right. Search for "Shortcuts" and then "Add Widget", you can swipe to select a single, four or eight shortcut buttons. This will add a widget to the Today View which can then be customised to include multiple shortcuts.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">That's it. Easy when you know how. Swipe right and tap on one button for R'Méribel!</div><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-PEjdW0b9F-A/YEQA8RJPZnI/AAAAAAAAAZc/ssZDjRPCo1kjHcj0CZad_SuV1yDBUUrggCLcBGAsYHQ/s2001/IMG_5405.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2001" data-original-width="1125" height="320" src="https://1.bp.blogspot.com/-PEjdW0b9F-A/YEQA8RJPZnI/AAAAAAAAAZc/ssZDjRPCo1kjHcj0CZad_SuV1yDBUUrggCLcBGAsYHQ/s320/IMG_5405.PNG" /></a></div><div class="separator" style="clear: both; text-align: left;"><br /></div>You can use this Virtual Button technique to trigger any number of Alexa Routines. Because the shortcut is added to your iPhone you can even get Siri to trigger the routine with a voice command on your phone. I'll leave it to you to figure that one out.</div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;">You can now enjoy the view whilst listening to R'Méribel.<div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-cy-uwnIpSH4/YEdlpI7uoNI/AAAAAAAAAaE/xu67SbrwHBQ7vv3glO3ScLJH_TObt6D8wCLcBGAsYHQ/s2048/IMG_0040.JPG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1536" data-original-width="2048" src="https://1.bp.blogspot.com/-cy-uwnIpSH4/YEdlpI7uoNI/AAAAAAAAAaE/xu67SbrwHBQ7vv3glO3ScLJH_TObt6D8wCLcBGAsYHQ/s320/IMG_0040.JPG" width="320" /></a></div><br /><br /><div class="separator" style="clear: both; text-align: left;"><br /></div><br /></div><br /></div><br /><div class="separator" style="clear: both; text-align: left;"><br /></div><br /></div><br /></div></div><div class="separator" style="clear: both; text-align: left;"><br /></div><div class="separator" style="clear: both; text-align: left;"><br /></div><br /></div></div>Andrew Joneshttp://www.blogger.com/profile/13107118977345285906noreply@blogger.com0tag:blogger.com,1999:blog-21661688.post-70625838500178863432020-09-20T22:16:00.000+01:002020-09-20T22:16:11.493+01:00Dremel 3D45<p>Well, here's my first 3D designed project printed with a Dremel 3D45 over the weekend. Setup was a bit annoying. It's not clear that by selecting "UK" during the initial setup it prevents use of the online remote printing tool (as the Dremel's About screen does not show the Token needed to setup the online connection). Switching the Dremel from "UK" to "US" is the trick you need to get this working.<br /><br />Apart from that it takes a little bit of practice to work out what prints well and which orientation you need for best results. In the photo below I made the two trays separately and designed them to click into the moon shaped parts.</p><p>I started using Autodesk Fusion but quickly switched to Sketchup 2020 for speed. I'd not really used Sketchup much but after a weekend of playing I'm getting pretty quick at new designs.</p><p>Overall I've been impressed with the printer. The parts produced (here in standard print quality mode) are perfectly useable. Standard mode is perfectly good enough for non-seen parts. You might want to use high quality mode for visible surfaces.</p><p>The biggest learning curve is finding a design tool that you can use. <br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-4o-uaR4DQws/X2fDgW0cl9I/AAAAAAAAAWE/uXPq9pUHVkADit9R2HYIsqDOA14xMPwVgCLcBGAsYHQ/s2048/IMG_5071.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="2048" data-original-width="1536" height="320" src="https://1.bp.blogspot.com/-4o-uaR4DQws/X2fDgW0cl9I/AAAAAAAAAWE/uXPq9pUHVkADit9R2HYIsqDOA14xMPwVgCLcBGAsYHQ/s320/IMG_5071.jpg" /></a></div><br /><p></p>Andrew Joneshttp://www.blogger.com/profile/13107118977345285906noreply@blogger.com0tag:blogger.com,1999:blog-21661688.post-15900845275911114162018-07-25T10:55:00.003+01:002018-07-25T10:58:49.294+01:00How to close a RDP session but leave original user logged onIt's annoying when you make a Remote Desktop Connection (RDP) to a PC that it does not automatically reconnect the original user once your remote session has finished. I often need to do this to remotely control a Windows based bit of test equipment. I developed this script to place a button on the Taskbar of the controlled machine to close the RDP session. Provided you use this button the desktop is returned to the original user as the remote session terminates. However, if you simply close the session (as you do normally by closing the RDC window) this code does not help and the machine will, as normal, prompt for a password before returning to the desktop.<br />
<br />
Firstly you need to create this .bat file. I've Created mine in a folder called C:\Temp\Shutdown RDP and named my .bat file "CloseRDP.bat".<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: xx-small;">set MY_SESSION_ID=unknown</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: xx-small;">for /f "tokens=3-4" %%a in ('query session') do @if "%%b"=="Active" set MY_SESSION_ID=%%a</span><br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: xx-small;">tscon %MY_SESSION_ID% /DEST:console /Password:<span style="color: red;">YourTopSecretPassword</span></span><br />
<br />
Firstly let me explain what this does. The second line runs the command 'query session' and extracts the session ID that is active. It puts the session ID into an environment variable called MY_SESSION_ID. The third line closes the active session (based on it's session ID number from line 2) and redirects to the console. You will have to replace <span style="color: red;">YourTopSecretPassword </span>with the password for the desktop user. Now, this is a bit of a security risk as the password is in plain text inside the .bat file but I'm afraid it does not work if you leave it out.<br />
<br />
However there is a problem with this .bat file...it must be run with Administrator privileges otherwise it does not work. So from File Explorer right click on CloseRDP.bat and select "Copy". Then right click in some empty space in the same folder and select "Paste Shortcut". My shortcut is now called "CloseRDP.bat - Shortcut". Right click on this and select "Properties", click on the "Advanced" button and tick "Run as administrator" and click OK twice to return to File Explorer. You have now created a shortcut that runs as Administrator. You can click on this to close the RDC session and return to the desktop. Because it runs as an Administrator you will be prompted to enter the Administrator password.<br />
<br />
In an ideal world you would be able to drag this shortcut directly to the Taskbar for it to appear as a clickable program. However for some weird reason this does not work.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
To fix this a second shortcut is required! Don't ask me why just do it! In File Explorer right click on "CloseRDP.bat - Shortcut" and select "Copy". Now right click in some empty space again and select "New > Shortcut". In the "Type the location of the item box" manually type "explorer " and then press Ctrl+V to paste the name copied earlier. It should look like this:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/--o2D_DxgLXk/W1hC_3c8tJI/AAAAAAAAARY/L34O7sXM5d4EPN84NRy8uphzUVuyB2ekQCEwYBhgL/s1600/Screen1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="454" data-original-width="614" height="236" src="https://2.bp.blogspot.com/--o2D_DxgLXk/W1hC_3c8tJI/AAAAAAAAARY/L34O7sXM5d4EPN84NRy8uphzUVuyB2ekQCEwYBhgL/s320/Screen1.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Click "Next" and give the shortcut a name. I've called mine "Pinable CloseRDP". There are now three files in the folder that should look like this</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-P-u4PvPW9bA/W1hD5g20DUI/AAAAAAAAARk/UtRyjuQBXVksg6Com4Da3Al9NTfax4AIQCLcBGAs/s1600/Screen2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="593" data-original-width="966" height="196" src="https://1.bp.blogspot.com/-P-u4PvPW9bA/W1hD5g20DUI/AAAAAAAAARk/UtRyjuQBXVksg6Com4Da3Al9NTfax4AIQCLcBGAs/s320/Screen2.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Now the icon for "Pinable CloseRDP" has the normal boring File Explorer icon. I like to change this to something that stands out better so right click on "Pinable CloseRDP" and select "Properties". Click on the "Change Icon..." button and select one of the default icons. I normally go with the red cross. Click OK twice to return to File Explorer. File Explorer should now have three files that look like this:</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-94TNQuqnxKQ/W1hE0M7IAGI/AAAAAAAAARw/Wq-bOfkxY28yDE1srtnWyBV3DQ1-mEKaQCLcBGAs/s1600/screen3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="593" data-original-width="966" height="196" src="https://3.bp.blogspot.com/-94TNQuqnxKQ/W1hE0M7IAGI/AAAAAAAAARw/Wq-bOfkxY28yDE1srtnWyBV3DQ1-mEKaQCLcBGAs/s320/screen3.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Now, after all these steps, you can finally drag the "Pinable CloseRDP" and drop it onto the Taskbar. You should now have a nice clear button that you can click to close the remote session and return the desktop to the original user.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-mEsIgL1EhiY/W1hFpXFhHGI/AAAAAAAAAR4/VUBwBSuJyykJ-wFR0XngYgzM7z45hcxlACLcBGAs/s1600/screen4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="95" data-original-width="294" src="https://3.bp.blogspot.com/-mEsIgL1EhiY/W1hFpXFhHGI/AAAAAAAAAR4/VUBwBSuJyykJ-wFR0XngYgzM7z45hcxlACLcBGAs/s1600/screen4.png" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
If you are really keen you could design a custom icon to make it even clearer. When you click on you new icon you will be prompted for the Administrator password, the remote session will close and the desktop will return to the local user session without any password prompt.<br />
<br />
Good luck, there are quite a few steps but it does work well if you follow them carefully.<br />
<br />
<br />Andrew Joneshttp://www.blogger.com/profile/13107118977345285906noreply@blogger.com0tag:blogger.com,1999:blog-21661688.post-1430576406877210802018-03-02T11:51:00.000+00:002018-03-02T11:51:11.811+00:00WPF Blurry PixelsToday I needed to create a small control for the status bar of my app. It needs to be small to show the pass/fail status of 96 items.<br />
<br />
I had an ItemControl displaying the 96 items as 4 rows of 24. I started with this code but it was horribly blurry and irregularly spaced.<br />
<br />
<span style="color: blue; font-family: Consolas; font-size: x-small;"><</span><span style="color: #a31515; font-family: Consolas; font-size: x-small;"><span style="color: #a31515; font-family: Consolas; font-size: x-small;"><span style="color: #a31515; font-family: Consolas; font-size: x-small;">Rectangle <span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: red; font-family: Consolas; font-size: x-small;"><span style="color: red; font-family: Consolas; font-size: x-small;"><span style="color: red; font-family: Consolas; font-size: x-small;">Width</span></span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;">="4" <span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: red; font-family: Consolas; font-size: x-small;"><span style="color: red; font-family: Consolas; font-size: x-small;"><span style="color: red; font-family: Consolas; font-size: x-small;">Height</span></span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;">="4" <span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: red; font-family: Consolas; font-size: x-small;"><span style="color: red; font-family: Consolas; font-size: x-small;"><span style="color: red; font-family: Consolas; font-size: x-small;">Margin</span></span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;">="1,1,0,0" <span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: red; font-family: Consolas; font-size: x-small;"><span style="color: red; font-family: Consolas; font-size: x-small;"><span style="color: red; font-family: Consolas; font-size: x-small;">Fill</span></span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;">="Green" /></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><br />
<a href="https://4.bp.blogspot.com/-tAfpe0pJf00/Wpk36xZLW4I/AAAAAAAAAQ8/_Xl_hLYYYWsFcbVGXfHQrttJQbk1_pqLwCLcBGAs/s1600/Image2.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="205" data-original-width="991" height="66" src="https://4.bp.blogspot.com/-tAfpe0pJf00/Wpk36xZLW4I/AAAAAAAAAQ8/_Xl_hLYYYWsFcbVGXfHQrttJQbk1_pqLwCLcBGAs/s320/Image2.png" width="320" /></a><br />
<br />
<br />
<br />
<br />
<div style="text-align: left;">
</div>
<div style="text-align: left;">
To get it to display nicely with no blurry edges I changed the code to this...</div>
<div style="text-align: left;">
<span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><</span></span></span><span style="color: #a31515; font-family: Consolas; font-size: x-small;"><span style="color: #a31515; font-family: Consolas; font-size: x-small;"><span style="color: #a31515; font-family: Consolas; font-size: x-small;">Rectangle</span></span></span><span style="color: red; font-family: Consolas; font-size: x-small;"><span style="color: red; font-family: Consolas; font-size: x-small;"><span style="color: red; font-family: Consolas; font-size: x-small;"> Width</span></span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;">="3.84"</span></span></span><span style="color: red; font-family: Consolas; font-size: x-small;"><span style="color: red; font-family: Consolas; font-size: x-small;"><span style="color: red; font-family: Consolas; font-size: x-small;"> Height</span></span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;">="3.84"</span></span></span><span style="color: red; font-family: Consolas; font-size: x-small;"><span style="color: red; font-family: Consolas; font-size: x-small;"><span style="color: red; font-family: Consolas; font-size: x-small;"> Margin</span></span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;">="0.96,0.96,0,0"</span></span></span><span style="color: red; font-family: Consolas; font-size: x-small;"><span style="color: red; font-family: Consolas; font-size: x-small;"><span style="color: red; font-family: Consolas; font-size: x-small;"> Fill</span></span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;">="Green" /></span></span></span></div>
<div style="text-align: left;">
<a href="https://3.bp.blogspot.com/-eJHOqj3Wi8A/Wpk368clRII/AAAAAAAAAQ4/dDCI6wZJcGwVF6ELBpfkk4W-RewNolxiACLcBGAs/s1600/image1.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="214" data-original-width="979" height="69" src="https://3.bp.blogspot.com/-eJHOqj3Wi8A/Wpk368clRII/AAAAAAAAAQ4/dDCI6wZJcGwVF6ELBpfkk4W-RewNolxiACLcBGAs/s320/image1.png" width="320" /></a></div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
It's because WPF assumes 96 pixels per inch. By changing the size to be multiple of 0.96 you can trick WPF into drawing complete pixels.</div>
<br />
<span style="color: #a31515; font-family: Consolas; font-size: x-small;"><span style="color: #a31515; font-family: Consolas; font-size: x-small;"><span style="color: #a31515; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><br />
<br />
<br />
<br />
<br />
<br />
<br />
<div style="text-align: left;">
<div style="text-align: left;">
<span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"></span></span></span> </div>
<span style="color: #a31515; font-family: Consolas; font-size: x-small;"><span style="color: #a31515; font-family: Consolas; font-size: x-small;"><span style="color: #a31515; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><br />
</div>
Andrew Joneshttp://www.blogger.com/profile/13107118977345285906noreply@blogger.com0tag:blogger.com,1999:blog-21661688.post-57273459733584799572018-02-24T16:58:00.000+00:002018-02-24T19:10:18.304+00:00UK Government Gateway 2FA/2SVThe UK Government Gateway now requires two factor authentication, which they call two step verification (2SV), when you login. This is a very good thing. You can download the HMRC app, receive SMS text messages (very insecure) or receive an automated phone call (quite insecure). They push you to download the HMRC app for your phone. However, I've discovered they are using industry standard Time-Based One-Time Password (TOTP) passwords (another very good thing). As a result you can use the standard Google Authenticator or Microsoft Authenticator on your iPhone instead of the HMRC app.<br />
<a href="https://3.bp.blogspot.com/-urrhgeHB6RQ/WpGgWs0KbEI/AAAAAAAAAQo/5n-sSMiI7JsaYQ-yphPuX9zhs1dalTdQACLcBGAs/s1600/MSAuthenticator.PNG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="418" data-original-width="744" height="179" src="https://3.bp.blogspot.com/-urrhgeHB6RQ/WpGgWs0KbEI/AAAAAAAAAQo/5n-sSMiI7JsaYQ-yphPuX9zhs1dalTdQACLcBGAs/s320/MSAuthenticator.PNG" width="320" /></a>Simply select "Mobile App" as your authentication method in the HMRC web site to display a QR code. Scan the QR code from your mobile authenticator app and you will be up and running in seconds. No need to download the HMRC app. Generally TOTP mobile phone authentication is much more secure than text messages or phone calls. Two factor authentication by SMS text message, used by many banks, should be banned as it's highly insecure due to serious vulnerabilities with the SS7 protocol used between mobile networks. It's so insecure that NIST (US Standards body) are no longer recommending SMS text messages a part of a two factor authentication scheme. For more details see <a href="https://www.schneier.com/blog/archives/2016/08/nist_is_no_long.html">https://www.schneier.com/blog/archives/2016/08/nist_is_no_long.html</a>. It's a shame the UK Government even offer SMS based authentication as it lends credibility to an insecure authentication method.Andrew Joneshttp://www.blogger.com/profile/13107118977345285906noreply@blogger.com0tag:blogger.com,1999:blog-21661688.post-85063420966101933622017-11-27T15:50:00.000+00:002017-11-27T15:50:31.566+00:00HP Officejet Pro 8600 Plus prints web pages very small from IOS 11We have an HP Officejet Pro 8600 Plus which has been printing from our IOS devices perfectly well for many years. However, since upgrading to IOS 11 web pages print as a tiny image (3x5") at the top left on the page (although I suppose it does save loads of ink!). Interestingly PDF's print without any problem, the problem seems to be limited to printing from web pages. Any of the older iPhones or iPads, which cannot be upgraded to IOS 11, continue to print without any problems. Here is an example showing the IOS 11 printing on the left and IOS10 printing on the right.<br />
<br />
<a href="https://2.bp.blogspot.com/-ArBfftZdnqc/WhwstmewPfI/AAAAAAAAAP8/KB9_hoi9hv4LGPHTz6Xwn98qhTDoyM4_wCLcBGAs/s1600/IMG_1221.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://2.bp.blogspot.com/-ArBfftZdnqc/WhwstmewPfI/AAAAAAAAAP8/KB9_hoi9hv4LGPHTz6Xwn98qhTDoyM4_wCLcBGAs/s320/IMG_1221.jpg" width="320" /></a><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-8j1CRnYZiz4/Whwsn9yQFcI/AAAAAAAAAP4/yQNyNMzEay8JiTl5EyFZ91S4XOUC90M_QCLcBGAs/s1600/Printer1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"></a> </div>
I'm pleased to report that I've found a solution. Find the IP address of your printer (by pressing the network icon on the touch screen on the printer) and use a web browser to connect to the IP address shown. <br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-SLd37U4flqk/Whww3NdzcZI/AAAAAAAAAQQ/_FRth_QvoM8fTjOr4IHLNOCLbj6CF_H0wCLcBGAs/s1600/printer2a.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1194" data-original-width="1600" height="238" src="https://2.bp.blogspot.com/-SLd37U4flqk/Whww3NdzcZI/AAAAAAAAAQQ/_FRth_QvoM8fTjOr4IHLNOCLbj6CF_H0wCLcBGAs/s320/printer2a.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Switch to the Network tab and select "Network Protocol" on the left hand side under General. Change the setting to "Enable IPV4 only", click the "Apply" button.</div>
<a href="https://1.bp.blogspot.com/-8j1CRnYZiz4/Whwsn9yQFcI/AAAAAAAAAP4/yQNyNMzEay8JiTl5EyFZ91S4XOUC90M_QCLcBGAs/s1600/Printer1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="836" data-original-width="946" height="282" src="https://1.bp.blogspot.com/-8j1CRnYZiz4/Whwsn9yQFcI/AAAAAAAAAP4/yQNyNMzEay8JiTl5EyFZ91S4XOUC90M_QCLcBGAs/s320/Printer1.png" width="320" /></a><br />
<br />
Now, restart the printer (I unplugged mine) and restart your IOS devices. Once you have done this you should find that you can once again print web pages at full size! <br />
<br />
It's clearly a bug in IOS 11 with IPV6 (as IOS 10 works just fine). Come on Apple get it sorted! It's been months now and there are thousands of people reporting the same problem on the Apple and HP forums. As normal both companies are blaming each other and sending people off to perform a load of useless tests rather than admitting to there being a problem in IOS 11.<br />
<br />
Let me know if this fixes it for you too.<br />
Andrew Joneshttp://www.blogger.com/profile/13107118977345285906noreply@blogger.com0tag:blogger.com,1999:blog-21661688.post-81990685012323416662017-11-08T15:06:00.000+00:002017-11-16T10:41:18.205+00:00Vodafone Sure Signal - No smoking please!I've just had my Vodafone Sure Signal V3 blow up with a little puff of smoke. Fortunately I was sitting right next to the thing when it popped and I was able to unplug it pretty quickly! It rattled once unplugged! I opened it up and found a capacitor that had blown itself off the board. The interior was filled with smoke, see burn marks in the photos below. <br />
<br />
I've contacted Vodafone via Twitter. Let's see what they do about it. Hopefully it's not a fire risk for others!<br />
<br />
The label says it's an Alcatel-Lucent Model Number : 9361 Home Cell p3.0, Part Number : 3JR09113ABBA<br />
<br />
I notice there is a <a href="https://forum.vodafone.co.uk/t5/Vodafone-Sure-Signal/Suresignal-V3-Overheated-Blew-Up-Exploded-Hot-Burnt-out-amp-Dead/td-p/2488254" target="_blank">big thread</a> on the Vodafone UK Sure Signal forums with loads of people who have had exactly the same problem. <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-8gHlK4Ribmk/WgMbsmwqlCI/AAAAAAAAAPM/c0PR4QRsXmoq8fh1_2p2ZBAIgh0qoDcJQCLcBGAs/s1600/IMG_1202.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="480" data-original-width="640" height="240" src="https://2.bp.blogspot.com/-8gHlK4Ribmk/WgMbsmwqlCI/AAAAAAAAAPM/c0PR4QRsXmoq8fh1_2p2ZBAIgh0qoDcJQCLcBGAs/s320/IMG_1202.jpg" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-vy6ggENy1Yw/WgMdG5JhvnI/AAAAAAAAAPY/_mZL5q7qyR4Z_UloIjsioj38e9ETaMIYQCLcBGAs/s1600/IMG_1204.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="640" data-original-width="480" height="320" src="https://4.bp.blogspot.com/-vy6ggENy1Yw/WgMdG5JhvnI/AAAAAAAAAPY/_mZL5q7qyR4Z_UloIjsioj38e9ETaMIYQCLcBGAs/s320/IMG_1204.jpg" width="240" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-dJpxcmaebOg/WgMbshkKVdI/AAAAAAAAAPI/VhW4Ntq1EZgKcjdFDZjSCbX4YOhp_Mk4wCLcBGAs/s1600/IMG_1203.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="640" data-original-width="480" height="320" src="https://2.bp.blogspot.com/-dJpxcmaebOg/WgMbshkKVdI/AAAAAAAAAPI/VhW4Ntq1EZgKcjdFDZjSCbX4YOhp_Mk4wCLcBGAs/s320/IMG_1203.jpg" width="240" /></a></div>
<br />
<strong>10 Nov Update</strong><br />
I am pleased to report that Vodafone have agreed to send a replacement SureSignal free of charge (regardless of the warranty status). It'll apparently be delivered within 3 days. Given the unit does not have a replaceable fuse I'll be plugging it into an extension block with a very small fuse fitted to the plug. In my case the old unit tripped the downstairs circuit breaker (which also has the fridge and freezer attached). Had it blown when I was not at home it could have had far greater and more costly consequences (not to mention the potential fire risk). I'm not totally comfortable with the design of the SS3 as it runs very hot, this will always shorten the life of any electronic components. However, I have no Vodafone mobile phone signal where I live (high tech Cambridgeshire) and need to use the phone for work so I have little choice but to use one. I think powering it from a power strip with a very low current quick blow fuse will be the best way to reduce the risk associated with using this product.<br />
<br />
<strong>13 Nov Update</strong><br />
A free of charge replacement unit was delivered today. I've reported the fault to Trading Standards and they are contacting Vodafone to report another failed unit.<br />
<br />
<span style="-webkit-text-stroke-width: 0px; background-color: transparent; color: black; display: inline !important; float: none; font-family: Times New Roman; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 700; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">16 Nov Update</span><br />
I've made a short extension lead and fitted a small 1A fuse to the plug. Hopefully this will stop the whole power circuit tripping out if (when) this new SureSignal fails.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-MseMct5o7L0/Wg1q6m08R5I/AAAAAAAAAPo/q1TS_C8KkWcBYo_oM7cB-CAI5F_58IavQCLcBGAs/s1600/IMG_1211.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="480" data-original-width="640" height="240" src="https://4.bp.blogspot.com/-MseMct5o7L0/Wg1q6m08R5I/AAAAAAAAAPo/q1TS_C8KkWcBYo_oM7cB-CAI5F_58IavQCLcBGAs/s320/IMG_1211.jpg" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<b></b><i></i><u></u><sub></sub><sup></sup><strike></strike><br /></div>
Andrew Joneshttp://www.blogger.com/profile/13107118977345285906noreply@blogger.com0tag:blogger.com,1999:blog-21661688.post-86341715011731995562017-07-03T12:41:00.002+01:002017-07-03T12:41:23.467+01:00Dell XPS 15 (9550) swollen batteryI have had a problem with a swollen battery on my Dell XPS 15 (9550). The battery swells as it fills with gas. This swollen battery pushes the trackpad up 3 or 4 mm beyond the case (see photo). The trackpad then stops working. Dell advised me to stop using the laptop and remove power from it. For safety I have removed the battery until a replacement is received. See video below<br />
<br />
<div style="margin: 0px;">
<span style="margin: 0px;"><a href="https://youtu.be/fuM-Cdv3nlk"><span style="color: blue; font-family: Calibri;">https://youtu.be/fuM-Cdv3nlk</span></a></span></div>
<b><br /></b><br />
<b><br /></b>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-jV8JnC3c-Ls/WVor7sTl5wI/AAAAAAAAAOo/k1_LaoPJQbI9EPKD_FVUs8xjz6PxxDYQQCLcBGAs/s1600/838D20A3-7179-4C07-96B3-4701B6A92A82.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://3.bp.blogspot.com/-jV8JnC3c-Ls/WVor7sTl5wI/AAAAAAAAAOo/k1_LaoPJQbI9EPKD_FVUs8xjz6PxxDYQQCLcBGAs/s320/838D20A3-7179-4C07-96B3-4701B6A92A82.JPG" width="320" /></a></div>
<a href="https://3.bp.blogspot.com/-zwgO3fuQrOA/WVosLyTRvQI/AAAAAAAAAOs/E3qOfsLxeRMkiYZpUmzzJqsmtihBzEarACLcBGAs/s1600/4BA538D4-7E1D-484D-9283-5F3AE9A9ED76.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1200" data-original-width="1600" height="240" src="https://3.bp.blogspot.com/-zwgO3fuQrOA/WVosLyTRvQI/AAAAAAAAAOs/E3qOfsLxeRMkiYZpUmzzJqsmtihBzEarACLcBGAs/s320/4BA538D4-7E1D-484D-9283-5F3AE9A9ED76.JPG" width="320" /></a><br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />Andrew Joneshttp://www.blogger.com/profile/13107118977345285906noreply@blogger.com1tag:blogger.com,1999:blog-21661688.post-27760451918946509202016-06-05T12:43:00.000+01:002016-06-05T12:43:11.552+01:00Simple WPF app using Task and Await with .NET 4.5Here is a simple example showing how to create background tasks in a WPF app with .NET 4.5 and above. This is so much easier than the old BackgroundWorker approach.<br />
<br />
<pre style="background: white; color: black; font-family: Consolas; font-size: 13px;"><span style="color: blue;"><</span><span style="color: #a31515;">Window</span><span style="color: red;"> x</span><span style="color: blue;">:</span><span style="color: red;">Class</span><span style="color: blue;">=</span><span style="color: blue;">"TestAsyncTasks.MainWindow"</span>
<span style="color: red;"> xmlns</span><span style="color: blue;">=</span><span style="color: blue;">"http://schemas.microsoft.com/winfx/2006/xaml/presentation"</span>
<span style="color: red;"> xmlns</span><span style="color: blue;">:</span><span style="color: red;">x</span><span style="color: blue;">=</span><span style="color: blue;">"http://schemas.microsoft.com/winfx/2006/xaml"</span>
<span style="color: red;"> xmlns</span><span style="color: blue;">:</span><span style="color: red;">d</span><span style="color: blue;">=</span><span style="color: blue;">"http://schemas.microsoft.com/expression/blend/2008"</span>
<span style="color: red;"> xmlns</span><span style="color: blue;">:</span><span style="color: red;">mc</span><span style="color: blue;">=</span><span style="color: blue;">"http://schemas.openxmlformats.org/markup-compatibility/2006"</span>
<span style="color: red;"> xmlns</span><span style="color: blue;">:</span><span style="color: red;">local</span><span style="color: blue;">=</span><span style="color: blue;">"clr-namespace:TestAsyncTasks"</span>
<span style="color: red;"> mc</span><span style="color: blue;">:</span><span style="color: red;">Ignorable</span><span style="color: blue;">=</span><span style="color: blue;">"d"</span>
<span style="color: red;"> Title</span><span style="color: blue;">=</span><span style="color: blue;">"MainWindow"</span><span style="color: red;"> Height</span><span style="color: blue;">=</span><span style="color: blue;">"350"</span><span style="color: red;"> Width</span><span style="color: blue;">=</span><span style="color: blue;">"525"</span><span style="color: blue;">></span>
<span style="color: blue;"><</span><span style="color: #a31515;">Grid</span><span style="color: red;"> Margin</span><span style="color: blue;">=</span><span style="color: blue;">"4"</span><span style="color: blue;">></span>
<span style="color: blue;"><</span><span style="color: #a31515;">Grid.RowDefinitions</span><span style="color: blue;">></span>
<span style="color: blue;"><</span><span style="color: #a31515;">RowDefinition</span><span style="color: red;"> Height</span><span style="color: blue;">=</span><span style="color: blue;">"Auto"</span><span style="color: blue;">></</span><span style="color: #a31515;">RowDefinition</span><span style="color: blue;">></span>
<span style="color: blue;"><</span><span style="color: #a31515;">RowDefinition</span><span style="color: red;"> Height</span><span style="color: blue;">=</span><span style="color: blue;">"*"</span><span style="color: blue;">></</span><span style="color: #a31515;">RowDefinition</span><span style="color: blue;">></span>
<span style="color: blue;"></</span><span style="color: #a31515;">Grid.RowDefinitions</span><span style="color: blue;">></span>
<span style="color: blue;"><</span><span style="color: #a31515;">StackPanel</span><span style="color: red;"> Grid.Row</span><span style="color: blue;">=</span><span style="color: blue;">"0"</span><span style="color: red;"> Orientation</span><span style="color: blue;">=</span><span style="color: blue;">"Horizontal"</span><span style="color: blue;">></span>
<span style="color: blue;"><</span><span style="color: #a31515;">Button</span><span style="color: red;"> x</span><span style="color: blue;">:</span><span style="color: red;">Name</span><span style="color: blue;">=</span><span style="color: blue;">"ButtonStart"</span><span style="color: red;"> Content</span><span style="color: blue;">=</span><span style="color: blue;">"Start"</span><span style="color: red;"> Click</span><span style="color: blue;">=</span><span style="color: blue;">"Start_Click"</span><span style="color: red;"> Padding</span><span style="color: blue;">=</span><span style="color: blue;">"4"</span><span style="color: blue;">/></span>
<span style="color: blue;"><</span><span style="color: #a31515;">Button</span><span style="color: red;"> x</span><span style="color: blue;">:</span><span style="color: red;">Name</span><span style="color: blue;">=</span><span style="color: blue;">"ButtonCancel"</span><span style="color: red;"> Content</span><span style="color: blue;">=</span><span style="color: blue;">"Cancel"</span><span style="color: red;"> Click</span><span style="color: blue;">=</span><span style="color: blue;">"Cancel_Click"</span><span style="color: red;"> Padding</span><span style="color: blue;">=</span><span style="color: blue;">"4"</span><span style="color: blue;">/></span>
<span style="color: blue;"></</span><span style="color: #a31515;">StackPanel</span><span style="color: blue;">></span>
<span style="color: blue;"><</span><span style="color: #a31515;">TextBox</span><span style="color: red;"> Grid.Row</span><span style="color: blue;">=</span><span style="color: blue;">"1"</span><span style="color: red;"> x</span><span style="color: blue;">:</span><span style="color: red;">Name</span><span style="color: blue;">=</span><span style="color: blue;">"Label1"</span><span style="color: blue;">></</span><span style="color: #a31515;">TextBox</span><span style="color: blue;">></span>
<span style="color: blue;"></</span><span style="color: #a31515;">Grid</span><span style="color: blue;">></span>
<span style="color: blue;"></</span><span style="color: #a31515;">Window</span><span style="color: blue;">></span></pre>
<div style="background: white; color: black; font-family: Consolas; font-size: 13px;">
<span style="color: blue;"></span> </div>
<div style="background: white; color: black; font-family: Consolas; font-size: 13px;">
<span style="color: blue;"></span> </div>
<div style="background: white; color: black; font-family: Consolas; font-size: 13px;">
<span style="color: blue;"></span> </div>
<div style="background: white; color: black; font-family: Consolas; font-size: 13px;">
<span style="color: blue;"></span> </div>
<div style="background: white; color: black; font-family: Consolas; font-size: 13px;">
<span style="color: blue;"></span> </div>
<span style="color: blue;"><pre style="background: white; color: black; font-family: Consolas; font-size: 13px;"><span style="color: blue;">using</span> System;
<span style="color: blue;">using</span> System.Threading;
<span style="color: blue;">using</span> System.Threading.Tasks;
<span style="color: blue;">using</span> System.Windows;
<span style="color: blue;">namespace</span> TestAsyncTasks
{
<span style="background: rgb(193, 224, 255); color: grey;">///</span><span style="background: rgb(193, 224, 255); color: green;"> </span><span style="background: rgb(193, 224, 255); color: grey;"><</span><span style="background: rgb(193, 224, 255); color: grey;">summary</span><span style="background: rgb(193, 224, 255); color: grey;">></span>
<span style="background: rgb(193, 224, 255); color: grey;">///</span><span style="background: rgb(193, 224, 255); color: green;"> Interaction logic for MainWindow.xaml</span>
<span style="background: rgb(193, 224, 255); color: grey;">///</span><span style="background: rgb(193, 224, 255); color: green;"> </span><span style="background: rgb(193, 224, 255); color: grey;"></</span><span style="background: rgb(193, 224, 255); color: grey;">summary</span><span style="background: rgb(193, 224, 255); color: grey;">></span>
<span style="color: blue;">public</span> <span style="color: blue;">partial</span> <span style="color: blue;">class</span> <span style="color: #2b91af;">MainWindow</span> : <span style="color: #2b91af;">Window</span>
{
<span style="color: blue;">public</span> MainWindow()
{
InitializeComponent();
}
<span style="background: rgb(193, 224, 255); color: green;">// To allow background task to be cancelled with cts.Cancel() </span>
<span style="color: #2b91af;">CancellationTokenSource</span> cts;
<span style="color: blue;">private</span> <span style="color: blue;">async</span> <span style="color: blue;">void</span> Start_Click(<span style="color: blue;">object</span> sender, <span style="color: #2b91af;">RoutedEventArgs</span> e)
{
<span style="background: rgb(193, 224, 255); color: green;">// Disable button so it can't be clicked again until finished </span>
ButtonStart.IsEnabled = <span style="color: blue;">false</span>;
Label1.Text = <span style="color: #a31515;">"Start\r\n"</span>;
<span style="background: rgb(193, 224, 255); color: green;">// Setup the function to be called with updates </span>
<span style="color: blue;">var</span> progressUpdate = <span style="color: blue;">new</span> <span style="color: #2b91af;">Progress</span><<span style="color: blue;">int</span>>(ReportProgressOnUIThread);
<span style="background: rgb(193, 224, 255); color: green;">// Create a new CancellationTokenSource and optionally set a time </span>
<span style="background: rgb(193, 224, 255); color: green;">// when the task will automatically cancel if it has not already </span>
<span style="background: rgb(193, 224, 255); color: green;">// finished. </span>
<span style="color: blue;">int</span> AutoCancelAfterMS = 50000;
cts = <span style="color: blue;">new</span> <span style="color: #2b91af;">CancellationTokenSource</span>(AutoCancelAfterMS);
<span style="background: rgb(193, 224, 255); color: green;">// Must be in Try/Catch to trap the OperationCanceledException </span>
<span style="color: blue;">try</span>
{
<span style="color: blue;">int</span> loopTo = 10;
<span style="color: blue;">int</span> result = <span style="color: blue;">await</span> MyBackgroundTaskAsync(loopTo, progressUpdate, cts.Token);
<span style="background: rgb(193, 224, 255); color: green;">// This code does not run until MyBackgroundTaskAsync finishes </span>
Label1.Text += <span style="color: #a31515;">$"Final result : </span>{result}<span style="color: #a31515;">\r\n"</span>;
}
<span style="color: blue;">catch</span> (<span style="color: #2b91af;">OperationCanceledException</span> ex)
{
<span style="background: rgb(193, 224, 255); color: green;">// Do stuff to handle the cancellation exception </span>
Label1.Text += <span style="color: #a31515;">"CANCELLED\r\n"</span>;
}
<span style="color: blue;">catch</span> (<span style="color: #2b91af;">Exception</span> ex)
{
<span style="background: rgb(193, 224, 255); color: green;">//Do stuff to handle other exceptions </span>
Label1.Text += <span style="color: #a31515;">$"Exception : </span>{ex.Message}<span style="color: #a31515;">\r\n"</span>;
}
<span style="background: rgb(193, 224, 255); color: green;">// Reenable Start button </span>
ButtonStart.IsEnabled = <span style="color: blue;">true</span>;
Label1.Text += <span style="color: #a31515;">"Finished\r\n"</span>;
}
<span style="color: blue;">private</span> <span style="color: blue;">void</span> Cancel_Click(<span style="color: blue;">object</span> sender, <span style="color: #2b91af;">RoutedEventArgs</span> e)
{
cts.Cancel();
}
<span style="color: blue;">async</span> <span style="color: #2b91af;">Task</span><<span style="color: blue;">int</span>> MyBackgroundTaskAsync(<span style="color: blue;">int</span> DataFromParent, <span style="color: #2b91af;">IProgress</span><<span style="color: blue;">int</span>> progress, <span style="color: #2b91af;">CancellationToken</span> ct)
{
<span style="color: blue;">int</span> result = <span style="color: blue;">await</span> <span style="color: #2b91af;">Task</span>.Run<<span style="color: blue;">int</span>>(<span style="color: blue;">async</span> () =>
{
<span style="color: blue;">for</span> (<span style="color: blue;">int</span> n=0; n< DataFromParent; n++)
{
<span style="background: rgb(193, 224, 255); color: green;">//You cannot do this because it's running on a non UI thread</span>
<span style="background: rgb(193, 224, 255); color: green;">// Label1.Text += $"{n} I don't work!\r\n";</span>
<span style="background: rgb(193, 224, 255); color: green;">// Throw OperationCanceledException if cts.Cancel() called </span>
ct.ThrowIfCancellationRequested();
<span style="background: rgb(193, 224, 255); color: green;">// Report progress back to UI thread </span>
progress.Report(n);
<span style="background: rgb(193, 224, 255); color: green;">// Do the slow things in the background </span>
<span style="color: blue;">await</span> SlowStuff();
}
<span style="background: rgb(193, 224, 255); color: green;">// result gets this value which is returned as final result </span>
<span style="color: blue;">return</span> 42;
}, ct);
<span style="color: blue;">return</span> result;
}
<span style="color: blue;">async</span> <span style="color: #2b91af;">Task</span> SlowStuff()
{
<span style="background: rgb(193, 224, 255); color: green;">// Simulate some slow code. This runs on a background thread. </span>
<span style="color: blue;">await</span> <span style="color: #2b91af;">Task</span>.Delay(1000);
}
<span style="color: blue;">void</span> ReportProgressOnUIThread (<span style="color: blue;">int</span> value)
{
<span style="background: rgb(193, 224, 255); color: green;">// This runs on the UI thread so it can update the WPF controls </span>
Label1.Text += value.ToString() + <span style="color: #a31515;">"\r\n"</span>;
}
}
}
</pre>
<div style="background: white; color: black; font-family: Consolas; font-size: 13px;">
</div>
</span><div style="background: white; color: black; font-family: Consolas; font-size: 13px;">
</div>
Andrew Joneshttp://www.blogger.com/profile/13107118977345285906noreply@blogger.com0tag:blogger.com,1999:blog-21661688.post-26311705944734451512015-11-10T22:18:00.001+00:002015-11-10T22:18:05.064+00:00Dell PremierColor Display Splitter on XPS15 9550I've been setting up a Dell XPS15-9550 today. It comes with Windows 10 and the most awful Dell addin you have ever seen. I normally use Dell because they refrain from adding too much crapware or useless third party apps. However, this addin, enabled by default, is awful. It adds a popup menu whenever you try and drag a window (or dialog box or popup borderless window) to reposition it on the screen. It's totally unnecessary as Windows 10 already includes a perfectly good "Windows Snap" feature. The popup window is always "in the way" and when you release the mouse the window then flies off to an illogical place on the screen. Truly awful UI design.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/--OY86LSAju8/VkJn8_LqQtI/AAAAAAAAANY/WaK-2NIY-FU/s1600/Capture%2Bsmall.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="143" src="http://2.bp.blogspot.com/--OY86LSAju8/VkJn8_LqQtI/AAAAAAAAANY/WaK-2NIY-FU/s320/Capture%2Bsmall.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: left;">
Finally I've worked out how to stop it. It turns out it's a <em>feature</em> of "Dell PremierColor". To disable this right click on the "Dell PremierColor" icon in the notification area and select "Disable Display Splitter".</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-VtRNsgnZw0U/VkJqiqgQ_DI/AAAAAAAAANk/Ym9jiK03OZU/s1600/Capture%2BDell%2BPremierColor.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/-VtRNsgnZw0U/VkJqiqgQ_DI/AAAAAAAAANk/Ym9jiK03OZU/s320/Capture%2BDell%2BPremierColor.PNG" width="280" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: left;">
Why oh why are you including this enabled by default? Crazy. Please ensure it is disabled by default ASAP at it is confusing and totally unnecessary.</div>
Andrew Joneshttp://www.blogger.com/profile/13107118977345285906noreply@blogger.com2tag:blogger.com,1999:blog-21661688.post-54101526879255254262015-10-21T11:21:00.000+01:002015-10-21T11:21:22.848+01:00Getting field names from anonymous types using WPF DataGridOften it is useful to use a bit of LINQ to prepare data for display in a WPF control. Here is a very simple example. The WPF window contains a DataGrid used to display the data.<br />
<br />
<pre style="background: white; color: black; font-family: Consolas; font-size: 13px;"><span style="color: blue;"><</span><span style="color: #a31515;">Window</span><span style="color: red;"> x</span><span style="color: blue;">:</span><span style="color: red;">Class</span><span style="color: blue;">=</span><span style="color: blue;">"DCView.Window15"</span>
<span style="color: red;"> xmlns</span><span style="color: blue;">=</span><span style="color: blue;">"http://schemas.microsoft.com/winfx/2006/xaml/presentation"</span>
<span style="color: red;"> xmlns</span><span style="color: blue;">:</span><span style="color: red;">x</span><span style="color: blue;">=</span><span style="color: blue;">"http://schemas.microsoft.com/winfx/2006/xaml"</span>
<span style="color: red;"> xmlns</span><span style="color: blue;">:</span><span style="color: red;">d</span><span style="color: blue;">=</span><span style="color: blue;">"http://schemas.microsoft.com/expression/blend/2008"</span>
<span style="color: red;"> xmlns</span><span style="color: blue;">:</span><span style="color: red;">mc</span><span style="color: blue;">=</span><span style="color: blue;">"http://schemas.openxmlformats.org/markup-compatibility/2006"</span>
<span style="color: red;"> xmlns</span><span style="color: blue;">:</span><span style="color: red;">local</span><span style="color: blue;">=</span><span style="color: blue;">"clr-namespace:DCView"</span>
<span style="color: red;"> mc</span><span style="color: blue;">:</span><span style="color: red;">Ignorable</span><span style="color: blue;">=</span><span style="color: blue;">"d"</span>
<span style="color: red;"> Title</span><span style="color: blue;">=</span><span style="color: blue;">"Window15"</span><span style="color: red;"> Height</span><span style="color: blue;">=</span><span style="color: blue;">"300"</span><span style="color: red;"> Width</span><span style="color: blue;">=</span><span style="color: blue;">"300"</span><span style="color: red;"> Loaded</span><span style="color: blue;">=</span><span style="color: blue;">"Window_Loaded"</span><span style="color: blue;">></span>
<span style="color: blue;"><</span><span style="color: #a31515;">Grid</span><span style="color: blue;">></span>
<span style="color: blue;"><</span><span style="color: #a31515;">DataGrid</span><span style="color: red;"> x</span><span style="color: blue;">:</span><span style="color: red;">Name</span><span style="color: blue;">=</span><span style="color: blue;">"DataGrid1"</span><span style="color: red;"> AutoGenerateColumns</span><span style="color: blue;">=</span><span style="color: blue;">"False"</span><span style="color: red;"> SelectionChanged</span><span style="color: blue;">=</span><span style="color: blue;">"DataGrid1_SelectionChanged"</span><span style="color: blue;">></span>
<span style="color: blue;"><</span><span style="color: #a31515;">DataGrid.Columns</span><span style="color: blue;">></span>
<span style="color: blue;"><</span><span style="color: #a31515;">DataGridTextColumn</span><span style="color: red;"> Header</span><span style="color: blue;">=</span><span style="color: blue;">"Number"</span><span style="color: red;"> Binding</span><span style="color: blue;">="{</span><span style="color: #a31515;">Binding</span><span style="color: red;"> NumberX1</span><span style="color: blue;">}</span><span style="color: blue;">"</span><span style="color: blue;"> /></span>
<span style="color: blue;"><</span><span style="color: #a31515;">DataGridTextColumn</span><span style="color: red;"> Header</span><span style="color: blue;">=</span><span style="color: blue;">"Number x 10"</span><span style="color: red;"> Binding</span><span style="color: blue;">="{</span><span style="color: #a31515;">Binding</span><span style="color: red;"> NumberX10</span><span style="color: blue;">}</span><span style="color: blue;">"</span><span style="color: blue;"> /></span>
<span style="color: blue;"></</span><span style="color: #a31515;">DataGrid.Columns</span><span style="color: blue;">></span>
<span style="color: blue;"></</span><span style="color: #a31515;">DataGrid</span><span style="color: blue;">></span>
<span style="color: blue;"></</span><span style="color: #a31515;">Grid</span><span style="color: blue;">></span>
<span style="color: blue;"></</span><span style="color: #a31515;">Window</span><span style="color: blue;">></span></pre>
<br />
The data might be prepared for display with a bit of LINQ. A new anonymous type is created using field names that are then used in the WPF control bindings.<br />
<br />
<pre style="background: white; color: black; font-family: Consolas; font-size: 13px;"><span style="color: blue;">private</span> <span style="color: blue;">void</span> Window_Loaded(<span style="color: blue;">object</span> sender, <span style="color: #2b91af;">RoutedEventArgs</span> e)
{
<span style="color: #2b91af;">List</span><<span style="color: blue;">int</span>> data = <span style="color: #2b91af;">Enumerable</span>.Range(1, 10).ToList();
<span style="color: blue;">var</span> query = <span style="color: blue;">from</span> d <span style="color: blue;">in</span> data
<span style="color: blue;">select</span> <span style="color: blue;">new</span> { NumberX1 = d, NumberX10 = d * 10 };
DataGrid1.ItemsSource = query;
}</pre>
<br />
The problem comes when you respond to selection changed events. How do you get to the fields in the anonymous type. You could create a new class instead of using the anonymous type but the advantage of LINQ is it is quick and easy.<br />
<br />
<pre style="background: white; color: black; font-family: Consolas; font-size: 13px;"><span style="color: blue;">private</span> <span style="color: blue;">void</span> DataGrid1_SelectionChanged(<span style="color: blue;">object</span> sender, <span style="color: #2b91af;">SelectionChangedEventArgs</span> e)
{
<span style="color: blue;">dynamic</span> dynamictype1 = DataGrid1.SelectedItem;
<span style="color: blue;">int</span> number = dynamictype1.NumberX10;
Title = number.ToString();
}</pre>
<br />
The problem is DataGrid1.SelectedItem returns an object and you can't cast it to an anonymous type. To solve the problem you can use a bit of dynamic black magic to get to the fields in the anonymous type. The example above shows how to use dynamic to get to the anonymous fields. There is no Visual Studio Smart Completion to help but as long as the field names match it will work.Andrew Joneshttp://www.blogger.com/profile/13107118977345285906noreply@blogger.com0tag:blogger.com,1999:blog-21661688.post-90119321427276629292015-02-07T19:06:00.000+00:002015-02-07T19:06:35.428+00:00Changing the rear light cluster on 2013 VW Sharan (VW part VAG 7N0945096G)A Cambridge cyclist managed to smash the rear light cluster on our car on Thursday night (thanks for riding off without having the courtesy to stop!). A new one is <em>just</em> £73 and really quite easy to fit yourself once you know this little trick.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-C509Kz4ELuM/VNZeyHIHG-I/AAAAAAAAAMk/ttxpz0IqbEk/s1600/WP_20150206_08_39_28_Pro%5B1%5D.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-C509Kz4ELuM/VNZeyHIHG-I/AAAAAAAAAMk/ttxpz0IqbEk/s1600/WP_20150206_08_39_28_Pro%5B1%5D.jpg" height="180" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
The 12V power socket slides down to reveal a single screw that holds the light cluster in place. Press the top of the 12V socket panel and slide it downwards. </div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-NDqGjmidb7U/VNZe-Ax0DXI/AAAAAAAAAMs/HGpo07HSy90/s1600/WP_20150207_13_26_13_Pro%5B1%5D.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-NDqGjmidb7U/VNZe-Ax0DXI/AAAAAAAAAMs/HGpo07HSy90/s1600/WP_20150207_13_26_13_Pro%5B1%5D.jpg" height="180" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
Using a 11mm socket set simply unscrew the central white nut which holds the light cluster in place. Once the light cluster is unscrewed unclip the power cable and replace the light unit. Total time about 5 minutes.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-Nd2IJl6W0-8/VNZfG_JGnkI/AAAAAAAAAM0/3iTU8lkRgbI/s1600/WP_20150207_13_26_27_Pro%5B1%5D.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-Nd2IJl6W0-8/VNZfG_JGnkI/AAAAAAAAAM0/3iTU8lkRgbI/s1600/WP_20150207_13_26_27_Pro%5B1%5D.jpg" height="180" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
Sorry for a slightly random blog post. Please let me know if it was helpful to you!</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
Andrew Joneshttp://www.blogger.com/profile/13107118977345285906noreply@blogger.com0tag:blogger.com,1999:blog-21661688.post-14791311668414396352014-09-11T20:14:00.002+01:002014-09-11T20:14:57.573+01:00The Ultimate Times Table Excel Spreadsheet!It's that time of year again. The kids are back to school and it's time for them to learn their times tables. Please find below an Excel spreadsheet that you can use to print out a sheet of random times tables (multiplications and divisions). <br />
<br />
To use the spreadsheet simply select which times tables should be included from the yellow cells on the first tab. <br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-Ev_hAV0yAjc/VBHyjtCuO5I/AAAAAAAAAL4/HxE-dI2VtYI/s1600/TT3.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-Ev_hAV0yAjc/VBHyjtCuO5I/AAAAAAAAAL4/HxE-dI2VtYI/s1600/TT3.PNG" height="320" width="270" /></a></div>
<br />
Then switch to the "Random Multiplication" or "Random Division" tab and print. Job done!<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-Up1Qc3yp6uU/VBHxfg8H9eI/AAAAAAAAALk/2tk0h-vwC4o/s1600/TT1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-Up1Qc3yp6uU/VBHxfg8H9eI/AAAAAAAAALk/2tk0h-vwC4o/s1600/TT1.PNG" height="227" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://onedrive.live.com/redir?resid=D557A7EAA9604FEC!39315&authkey=!AFItQ77cQFI0xZA&ithint=file%2cxlsx" target="_blank">Download Link</a></div>
Andrew Joneshttp://www.blogger.com/profile/13107118977345285906noreply@blogger.com0tag:blogger.com,1999:blog-21661688.post-70479658637863821682013-11-13T20:33:00.002+00:002013-11-13T20:33:40.712+00:00No Windows Easy Transfer on Windows 8.1I have a new PC Windows 8.1 laptop and need to transfer the 600Gb of files from my old laptop which is also running 8.1. Frustratingly I've discovered that Windows Easy Transfer in 8.1 no longer allows machine to machine transfer of files! Apparently you are supposed to copy everything to and from SkyDrive. Well 600Gb would take months over my ADSL and I've only got 100Gb on my SkyDrive account! It seems a crazy solution to remove this feature however I've found a solution. I found an old Windows 8.0 machine and copied the whole c:\Windows\System32\MigWiz folder to the two 8.1 laptops. You can then simply run the 8.0 migwiz.exe on the old and new laptops. I'm pleased to report that the Windows 8.0 version runs fine on 8.1 and successfully copies over the files.<br />
<br />
I really think Microsoft should put the file transfer option back in. It would also be helpful if people sold USB3 Easy Transfer cables to speed up the transfer time.Andrew Joneshttp://www.blogger.com/profile/13107118977345285906noreply@blogger.com0tag:blogger.com,1999:blog-21661688.post-16545944551302892292013-10-09T14:06:00.000+01:002013-10-09T14:06:00.887+01:00MessageBox.Show does not work on Windows 7 EmbeddedI have the world's simplest C# Winform application. A Form with a single button. Here is the entire app.<br />
<br />
<span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;">private</span></span></span><span style="font-family: Consolas; font-size: x-small;"><span style="font-family: Consolas; font-size: x-small;"> </span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;">void</span></span></span><span style="font-family: Consolas; font-size: x-small;"><span style="font-family: Consolas; font-size: x-small;"> button1_Click(</span></span><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;"><span style="color: blue; font-family: Consolas; font-size: x-small;">object</span></span></span><span style="font-family: Consolas; font-size: x-small;"><span style="font-family: Consolas; font-size: x-small;"> sender, </span></span><span style="color: #2b91af; font-family: Consolas; font-size: x-small;"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;">EventArgs</span></span></span><span style="font-family: Consolas; font-size: x-small;"><span style="font-family: Consolas; font-size: x-small;"> e)</span></span><br />
<span style="font-family: Consolas; font-size: x-small;"><span style="font-family: Consolas; font-size: x-small;">{</span></span><span style="color: #2b91af; font-family: Consolas; font-size: x-small;"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;"><span style="color: #2b91af; font-family: Consolas; font-size: x-small;">MessageBox</span></span></span><span style="font-family: Consolas; font-size: x-small;"><span style="font-family: Consolas; font-size: x-small;">.Show(</span></span><span style="color: #a31515; font-family: Consolas; font-size: x-small;"><span style="color: #a31515; font-family: Consolas; font-size: x-small;"><span style="color: #a31515; font-family: Consolas; font-size: x-small;">"Hello World"</span></span></span><span style="font-family: Consolas; font-size: x-small;"><span style="font-family: Consolas; font-size: x-small;">, </span></span><span style="color: #a31515; font-family: Consolas; font-size: x-small;"><span style="color: #a31515; font-family: Consolas; font-size: x-small;"><span style="color: #a31515; font-family: Consolas; font-size: x-small;">"Button Click Event"</span></span></span><span style="font-family: Consolas; font-size: x-small;"><span style="font-family: Consolas; font-size: x-small;">);</span></span><br />
<span style="font-family: Consolas; font-size: x-small;"><span style="font-family: Consolas; font-size: x-small;">}</span></span><br />
Amazingly on Windows 7 Embedded the MessageBox does <u><strong>not</strong></u> display. It works on every other non-embedded version of Windows.<br />
<br />
It turns out that Windows 7 Embedded has an option to <strong>automatically</strong> click the default button on any MessageBox. See <a href="http://msdn.microsoft.com/en-us/library/aa940743(v=winembedded.5).aspx">http://msdn.microsoft.com/en-us/library/aa940743(v=winembedded.5).aspx</a> for more details. <br />
<br />
Strange but true!<br />
<br />
<br />
<span style="font-family: Consolas; font-size: x-small;"><br />
<span style="font-family: Consolas; font-size: x-small;"><br />
<br />
<br />
</span></span>Andrew Joneshttp://www.blogger.com/profile/13107118977345285906noreply@blogger.com0tag:blogger.com,1999:blog-21661688.post-10484113855602584312013-09-12T23:56:00.001+01:002013-09-12T23:56:36.321+01:00Dial up VPN connections fail following Win 8 to Win 8.1 RTM upgradeI had a strange problem yesterday. I have several dial-up VPN connections that I use daily. With Windows 8 these were working fine. I upgraded the machine from Win 8 to Win 8.1 with the RTM bits. Following the upgrade none of the dial up VPN connections would work. They all reported Error 720 : A Connection to the remote computer could not be established. Other Windows 8 machines on the same network could connect to identical servers without any problem. In the end I found that rebooting the ADSL router (the one the client machines were connected to) fixed the problem. I've no idea why all the Windows 8 machines could connect but the Windows 8.1 machine refused until the router was restarted. If you come across the same problem it might be worth trying a router reboot. Let me know if it works for you.<br />
<br />
AndrewAndrew Joneshttp://www.blogger.com/profile/13107118977345285906noreply@blogger.com0tag:blogger.com,1999:blog-21661688.post-3250348010960546472013-09-11T10:31:00.002+01:002013-09-11T10:31:29.807+01:00Get Libraries back in Windows 8.1Really annoyingly the Libraries feature in File Explorer seems to be turned off when you upgrade to Windows 8.1. To turn them back on Right click in the space between folders and select "Show Libraries".<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-yrAAb07sKsc/UjA4I9TeWCI/AAAAAAAAAK0/Aw3ybbZlbco/s1600/GetLibrariesBack.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://2.bp.blogspot.com/-yrAAb07sKsc/UjA4I9TeWCI/AAAAAAAAAK0/Aw3ybbZlbco/s320/GetLibrariesBack.png" width="162" /></a></div>
Andrew Joneshttp://www.blogger.com/profile/13107118977345285906noreply@blogger.com0tag:blogger.com,1999:blog-21661688.post-52155672198348761762013-06-13T12:23:00.000+01:002013-06-13T12:24:03.292+01:00Are you a Manager or a Leader?Are you a manager or a leader?<br />
<ol>
<li><div style="margin: 0in 0in 0in 0.375in;">
<span lang="en-US" style="color: black; font-family: Arial; font-size: 10pt;">The m</span><span lang="en-GB" style="font-family: Calibri; font-size: 11pt;">anager has subordinates; the leader has followers.</span></div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
<span lang="en-US">The manager does things right; the leader does the right thing.</span></div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
<span lang="en-US">The manager administers; the leader continually innovates.</span></div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
<span lang="en-US">The manager is a copy; the leader is an original.</span></div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
<span lang="en-US">The manager maintains; the leader develops.</span></div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
<span lang="en-US">The manager focuses on systems and structure; the leader focuses on innovation.</span></div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
<span lang="en-US">The manager relies on control; the leader inspires trust.</span></div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
<span lang="en-US">The manager has a short-range view; the leader has a long-range perspective.</span></div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
<span lang="en-US">The manager asks how and when; the leader asks what and why.</span></div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
<span lang="en-US">The manager has his or her eye always on the bottom line; the leader</span><span lang="en-GB">’</span><span lang="en-US">s eye is on the horizon.</span></div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
<span lang="en-US">The manager imitates; the leader originates.</span></div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
<span lang="en-US">The manager accepts the status quo; the leader challenges it.</span></div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
<span lang="en-US">The manager is the classic good soldier; the leader is his or her own person.</span></div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
<span lang="en-US">The manager seeks group consensus for each decision; the leader makes decisions independently and regardless of the opinion of others.</span></div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
The manager assembles teams of those, like themselves, to advise on and validate every decision, leaders decide for themselves without external influence.</div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
The manager acts on expert advice; the leader has the courage to act against an expert’s advice.</div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
The manager knows the cost of everything, the leader knows the value of everything.</div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
The manager asks for a task to be performed, the leader shows the best way to do it.</div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
The manager always has someone else to blame for every mistake, the leader learns from his own mistakes.</div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
A leader takes people where they don’t necessarily want to go but ought to be.</div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
When the leader is finished with his work, the people say it happened naturally.</div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
<span lang="en-US">Leaders are not team players, they feel no need to function as a group.</span></div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
<span lang="en-GB">The m</span><span lang="en-US">anager climbs the corporate ladder quickly, leaders don’t use ladders to climb.</span></div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
The person at the top of the org chart is rarely its true leader.</div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
Managers spend most of their time thinking they are leaders by virtue of their position. </div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
Leaders don't have all the answers whilst managers believe they do.</div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
Managers can be managed themselves, leaders can't be easily led or managed.</div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
Leaders 'begin with the end in mind.' Managers 'begin with the beginning in mind'.</div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
Leadership is freedom of action. Management is working within set boundaries.</div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
Leadership cannot be outsourced or delegated, management can.</div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
Leaders persevere until the goal is reached, managers abandon projects because they see only on the bottom line.</div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
Managers seek continuity, Leaders seeks change.</div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
Managers focus on goals for improvement. The Leader focuses on goals of innovation. </div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
Management's power is based on position or authority; Leadership power is based on personal influence and trust. </div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
The manager demonstrates skill in technical competence but the Leader demonstrates skill in selling the vision.</div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
The manager demonstrates skill in administration. A Leader demonstrates skill in dealing with ambiguity. </div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
The manager demonstrates skill in supervision. A Leader demonstrates skill in persuasion.</div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
The manager diligently seeks legal agreement at each stage of a project. A leader proceeds much more quickly by personal agreement based on trust.</div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
You manage things, you lead people.</div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
Leadership has no performance metrics, management does.</div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
Managers manage, so by nature are natural followers. Leaders lead. </div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
Management is a career. Leadership is a calling.</div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
Managers focus on the bottom line; leaders focus on adding value.</div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
Managers minimise todays costs, leaders maximise future value.</div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
Managers solve problems sequentially - step by step, leaders solve problems quicker by working in parallel.</div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
Managers take a salary, leaders work to change the world.</div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
A managers social identity is defined by title and position, a leaders identity by how he's changed the world.</div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
Without followers, there is no leader … there is just one person with a goal or idea.</div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
Managers prefer process, leaders prefer agility.</div>
</li>
<li><div style="color: black; font-family: Arial; font-size: 10pt; margin: 0in 0in 0in 0.375in;">
<span lang="en-US" style="font-family: Arial; font-size: 10pt;">The m</span><span lang="en-GB" style="font-family: Calibri; font-size: 11pt;">anager is SAD, the leader is MAD. </span>SAD =<span lang="en-GB" style="font-family: Calibri; font-size: 11pt; font-weight: bold;"> S</span><span lang="en-GB" style="font-family: Calibri; font-size: 11pt;">ame as we've </span><span lang="en-GB" style="font-family: Calibri; font-size: 11pt; font-weight: bold;">A</span><span lang="en-GB" style="font-family: Calibri; font-size: 11pt;">lways </span><span lang="en-GB" style="font-family: Calibri; font-size: 11pt; font-weight: bold;">D</span><span lang="en-GB" style="font-family: Calibri; font-size: 11pt;">one. </span>MAD = <span lang="en-GB" style="font-family: Calibri; font-size: 11pt; font-weight: bold;">M</span><span lang="en-GB" style="font-family: Calibri; font-size: 11pt;">akes </span><span lang="en-GB" style="font-family: Calibri; font-size: 11pt; font-weight: bold;">A</span><span lang="en-GB" style="font-family: Calibri; font-size: 11pt;"> </span><span lang="en-GB" style="font-family: Calibri; font-size: 11pt; font-weight: bold;">D</span><span lang="en-GB" style="font-family: Calibri; font-size: 11pt;">ifference</span></div>
</li>
</ol>
<br />Andrew Joneshttp://www.blogger.com/profile/13107118977345285906noreply@blogger.com0tag:blogger.com,1999:blog-21661688.post-86360154088549148312012-08-28T02:07:00.001+01:002012-08-28T02:07:41.913+01:00Installing NVIDIA drivers on 64bit Windows 8<p>I upgraded a Sony laptop from Windows 7 to Windows 8 but the upgrade did not detect the Nvidia graphics chipset. I grabbed the latest Windows 8 64bit Nvidia driver from <a href="http://www.laptopvideo2go.com/">http://www.laptopvideo2go.com/</a> but the installer failed. It turns out that 64 bit Windows 8 will not install a driver unless it’s signed. You can disable signature checking by :</p> <ul> <li>Windows Key + C to bring up charms menu</li> <li>Click “Settings”</li> <li>Click “Change PC Settings”</li> <li>Click “General”</li> <li>Under Advanced Start-up click the “Restart Now” button</li> <li>Click “Troubleshoot”</li> <li>Click “Advanced Options”</li> <li>Click “Start-up Settings”</li> <li>Click “Restart” button</li> <li>Press option 7 – Disable driver signature enforcement</li> <li>You can now install your un-signed 64bit driver</li> </ul> Andrew Joneshttp://www.blogger.com/profile/13107118977345285906noreply@blogger.com2tag:blogger.com,1999:blog-21661688.post-36028263475222309432012-08-28T01:53:00.001+01:002012-08-28T01:53:03.431+01:00No DVD after upgrading Windows 7 to Windows 8<p>I upgraded my Windows 7 laptop to Windows 8 RTM but the DVD player refused to work. It's a MATSHITA BD-CMB UJ141EF drive in a Toshiba laptop. It was showing a yellow exclamation mark in Device Manager which reported the following error "Windows cannot start this hardware device because its configuration information (in the registry) is incomplete or damaged. (Code 19)". Deleting and re-scanning in Device Manager made no difference.</p> <p>SOLUTION:</p> <p>I noticed a service called "TOSHIBA Optical Disk Drive Service" which was presumably installed as part of the original Windows 7 setup. I used "System Configuration" to stop this service and the drive now works correctly in Windows 8.</p> Andrew Joneshttp://www.blogger.com/profile/13107118977345285906noreply@blogger.com0tag:blogger.com,1999:blog-21661688.post-33171788240886616982012-08-19T22:41:00.001+01:002012-08-19T22:41:22.014+01:00Getting CRM2011 Outlook Client running on Windows 8I upgraded my Windows 7 machine to Windows 8 and found a problem with CRM2011. I upgraded the Outlook Client to UR10 but still had problems. There are two things you need to do<br />
<br />
<ol>
<li>Ensure Windows Identity Framework 3.5 is installed (this is now a 'feature' of Windows 8 and can be enabled from "Turn Windows Features on or off" from Programs and Features.</li>
<li>Ensure you are using your full Domain username when entering the account details in the CRM connection dialog. I was originally using my email address to login. For some reason that does not work and you need to use the full domain username. You can find the full domain username from System>Administration>Users> Select a user >General>Account Information.</li>
</ol>
It's the second point that seems critical on Windows 8.<br />
<br />
Andrew Joneshttp://www.blogger.com/profile/13107118977345285906noreply@blogger.com0tag:blogger.com,1999:blog-21661688.post-76466217700389505742012-04-15T21:32:00.000+01:002012-04-15T21:32:16.190+01:00Programming with Scratch<span style="font-family: Calibri;">Inspired by the launch of the Raspberry Pi computer (</span><a href="http://www.raspberrypi.org/"><span style="color: blue; font-family: Calibri;">http://www.raspberrypi.org/</span></a><span style="font-family: Calibri;">) I went into
my daughter’s school last month to teach the key stage 2 kids some games programming
with Scratch. See more here ( <a href="http://www.barnabasoley.cambs.sch.uk/Our+School/Golden+Time">http://www.barnabasoley.cambs.sch.uk/Our+School/Golden+Time</a> ). Just waiting for some Pi's to arrive and we can make our own games console!</span><br />
<br />
<div class="MsoNormal" style="margin: 0cm 0cm 10pt;">
<span style="font-family: Calibri;">I was introduced to computing by soldering together ZX80
kits when I was about their age. I think it’s critical for the UK to get a
new generation of kids into creating content rather than just consuming it. I hope the Raspberry Pi will be as influential as the BBC Micro was for me and my generation.<o:p></o:p></span></div>Andrew Joneshttp://www.blogger.com/profile/13107118977345285906noreply@blogger.com0