tag:blogger.com,1999:blog-79729672024-02-28T17:24:44.254+01:00MathiasWestinMathiasWestinhttp://www.blogger.com/profile/17194202963360212028noreply@blogger.comBlogger155125tag:blogger.com,1999:blog-7972967.post-65127381930008694722021-01-31T11:02:00.002+01:002021-01-31T11:02:33.968+01:00C++ a modern programming language<p>I've been doing a lot of C/C++ development lately. There is ton of new stuff going on in C++ a good reference to what's going on is the <a href="https://isocpp.org/">https://isocpp.org/</a> site.</p><p>A few years back there were a lot of talks and articles in modern c++. The <a href="http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines">c++ core guideline</a> is a good starter to get tips on how write code in a modern way i c++17.</p>MathiasWestinhttp://www.blogger.com/profile/17194202963360212028noreply@blogger.com0tag:blogger.com,1999:blog-7972967.post-5226656763453858792021-01-14T22:51:00.002+01:002021-01-14T22:51:37.239+01:00Writing a new chapter a work<p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjw03yelpI3qk2uoyBkJbhHyz8g_JAkjHbVo48JdNOSxr19Sp_kTOP_V5Yt0CY-kyCyaUhU44BBy51llAp5jN1cJwT9XQoea0VGM0FmVttcLzOVko6yV2C2bjVY-p7z1MJwndPx/s4608/IMG_20210113_210631.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="3456" data-original-width="4608" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjw03yelpI3qk2uoyBkJbhHyz8g_JAkjHbVo48JdNOSxr19Sp_kTOP_V5Yt0CY-kyCyaUhU44BBy51llAp5jN1cJwT9XQoea0VGM0FmVttcLzOVko6yV2C2bjVY-p7z1MJwndPx/w400-h300/IMG_20210113_210631.jpg" width="400" /></a></div><br />It's been a while since the last post but today I start a new chapter in my working life. Changing my employer from Sogeti to Ecru Consulting Norr AB. A lot will be similar, I will continue on the same customer assignment. But some things change, I will have more control over my assignments and work life balance. <br /><a href="https://ecru.se/2021/01/14/ecru-norr-nytt-dotterbolag/">https://ecru.se/2021/01/14/ecru-norr-nytt-dotterbolag/</a><br /><p></p>MathiasWestinhttp://www.blogger.com/profile/17194202963360212028noreply@blogger.com9tag:blogger.com,1999:blog-7972967.post-12275257769152299722019-04-06T12:16:00.000+02:002019-04-06T12:16:25.040+02:00Creating a new MVC web application with .Net Core CLIStart a command prompt by searching for cmd in .<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi03ff4_bRg1Crwlpfr2JPcHI_hzrctAk95x__qpHJa2XKpMJLa1dJwuTab1LPZXokdY7d_BDPGwIbu-qvbme-IgEyLn9YVfAmSZlnOAQHy1jun9m8uPqlUfi61tK6pryG3Ya7V/s1600/SearchApplicationWindows.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="67" data-original-width="146" height="183" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi03ff4_bRg1Crwlpfr2JPcHI_hzrctAk95x__qpHJa2XKpMJLa1dJwuTab1LPZXokdY7d_BDPGwIbu-qvbme-IgEyLn9YVfAmSZlnOAQHy1jun9m8uPqlUfi61tK6pryG3Ya7V/s400/SearchApplicationWindows.PNG" width="400" /></a></div>
<br />
<br />
To check what version of .Net Core that is installed type:<br />
<br />
<blockquote class="tr_bq">
dotnet --version</blockquote>
<br />
Make a root directory for your web application.<br />
<br />
<blockquote class="tr_bq">
mkdir MvcWebApp</blockquote>
move into the folder.<br />
<br />
<blockquote class="tr_bq">
cd MvcWebApp</blockquote>
<br />
<br />
Create a mvc web application (this step can be changed to create a webapi or empty web application, see the full documentation here: <a href="https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-new?tabs=netcore2x" target="_blank">https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-new?tabs=netcore2x</a>)<br />
<blockquote class="tr_bq">
dotnet new mvc</blockquote>
list the created files and folders.<br />
<br />
<blockquote class="tr_bq">
dir</blockquote>
<span style="font-family: "courier new" , "courier" , monospace;">C:\temp\MvcWebApp>dir</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br />Directory of C:\temp\MvcWebApp</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><DIR> .<br /><DIR> ..<br /> 36 .bowerrc<br /> 178 appsettings.Development.json<br /> 113 appsettings.json<br /> 207 bower.json<br /> 628 bundleconfig.json<br /><DIR> Controllers<br /><DIR> Models<br /> 397 MvcWebApp.csproj<br /><DIR> obj<br /> 626 Program.cs<br /> 1 428 Startup.cs<br /><DIR> Views<br /><DIR> wwwroot<br />8 File(s) 3 613 bytes<br />7 Dir(s)</span><br />
<br />
<br />
<br />
<br />
<br />
<br />MathiasWestinhttp://www.blogger.com/profile/17194202963360212028noreply@blogger.com0tag:blogger.com,1999:blog-7972967.post-76322872114797037292019-04-06T12:15:00.001+02:002019-04-06T12:15:56.217+02:00ASP.Net Core and app.settingsGot a question from a <span class="short_text" id="result_box" lang="en">colleague on how to handle different app.settings in ASP.Net core 1.1. When debugging in VS the command prompt shows that the ASP.Net Core web application is started in Development. So the question is how to use this to supply different app.settings on different environments.</span><br />
<div>
<span class="short_text" lang="en"><br /></span></div>
<div>
<span class="short_text" lang="en">A quick look in the documentation show that the recommended way to handle app.settings.json is by different files for different environments. </span></div>
<div>
<span class="short_text" lang="en"><a href="https://docs.microsoft.com/en-us/aspnet/core/fundamentals/configuration/?tabs=basicconfiguration#configuration-by-environment" target="_blank">https://docs.microsoft.com/en-us/aspnet/core/fundamentals/configuration/?tabs=basicconfiguration#configuration-by-environment</a></span></div>
<div>
<span class="short_text" lang="en"><br /></span></div>
<div>
<span class="short_text" lang="en"><br /></span></div>
<br />MathiasWestinhttp://www.blogger.com/profile/17194202963360212028noreply@blogger.com0tag:blogger.com,1999:blog-7972967.post-73482624350687525462019-04-06T12:15:00.000+02:002019-04-06T12:15:02.483+02:00Web front end - Angular 2We are building an application in Angular 2. Writing down som findings to remember. The Angular CLI Command Line Interface that is used for scaffolding new projects and artefacts requires Node.js and NPM (Node Package Manager). <br />
<h2>
Installation</h2>
<h3>
Node.js and NPM</h3>
Installation in Windows is made by downloading the latest installer from: <a href="https://nodejs.org/en/download/">https://nodejs.org/en/download/</a><br />
<br />
Or installing with Chocolatey:<br />
<a href="https://chocolatey.org/packages/nodejs">https://chocolatey.org/packages/nodejs</a><br />
<h3>
Angular CLI</h3>
Install by using NPM:<br />
<i>npm install -g angular-cli</i><br />
<br />
<a href="https://github.com/angular/angular-cli#installation">https://github.com/angular/angular-cli#installation</a><br />
<h2>
Create a project</h2>
To create a new project:<br />
<i>ng new PROJECT_NAME</i><span class="pl-c1"><i>cd</i></span><i> PROJECT_NAME<br />ng serve</i><br />
<a href="https://www.blogger.com/goog_904224505"><br /></a>
<a href="https://github.com/angular/angular-cli#usage">https://github.com/angular/angular-cli#usage</a><br />
<br />
<i>ng new PROJECT_NAME</i> creates the folder structure for the project and downloads the dependencies.<br />
<i>ng serve</i> starts a web server with the project.<br />
<br />
<br />
<br />
ng new TestProj<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvmZsfI8CIBxF-_WIGfOw1tTKih-epLaW5X2G0D6u98pxQQXkPLuPDza_GVeSjzUeR14bpYYLo582kv80dK77L22eCCF5x8lOCCdoBcQLtCpVKHYLF4tItq8K8yEg9IQ6dhsv2/s1600/CreatesFolders.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="334" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvmZsfI8CIBxF-_WIGfOw1tTKih-epLaW5X2G0D6u98pxQQXkPLuPDza_GVeSjzUeR14bpYYLo582kv80dK77L22eCCF5x8lOCCdoBcQLtCpVKHYLF4tItq8K8yEg9IQ6dhsv2/s640/CreatesFolders.PNG" width="640" /></a></div>
<br />
<br />
To be continued....<br />
<br />MathiasWestinhttp://www.blogger.com/profile/17194202963360212028noreply@blogger.com1tag:blogger.com,1999:blog-7972967.post-43132869547290337712015-09-19T14:13:00.001+02:002015-09-19T14:13:08.180+02:00Raspberry Pi 2 official touchscreen displayInstalled the official touchscreen on one of my Raspberry Pi 2 devices.<br />
<br />
It was a easy, I followed the guide <a href="https://youtu.be/6HvWXQsBeHk">Raspberry Pi Official DSI Display Assembly</a> to install the hardware. After the hardware setup of the display I connected a USB cable for powering the Raspberry pi according to the guide in <a href="https://www.raspberrypi.org/blog/the-eagerly-awaited-raspberry-pi-display/">The eagerly awaited Raspberry pi display</a><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-cH7BcRkoOBbD5Lv018lcjeIAYkDpFI3kK2D8P9iuBzNvswzjG-dQJTSahi-TAIma7d3ZfEt8BzAAVqPl-3Q0zHDVpaeKF7Tzi3ECnKf7onwGRqE0rlmbK5HMoAfx5fyC57mn/s1600/WP_20150919_006.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-cH7BcRkoOBbD5Lv018lcjeIAYkDpFI3kK2D8P9iuBzNvswzjG-dQJTSahi-TAIma7d3ZfEt8BzAAVqPl-3Q0zHDVpaeKF7Tzi3ECnKf7onwGRqE0rlmbK5HMoAfx5fyC57mn/s640/WP_20150919_006.jpg" width="360" /></a></div>
<br />
<br />
Starting up the the device the display was working, but no touchscreen was enabled. To get the touchscreen to work I did the upgrade explained in the guide:<br />
<blockquote class="tr_bq">
$ sudo apt-get update<br />$ sudo apt-get upgrade<br />$ sudo reboot</blockquote>
After the update the display worked as expected.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKe7TBQ2neMCY4Cz_JG6ul3KSm8d3d7cPTnNLGGqmdRJX3BI5cmTNQipzPUn_gd00g9gbCcmx_8w0w0WQ7QVFITUo78X_Qtx8SRVjrzQ1gfX5KAR7yDB9ObjDKJ5CZ5JMPTzeU/s1600/WP_20150919_005.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKe7TBQ2neMCY4Cz_JG6ul3KSm8d3d7cPTnNLGGqmdRJX3BI5cmTNQipzPUn_gd00g9gbCcmx_8w0w0WQ7QVFITUo78X_Qtx8SRVjrzQ1gfX5KAR7yDB9ObjDKJ5CZ5JMPTzeU/s640/WP_20150919_005.jpg" width="640" /></a></div>
MathiasWestinhttp://www.blogger.com/profile/17194202963360212028noreply@blogger.com1tag:blogger.com,1999:blog-7972967.post-34629783202782386262015-09-19T13:57:00.000+02:002015-09-19T14:20:13.310+02:00Raspberry Pi 2 WiFi with WEP Open SystemTried to get the wifi going with the GUI in Raspbian but it would not start working.<br />
<br />
Ended up googeling and found this <a href="https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=88644">forum post</a> on the Raspberrypi forum. that explained how to correctly setup the file for WEP with open system:<br />
<blockquote class="tr_bq">
network={<br />
ssid="myssid"<br />
key_mgmt=NONE<br />
wep_key0=mywepkey<br />
wep_tx_keyidx=0<br />
}</blockquote>
Found an <a href="http://weworkweplay.com/play/automatically-connect-a-raspberry-pi-to-a-wifi-network/">blogpost</a> explaining how to edit the file:<br />
<blockquote class="tr_bq">
$ sudo nano /etc/wpa_supplicant/wpa_supplicant.conf </blockquote>
changed myssid to the my wifi network ssid and changed the mywebkey to the correct key.<br />
<br />
did a reboot<br />
<blockquote class="tr_bq">
$ sudo reboot</blockquote>
and now it works!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEht9GZI1tPtC7isv_m-RRIeJYtGWFgJCUpXv820KVNOtpU-ZvjBzhiHZkmQ7Wpe0VIRhpOtPujOPxIkAPt6XsBU61o9JpLN0VuvbfNR9IS3dTrjcFrxX-g7bjhXlAv_bXalPSEp/s1600/WP_20150919_005.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEht9GZI1tPtC7isv_m-RRIeJYtGWFgJCUpXv820KVNOtpU-ZvjBzhiHZkmQ7Wpe0VIRhpOtPujOPxIkAPt6XsBU61o9JpLN0VuvbfNR9IS3dTrjcFrxX-g7bjhXlAv_bXalPSEp/s640/WP_20150919_005.jpg" width="640" /></a></div>
<br />MathiasWestinhttp://www.blogger.com/profile/17194202963360212028noreply@blogger.com2tag:blogger.com,1999:blog-7972967.post-74167052527183033152015-08-31T19:38:00.001+02:002015-08-31T19:38:33.846+02:00Solution to sound problem on HDMI TV after upgrade to Windows 10 on Surface Pro 3Were having problem getting the sound from the Surface Pro 3 to my TV through HDMI. It worked before upgrading so Windows 10 had a different behavior. Found this <a href="http://answers.microsoft.com/en-us/surface/forum/surfpro3-surfusingwin10/no-hdmi-sound-after-upgrade-to-windows-10/45c740da-5326-48a1-9be5-1e84dca50ae8">http://answers.microsoft.com/en-us/surface/forum/surfpro3-surfusingwin10/no-hdmi-sound-after-upgrade-to-windows-10/45c740da-5326-48a1-9be5-1e84dca50ae8</a> on the internet, though it might be good to write down so I'll remember next time.<br />
<br />
Right click on the speaker icon, on the task bar.<br />
Choose Playback Devices.<br />
Right Click the TV item in the list<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOSloCsGcqYAFE-ELjC9FO-HVAQUkvHD4oGLsRhaLRCxRmIXbj_ZYtPDKLbKm0MqF9UyZKPUJ_HqUCfptBYVb8cI52GlAFxY2cBcwsAXt6BONUd7jTbOnW7cXNhSmHlv9xv2Kk/s1600/soundRightClick.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="348" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOSloCsGcqYAFE-ELjC9FO-HVAQUkvHD4oGLsRhaLRCxRmIXbj_ZYtPDKLbKm0MqF9UyZKPUJ_HqUCfptBYVb8cI52GlAFxY2cBcwsAXt6BONUd7jTbOnW7cXNhSmHlv9xv2Kk/s400/soundRightClick.PNG" width="400" /></a></div>
<br />
Choose Properties<br />
Click the "Advanced" tab in the dialog<br />
change the default format for audio playback to a lower value.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfJvjHvCfaHxlKgGFefFpRjTfhs-r2U6GtwMcGSfk5HZEqA4UML0-vdg5sYtQxyrtzo7NRykWzPVC0fzsiB6Sxt3k5mZ8IcUAtgNSvr-8roCE8oUZe643Utwcbqla3SsdNw7dS/s1600/PropertiesSamsung.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfJvjHvCfaHxlKgGFefFpRjTfhs-r2U6GtwMcGSfk5HZEqA4UML0-vdg5sYtQxyrtzo7NRykWzPVC0fzsiB6Sxt3k5mZ8IcUAtgNSvr-8roCE8oUZe643Utwcbqla3SsdNw7dS/s400/PropertiesSamsung.PNG" width="313" /></a></div>
<br />
<br />
<br />
<br />MathiasWestinhttp://www.blogger.com/profile/17194202963360212028noreply@blogger.com3tag:blogger.com,1999:blog-7972967.post-80922460401132778302015-08-27T20:27:00.000+02:002015-08-27T20:27:52.728+02:00Hello World with Windows 10 Core IoT and Visual Studio 2015Start by creating an Universal Application project in Visual Studio 2015:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9yOV7TjNbhjFHECk27BtNYwxefYN4U_1B_2VTPmaQ3XHjkgO1RUb-FKFmZYkSXNPg6mDKFMIUooU-_8DqZVngeSPjlNA1LZfwq1VySqjHt8utDuQNF2PXL8Jj1RSLZOSdyGm3/s1600/CreateUniversalAppIoT.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="364" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9yOV7TjNbhjFHECk27BtNYwxefYN4U_1B_2VTPmaQ3XHjkgO1RUb-FKFmZYkSXNPg6mDKFMIUooU-_8DqZVngeSPjlNA1LZfwq1VySqjHt8utDuQNF2PXL8Jj1RSLZOSdyGm3/s640/CreateUniversalAppIoT.PNG" width="640" /></a></div>
<br />
Change the platform to ARM:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhamWQEg2bO4v3sss7NK-XHrCEipsj8QNexqVb9pKJjwX8zlJUO0ZwHIMXRgvywLLvBNcUmrmPdnQA9NibEbmS25lM7Snpz6N0m9r4ulU_foK2Hn-TuiLQJ-utOT_cbRQeqgN-P/s1600/SetARM.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="250" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhamWQEg2bO4v3sss7NK-XHrCEipsj8QNexqVb9pKJjwX8zlJUO0ZwHIMXRgvywLLvBNcUmrmPdnQA9NibEbmS25lM7Snpz6N0m9r4ulU_foK2Hn-TuiLQJ-utOT_cbRQeqgN-P/s640/SetARM.PNG" width="640" /></a></div>
<br />
Change the target to Remote Machine (You have to set up your Raspberry Pi 2 unit with Windows 10 Core IoT before doing this):<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd72UwbNIqF76wR6e_ywUiTsu-L3D7ZvcAUR1c-ZwF8bKSCHFn2CkXFhLJ5IbBgssq2Bng7iGwtwgS7WjI32BYFqVKhZl7kl-NWoUEy0QJVHGBQ9KfwPay-cAgfoKehkTpYsSe/s1600/SetRemoteMachine.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="214" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd72UwbNIqF76wR6e_ywUiTsu-L3D7ZvcAUR1c-ZwF8bKSCHFn2CkXFhLJ5IbBgssq2Bng7iGwtwgS7WjI32BYFqVKhZl7kl-NWoUEy0QJVHGBQ9KfwPay-cAgfoKehkTpYsSe/s640/SetRemoteMachine.PNG" width="640" /></a></div>
<br />
Click on the minwinpc:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjxVgn0Sk7I2pp83-uoX_r0hw3MyqKRKZH59CZNVY9B4-oG6Bv7BwlAtcnuWZ_rfNpmhnvJGx3mYHBySUKV-jpqD_wbGo7HrszK4_YnF1rKIGhH0i-wn66r9c3e-wOkhbMLQqv/s1600/SetRemoteMachineMinWinPc.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjxVgn0Sk7I2pp83-uoX_r0hw3MyqKRKZH59CZNVY9B4-oG6Bv7BwlAtcnuWZ_rfNpmhnvJGx3mYHBySUKV-jpqD_wbGo7HrszK4_YnF1rKIGhH0i-wn66r9c3e-wOkhbMLQqv/s640/SetRemoteMachineMinWinPc.PNG" width="502" /></a></div>
<br />
Choose to select:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvYan5GFB2WLUbbMll-u7iweM-qGBbdR9gIv1sGZSotvmHz6CW-D_xrT0rXzcojqtSbq6Pv4hJ8mjw32lsCyuMDdDyeqvRN1-p6CDmsZHM0yAak1Via-RizrQb3Z9j5LKjk_tB/s1600/SetRemoteMachineMinWinPc2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvYan5GFB2WLUbbMll-u7iweM-qGBbdR9gIv1sGZSotvmHz6CW-D_xrT0rXzcojqtSbq6Pv4hJ8mjw32lsCyuMDdDyeqvRN1-p6CDmsZHM0yAak1Via-RizrQb3Z9j5LKjk_tB/s640/SetRemoteMachineMinWinPc2.PNG" width="502" /></a></div>
<br />
It's possible to change size of the mainPage.xaml:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhG3wYWAz6Ch7CL2iTtp1bGYi7EDsrdG6BXAAF9PZ4IIs76CK_CVAzSW99fTKlUF8nxXGFBnbbjjnu2jhOT1BCrqGutpzkHCtoCBDk8Qita5yzpRLc9t1iJpPjdFe7TAQSGeOTr/s1600/SetSizeAndRatio.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="338" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhG3wYWAz6Ch7CL2iTtp1bGYi7EDsrdG6BXAAF9PZ4IIs76CK_CVAzSW99fTKlUF8nxXGFBnbbjjnu2jhOT1BCrqGutpzkHCtoCBDk8Qita5yzpRLc9t1iJpPjdFe7TAQSGeOTr/s640/SetSizeAndRatio.PNG" width="640" /></a></div>
<br />
Added a Hello world text block and run the application, On the TV connected to the Raspberry Pi 2. Tha application is started and shows "Hello World":<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLyvJD6YUpbWupK76TGVQk0OIyE2av9vJT-fLePnl9_Hqtlc9WDMXC2e_EcTubh8urNDNRV-nO9voCnyCc9u3P01UYOejDkPgYqXGcjnib_SxVihNFWmt8lGJ27QSbYYO5ELs2/s1600/WP_20150826_004.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLyvJD6YUpbWupK76TGVQk0OIyE2av9vJT-fLePnl9_Hqtlc9WDMXC2e_EcTubh8urNDNRV-nO9voCnyCc9u3P01UYOejDkPgYqXGcjnib_SxVihNFWmt8lGJ27QSbYYO5ELs2/s640/WP_20150826_004.jpg" width="640" /></a></div>
MathiasWestinhttp://www.blogger.com/profile/17194202963360212028noreply@blogger.com1tag:blogger.com,1999:blog-7972967.post-443772893225202572015-08-26T19:16:00.003+02:002015-08-26T19:16:33.101+02:00Solved: Error: this template attempted to load component assembly 'Microsoft.VisualStudio.Universal.TemplateWizards...<div class="" style="clear: both; text-align: left;">
I got this error message:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj72fMdBtmF_Rzd0oh_QFii7jPcZdoknvRDOCAUmvIcHZUzRE8ZqVrFQHC1S_I9QtFnnyGcsJWGQ3lSeFAChjFwI-y7GsdPPXwaAT1ycrnCk4j8bFH7aT7jxABVVJOUTXFh1qPr/s1600/Error+vs2015+iot.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="352" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj72fMdBtmF_Rzd0oh_QFii7jPcZdoknvRDOCAUmvIcHZUzRE8ZqVrFQHC1S_I9QtFnnyGcsJWGQ3lSeFAChjFwI-y7GsdPPXwaAT1ycrnCk4j8bFH7aT7jxABVVJOUTXFh1qPr/s640/Error+vs2015+iot.PNG" width="640" /></a></div>
<div class="" style="clear: both; text-align: left;">
<br /></div>
<div class="" style="clear: both; text-align: left;">
when trying to create a Background Application (IoT) project in Visual Studio 2015:</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPYRBQvfxjEXj8t-nhinNFc_aAGUSLq8LrhyNHOeX5WQyw0Y9GRfI8KVDxpc7eSR2uTCbyLQjUVWL4wwWYyLL_l5GnuUr_xUAKovK6_mi_z4mQ6_HKCKqZO31TekLAMUkaxxgy/s1600/Background+task.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="364" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPYRBQvfxjEXj8t-nhinNFc_aAGUSLq8LrhyNHOeX5WQyw0Y9GRfI8KVDxpc7eSR2uTCbyLQjUVWL4wwWYyLL_l5GnuUr_xUAKovK6_mi_z4mQ6_HKCKqZO31TekLAMUkaxxgy/s640/Background+task.PNG" width="640" /></a></div>
<br />
<br />
When reading through the setup guide <a href="http://ms-iot.github.io/content/en-US/win10/SetupPCRPI.htm">http://ms-iot.github.io/content/en-US/win10/SetupPCRPI.htm</a> an extra time I found out that I've missed installing this when installing Visual Studio 2015:<br /><br />The required version of <strong>Visual Studio Tools for Universal Windows Apps</strong> is <code>14.0.23121.00 D14OOB</code>.<br />
<br />
I click on the Templates | Visual C# | Windows | Universal<br />
and from there I installed the templates and after that the error message when creating a background application disappeared.MathiasWestinhttp://www.blogger.com/profile/17194202963360212028noreply@blogger.com2tag:blogger.com,1999:blog-7972967.post-36474303419265930262015-08-25T18:26:00.001+02:002015-08-25T18:26:16.307+02:00Raspberry PI 2 and Windows 10 IoT CoreHave been playing around with an Raspberry Pi 2 and Windows 10 IoT Core.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiy867G2dAntKfU1dF_qbwhjvJDaGiwfp30YV5_4sIR9SrVu-owSHn-vu5gELu2Ie5_CFLoihAm5QK-u418h3Tf-7e843Fr539AOMf5QyxEcOL5WzD9bzk5eMIu700F6N86cc4/s1600/WP_20150825_005.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiy867G2dAntKfU1dF_qbwhjvJDaGiwfp30YV5_4sIR9SrVu-owSHn-vu5gELu2Ie5_CFLoihAm5QK-u418h3Tf-7e843Fr539AOMf5QyxEcOL5WzD9bzk5eMIu700F6N86cc4/s640/WP_20150825_005.jpg" width="640" /></a></div>
<br />
<br />
There is a great guide on how to prepare your PC and Raspberry Pi 2 with windows 10 IoT Core here <a href="https://ms-iot.github.io/content/en-US/win10/SetupRPI.htm">https://ms-iot.github.io/content/en-US/win10/SetupRPI.htm</a> following the guide is easy. But I don't get the requirement for Windows 10 to be able to flash the image to the memory card. But off course to be able to develop you need Windows 10 and Visual Studio 2015.<br />
<br />
Installed Visual Studio 2015 Community and the IoT Templates. Described here <a href="https://ms-iot.github.io/content/en-US/win10/SetupPCRPI.htm">https://ms-iot.github.io/content/en-US/win10/SetupPCRPI.htm</a><br />
<br />
I tried to get the wifi up and running but windows 10 IoT Core seems to only support some USB wifi dongles <a href="https://ms-iot.github.io/content/en-US/win10/SetupWiFi.htm">https://ms-iot.github.io/content/en-US/win10/SetupWiFi.htm</a> So ended up using ethernet cable.<br />
<br />
A good advice is to change the default password. So I did that in the a first Powershell session following the setup guide:<br />
net user Administrator [new password]<br />
<br />
By starting the Windows IoT Core Watcher on a desktop PC that are on the same network. It's possible to see all Raspberry Pi 2 devices running on the network<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeFO7TmjENiP2EgJDHqTD62ZlTtoCwBjZrb_etGKwNILBI0wc2rQjKADmmI_5eDBMMAQBxfKt1mt77r2hMlNKFv00TDKkZNzDrk9hU7y4jBsu0tK6MNarMYRl27MXhrTnfcO95/s1600/WindowsIoTCoreWatcher.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="392" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeFO7TmjENiP2EgJDHqTD62ZlTtoCwBjZrb_etGKwNILBI0wc2rQjKADmmI_5eDBMMAQBxfKt1mt77r2hMlNKFv00TDKkZNzDrk9hU7y4jBsu0tK6MNarMYRl27MXhrTnfcO95/s640/WindowsIoTCoreWatcher.PNG" width="640" /></a></div>
<br />
By right clicking the item it's possible to open the website on the Raspberry Pi 2 <ip-adress>:8080. <br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifT-JRlvz-4CTE58n6fa79goglSyfoWD5VKZfLF51En4utbkXvG45h0z2vSYnEwdeHiMbnvolFCO9NF0_BN-fVuZohSzbMOJ-TImzqvmNLFcMv43ivVaZxhfS5Y_tXAdMx8bqO/s1600/RaspberryPiWebPageWin10.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="408" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifT-JRlvz-4CTE58n6fa79goglSyfoWD5VKZfLF51En4utbkXvG45h0z2vSYnEwdeHiMbnvolFCO9NF0_BN-fVuZohSzbMOJ-TImzqvmNLFcMv43ivVaZxhfS5Y_tXAdMx8bqO/s640/RaspberryPiWebPageWin10.PNG" width="640" /></a></div>
<br />MathiasWestinhttp://www.blogger.com/profile/17194202963360212028noreply@blogger.com2tag:blogger.com,1999:blog-7972967.post-5179410065424006352015-08-24T09:52:00.001+02:002015-08-24T09:52:53.853+02:00Visual Studio OnlineMicrosoft Visual Studio Online makes it possible to have an online ALM. Each Project can have 5 basic users and unlimited amount of stakeholder users. <br />
<br />
I made an presentation for our user group a few month ago. Posted on Slideshare.net: <a href="http://www.slideshare.net/MathiasWestin/knowit-study-group-rnskldsvik-introduction-to-visual-studio-online">http://www.slideshare.net/MathiasWestin/knowit-study-group-rnskldsvik-introduction-to-visual-studio-online</a>MathiasWestinhttp://www.blogger.com/profile/17194202963360212028noreply@blogger.com2tag:blogger.com,1999:blog-7972967.post-58174135664371150962015-03-06T13:15:00.000+01:002015-03-06T13:15:44.292+01:00Installing NAPA Office 365 Development Tools There is a great instruction on how to install the NAPA Development Tools here:<br />
<a href="https://msdn.microsoft.com/en-us/library/office/fp179924%28v=office.15%29.aspx">https://msdn.microsoft.com/en-us/library/office/fp179924%28v=office.15%29.aspx</a><br />
<br />
After installing it's possible to create Apps in NAPA that can be published in the Sharepoint App Store.<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGEZigUFonIzCTQE892NPjr9voMfD0TG_Hja0E4OdPqeVj2OwH1m9TNcUclwfZPbYwLGWAi9fd8nMcJuzInz0byeCd8m7DwUA_N1yvEmUtCciaSAB3iV_7e2ttPFlxmFoRybTj/s1600/Create+Apps.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGEZigUFonIzCTQE892NPjr9voMfD0TG_Hja0E4OdPqeVj2OwH1m9TNcUclwfZPbYwLGWAi9fd8nMcJuzInz0byeCd8m7DwUA_N1yvEmUtCciaSAB3iV_7e2ttPFlxmFoRybTj/s1600/Create+Apps.PNG" height="410" width="640" /></a><br />
It's possible to create several different app types:<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXjKg7JJUJJwKgbl3vDlIwRlH2M0GjvF9ouSqqCeD5EGpXxnIuu4Xi4ogGoNIeN-sKpI_2uPKFcovvPH0RmQBu23VRQuKR9-YrgXtskeSj58HI1_ZE3urMZRQ2FYkQxr4le45o/s1600/Choose+app+types.PNG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXjKg7JJUJJwKgbl3vDlIwRlH2M0GjvF9ouSqqCeD5EGpXxnIuu4Xi4ogGoNIeN-sKpI_2uPKFcovvPH0RmQBu23VRQuKR9-YrgXtskeSj58HI1_ZE3urMZRQ2FYkQxr4le45o/s1600/Choose+app+types.PNG" height="416" width="640" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXjKg7JJUJJwKgbl3vDlIwRlH2M0GjvF9ouSqqCeD5EGpXxnIuu4Xi4ogGoNIeN-sKpI_2uPKFcovvPH0RmQBu23VRQuKR9-YrgXtskeSj58HI1_ZE3urMZRQ2FYkQxr4le45o/s1600/Choose+app+types.PNG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br /></a>NAPA has a editor where the code can be edited online:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqz0fmUwIFZTqoHvqhmYOjAZwU24-Qt8l3ei6hO6hr3lZ61PKkqEqKpMAvR5pEKvhRYYoHIai9GjiGEX8BVfVwnVkIx65V345yFnJIAQZic2i2NtZqZ7b_XV3rqHHrNzfjySyO/s1600/NapaEditor.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqz0fmUwIFZTqoHvqhmYOjAZwU24-Qt8l3ei6hO6hr3lZ61PKkqEqKpMAvR5pEKvhRYYoHIai9GjiGEX8BVfVwnVkIx65V345yFnJIAQZic2i2NtZqZ7b_XV3rqHHrNzfjySyO/s1600/NapaEditor.PNG" height="442" width="640" /></a></div>
<br />MathiasWestinhttp://www.blogger.com/profile/17194202963360212028noreply@blogger.com1tag:blogger.com,1999:blog-7972967.post-74872600261834749752015-03-06T13:11:00.001+01:002015-03-06T13:11:51.384+01:00Introduction to Microsoft Azure websitesHave been watching a lot of online courses last month on Microsoft Virtual Academy on the cloud track on Know It Prove It.<br />
<br />
The fundamentals courses by Bob Tabor:<br />
<a href="http://www.microsoftvirtualacademy.com/training-courses/microsoft-azure-fundamentals">http://www.microsoftvirtualacademy.com/training-courses/microsoft-azure-fundamentals</a><br />
<a href="http://www.microsoftvirtualacademy.com/training-courses/microsoft-azure-fundamentals-websites">http://www.microsoftvirtualacademy.com/training-courses/microsoft-azure-fundamentals-websites</a><br />
showed how easy it is to set up and configure a Microsoft Azure website.<br />
<br />
Made a short introduction presentation for our Study group to inspire other developers to start using Azure when doing web development. For those who are interested it's published the presentation on:<br />
<a href="http://www.slideshare.net/MathiasWestin/knowit-study-group-rnskldsvik-introduction-to-microsoft-azure-websites">http://www.slideshare.net/MathiasWestin/knowit-study-group-rnskldsvik-introduction-to-microsoft-azure-websites</a>MathiasWestinhttp://www.blogger.com/profile/17194202963360212028noreply@blogger.com7tag:blogger.com,1999:blog-7972967.post-25499473400574508982015-02-26T11:11:00.001+01:002015-02-26T11:11:13.533+01:00How to make web site running IIS Express accessible from a Raspberry Pi 2I wanted to build a web site that is used by a Raspberry Pi 2 from Visual Studio without hosting the site in an IIS.<br />
<br />
Was following the following this guide: <br />
<a href="http://www.hanselman.com/blog/WorkingWithSSLAtDevelopmentTimeIsEasierWithIISExpress.aspx">http://www.hanselman.com/blog/WorkingWithSSLAtDevelopmentTimeIsEasierWithIISExpress.aspx</a><br />
<br />
Got some errors, though it could be great for my own memory to write down the steps nessessary:<br />
<br />
<strong>First step:</strong> Edititing the applicationhost.config:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCOGmhPrPFfd-05WWWq-QhUZrBx-bwNzFsSBn4-G1pE-vufeM3fv0mQlhB_Fp_Obzk8UEV8wbCHpW_6lXn4xQixprvvQqhN5XX9GniJnDH-fUiY3lu2soJ5lR1oF-gGjps14fU/s1600/applicationhost.config.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCOGmhPrPFfd-05WWWq-QhUZrBx-bwNzFsSBn4-G1pE-vufeM3fv0mQlhB_Fp_Obzk8UEV8wbCHpW_6lXn4xQixprvvQqhN5XX9GniJnDH-fUiY3lu2soJ5lR1oF-gGjps14fU/s1600/applicationhost.config.PNG" height="237" width="400" /></a></div>
<br />
<br />
<script src="https://gist.github.com/MathiasWestin/a1d02dddd4710a1220b9.js"></script>
<br />
Change "localhost" to the ip-number of the machine running the IIS Express (can be found by using command netconfig in the command prompt) ip-number is for example 192.168.1.2:<br />
<br />
<script src="https://gist.github.com/MathiasWestin/d223e116c0515b06bc9f.js"></script>
<br />
<strong>Second step:</strong> Tell HTTP.SYS that everybody has access to the url:<br />
<br />
<blockquote class="tr_bq">
netsh http add urlacl url=http://myhostname:58763/ user=everybody</blockquote>
<br />
<br />
If Everything works you get:<br />
<blockquote class="tr_bq">
URL reservation successfully added</blockquote>
<br />
<br />
"everybody" needs to be "alla" in a swedish machine otherwise you get the following error message:<br />
<br />
<blockquote class="tr_bq">
Create SDDL failed, Error: 1332 Felaktig parameter.</blockquote>
<br />
<br />
If you like me forget the / in the url that is write http://myhostname:58763 without trailing / you get the following error message:<br />
<br />
<blockquote class="tr_bq">
Url reservation add failed, Error: 87 Felaktig parameter.</blockquote>
<br />
<br />
<strong>Third step:</strong> add an exception in the firewall:<br />
<br />
<blockquote class="tr_bq">
netsh advfirewall firewall add rule name="IISExpressWeb" dir=in protocol=tcp localport=58763 profile=private remoteip=localsubnet action=allow</blockquote>
<br />
<br />
If Everything works you get:<br />
<br />
<blockquote class="tr_bq">
Ok.</blockquote>
<br />
<br />
If running the IIS Express from Visual studio you need to run as administrator, otherwise you get an error message that say you need to run as an administrator.<br />
<br />
Check that you can access the machine running the IIS Express by entering ping 192.168.1.2 in the command prompt in Raspberry pi. If you can access the machine, start the web browser and enter http://192.168.1.2:58763 in the adress. <br />
<br />
Now its possible to access the site.<br />
MathiasWestinhttp://www.blogger.com/profile/17194202963360212028noreply@blogger.com1tag:blogger.com,1999:blog-7972967.post-56970110233466583692015-02-01T15:19:00.000+01:002015-02-01T15:19:08.505+01:00Testing f.lux that adjust color temperature of the displayTrying out a tool called <a href="https://justgetflux.com/">f.lux</a> that adjust the color on the computer screen so that the eyes don't get tired so fast when working late evening/night. I found the tool in <a href="http://www.hanselman.com/blog/ScottHanselmans2014UltimateDeveloperAndPowerUsersToolListForWindows.aspx">Scott Hanselman:s ultimate tool list</a> so thanks for sharing. Worth trying out when working late during the winter month. I must admit that I've started adjusting the brightness on the phone and surface after using f.lux a while, because I felt the brightness was too bright for my eyes.MathiasWestinhttp://www.blogger.com/profile/17194202963360212028noreply@blogger.com0tag:blogger.com,1999:blog-7972967.post-48920375680496132182014-11-29T12:21:00.002+01:002014-11-29T12:21:41.396+01:00.Net 4.5 Async Await for a more responsive design Writing this so I'll remember the details. There is a good resource on the Await and Async keywords in MSDN: <a href="http://msdn.microsoft.com/en-us/library/hh191443.aspx">http://msdn.microsoft.com/en-us/library/hh191443.aspx</a><br />
<div>
<br /></div>
<div>
The key thing is that the execution is released back to the event loop until the async method is executed and completed. So there is no blocking of the event loop causing rendering problems in the GUI.<br />
<div>
<br /></div>
<div>
There is a lot of arrows in the sample in MSDN but the summary is that code will go back and resume executing the "continuation" after the async method has completed. This is great for long-running processes like downloading resources.</div>
</div>
MathiasWestinhttp://www.blogger.com/profile/17194202963360212028noreply@blogger.com1tag:blogger.com,1999:blog-7972967.post-26922039757471844322014-11-22T12:10:00.000+01:002014-11-23T10:17:34.343+01:00Installing the Android Studio BetaGoogle is moving to new IDE, Android Studio. it's only in Beta right now but when released it will be the preferred IDE and you will need to merge from Eclipse. <br />
<br />
You have to install the java development kit 6 (JDK 6) the 32-bit and the 64-bit version, it that can be found here: <a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html">http://www.oracle.com/technetwork/java/javase/downloads/index.html</a><br />
<br />
Installer for the Android Studio can be downloaded here <a href="http://developer.android.com/sdk/installing/studio.html">http://developer.android.com/sdk/installing/studio.html</a><br />
Unzip<br />
<br />
After installing the Android studio you have to add the JDK JAVA_HOME Environment variable setting if the installer script failed to do so, follow the instructions on the site. (the path should be to 32-bit or 64-bit depending on if studio.exe or studio64.exe will be used)<br />
<br />
Also install the Android SDK, by downloading "Get the SDK for an existing IDE" <a href="http://developer.android.com/sdk/index.html">http://developer.android.com/sdk/index.html</a> Start the SDK Manager and download according to the instructions on the web site.<br />
<br />
Start the Studio.exe in the Android Studio unzipped folder. Set the path to the Android SDK by clicking configure | project setting | project platform and setting the path.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhs3N4aazWExiPCdkivbW_I6VY5dGgNJQxdvgpcu9uvYWtLR2VEEMlAYDinrX0opDUqaIrK2UMTkD7T8mIr0Eo5NPixioTP7fPDtiriq6K5s99hsUOUMMNyGYjFS-CJT7nWvrxZ/s1600/001FirstStart.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhs3N4aazWExiPCdkivbW_I6VY5dGgNJQxdvgpcu9uvYWtLR2VEEMlAYDinrX0opDUqaIrK2UMTkD7T8mIr0Eo5NPixioTP7fPDtiriq6K5s99hsUOUMMNyGYjFS-CJT7nWvrxZ/s1600/001FirstStart.PNG" height="474" width="640" /></a></div>
<br />
<br />
Now you will be able to start a New project... By creating a project you start the IDE:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhN9Styr9BJbllvhgSU2MsaXlC-55E7xk69M0YcYiRcniAxTiahODL0r-GY-3CBbMkRnDmDfeEOQEGb2OD6isNYOh6nbNUR31xPe9g38Jm-GDUZRV1oI8QUBhTxmXArJuYtwf4r/s1600/IDE.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhN9Styr9BJbllvhgSU2MsaXlC-55E7xk69M0YcYiRcniAxTiahODL0r-GY-3CBbMkRnDmDfeEOQEGb2OD6isNYOh6nbNUR31xPe9g38Jm-GDUZRV1oI8QUBhTxmXArJuYtwf4r/s1600/IDE.PNG" height="406" width="640" /></a></div>
<br />
<br />
Found a tutorial that describe the Android Studio here: <a href="http://youtu.be/bJ_2_AQboc0">http://youtu.be/bJ_2_AQboc0</a><br />
<br />
The UX when installing the Android Studio is really bad, hopefully it will be a lot easier to install with all the dependencies when released.MathiasWestinhttp://www.blogger.com/profile/17194202963360212028noreply@blogger.com1tag:blogger.com,1999:blog-7972967.post-41126696275215006832014-11-02T13:33:00.001+01:002014-11-02T13:33:37.706+01:00Compiling Qt code gave: multiple definition of ...Got an error when compiling our code:<br />
<br />
In Windows 7 and visual studio, I at first did not notice the problem, but it was giving a warning:<br />
<b><span style="font-family: "Calibri","sans-serif"; font-size: 11.0pt; mso-ansi-language: SV; mso-bidi-font-family: "Times New Roman"; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: SV; mso-fareast-theme-font: minor-latin;">LNK4042: object specified more than once; extras ignored<!--[endif]--></span></b><br />
<span style="font-family: "Calibri","sans-serif"; font-size: 11.0pt; mso-ansi-language: SV; mso-bidi-font-family: "Times New Roman"; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: SV; mso-fareast-theme-font: minor-latin;"><br /></span>In <span style="font-family: "Calibri","sans-serif"; font-size: 11.0pt; mso-ansi-language: SV; mso-bidi-font-family: "Times New Roman"; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: SV; mso-fareast-theme-font: minor-latin;">Linux and gcc it gave an error, so I could not compile the code:</span><br />
<b><span style="font-family: "Calibri","sans-serif"; font-size: 11.0pt; mso-ansi-language: SV; mso-bidi-font-family: "Times New Roman"; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: SV; mso-fareast-theme-font: minor-latin;">multiple definition of `<constructor of class>'</span></b><br />
<b><span style="font-family: "Calibri","sans-serif"; font-size: 11.0pt; mso-ansi-language: SV; mso-bidi-font-family: "Times New Roman"; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: SV; mso-fareast-theme-font: minor-latin;">collect2: ld returned 1 exit status</span></b><br />
<span style="font-family: "Calibri","sans-serif"; font-size: 11.0pt; mso-ansi-language: SV; mso-bidi-font-family: "Times New Roman"; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: SV; mso-fareast-theme-font: minor-latin;"><br /></span>
I took som time to figure it out, but <span style="font-family: "Calibri","sans-serif"; font-size: 11.0pt; mso-ansi-language: SV; mso-bidi-font-family: "Times New Roman"; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: SV; mso-fareast-theme-font: minor-latin;">turned out to be a bad merge in subversion, </span><br />
<span style="font-family: "Calibri","sans-serif"; font-size: 11.0pt; mso-ansi-language: SV; mso-bidi-font-family: "Times New Roman"; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: SV; mso-fareast-theme-font: minor-latin;">the *.pro file had the same class twice in</span><br />
<span style="font-family: "Calibri","sans-serif"; font-size: 11.0pt; mso-ansi-language: SV; mso-bidi-font-family: "Times New Roman"; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: SV; mso-fareast-theme-font: minor-latin;"><br /></span>
<span style="color: purple;">HEADERS</span><span style="color: silver;"> </span>+=<span style="color: silver;"> </span>\ <b>Class1.h</b> /<br />
<b>Class1.h</b><br />
<span style="color: purple;">SOURCES</span><span style="color: silver;"> </span>+=<span style="color: silver;"> </span>\ <b>Class1.cpp</b> /<br />
<b>Class1.cpp</b><br />
<span style="font-family: "Calibri","sans-serif"; font-size: 11.0pt; mso-ansi-language: SV; mso-bidi-font-family: "Times New Roman"; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: SV; mso-fareast-theme-font: minor-latin;"><br /></span>R<span style="font-family: "Calibri","sans-serif"; font-size: 11.0pt; mso-ansi-language: SV; mso-bidi-font-family: "Times New Roman"; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: SV; mso-fareast-theme-font: minor-latin;">removing the second time the class name where entered in the *.pro file solved the problem.</span>
<span style="font-family: "Calibri","sans-serif"; font-size: 11.0pt; mso-ansi-language: SV; mso-bidi-font-family: "Times New Roman"; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: SV; mso-fareast-theme-font: minor-latin;">See <a href="http://stackoverflow.com/questions/4722400/qt-compiler-warning-overriding-commands-for-target-ignoring-old-commands-for">http://stackoverflow.com/questions/4722400/qt-compiler-warning-overriding-commands-for-target-ignoring-old-commands-for</a> </span>MathiasWestinhttp://www.blogger.com/profile/17194202963360212028noreply@blogger.com1tag:blogger.com,1999:blog-7972967.post-12430742322402574362014-10-03T20:01:00.000+02:002014-10-03T20:01:23.621+02:00Been to a lunch seminar about Internet of ThingsWent to Sogeti Internet of Things seminar on <span class="short_text" id="result_box" lang="en"><span class="hps">Wednesday lunch. </span></span><br /><span class="short_text" id="result_box" lang="en"><span class="hps">I made some notes:</span></span><br />
<br />
<span class="short_text" id="result_box" lang="en"><span class="hps">Presenter was: <a class="ProfileCard-screennameLink u-linkComplex js-nav" data-aria-label-part="" href="https://twitter.com/dagpetersson">@<span class="u-linkComplex-target">dagpetersson</span></a> </span></span><br />
<br />
<span class="short_text" id="result_box" lang="en"><span class="hps">Devices:</span></span><br />
<ul>
<li><span class="short_text" id="result_box" lang="en"><span class="hps">Electric IMP. Computer, WiFi, inputs for sensors. Very small.</span></span></li>
<li><span class="short_text" id="result_box" lang="en"><span class="hps">iBecon. Localication, triangulation, water resistant.</span></span></li>
<li><span class="short_text" id="result_box" lang="en"><span class="hps">LightBlue Bean. Test card, Temperature sensor, Accelerometer, iBecon. In and output.</span></span></li>
</ul>
<span class="short_text" id="result_box" lang="en"><span class="hps"><br /></span></span>
<span class="short_text" id="result_box" lang="en"><span class="hps">IBM MessageSight, uses MQTT protocol. Can support up to 1 miljon devices.</span></span><span class="short_text" id="result_box" lang="en"><span class="hps"> </span></span><br />
<br />
<span class="short_text" id="result_box" lang="en"><span class="hps">We where also able to test Google glass, very interesting experience. </span></span> MathiasWestinhttp://www.blogger.com/profile/17194202963360212028noreply@blogger.com1tag:blogger.com,1999:blog-7972967.post-91705559886576460172014-10-02T20:23:00.002+02:002014-10-02T20:23:46.207+02:00Qt and collect2 ld returned exit status 1Got this error when building a unit test project:<br />
collect2 ld returned exit status 1<br />
<br />
The linker complained on my newly added class in the implementation project.<br />
<br />
It took a while to figure it out, but the problem was that the old *.so file was left in Build folder when I tried to compile the lib file that was used by the unit test project.<br />
<br />The solution to the problem was to remove all files in the implementation project build folder. Followed by a rebuild of the implementation project and unit tests project could be built without any linker errors.<br />
MathiasWestinhttp://www.blogger.com/profile/17194202963360212028noreply@blogger.com0tag:blogger.com,1999:blog-7972967.post-77802054666713273152014-09-21T18:31:00.001+02:002014-09-21T18:31:34.356+02:00Use Pomodoro Technique and instrumental music to get into the zone quickly<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGMDSBrqgmCxN7q0t8A7WImOGApJ76B_kwONuA4TmM3lGBurZLi3WiMFthWFdC-TVL-gKvqANQjPlm9VeZKOqXFxLV6YdEi7dO9k1aQWrrvMXhtlKmYlS9OPjdHQZgOOGbUM9S/s1600/WP_001651.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGMDSBrqgmCxN7q0t8A7WImOGApJ76B_kwONuA4TmM3lGBurZLi3WiMFthWFdC-TVL-gKvqANQjPlm9VeZKOqXFxLV6YdEi7dO9k1aQWrrvMXhtlKmYlS9OPjdHQZgOOGbUM9S/s1600/WP_001651.jpg" height="300" width="400" /></a></div>
Was listening to <a href="http://blog.ploeh.dk/">Mark Seeman</a> on .Net Rocks, talking about <a href="http://www.dotnetrocks.com/default.aspx?showNum=1001">Getting into the zone</a>.<br />
<br />
Got some good advice's, Instrumental music tends to be better to listen to than lyrics or someone is talking when trying to get "into the zone" or <a href="http://en.wikipedia.org/wiki/Flow_(psychology)">flow</a>.<br />
I usually had a podcast or a radio station on while working. But I get it now, listening and processing when someone is talking and in the same time as I'm working with my brain is reducing the mental performance. After changing to classical or instrumental music in my playlist at work, I can feel that it's faster to get into coding quicker when interrupted.<br />
<br />
I also picked up the <a href="http://en.wikipedia.org/wiki/Pomodoro_Technique">Pomodoro technique</a> mentioned in the show, after <a href="http://baomee.info/pdf/technique/1.pdf">reading up</a> on the technique developed by Francesco Cirillo and setting a timer on 25 minutes when working and 5 minutes of rest between every "pomodoro"/work session, I can say it works for me, getting more done every day.MathiasWestinhttp://www.blogger.com/profile/17194202963360212028noreply@blogger.com0tag:blogger.com,1999:blog-7972967.post-83914031788935795742014-09-06T20:42:00.001+02:002014-09-06T20:42:59.056+02:00Solved: error: C2248: 'QObject::QObject' : cannot access private member declared in class 'QObject'Added two classes A and B both inheriting QObject.<br />
<br />
<pre><span style="color: navy;">#include</span><span style="color: silver;"> </span><span style="color: green;"><QObject></span></pre>
<pre><span style="color: navy;">#include</span><span style="color: silver;"> </span><span style="color: green;">"b.h"</span></pre>
<pre></pre>
<pre><span style="color: olive;">class</span><span style="color: silver;"> </span><span style="color: purple;">A</span><span style="color: silver;"> </span>:<span style="color: silver;"> </span><span style="color: olive;">public</span><span style="color: silver;"> </span><span style="color: purple;">QObject</span></pre>
<pre>{</pre>
<pre><span style="color: silver;"> </span><span style="color: navy;">Q_OBJECT</span></pre>
<pre><span style="color: olive;">public</span>:</pre>
<pre><span style="color: silver;"> </span><span style="color: olive;">explicit</span><span style="color: silver;"> </span><span style="color: purple;">A</span>(<span style="color: purple;">QObject</span><span style="color: silver;"> </span>*parent<span style="color: silver;"> </span>=<span style="color: silver;"> </span><span style="color: navy;">0</span>);</pre>
<pre></pre>
<pre><span style="color: silver;"> </span><span style="color: purple;">QList</span><<span style="color: purple;">B</span>><span style="color: silver;"> </span>doStuff();</pre>
<pre></pre>
<pre><span style="color: olive;">signals</span>:</pre>
<pre></pre>
<pre><span style="color: olive;">public</span><span style="color: silver;"> </span><span style="color: olive;">slots</span>:</pre>
<pre></pre>
<br />
<pre>};</pre>
<pre></pre>
<pre></pre>
<pre></pre>
<pre></pre>
<pre></pre>
<pre><pre><span style="color: navy;">#include</span><span style="color: silver;"> </span><span style="color: green;"><QObject></span></pre>
<pre></pre>
<pre><span style="color: olive;">class</span><span style="color: silver;"> </span><span style="color: purple;">B</span><span style="color: silver;"> </span>:<span style="color: silver;"> </span><span style="color: olive;">public</span><span style="color: silver;"> </span><span style="color: purple;">QObject</span></pre>
<pre>{</pre>
<pre><span style="color: silver;"> </span><span style="color: navy;">Q_OBJECT</span></pre>
<pre><span style="color: olive;">public</span>:</pre>
<pre><span style="color: silver;"> </span><span style="color: olive;">explicit</span><span style="color: silver;"> </span><span style="color: purple;">B</span>(<span style="color: purple;">QObject</span><span style="color: silver;"> </span>*parent<span style="color: silver;"> </span>=<span style="color: silver;"> </span><span style="color: navy;">0</span>);</pre>
<pre></pre>
<pre></pre>
<pre><span style="color: olive;">signals</span>:</pre>
<pre></pre>
<pre><span style="color: olive;">public</span><span style="color: silver;"> </span><span style="color: olive;">slots</span>:</pre>
<pre></pre>
<div style="font-family: 'Times New Roman'; white-space: normal;">
</div>
<pre>};</pre>
<div>
</div>
</pre>
<pre></pre>
But when adding implementation for A:<br />
<br />
<pre><span style="color: purple;">QList</span><<span style="color: purple;">GUIContainer</span>><span style="color: silver;"> </span><span style="color: purple;">A</span>::doStuff()</pre>
<pre>{</pre>
<pre><span style="color: silver;"> </span><span style="color: purple;">QList</span><<span style="color: purple;">B</span>><span style="color: silver;"> </span>list;</pre>
<pre><span style="color: silver;"> </span><span style="color: olive;">return</span><span style="color: silver;"> </span>list;</pre>
<br />
<pre>}</pre>
<br />
<br />
The compiler started complaining:<br />
error: C2248: 'QObject::QObject' : cannot access private member declared in class 'QObject'<br />
<br />
<br />
It complains because:<br />
"<span style="background-color: white; color: #363534; font-family: 'Open Sans', sans-serif; font-size: 13px; line-height: 20px;">The values stored in the various containers can be of any </span><i style="background-color: white; color: #363534; font-family: 'Open Sans', sans-serif; font-size: 13px; line-height: 20px; margin: 0px; padding: 0px;">assignable data type</i><span style="background-color: white; color: #363534; font-family: 'Open Sans', sans-serif; font-size: 13px; line-height: 20px;">. To qualify, a type must provide a <b>default constructor</b>, <b>a copy constructor</b>, and an <b>assignment operator</b>.</span>"<br />
<a href="http://qt-project.org/doc/qt-4.8/containers.html">http://qt-project.org/doc/qt-4.8/containers.html</a><br />
<br />
<br />
Solved the error by changing the QList to be a list of QSharedPointer:<br />
<pre><span style="color: purple;">QList</span><<span style="color: purple;">QSharedPointer</span><<span style="color: purple;">B</span>><span style="color: silver;"> </span>><span style="color: silver;"> </span>doStuff();</pre>
<br />
<br />MathiasWestinhttp://www.blogger.com/profile/17194202963360212028noreply@blogger.com2tag:blogger.com,1999:blog-7972967.post-12724897861198874782014-08-31T09:07:00.003+02:002014-08-31T09:07:46.156+02:00How to find out if a shared library has Debug symbols<span style="background-color: #eeeeee; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8px; white-space: pre-wrap;"><span style="background-color: white;">We had some problems with debugging on a remote system and did some searching on the Internet to find out how to ensure that the library indeed has debug information. </span></span><br />
<br />
<span style="background-color: #eeeeee; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8px; white-space: pre-wrap;"><span style="background-color: white;">This is the command that can be used</span>:</span>
<span style="background-color: #eeeeee; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8px; white-space: pre-wrap;"><br /></span>
<span style="background-color: #eeeeee; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8px; white-space: pre-wrap;">objdump --syms ... | grep debug</span><br />
<span style="background-color: #eeeeee; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 14px; line-height: 17.8px; white-space: pre-wrap;"><br /></span>
<a href="http://stackoverflow.com/questions/3284112/how-to-check-if-program-was-compiled-with-debug-symbols">http://stackoverflow.com/questions/3284112/how-to-check-if-program-was-compiled-with-debug-symbols</a>MathiasWestinhttp://www.blogger.com/profile/17194202963360212028noreply@blogger.com0tag:blogger.com,1999:blog-7972967.post-41901177015660385602014-08-26T18:56:00.004+02:002014-08-26T18:56:33.357+02:00Solved: Failed to start program. Path or permissions wrong?Got this error in Qt: "<b>Failed to start program. Path or permissions wrong?</b>" after adding a new drive in our linux developer image in VM-Ware and moving our trunk to it. According to a lot of resources on the Internet the cause should be that the user don't have execute permission. But the user did and there were no difference when using root. <br />
<br />
Found out that it was possible to check if mount was set to: <b>noexec</b> by using mount command and it was <b>noexec</b> although according to the GUI in mountmanager it was exec.<br />
<a href="http://forum.softpedia.com/topic/980864-probleme-cu-permisiuni-folder/">http://forum.softpedia.com/topic/980864-probleme-cu-permisiuni-folder/</a><br />
<br />
Found out that this issue could be solved by doing a remount:<br />
<pre style="background-color: #eeeeee; border: 0px; color: #333333; font-family: 'Ubuntu Mono', 'Ubuntu Beta Mono A', Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 14px; line-height: 18.200000762939453px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto; word-wrap: normal;"><code style="border: 0px; color: #222222; font-family: 'Ubuntu Mono', 'Ubuntu Beta Mono A', Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;">sudo mount -o remount,exec /tmp</code></pre>
<a href="http://askubuntu.com/questions/311438/how-to-make-tmp-executable">http://askubuntu.com/questions/311438/how-to-make-tmp-executable</a><br />
<br />
After the remount the error disappeared.MathiasWestinhttp://www.blogger.com/profile/17194202963360212028noreply@blogger.com0