<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-17515961</id><updated>2024-09-08T05:09:04.822+02:00</updated><category term="Code"/><category term="Lifehacks"/><category term="Sitecore"/><category term="Beretning"/><category term="Tools"/><category term="Svæveflyvning"/><category term="C#"/><category term="Sql"/><category term="Deployment"/><category term="Gaming"/><category term="Script"/><category term="ASP.NET"/><category term="Politik"/><category term="Sport"/><category term="Umbraco"/><category term="Security"/><category term="Analytics"/><category term="i18n"/><category term="WPF"/><category term="XML"/><category term="node"/><title type='text'>All that is not given is lost</title><subtitle type='html'>Jan Hebnes&#39; journal, a personal record of occurrences, experiences and reflections.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.jan.hebnes.dk/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default?alt=atom'/><link rel='alternate' type='text/html' href='http://blog.jan.hebnes.dk/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default?alt=atom&amp;start-index=26&amp;max-results=25'/><author><name>Jan</name><uri>http://www.blogger.com/profile/11255494161260284837</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>212</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-17515961.post-9105309389501650461</id><published>2018-01-21T00:40:00.000+01:00</published><updated>2018-01-21T00:40:07.551+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Tools"/><title type='text'>Smtp server for testing email sending / Papercut</title><content type='html'>https://github.com/changemakerstudios/papercut&lt;br /&gt;
&lt;br /&gt;
Sharing a tool with the blog.&lt;br /&gt;
&lt;br /&gt;
I have been using Papercut in many years to validate mail formatting on development, you just start the application and it will catch alle outgoing e-mails from your system and allow you to validate the details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.jan.hebnes.dk/feeds/9105309389501650461/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/17515961/9105309389501650461?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/9105309389501650461'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/9105309389501650461'/><link rel='alternate' type='text/html' href='http://blog.jan.hebnes.dk/2018/01/smtp-server-for-testing-email-sending.html' title='Smtp server for testing email sending / Papercut'/><author><name>Jan</name><uri>http://www.blogger.com/profile/11255494161260284837</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17515961.post-833945851098878299</id><published>2017-09-14T09:27:00.000+02:00</published><updated>2017-09-14T09:27:36.176+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Lifehacks"/><category scheme="http://www.blogger.com/atom/ns#" term="Script"/><category scheme="http://www.blogger.com/atom/ns#" term="Tools"/><title type='text'>Solution for Excel opening blank when you double-click a file icon or file name</title><content type='html'>Problem with running the latest Excel, where i cannot open Excel files when double-clicking the files, but i can drag the files and they open.&lt;br /&gt;
&lt;br /&gt;
Microsoft Support stats the following but non of the proposed solutions resolved the issue.&lt;br /&gt;
&lt;a href=&quot;https://support.microsoft.com/en-us/help/2994633/excel-how-to-troubleshoot-excel-opening-blank-when-you-double-click-a&quot;&gt;https://support.microsoft.com/en-us/help/2994633/excel-how-to-troubleshoot-excel-opening-blank-when-you-double-click-a&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
You can solve it the hard way by just sending the filepath as a command line parameter to Excel!&lt;br /&gt;
&lt;br /&gt;
Create a Excel.cmd file and locate in e.g. c:\program files with the following content&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Excel.cmd&lt;/b&gt;&lt;br /&gt;
&lt;i&gt;start &quot;Opening files with Excel fix&quot; &quot;C:\Program Files (x86)\Microsoft Office\Root\Office16\EXCEL.EXE&quot; %1&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Then right click the xlsx file and open with, mark always, and choose another program and find your Excel.cmd file. Using start means the command window closes after excel opens, without start the cmd file is open in the background.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;This is the most basic way of sending files to programs and it works for excel too :)&amp;nbsp;&lt;/b&gt;&lt;/i&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.jan.hebnes.dk/feeds/833945851098878299/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/17515961/833945851098878299?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/833945851098878299'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/833945851098878299'/><link rel='alternate' type='text/html' href='http://blog.jan.hebnes.dk/2017/09/solution-for-excel-opening-blank.html' title='Solution for Excel opening blank when you double-click a file icon or file name'/><author><name>Jan</name><uri>http://www.blogger.com/profile/11255494161260284837</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17515961.post-6665352721945430493</id><published>2017-03-21T14:20:00.002+01:00</published><updated>2017-07-28T21:24:19.483+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="Code"/><category scheme="http://www.blogger.com/atom/ns#" term="Tools"/><title type='text'>Versioning .NET builds with MsBuild Tasks using TFS Revision or Git Revision</title><content type='html'>MSBuild - Detecting latest TFS Revision on Project Folder level using tf.exe history and replaces the Revision in AssemblyVersion and AssemblyFileVersion for AssemblyInfo.cs prior to building the project with CustomTasks in csproj.&lt;br /&gt;
&lt;br /&gt;
Inspired by &lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://stackoverflow.com/questions/25768653/versioning-net-builds/25806365#25806365&quot;&gt;http://stackoverflow.com/questions/25768653/versioning-net-builds/25806365#25806365&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://intovsts.net/2015/08/24/global-net-versioning-strategy-assemblyinformationalversion/&quot;&gt;https://intovsts.net/2015/08/24/global-net-versioning-strategy-assemblyinformationalversion/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
I set off to create an MsBuild Tasks file that could be imported into csproj files and that calls tf.exe history as command line to get the latest revision on a project folder and embedding in the build assembly version revision number. I did not want this to be hidden in a build server step and I wanted the code to be open if a developer needed to investigate the tasks. 
&lt;br /&gt;&lt;br /&gt;

&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjejAn4bqc4tR77YO4wMyOyDTE4HhWuXTSw8GeSfT0EjVqAnLe_nsPVuSUfYW4eBv3-AynXi0lV5naRMPG7ZxQLDwnyXVOA_cXiyU_ztjlNo2WF5TyELIywRtiNDaUIEyfU5nKxew/s1600/internalreporting-csproj.png&quot; imageanchor=&quot;1&quot; &gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjejAn4bqc4tR77YO4wMyOyDTE4HhWuXTSw8GeSfT0EjVqAnLe_nsPVuSUfYW4eBv3-AynXi0lV5naRMPG7ZxQLDwnyXVOA_cXiyU_ztjlNo2WF5TyELIywRtiNDaUIEyfU5nKxew/s400/internalreporting-csproj.png&quot; width=&quot;400&quot; height=&quot;75&quot; /&gt;&lt;/a&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhM7nHnhZWU-SUqY8uyHLI2P2GFQeIberh3bmyRElta53lWE5WlGC-E1rYPKHd9KnGv7WlcgmniuceGnSbfagEXXA-xE8mqCXhpd5Ns7StJSHl1Zu-8jvPcIe3uwilbXU6niFghAA/s1600/internalreporting.png&quot; imageanchor=&quot;1&quot; &gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhM7nHnhZWU-SUqY8uyHLI2P2GFQeIberh3bmyRElta53lWE5WlGC-E1rYPKHd9KnGv7WlcgmniuceGnSbfagEXXA-xE8mqCXhpd5Ns7StJSHl1Zu-8jvPcIe3uwilbXU6niFghAA/s400/internalreporting.png&quot; width=&quot;400&quot; height=&quot;29&quot; /&gt;&lt;/a&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBHncvnhUgS_jrqDCOI_vEyXEjSGiVu0QNY5E_4hoZup_DCGDzrPmvnk5YykEHPqkxQ7x_mhnWEWwr1NVlSlh1Q_11qXkq6kYu2cwGLIriBPp7NYVLMSfqJ_xlEaQ6k_dZPaQovA/s1600/internalreporting-filedetails.png&quot; imageanchor=&quot;1&quot; &gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBHncvnhUgS_jrqDCOI_vEyXEjSGiVu0QNY5E_4hoZup_DCGDzrPmvnk5YykEHPqkxQ7x_mhnWEWwr1NVlSlh1Q_11qXkq6kYu2cwGLIriBPp7NYVLMSfqJ_xlEaQ6k_dZPaQovA/s400/internalreporting-filedetails.png&quot; width=&quot;400&quot; height=&quot;399&quot; /&gt;&lt;/a&gt;
&lt;br /&gt;&lt;br /&gt;
The end result is shared in this Gist: &lt;br /&gt;
&lt;br /&gt; (Updated with Git support on 2017-07-28)
&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/janhebnes/9b7f76564b6c3c8a5cb0d9e8dc93f9f5.js&quot;&gt;&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.jan.hebnes.dk/feeds/6665352721945430493/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/17515961/6665352721945430493?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/6665352721945430493'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/6665352721945430493'/><link rel='alternate' type='text/html' href='http://blog.jan.hebnes.dk/2017/03/versioning-net-builds-with-msbuild.html' title='Versioning .NET builds with MsBuild Tasks using TFS Revision or Git Revision'/><author><name>Jan</name><uri>http://www.blogger.com/profile/11255494161260284837</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjejAn4bqc4tR77YO4wMyOyDTE4HhWuXTSw8GeSfT0EjVqAnLe_nsPVuSUfYW4eBv3-AynXi0lV5naRMPG7ZxQLDwnyXVOA_cXiyU_ztjlNo2WF5TyELIywRtiNDaUIEyfU5nKxew/s72-c/internalreporting-csproj.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17515961.post-4638048306705438489</id><published>2017-03-18T20:01:00.002+01:00</published><updated>2017-03-18T20:01:49.203+01:00</updated><title type='text'>Batch file logfile pattern for scheduled Tasks</title><content type='html'>&lt;h2&gt;
Batch file logfile pattern for scheduled Tasks&lt;/h2&gt;
A simple and robust pattern for generating a log file when creating a scheduled task batchfile is the following. If you set a double&amp;nbsp;&lt;span style=&quot;background-color: #f0f0f0;&quot;&gt;&amp;nbsp;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span style=&quot;color: #bb60d5;&quot;&gt;%log%&amp;nbsp;&lt;/span&gt;&amp;nbsp;at the first reference to&amp;nbsp;&lt;span style=&quot;color: #bb60d5;&quot;&gt;%log%&lt;/span&gt;&amp;nbsp;the log file will not be emptied but will just grow with the job.&lt;br /&gt;
&lt;br /&gt;
The result is a file called the same as the task:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAjXZuNWTvYhIcfkIRCXHb74U3Tgng-J9AifF5j15u0wPiDfNIDk-coAinI7Lpo9OX775A4IU1yN01kKI-K_n9Nl1VmcU7k-QVrp8gHoaHZDOnR4yyE4kPOMVuavmJwmJc23nWeg/s1600/tasklog.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;160&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAjXZuNWTvYhIcfkIRCXHb74U3Tgng-J9AifF5j15u0wPiDfNIDk-coAinI7Lpo9OX775A4IU1yN01kKI-K_n9Nl1VmcU7k-QVrp8gHoaHZDOnR4yyE4kPOMVuavmJwmJc23nWeg/s640/tasklog.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;background: #f0f0f0; border-width: 0.1em 0.1em 0.1em 0.8em; border: solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;&quot;&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt; 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26&lt;/pre&gt;
&lt;/td&gt;&lt;td&gt;&lt;pre style=&quot;line-height: 125%; margin: 0;&quot;&gt;@&lt;span style=&quot;color: #007020; font-weight: bold;&quot;&gt;echo&lt;/span&gt; &lt;span style=&quot;color: #007020; font-weight: bold;&quot;&gt;off&lt;/span&gt;
&lt;span style=&quot;color: #007020; font-weight: bold;&quot;&gt;if&lt;/span&gt; not &lt;span style=&quot;color: #007020; font-weight: bold;&quot;&gt;DEFINED&lt;/span&gt; bin (
  &lt;span style=&quot;color: #007020; font-weight: bold;&quot;&gt;set&lt;/span&gt; &lt;span style=&quot;color: #bb60d5;&quot;&gt;bin&lt;/span&gt;&lt;span style=&quot;color: #666666;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #bb60d5;&quot;&gt;%~dp0&lt;/span&gt;
)
&lt;span style=&quot;color: #007020; font-weight: bold;&quot;&gt;set&lt;/span&gt; &lt;span style=&quot;color: #bb60d5;&quot;&gt;log&lt;/span&gt;&lt;span style=&quot;color: #666666;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #4070a0;&quot;&gt;&quot;%bin%%~nx0.log&quot;&lt;/span&gt;
title &lt;span style=&quot;color: #bb60d5;&quot;&gt;%~nx0&lt;/span&gt;

&lt;span style=&quot;color: #60a0b0; font-style: italic;&quot;&gt;rem Resetting the log for each run because it otherwise will grow to large&lt;/span&gt;
&lt;span style=&quot;color: #007020; font-weight: bold;&quot;&gt;echo&lt;/span&gt; &lt;span style=&quot;color: #bb60d5;&quot;&gt;%date%&lt;/span&gt; (&lt;span style=&quot;color: #bb60d5;&quot;&gt;%time:~0&lt;/span&gt;,&lt;span style=&quot;color: #40a070;&quot;&gt;8&lt;/span&gt;%) Starting &lt;span style=&quot;color: #bb60d5;&quot;&gt;%~nx0&lt;/span&gt; ---------------- &amp;gt; &lt;span style=&quot;color: #bb60d5;&quot;&gt;%log%&lt;/span&gt;
&lt;span style=&quot;color: #007020; font-weight: bold;&quot;&gt;echo&lt;/span&gt;. &amp;gt;&amp;gt; &lt;span style=&quot;color: #bb60d5;&quot;&gt;%log%&lt;/span&gt;
&lt;span style=&quot;color: #007020; font-weight: bold;&quot;&gt;echo&lt;/span&gt; Running automated sms reminder service &lt;span style=&quot;color: #007020; font-weight: bold;&quot;&gt;for&lt;/span&gt; vagter in flyveklubben &amp;gt;&amp;gt; &lt;span style=&quot;color: #bb60d5;&quot;&gt;%log%&lt;/span&gt;
&lt;span style=&quot;color: #007020; font-weight: bold;&quot;&gt;echo&lt;/span&gt;. &amp;gt;&amp;gt; &lt;span style=&quot;color: #bb60d5;&quot;&gt;%log%&lt;/span&gt;

D:\Tasks\Flyveklub-Reminder-Service\Reminder-Service.exe &lt;span style=&quot;color: #40a070;&quot;&gt;12&lt;/span&gt; &amp;gt;&amp;gt; &lt;span style=&quot;color: #bb60d5;&quot;&gt;%log%&lt;/span&gt;

&lt;span style=&quot;color: #60a0b0; font-style: italic;&quot;&gt;rem IF ERRORLEVEL statements should be read as IF Errorlevel &amp;gt;= number &lt;/span&gt;
&lt;span style=&quot;color: #007020; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #bb60d5;&quot;&gt;%errorlevel%&lt;/span&gt; &lt;span style=&quot;color: #666666;&quot;&gt;EQU&lt;/span&gt; &lt;span style=&quot;color: #40a070;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #007020; font-weight: bold;&quot;&gt;echo&lt;/span&gt; Success &amp;amp; &lt;span style=&quot;color: #007020; font-weight: bold;&quot;&gt;goto&lt;/span&gt;&lt;span style=&quot;color: #002070; font-weight: bold;&quot;&gt;:end&lt;/span&gt; &amp;gt;&amp;gt; &lt;span style=&quot;color: #bb60d5;&quot;&gt;%log%&lt;/span&gt;

&lt;span style=&quot;color: #007020; font-weight: bold;&quot;&gt;echo&lt;/span&gt; Error occured see &lt;span style=&quot;color: #bb60d5;&quot;&gt;%~nx0&lt;/span&gt;.log (sending email to it support) &amp;gt;&amp;gt; &lt;span style=&quot;color: #bb60d5;&quot;&gt;%log%&lt;/span&gt;
&lt;span style=&quot;color: #bb60d5;&quot;&gt;%bin%&lt;/span&gt;bmail -s localhost -t my@mail.dk -f my@mail.dk -a &lt;span style=&quot;color: #4070a0;&quot;&gt;&quot;%COMPUTERNAME% %~nx0 exit code %errorlevel%&quot;&lt;/span&gt; -h -m &lt;span style=&quot;color: #4070a0;&quot;&gt;&quot;%log%&quot;&lt;/span&gt; -c 

&lt;span style=&quot;color: #002070; font-weight: bold;&quot;&gt;:end&lt;/span&gt;
&lt;span style=&quot;color: #007020; font-weight: bold;&quot;&gt;echo&lt;/span&gt;. &amp;gt;&amp;gt; &lt;span style=&quot;color: #bb60d5;&quot;&gt;%log%&lt;/span&gt;
&lt;span style=&quot;color: #007020; font-weight: bold;&quot;&gt;echo&lt;/span&gt; &lt;span style=&quot;color: #bb60d5;&quot;&gt;%date%&lt;/span&gt; (&lt;span style=&quot;color: #bb60d5;&quot;&gt;%time:~0&lt;/span&gt;,&lt;span style=&quot;color: #40a070;&quot;&gt;8&lt;/span&gt;%) Ending &lt;span style=&quot;color: #bb60d5;&quot;&gt;%~nx0&lt;/span&gt;---------------- &amp;gt;&amp;gt; &lt;span style=&quot;color: #bb60d5;&quot;&gt;%log%&lt;/span&gt;

&lt;span style=&quot;color: #007020; font-weight: bold;&quot;&gt;GOTO&lt;/span&gt; &lt;span style=&quot;color: #002070; font-weight: bold;&quot;&gt;:EOF&lt;/span&gt;
&lt;/pre&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;


bmail is a command line mailer that sends the log file as attachment to the mail specified.</content><link rel='replies' type='application/atom+xml' href='http://blog.jan.hebnes.dk/feeds/4638048306705438489/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/17515961/4638048306705438489?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/4638048306705438489'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/4638048306705438489'/><link rel='alternate' type='text/html' href='http://blog.jan.hebnes.dk/2017/03/batch-file-logfile-pattern-for.html' title='Batch file logfile pattern for scheduled Tasks'/><author><name>Jan</name><uri>http://www.blogger.com/profile/11255494161260284837</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAjXZuNWTvYhIcfkIRCXHb74U3Tgng-J9AifF5j15u0wPiDfNIDk-coAinI7Lpo9OX775A4IU1yN01kKI-K_n9Nl1VmcU7k-QVrp8gHoaHZDOnR4yyE4kPOMVuavmJwmJc23nWeg/s72-c/tasklog.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17515961.post-2035677523324398659</id><published>2017-03-07T10:33:00.000+01:00</published><updated>2017-03-07T10:33:06.558+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><title type='text'>Unit testing internal methods / assembly: InternalsVisibleTo</title><content type='html'>For allowing internal methods to be testable from a specific assembly, you have been able to extend AssemblyInfo with &lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;[assembly: InternalsVisibleTo(&quot;MyLib.Tests&quot;)]&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;Available since .Net 2.0.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Related information:&lt;/i&gt; &lt;br /&gt;
&lt;a href=&quot;https://lostechies.com/jimmybogard/2007/10/12/double-edged-sword-of-internalsvisibleto/&quot;&gt;https://lostechies.com/jimmybogard/2007/10/12/double-edged-sword-of-internalsvisibleto/&lt;/a&gt;
&lt;a href=&quot;http://theburningmonk.com/2010/05/net-tips-using-internalsvisibleto-attribute-to-help-testing-non-public-methods/&quot;&gt;http://theburningmonk.com/2010/05/net-tips-using-internalsvisibleto-attribute-to-help-testing-non-public-methods/&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/system.runtime.compilerservices.internalsvisibletoattribute(v=vs.110).aspx&quot;&gt;https://msdn.microsoft.com/en-us/library/system.runtime.compilerservices.internalsvisibletoattribute(v=vs.110).aspx&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.jan.hebnes.dk/feeds/2035677523324398659/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/17515961/2035677523324398659?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/2035677523324398659'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/2035677523324398659'/><link rel='alternate' type='text/html' href='http://blog.jan.hebnes.dk/2017/03/unit-testing-internal-methods.html' title='Unit testing internal methods / assembly: InternalsVisibleTo'/><author><name>Jan</name><uri>http://www.blogger.com/profile/11255494161260284837</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17515961.post-7079219845251108796</id><published>2017-03-01T11:02:00.001+01:00</published><updated>2017-03-01T11:08:07.988+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Security"/><category scheme="http://www.blogger.com/atom/ns#" term="Sql"/><category scheme="http://www.blogger.com/atom/ns#" term="Tools"/><title type='text'></title><content type='html'>&lt;h2&gt;SQL Security Auditting&lt;/h2&gt;
For allowing more general auditing between database environments you could find the following is useful for dumping logins, users, roles and their releated object permissions into a comparable format.

&lt;blockquote style=&quot;background-color:white&quot;&gt; 
&lt;font face=&quot;Courier New&quot; size=&quot;2&quot;&gt;
&lt;font color = &quot;blue&quot;&gt;CREATE&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;SCHEMA&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;[audit]&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;AUTHORIZATION&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;[db_owner]&lt;/font&gt;
&lt;br/&gt;
&lt;br/&gt;&lt;font color = &quot;maroon&quot;&gt;go&lt;/font&gt;
&lt;br/&gt;
&lt;br/&gt;&lt;font color = &quot;green&quot;&gt;&lt;i&gt;&amp;#45;&amp;#45;&amp;nbsp;=============================================&lt;/i&gt;&lt;/font&gt;
&lt;br/&gt;&lt;font color = &quot;green&quot;&gt;&lt;i&gt;&amp;#45;&amp;#45;&amp;nbsp;Description:&amp;nbsp;Audit&amp;nbsp;Serverlevel&amp;nbsp;logins&amp;nbsp;and&amp;nbsp;roles&lt;/i&gt;&lt;/font&gt;
&lt;br/&gt;&lt;font color = &quot;green&quot;&gt;&lt;i&gt;&amp;#45;&amp;#45;&amp;nbsp;=============================================&lt;/i&gt;&lt;/font&gt;
&lt;br/&gt;&lt;font color = &quot;blue&quot;&gt;CREATE&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;PROCEDURE&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;[audit]&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;.&lt;/font&gt;&lt;font color = &quot;#FF0080&quot;&gt;&lt;b&gt;Serverlevel_logins_and_roles&lt;/b&gt;&lt;/font&gt;
&lt;br/&gt;&lt;font color = &quot;blue&quot;&gt;AS&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;BEGIN&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;green&quot;&gt;&lt;i&gt;&amp;#45;&amp;#45;Server&amp;nbsp;level&amp;nbsp;Logins&amp;nbsp;and&amp;nbsp;roles&lt;/i&gt;&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;SELECT&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;sp&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;.&lt;/font&gt;&lt;font color = &quot;blue&quot;&gt;NAME&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;AS&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;LoginName&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;,&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;sp&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;.&lt;/font&gt;&lt;font color = &quot;maroon&quot;&gt;type_desc&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;AS&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;LoginType&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;,&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;sp&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;.&lt;/font&gt;&lt;font color = &quot;maroon&quot;&gt;default_database_name&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;AS&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;DefaultDBName&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;,&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;slog&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;.&lt;/font&gt;&lt;font color = &quot;maroon&quot;&gt;sysadmin&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;AS&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;SysAdmin&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;,&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;slog&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;.&lt;/font&gt;&lt;font color = &quot;maroon&quot;&gt;securityadmin&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;AS&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;SecurityAdmin&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;,&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;slog&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;.&lt;/font&gt;&lt;font color = &quot;maroon&quot;&gt;serveradmin&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;AS&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;ServerAdmin&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;,&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;slog&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;.&lt;/font&gt;&lt;font color = &quot;maroon&quot;&gt;setupadmin&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;AS&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;SetupAdmin&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;,&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;slog&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;.&lt;/font&gt;&lt;font color = &quot;maroon&quot;&gt;processadmin&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;AS&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;ProcessAdmin&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;,&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;slog&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;.&lt;/font&gt;&lt;font color = &quot;maroon&quot;&gt;diskadmin&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;AS&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;DiskAdmin&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;,&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;slog&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;.&lt;/font&gt;&lt;font color = &quot;maroon&quot;&gt;dbcreator&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;AS&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;DBCreator&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;,&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;slog&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;.&lt;/font&gt;&lt;font color = &quot;maroon&quot;&gt;bulkadmin&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;AS&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;BulkAdmin&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;FROM&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;sys&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;.&lt;/font&gt;&lt;font color = &quot;maroon&quot;&gt;server_principals&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;sp&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;JOIN&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;master&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;.&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;.&lt;/font&gt;&lt;font color = &quot;maroon&quot;&gt;syslogins&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;slog&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;ON&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;sp&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;.&lt;/font&gt;&lt;font color = &quot;maroon&quot;&gt;sid&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;silver&quot;&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;slog&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;.&lt;/font&gt;&lt;font color = &quot;maroon&quot;&gt;sid&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;WHERE&lt;/font&gt;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;sp&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;.&lt;/font&gt;&lt;font color = &quot;maroon&quot;&gt;type&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;silver&quot;&gt;&amp;lt;&amp;gt;&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;red&quot;&gt;&#39;R&#39;&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;AND&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;sp&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;.&lt;/font&gt;&lt;font color = &quot;blue&quot;&gt;NAME&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;NOT&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;LIKE&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;red&quot;&gt;&#39;##%&#39;&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;END&lt;/font&gt;
&lt;br/&gt;
&lt;br/&gt;&lt;font color = &quot;maroon&quot;&gt;go&lt;/font&gt;
&lt;br/&gt;
&lt;br/&gt;&lt;font color = &quot;green&quot;&gt;&lt;i&gt;&amp;#45;&amp;#45;&amp;nbsp;=============================================&lt;/i&gt;&lt;/font&gt;
&lt;br/&gt;&lt;font color = &quot;green&quot;&gt;&lt;i&gt;&amp;#45;&amp;#45;&amp;nbsp;Description:&amp;nbsp;Audit&amp;nbsp;Databaselevel&amp;nbsp;users&amp;nbsp;and&amp;nbsp;roles&lt;/i&gt;&lt;/font&gt;
&lt;br/&gt;&lt;font color = &quot;green&quot;&gt;&lt;i&gt;&amp;#45;&amp;#45;&amp;nbsp;=============================================&lt;/i&gt;&lt;/font&gt;
&lt;br/&gt;&lt;font color = &quot;blue&quot;&gt;CREATE&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;PROCEDURE&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;[audit]&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;.&lt;/font&gt;&lt;font color = &quot;#FF0080&quot;&gt;&lt;b&gt;Databaselevel_users_and_roles&lt;/b&gt;&lt;/font&gt;
&lt;br/&gt;&lt;font color = &quot;blue&quot;&gt;AS&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;BEGIN&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;DECLARE&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;#8000FF&quot;&gt;@SQLStatement&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;black&quot;&gt;&lt;i&gt;VARCHAR&lt;/i&gt;&lt;/font&gt;&lt;font color = &quot;maroon&quot;&gt;(&lt;/font&gt;&lt;font color = &quot;black&quot;&gt;4000&lt;/font&gt;&lt;font color = &quot;maroon&quot;&gt;)&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;DECLARE&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;#8000FF&quot;&gt;@T_DBuser&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;TABLE&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;(&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;dbname&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;black&quot;&gt;&lt;i&gt;SYSNAME&lt;/i&gt;&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;,&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;username&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;black&quot;&gt;&lt;i&gt;SYSNAME&lt;/i&gt;&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;,&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;associateddbrole&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;black&quot;&gt;&lt;i&gt;NVARCHAR&lt;/i&gt;&lt;/font&gt;&lt;font color = &quot;maroon&quot;&gt;(&lt;/font&gt;&lt;font color = &quot;black&quot;&gt;256&lt;/font&gt;&lt;font color = &quot;maroon&quot;&gt;)&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;)&lt;/font&gt;
&lt;br/&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;SET&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;#8000FF&quot;&gt;@SQLStatement&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;=&lt;/font&gt;
&lt;br/&gt;&lt;font color = &quot;red&quot;&gt;&#39;
SELECT&amp;nbsp;&#39;&#39;?&#39;&#39;&amp;nbsp;AS&amp;nbsp;DBName,dp.name&amp;nbsp;AS&amp;nbsp;UserName,USER_NAME(drm.role_principal_id)&amp;nbsp;AS&amp;nbsp;AssociatedDBRole&amp;nbsp;
FROM&amp;nbsp;?.sys.database_principals&amp;nbsp;dp
LEFT&amp;nbsp;OUTER&amp;nbsp;JOIN&amp;nbsp;?.sys.database_role_members&amp;nbsp;drm
ON&amp;nbsp;dp.principal_id=drm.member_principal_id&amp;nbsp;
WHERE&amp;nbsp;dp.sid&amp;nbsp;NOT&amp;nbsp;IN&amp;nbsp;(0x01)&amp;nbsp;AND&amp;nbsp;dp.sid&amp;nbsp;IS&amp;nbsp;NOT&amp;nbsp;NULL&amp;nbsp;AND&amp;nbsp;dp.type&amp;nbsp;NOT&amp;nbsp;IN&amp;nbsp;(&#39;&#39;C&#39;&#39;)&amp;nbsp;AND&amp;nbsp;dp.is_fixed_role&amp;nbsp;&amp;#60;&gt;&amp;nbsp;1&amp;nbsp;AND&amp;nbsp;dp.name&amp;nbsp;NOT&amp;nbsp;LIKE&amp;nbsp;&#39;&#39;##%&#39;&#39;&amp;nbsp;AND&amp;nbsp;&#39;&#39;?&#39;&#39;&amp;nbsp;NOT&amp;nbsp;IN&amp;nbsp;(&#39;&#39;master&#39;&#39;,&#39;&#39;msdb&#39;&#39;,&#39;&#39;model&#39;&#39;,&#39;&#39;tempdb&#39;&#39;)&amp;nbsp;ORDER&amp;nbsp;BY&amp;nbsp;DBName&#39;&lt;/font&gt;
&lt;br/&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;INSERT&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;#8000FF&quot;&gt;@T_DBuser&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;EXEC&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;#FF0080&quot;&gt;&lt;b&gt;Sp_msforeachdb&lt;/b&gt;&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;#8000FF&quot;&gt;@SQLStatement&lt;/font&gt;
&lt;br/&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;SELECT&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;dbname&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;,&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;username&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;,&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;associateddbrole&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;FROM&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;#8000FF&quot;&gt;@T_DBuser&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;ORDER&lt;/font&gt;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;BY&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;dbname&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;,&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;username&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;,&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;associateddbrole&lt;/font&gt;
&lt;br/&gt;&lt;font color = &quot;blue&quot;&gt;END&lt;/font&gt;
&lt;br/&gt;
&lt;br/&gt;&lt;font color = &quot;maroon&quot;&gt;go&lt;/font&gt;
&lt;br/&gt;
&lt;br/&gt;&lt;font color = &quot;green&quot;&gt;&lt;i&gt;&amp;#45;&amp;#45;&amp;nbsp;=============================================&lt;/i&gt;&lt;/font&gt;
&lt;br/&gt;&lt;font color = &quot;green&quot;&gt;&lt;i&gt;&amp;#45;&amp;#45;&amp;nbsp;Description:&amp;nbsp;Audit&amp;nbsp;Objectlevel&amp;nbsp;permissions&lt;/i&gt;&lt;/font&gt;
&lt;br/&gt;&lt;font color = &quot;green&quot;&gt;&lt;i&gt;&amp;#45;&amp;#45;&amp;nbsp;=============================================&lt;/i&gt;&lt;/font&gt;
&lt;br/&gt;&lt;font color = &quot;blue&quot;&gt;CREATE&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;PROCEDURE&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;[audit]&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;.&lt;/font&gt;&lt;font color = &quot;#FF0080&quot;&gt;&lt;b&gt;Objectlevel_permissions&lt;/b&gt;&lt;/font&gt;
&lt;br/&gt;&lt;font color = &quot;blue&quot;&gt;AS&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;BEGIN&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;DECLARE&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;#8000FF&quot;&gt;@Obj&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;black&quot;&gt;&lt;i&gt;VARCHAR&lt;/i&gt;&lt;/font&gt;&lt;font color = &quot;maroon&quot;&gt;(&lt;/font&gt;&lt;font color = &quot;black&quot;&gt;4000&lt;/font&gt;&lt;font color = &quot;maroon&quot;&gt;)&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;DECLARE&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;#8000FF&quot;&gt;@T_Obj&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;TABLE&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;(&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;dbname&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;black&quot;&gt;&lt;i&gt;SYSNAME&lt;/i&gt;&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;,&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;username&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;black&quot;&gt;&lt;i&gt;SYSNAME&lt;/i&gt;&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;,&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;issqlrole&lt;/font&gt;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;black&quot;&gt;&lt;i&gt;BIT&lt;/i&gt;&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;,&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;objectname&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;black&quot;&gt;&lt;i&gt;SYSNAME&lt;/i&gt;&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;,&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;permission&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;black&quot;&gt;&lt;i&gt;NVARCHAR&lt;/i&gt;&lt;/font&gt;&lt;font color = &quot;maroon&quot;&gt;(&lt;/font&gt;&lt;font color = &quot;black&quot;&gt;128&lt;/font&gt;&lt;font color = &quot;maroon&quot;&gt;)&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;)&lt;/font&gt;
&lt;br/&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;SET&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;#8000FF&quot;&gt;@Obj&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;=&lt;/font&gt;&lt;font color = &quot;red&quot;&gt;&#39;USE&amp;nbsp;[?];
SELECT&amp;nbsp;&#39;&#39;?&#39;&#39;&amp;nbsp;AS&amp;nbsp;DBName,&amp;nbsp;Us.name&amp;nbsp;AS&amp;nbsp;username,&amp;nbsp;Us.issqlrole&amp;nbsp;AS&amp;nbsp;issqlrole,&amp;nbsp;Obj.name&amp;nbsp;AS&amp;nbsp;object,&amp;nbsp;dp.permission_name&amp;nbsp;AS&amp;nbsp;permission&amp;nbsp;
FROM&amp;nbsp;sys.database_permissions&amp;nbsp;dp
JOIN&amp;nbsp;sys.sysusers&amp;nbsp;Us&amp;nbsp;
ON&amp;nbsp;dp.grantee_principal_id&amp;nbsp;=&amp;nbsp;Us.uid&amp;nbsp;
JOIN&amp;nbsp;sys.sysobjects&amp;nbsp;Obj
ON&amp;nbsp;dp.major_id&amp;nbsp;=&amp;nbsp;Obj.id&amp;nbsp;&#39;&lt;/font&gt;
&lt;br/&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;green&quot;&gt;&lt;i&gt;&amp;#45;&amp;#45;&amp;nbsp;for&amp;nbsp;each&amp;nbsp;database&amp;nbsp;can&amp;nbsp;be&amp;nbsp;done&amp;nbsp;with&amp;nbsp;USE&amp;nbsp;[?];&lt;/i&gt;&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;INSERT&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;#8000FF&quot;&gt;@T_Obj&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;EXEC&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;#FF0080&quot;&gt;&lt;b&gt;Sp_msforeachdb&lt;/b&gt;&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;#8000FF&quot;&gt;@Obj&lt;/font&gt;
&lt;br/&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;green&quot;&gt;&lt;i&gt;&amp;#45;&amp;#45;SELECT&amp;nbsp;UserName,&amp;nbsp;issqlrole,&amp;nbsp;DBName,&amp;nbsp;ObjectName,&amp;nbsp;Permission&amp;nbsp;FROM&amp;nbsp;@T_Obj&amp;nbsp;ORDER&amp;nbsp;BY&amp;nbsp;UserName,&amp;nbsp;issqlrole,&amp;nbsp;DBName,&amp;nbsp;ObjectName,&amp;nbsp;Permission&lt;/i&gt;&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;SELECT&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;dbname&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;,&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;objectname&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;,&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;permission&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;,&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;username&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;,&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;issqlrole&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;FROM&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;#8000FF&quot;&gt;@T_Obj&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;WHERE&lt;/font&gt;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;dbname&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;NOT&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;IN&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;(&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;red&quot;&gt;&#39;master&#39;&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;,&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;red&quot;&gt;&#39;msdb&#39;&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;)&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;ORDER&lt;/font&gt;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;BY&lt;/font&gt;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;dbname&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;,&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;objectname&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;,&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;permission&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;,&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;username&lt;/font&gt;&lt;font color = &quot;silver&quot;&gt;,&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;maroon&quot;&gt;issqlrole&lt;/font&gt;
&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;font color = &quot;blue&quot;&gt;END&lt;/font&gt;
&lt;br/&gt;
&lt;br/&gt;&lt;font color = &quot;maroon&quot;&gt;go&lt;/font&gt;&amp;nbsp;
&lt;/font&gt;

&lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.jan.hebnes.dk/feeds/7079219845251108796/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/17515961/7079219845251108796?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/7079219845251108796'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/7079219845251108796'/><link rel='alternate' type='text/html' href='http://blog.jan.hebnes.dk/2017/03/sql-security-auditting.html' title=''/><author><name>Jan</name><uri>http://www.blogger.com/profile/11255494161260284837</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17515961.post-5451208725212866827</id><published>2017-02-17T13:52:00.002+01:00</published><updated>2017-02-17T13:55:01.896+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Sql"/><title type='text'>Helpful TSQL Queries for meta search</title><content type='html'>&lt;h3&gt;
Searching for table names&amp;nbsp;&lt;/h3&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME LIKE &#39;%prop%&#39;&lt;/blockquote&gt;
&lt;h3&gt;
Searching for Stored Procedure and more containing text&amp;nbsp;&lt;/h3&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
SELECT OBJECT_NAME(object_id)&lt;br /&gt;
FROM sys.sql_modules&lt;br /&gt;
WHERE OBJECTPROPERTY(object_id, &#39;IsProcedure&#39;) = 1&lt;br /&gt;
&amp;nbsp; &amp;nbsp; AND definition LIKE &#39;%CounterpartyProperties%&#39;&lt;br /&gt;
ORDER BY OBJECT_NAME(object_id)&lt;/blockquote&gt;
&lt;h4&gt;
OBJECTPROPERTY PropertyName reference list:&lt;/h4&gt;
&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/ms176105.aspx&quot;&gt;https://msdn.microsoft.com/en-us/library/ms176105.aspx&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.jan.hebnes.dk/feeds/5451208725212866827/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/17515961/5451208725212866827?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/5451208725212866827'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/5451208725212866827'/><link rel='alternate' type='text/html' href='http://blog.jan.hebnes.dk/2017/02/helpfull-tsql-queries-for-large-table.html' title='Helpful TSQL Queries for meta search'/><author><name>Jan</name><uri>http://www.blogger.com/profile/11255494161260284837</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17515961.post-2747083924847284508</id><published>2016-12-13T09:31:00.002+01:00</published><updated>2016-12-13T09:41:53.011+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="Code"/><category scheme="http://www.blogger.com/atom/ns#" term="Lifehacks"/><category scheme="http://www.blogger.com/atom/ns#" term="Tools"/><title type='text'>Adding Visual Studio Code Map Scrollbar</title><content type='html'>&lt;div style=&quot;clear: both; text-align: left;&quot;&gt;
Since Visual Studio 2013 a code map has been available instead of a plain scroll bar.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Toggling is done from &quot;Scroll Bars&quot; in the settings tab either under All languages or under a specific language.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
I prefer this setting, with the &quot;Wide&quot; Source overview.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEil6cGtbjOnVk4L6IDqrbb0yB-drVsT4SZcIpO9QzbtM_WAZXhWv2wY06NPMQi0qtkIUl6GMV50oqTpF2cEATAZLoo_LDp0nObBLQCvm9LNaw1AkF_eDT_kG1C_Cirr0gnpjPjbog/s1600/13-12-2016+09-26-27.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;340&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEil6cGtbjOnVk4L6IDqrbb0yB-drVsT4SZcIpO9QzbtM_WAZXhWv2wY06NPMQi0qtkIUl6GMV50oqTpF2cEATAZLoo_LDp0nObBLQCvm9LNaw1AkF_eDT_kG1C_Cirr0gnpjPjbog/s640/13-12-2016+09-26-27.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.jan.hebnes.dk/feeds/2747083924847284508/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/17515961/2747083924847284508?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/2747083924847284508'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/2747083924847284508'/><link rel='alternate' type='text/html' href='http://blog.jan.hebnes.dk/2016/12/adding-visual-studio-code-map-scrollbar.html' title='Adding Visual Studio Code Map Scrollbar'/><author><name>Jan</name><uri>http://www.blogger.com/profile/11255494161260284837</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEil6cGtbjOnVk4L6IDqrbb0yB-drVsT4SZcIpO9QzbtM_WAZXhWv2wY06NPMQi0qtkIUl6GMV50oqTpF2cEATAZLoo_LDp0nObBLQCvm9LNaw1AkF_eDT_kG1C_Cirr0gnpjPjbog/s72-c/13-12-2016+09-26-27.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17515961.post-4661725395295145235</id><published>2016-10-20T00:25:00.002+02:00</published><updated>2016-10-20T00:25:45.266+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Code"/><category scheme="http://www.blogger.com/atom/ns#" term="Script"/><category scheme="http://www.blogger.com/atom/ns#" term="Tools"/><title type='text'>Sync an FTP folder using WinSCP commandline</title><content type='html'>&lt;h3&gt;
syncftp.cmd&lt;/h3&gt;
&quot;C:\Program Files (x86)\WinSCP\winscp&quot; /script=&quot;C:\FTP-Sync\download.winscp&quot; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
download.winscp&lt;/h3&gt;
open ftp://user:password@server.com/&lt;br /&gt;
synchronize local &quot;C:\FTP-Sync\public&quot; /&lt;br /&gt;
exit</content><link rel='replies' type='application/atom+xml' href='http://blog.jan.hebnes.dk/feeds/4661725395295145235/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/17515961/4661725395295145235?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/4661725395295145235'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/4661725395295145235'/><link rel='alternate' type='text/html' href='http://blog.jan.hebnes.dk/2016/10/sync-ftp-folder-using-winscp-commandline.html' title='Sync an FTP folder using WinSCP commandline'/><author><name>Jan</name><uri>http://www.blogger.com/profile/11255494161260284837</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17515961.post-4189348875495298849</id><published>2016-09-15T10:59:00.002+02:00</published><updated>2016-09-15T11:00:18.969+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="Code"/><category scheme="http://www.blogger.com/atom/ns#" term="Sql"/><title type='text'>Batching Commands for SQL and Optimizing network round trips.</title><content type='html'>Optimizing Database Access And Diving Into .Net SqlClient by&amp;nbsp;Mladen Prajdić&lt;br /&gt;
&lt;a href=&quot;http://www.sqlpass.org/24hours/2016/summitpreview/Sessions/Details.aspx?sid=53738&quot;&gt;http://www.sqlpass.org/24hours/2016/summitpreview/Sessions/Details.aspx?sid=53738&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
I was watching the session and found that I would like to add to the batch commands section. Back in 2003 i wrote a query optimization model that still works to this day that i would like to share.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;Problem&amp;nbsp;&lt;/h3&gt;You have a lot of data you need to import, pushing it one row at a time is very inefficient, but what is the &quot;right&quot; amount of queries to push.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;Solution&lt;/h3&gt;&lt;div&gt;SQL commands are sent through a network packet to the server, these packets are default 4096 bytes / 4KB in size, this can be defined on the system but most leave this setting intact. This means that if you write an insert for one row and sends that to the server there are plenty of unused space in the packet of 4096.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;So the task at hand is very simple, you must optimize your query so that you send as many queries in one packet of 4096 but without going over, since it then sends the overflowing query in another packet with trailing empty space as a result.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;If you watch the session by Mladen Prajdić there is a reference to a &lt;i&gt;System.Data.SqlClient.SqlCommandSet&lt;/i&gt;&amp;nbsp;that is used internally by the .Net framework, my guess is that it works similarly and tries to optimize the network traffic to the server.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;A more brutal implementation (clean and simple) is the write a batch query engine yourself and measuring the byte length of the resulting query and then only pushing it to the server when the byte length is close to 4096 but not over.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;I have shared my base code for this brutal approach on&amp;nbsp;&lt;a href=&quot;https://gist.github.com/janhebnes/726811a5ba0d36c9de7c323ae177bf22&quot;&gt;https://gist.github.com/janhebnes/726811a5ba0d36c9de7c323ae177bf22&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/janhebnes/726811a5ba0d36c9de7c323ae177bf22.js&quot;&gt;&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.jan.hebnes.dk/feeds/4189348875495298849/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/17515961/4189348875495298849?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/4189348875495298849'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/4189348875495298849'/><link rel='alternate' type='text/html' href='http://blog.jan.hebnes.dk/2016/09/batching-commands-for-sql-and_15.html' title='Batching Commands for SQL and Optimizing network round trips.'/><author><name>Jan</name><uri>http://www.blogger.com/profile/11255494161260284837</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17515961.post-265979238529270907</id><published>2016-09-15T10:28:00.000+02:00</published><updated>2016-09-15T10:28:35.742+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Sql"/><category scheme="http://www.blogger.com/atom/ns#" term="Tools"/><title type='text'>SET STATISTICS IO ON by default in SQL Management Studio</title><content type='html'>When working with databases and indexes you should always use&lt;br /&gt;
&quot;SET STATISTICS IO ON&quot; &amp;nbsp;and&lt;br /&gt;
&quot;SET STATISTICS TIME ON&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJKnt8yNKmcmciPvoo78hGUcIxrpVPX9RVkWeM5egmeTSsATcslLXw4u7sLvXBYq-J2wnQxOVVnCxTwC5JAs5xZgJr-AQ1GBtLLpEMixIwXMrFN6psLzfTsFuGq3Nf_7eP4KoJ9Q/s1600/statistics+on.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJKnt8yNKmcmciPvoo78hGUcIxrpVPX9RVkWeM5egmeTSsATcslLXw4u7sLvXBYq-J2wnQxOVVnCxTwC5JAs5xZgJr-AQ1GBtLLpEMixIwXMrFN6psLzfTsFuGq3Nf_7eP4KoJ9Q/s1600/statistics+on.png&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
For getting the logical reads and execution times and validating the you have index coverage on your queries. But not all are aware that these can actually be set to be on by default...&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBrC2Zcgv8PKThNIPSirWJKd8cRXTLqz6pRfqCitRjDwgBo0uE2PfPKQI_OypFFoGdUxqw1Jxy4WHezqLisYogiFzaoVxOb3vo0dF0-d2a9NCvLuUR6uLxjm1q_DfCCPmJMF4NNw/s1600/statistics+setup.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBrC2Zcgv8PKThNIPSirWJKd8cRXTLqz6pRfqCitRjDwgBo0uE2PfPKQI_OypFFoGdUxqw1Jxy4WHezqLisYogiFzaoVxOb3vo0dF0-d2a9NCvLuUR6uLxjm1q_DfCCPmJMF4NNw/s1600/statistics+setup.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
The check boxes for SET STATISTICS IO and SET STATISTICS TIME are hidden in the Options &amp;gt; Query Execution &amp;gt; SQL Server &amp;gt; Advanced of SQL server management studio&lt;br /&gt;
&lt;br /&gt;
You can find a nice summary of indexing for beginners by&amp;nbsp;Kathi Kellenberger on SQL PASS&lt;br /&gt;
&lt;a href=&quot;http://www.sqlpass.org/24hours/2016/summitpreview/Sessions/Details.aspx?sid=53731&quot;&gt;http://www.sqlpass.org/24hours/2016/summitpreview/Sessions/Details.aspx?sid=53731&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.jan.hebnes.dk/feeds/265979238529270907/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/17515961/265979238529270907?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/265979238529270907'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/265979238529270907'/><link rel='alternate' type='text/html' href='http://blog.jan.hebnes.dk/2016/09/set-statistics-io-on-by-default-in-sql.html' title='SET STATISTICS IO ON by default in SQL Management Studio'/><author><name>Jan</name><uri>http://www.blogger.com/profile/11255494161260284837</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJKnt8yNKmcmciPvoo78hGUcIxrpVPX9RVkWeM5egmeTSsATcslLXw4u7sLvXBYq-J2wnQxOVVnCxTwC5JAs5xZgJr-AQ1GBtLLpEMixIwXMrFN6psLzfTsFuGq3Nf_7eP4KoJ9Q/s72-c/statistics+on.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17515961.post-1585489234104117341</id><published>2016-07-13T01:53:00.001+02:00</published><updated>2016-07-13T01:53:29.054+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Code"/><category scheme="http://www.blogger.com/atom/ns#" term="Lifehacks"/><category scheme="http://www.blogger.com/atom/ns#" term="Sql"/><title type='text'>Excel Losing Decimal Values When Value Pasted from SSMS ResultSet</title><content type='html'>&lt;a href=&quot;http://blog.sqlauthority.com/2012/09/24/sql-server-excel-losing-decimal-values-when-value-pasted-from-ssms-resultset/&quot;&gt;http://blog.sqlauthority.com/2012/09/24/sql-server-excel-losing-decimal-values-when-value-pasted-from-ssms-resultset/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Remember to format cells to text in Excel, before pasting from the SQL Server Management results window.&lt;br /&gt;
&lt;br /&gt;
This will keep the decimal format from SSMS as a dot and not autoformat the number and loosing the comma in the process.&lt;br /&gt;
 &lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blog.jan.hebnes.dk/feeds/1585489234104117341/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/17515961/1585489234104117341?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/1585489234104117341'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/1585489234104117341'/><link rel='alternate' type='text/html' href='http://blog.jan.hebnes.dk/2016/07/excel-losing-decimal-values-when-value.html' title='Excel Losing Decimal Values When Value Pasted from SSMS ResultSet'/><author><name>Jan</name><uri>http://www.blogger.com/profile/11255494161260284837</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17515961.post-293564669618921378</id><published>2016-06-24T11:17:00.001+02:00</published><updated>2016-06-24T11:41:10.831+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><title type='text'>Unit Test WebAPI 2 IHttpActionResult </title><content type='html'>Sample Unit test looking at a Controller returning the IHttpActionResult pattern (introduced in WebApi2) for reference.&lt;br /&gt;
&lt;br /&gt;
Motivations behind the new IHttpActionResult (WebApi2) vs the old HttpResponseMessage (WebApi1) &lt;br /&gt;
&lt;a href=&quot;http://weblogs.asp.net/dwahlin/new-features-in-asp-net-web-api-2-part-i&quot;&gt;http://weblogs.asp.net/dwahlin/new-features-in-asp-net-web-api-2-part-i&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://stackoverflow.com/questions/21758615/why-should-i-use-ihttpactionresult-instead-of-httpresponsemessage&quot;&gt;http://stackoverflow.com/questions/21758615/why-should-i-use-ihttpactionresult-instead-of-httpresponsemessage&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.asp.net/web-api/overview/testing-and-debugging/unit-testing-controllers-in-web-api&quot;&gt;http://www.asp.net/web-api/overview/testing-and-debugging/unit-testing-controllers-in-web-api&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/janhebnes/6e007070918fd8cec8e77e24d5abd647.js&quot;&gt;&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.jan.hebnes.dk/feeds/293564669618921378/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/17515961/293564669618921378?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/293564669618921378'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/293564669618921378'/><link rel='alternate' type='text/html' href='http://blog.jan.hebnes.dk/2016/06/unit-test-ihttpactionresult.html' title='Unit Test WebAPI 2 IHttpActionResult '/><author><name>Jan</name><uri>http://www.blogger.com/profile/11255494161260284837</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17515961.post-1696851269174930360</id><published>2016-06-20T11:49:00.002+02:00</published><updated>2016-06-20T12:20:13.935+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="Code"/><category scheme="http://www.blogger.com/atom/ns#" term="Umbraco"/><title type='text'>Making Umbraco or any .Net CMS respect default documents </title><content type='html'>HttpHandler that helps respect the Request flow and serves the default documents of a directory instead of allowing e.g. Umbraco to kidnap the request for there purposes.&lt;br /&gt;
&lt;br /&gt;
IIS does not serve the Default Document when set in Integrated pipeline mode. E.g. after installing Umbraco the httpModules will catch any traffic to the site and will return a 404 page instead of actually passing to the existing file system. In this case I wanted to add umbraco on top of an old asp and html based site. We did not want to move large amount of archive content, so using this modules allows for the classic Default Documents to be respected even if you are in a modern setup where Default Documents are being ignored. So first we check the file system for a response document if non is found the request is allowed to continue to Umbraco, allowing us to extend the existing content with Umbraco instead of having to nuke everything. &lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/janhebnes/72633a28a7a08199b708e43b314641fa.js&quot;&gt;&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.jan.hebnes.dk/feeds/1696851269174930360/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/17515961/1696851269174930360?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/1696851269174930360'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/1696851269174930360'/><link rel='alternate' type='text/html' href='http://blog.jan.hebnes.dk/2016/06/making-umbraco-or-any-net-cms-respect.html' title='Making Umbraco or any .Net CMS respect default documents '/><author><name>Jan</name><uri>http://www.blogger.com/profile/11255494161260284837</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17515961.post-7198846887000461971</id><published>2016-05-24T09:03:00.001+02:00</published><updated>2016-05-24T09:17:03.543+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Code"/><category scheme="http://www.blogger.com/atom/ns#" term="Deployment"/><title type='text'>visual studio web deployment / deploying extra files</title><content type='html'>&lt;div&gt;&lt;h3&gt;Deploying extra files with Web Deploy&amp;nbsp;&lt;/h3&gt;&lt;a href=&quot;http://www.asp.net/mvc/overview/deployment/visual-studio-web-deployment/deploying-extra-files&quot;&gt;http://www.asp.net/mvc/overview/deployment/visual-studio-web-deployment/deploying-extra-files&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The official search result shows a somewhat complex approach to including files to the project deployment, a more simpler approach is to fake that the files have been included as content. This approach requires the files to be accessible at the root prior to deploying. &lt;br /&gt;
&lt;br /&gt;
By creating a *.wpp.targets (named the same as your project) you can add to the project files source prior to building. If you had included your content from Visual Studio to the project, it would have resulted in the external content being saved as &amp;lt;ItemGroup&amp;gt; and Content Include xxx for each file. By doing this manually you can use search patterns to add unknown amounts of files using \**\*.&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;pre&gt;&lt;i&gt;ProjectName&lt;/i&gt;.wpp.targets&lt;/pre&gt;&lt;pre class=&quot;language-markup&quot;&gt;&lt;code&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;
&amp;lt;Project ToolsVersion=&quot;4.0&quot; xmlns=&quot;http://schemas.microsoft.com/developer/msbuild/2003&quot;&amp;gt;
 &amp;lt;ItemGroup&amp;gt;
  &amp;lt;Content Include=&quot;css\**\*&quot; /&amp;gt;
  &amp;lt;Content Include=&quot;content\**\*&quot; /&amp;gt;
 &amp;lt;/ItemGroup&amp;gt;
&amp;lt;/Project&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;
It is that simple to include external content.&lt;br /&gt;
&lt;br /&gt;
Another classic issue using webdeployment is to control the content of your web.config, AutoParameterizationWebConfigConnectionStrings is the solution for this. &lt;a href=&quot;http://blog.jan.hebnes.dk/2015/07/umbraco-to-azure-msdeploy-error.html&quot;&gt;http://blog.jan.hebnes.dk/2015/07/umbraco-to-azure-msdeploy-error.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blog.jan.hebnes.dk/feeds/7198846887000461971/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/17515961/7198846887000461971?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/7198846887000461971'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/7198846887000461971'/><link rel='alternate' type='text/html' href='http://blog.jan.hebnes.dk/2016/05/visual-studio-web-deployment-deploying-extra-files.html' title='visual studio web deployment / deploying extra files'/><author><name>Jan</name><uri>http://www.blogger.com/profile/11255494161260284837</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17515961.post-7778667520823842461</id><published>2016-04-20T12:07:00.001+02:00</published><updated>2016-04-20T12:07:38.773+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Sql"/><title type='text'>T-SQL Generating af quick table with calendar dates</title><content type='html'>&lt;pre &gt;SELECT DATEADD(d, ones.n + 10*tens.n + 100*hundreds.n + 1000*thousands.n, GETDATE())
FROM (VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9)) ones(n),
     (VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9)) tens(n),
     (VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9)) hundreds(n),
     (VALUES(0),(1),(2),(3),(4),(5),(6),(7),(8),(9)) thousands(n)
ORDER BY 1
&lt;/pre&gt;&lt;br /&gt;
The fastest way to generate a base table with date entries...&lt;br /&gt;
&lt;br /&gt;
Originally a method used in 2003, when we developed the statistics calculations for Skandias Fond performance dashboards. &lt;br /&gt;
Still available today at &lt;a href=&quot;https://www.skandia.dk/funddatasheet?fundID=142&quot;&gt;https://www.skandia.dk/funddatasheet?fundID=142&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
I keep forgetting the method, so now it is documented here. &lt;br /&gt;
&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blog.jan.hebnes.dk/feeds/7778667520823842461/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/17515961/7778667520823842461?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/7778667520823842461'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/7778667520823842461'/><link rel='alternate' type='text/html' href='http://blog.jan.hebnes.dk/2016/04/t-sql-generating-af-quick-table-with.html' title='T-SQL Generating af quick table with calendar dates'/><author><name>Jan</name><uri>http://www.blogger.com/profile/11255494161260284837</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17515961.post-7142785010781358027</id><published>2016-03-04T10:18:00.001+01:00</published><updated>2016-06-23T11:12:24.048+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Sql"/><title type='text'>Visual Studio Database Projects (basics / refactoring log file)</title><content type='html'>&lt;h2&gt;Visual Studio Database Projects&amp;nbsp;&lt;/h2&gt;&lt;h3&gt;Basics / refactoring log file&lt;/h3&gt;&lt;br /&gt;
I am new to the Database projects in Visual Studio and still learning a lot of the basics.&lt;br /&gt;
&lt;br /&gt;
I imported some tables from a database to my project, fiddled a little with the fields not really changing anything but saving the file... i also copied one table and renamed the fields in the file ...&lt;br /&gt;
&lt;br /&gt;
When publishing i got&lt;br /&gt;
&lt;pre&gt;(50,1): SQL72014: .Net SqlClient Data Provider: Msg 50000, Level 16, State 127, Line 8 Rows were detected. The schema update is terminating because data loss might occur.
(43,0): SQL72045: Script execution error. &amp;nbsp;The executed script:
IF EXISTS (SELECT TOP 1 1
  FROM &amp;nbsp; [DSA].[Fact_Sellout_brick_totals_stg])
  RAISERROR (N&#39;Rows were detected. The schema update is terminating because data loss might occur.&#39;, 16, 127)
    WITH NOWAIT;
&lt;/pre&gt;&lt;br /&gt;
The table schema Compare shows one field as changed, yet it is changed to the same value... if it was normal code it would not be marked as changed...&lt;br /&gt;
Looking for a Refactorlog i found .refactorlog in the root of the project and it contains the problem... &lt;br /&gt;
&lt;br /&gt;
&lt;textarea style=&quot;width:100%;height:80px;&quot;&gt;&lt;operation Name=&quot;Rename Refactor&quot; Key=&quot;f8eb4f84-f81d-4292-a3f3-4e285b6f5d73&quot; ChangeDateTime=&quot;03/04/2016 08:14:48&quot;&gt;&lt;br /&gt;
&lt;property Name=&quot;ElementName&quot; Value=&quot;[DSA].[Fact_Sellout_brick_totals_stg].[Brick_code]&quot; /&gt;&lt;br /&gt;
&lt;property Name=&quot;ElementType&quot; Value=&quot;SqlSimpleColumn&quot; /&gt;&lt;br /&gt;
&lt;property Name=&quot;ParentElementName&quot; Value=&quot;[DSA].[Fact_Sellout_brick_totals_stg]&quot; /&gt;&lt;br /&gt;
&lt;property Name=&quot;ParentElementType&quot; Value=&quot;SqlTable&quot; /&gt;&lt;br /&gt;
&lt;property Name=&quot;NewName&quot; Value=&quot;MiniBrick_code&quot; /&gt;&lt;br /&gt;
&lt;/Operation&gt;&lt;br /&gt;
&lt;/textarea&gt;&lt;br /&gt;
&lt;br /&gt;
Removing the fiddling from the refactorlog solved my publishing issues. &lt;br /&gt;
I have yet to find the visual studio tool way to the refactorlog... </content><link rel='replies' type='application/atom+xml' href='http://blog.jan.hebnes.dk/feeds/7142785010781358027/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/17515961/7142785010781358027?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/7142785010781358027'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/7142785010781358027'/><link rel='alternate' type='text/html' href='http://blog.jan.hebnes.dk/2016/03/visual-studio-database-projects-basics.html' title='Visual Studio Database Projects (basics / refactoring log file)'/><author><name>Jan</name><uri>http://www.blogger.com/profile/11255494161260284837</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17515961.post-4775397844943114401</id><published>2016-01-27T15:24:00.001+01:00</published><updated>2016-01-27T15:34:39.194+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Lifehacks"/><category scheme="http://www.blogger.com/atom/ns#" term="Tools"/><title type='text'>Windows 10 start menu chrome apps icon glitch - fix</title><content type='html'>A Chrome App or a Chrome Website App being pinned to desktop or in the taskbar retains the originale icon attached... But for some reason the icon changes to the default Chrome icon when pinned to the&amp;nbsp;Windows 10&amp;nbsp;startmenu.&lt;br /&gt;
&lt;br /&gt;
The fix is to trick the windows 10 startmenu and change the shortcut so the chrome application is launched by another &lt;i&gt;primary &lt;/i&gt;program, e.g.&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;
&lt;/i&gt; &lt;i&gt;cmd /c &quot;chrome.exe&amp;nbsp;&lt;/i&gt;&lt;i&gt;--app=https://inbox.google.com&quot;&lt;/i&gt;&lt;i&gt;&amp;nbsp;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp; with start folder &quot;&lt;/i&gt;&lt;i&gt;C:\Program Files (x86)\Google\Chrome\Application\&lt;/i&gt;&lt;i&gt;&quot;&lt;/i&gt;&lt;br /&gt;
&lt;h3&gt;
Chrome shortcuts&lt;/h3&gt;
&lt;div&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;float: right; margin-left: 1em; text-align: right;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuR6lsBvsQMIfgfkt-NnsJ_FktKEc5a0PNN4tU6O6pvKEpQOmweVSQNn8t6t7P_HGNcv_KvG7nD1H07HBK25z2hK6p8oN80Hg-8EBGuEWCBjcTLeuHDAjHWcdRApjHfesaO52EoQ/s1600/27-01-2016+13-44-55+icon+glitch.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;223&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuR6lsBvsQMIfgfkt-NnsJ_FktKEc5a0PNN4tU6O6pvKEpQOmweVSQNn8t6t7P_HGNcv_KvG7nD1H07HBK25z2hK6p8oN80Hg-8EBGuEWCBjcTLeuHDAjHWcdRApjHfesaO52EoQ/s320/27-01-2016+13-44-55+icon+glitch.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Chrome logos showing all over the startmenu&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div&gt;
The shortcuts used by Chrome are very simple, you will find two types&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;u&gt;&lt;b&gt;Shortcut for opening an App &quot;webpage&quot;&lt;/b&gt;&lt;/u&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;chrome.exe --app=https://inbox.google.com&quot;&amp;nbsp;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;u&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/u&gt;&lt;/div&gt;
&lt;div&gt;
&lt;u&gt;&lt;b&gt;Shortcut for opening an App-id&lt;/b&gt;&lt;/u&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;chrome.exe &amp;nbsp;--profile-directory=Default --app-id=ejjicmeblgpmajnghnpcppodonldlgfn&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
Both of these refere to the same executable &lt;i&gt;Chrome.exe&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;h3&gt;
Windows 10 Startmenu Manifest files&lt;/h3&gt;
Windows 10 searches for a Manifest for the executable when in the startmenu context, in some version of Chrome this manifest has been added to the application folder.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;C:\Program Files (x86)\Google\Chrome\Application\chrome.VisualElementsManifest.xml&lt;/i&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
When this is present start menu icons will prefer this Manifest over local icon informations.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
On can try to remove&amp;nbsp;&lt;i&gt;chrome.VisualElementsManifest.xml &lt;/i&gt;but is a reither crude approach.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
A have found a less intrusive fix.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;-webkit-text-stroke-width: 0px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;-webkit-text-stroke-width: 0px; float: left; font-family: &#39;Times New Roman&#39;; letter-spacing: normal; margin-bottom: 0.5em; margin-right: 1em; orphans: auto; padding: 6px; text-align: left; text-indent: 0px; text-transform: none; widows: 1; word-spacing: 0px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;div style=&quot;margin: 0px;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjtaPCgxZLXFFAfkbH8gPJWAH0wx5aL-Ljp4w0vjHJGk-2V2xJQSkadwft3WH-9plihYXu7RFBbgpO-x36Pt9225MlyHJBZQkPrPaBVA7T2AgaulDP6yF3GP81ul9f14QtTPP44w/s1600/27-01-2016+15-06-20+open+location.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;116&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjtaPCgxZLXFFAfkbH8gPJWAH0wx5aL-Ljp4w0vjHJGk-2V2xJQSkadwft3WH-9plihYXu7RFBbgpO-x36Pt9225MlyHJBZQkPrPaBVA7T2AgaulDP6yF3GP81ul9f14QtTPP44w/s320/27-01-2016+15-06-20+open+location.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;font-size: 12.8px; padding-top: 4px; text-align: center;&quot;&gt;&lt;div style=&quot;margin: 0px;&quot;&gt;
Open the file location of the Chrome App you want to fix&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;float: right; margin-left: 1em; text-align: right;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCju1nY-ZvYJ03IT3q2MzOS8OhkbHMt4rzMAAcCpsZ32Ei073BAV-hXTcWMGAT1LZmGBQ_3E6fxgzjFSpnnWbBiakj1n14a5c7ItMv7DrolJj6yyoYJFB00ZSVbZqTkbVkZUStQA/s1600/27-01-2016+13-46-09+find+the+target+path.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: start;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCju1nY-ZvYJ03IT3q2MzOS8OhkbHMt4rzMAAcCpsZ32Ei073BAV-hXTcWMGAT1LZmGBQ_3E6fxgzjFSpnnWbBiakj1n14a5c7ItMv7DrolJj6yyoYJFB00ZSVbZqTkbVkZUStQA/s320/27-01-2016+13-46-09+find+the+target+path.png&quot; width=&quot;219&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;You will see e.g chrome.exe --app=https://calendar.google.com&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJR1zbv-rRiltzHr0HcRSxboYyYWLXyGeWVAlPO6sLh3sZ2w3V7kDzDDA1gjc_GwD77ZwAws1mDkwvilGasqbvUunt8y8JREtfU3wxYMKU_waHP0-peHNBN97nc6Q_947ThIwvmA/s400/27-01-2016+13-49-27+change+the+path.png&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;290&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Change the path so Chrome.exe is launched through &quot;cmd /k&quot;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;Change the Target path to use cmd /c &quot;&lt;i&gt;chrome.exe &amp;nbsp;xxxxx&quot;&lt;/i&gt;&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;
&lt;i&gt;e.g. &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/i&gt;&lt;i&gt;cmd /c &quot;chrome.exe&amp;nbsp;&lt;/i&gt;&lt;i&gt;--app=https://inbox.google.com&quot;&lt;/i&gt;&lt;i&gt;&amp;nbsp;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp; with start folder &quot;&lt;/i&gt;&lt;i&gt;C:\Program Files (x86)\Google\Chrome\Application\&lt;/i&gt;&lt;i&gt;&quot;&lt;/i&gt;&lt;br /&gt;
&lt;div&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;remember the minimized run start to hide the command window getting launched...&amp;nbsp;&lt;/i&gt;&lt;/div&gt;
&lt;br /&gt;
By changing the reference to chrome.exe and using cmd /c as a proxy launcher, windows 10&#39;s startmenu no longer detects the&amp;nbsp;&lt;i&gt;chrome.VisualElementsManifest.xml &lt;/i&gt;as primary manifest... You still get to receive auto updates from Chrome without needing to worry about&amp;nbsp;&lt;i&gt;chrome.VisualElementsManifest.xml&amp;nbsp;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;
&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;/div&gt;
&lt;h3 style=&quot;text-align: start;&quot;&gt;
&lt;i&gt;Missing icons ?&lt;/i&gt;&lt;/h3&gt;
If you need to find original icons that have been saved by Chrome they are located in&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;\AppData\Local\Google\Chrome\User Data\Default\Web Applications&amp;nbsp;&lt;/i&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhSfSt4fziTEe9Rhjqu9RJL5QGp1Z3Q-UQ73wdvq8fGIUsXn5oRZij54HKu1W-iNJkfYhYJrLNfiSn39u-w2TiyR9TrOQq9sS39XWbB8_356sjFPtRSu_hvOVNfm05r-pAXm82Zg/s1600/27-01-2016+14-11-28+finding+the+icons.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;104&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhSfSt4fziTEe9Rhjqu9RJL5QGp1Z3Q-UQ73wdvq8fGIUsXn5oRZij54HKu1W-iNJkfYhYJrLNfiSn39u-w2TiyR9TrOQq9sS39XWbB8_356sjFPtRSu_hvOVNfm05r-pAXm82Zg/s320/27-01-2016+14-11-28+finding+the+icons.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3&gt;
Final result&lt;/h3&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAH4SW9PAdHf3AbnOJvZZvfk28yupBHyplnHb4h3r6TX-2I2AyyUoWien48yCEAsSjRlxqC5pUyZ3pijc7_1HLsNe99jQek-xqHXDdgRmDW7Roxvf43v4NZBaNvQBCV6wcHOK2nw/s1600/27-01-2016+14-09-47+final+result+fixed+icons.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;257&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAH4SW9PAdHf3AbnOJvZZvfk28yupBHyplnHb4h3r6TX-2I2AyyUoWien48yCEAsSjRlxqC5pUyZ3pijc7_1HLsNe99jQek-xqHXDdgRmDW7Roxvf43v4NZBaNvQBCV6wcHOK2nw/s640/27-01-2016+14-09-47+final+result+fixed+icons.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Windows 10 Start menu all cleaned up&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;h3&gt;
Tip for getting the Chrome App list back (if missing)&lt;/h3&gt;
By the way: if you are missing the Chrome App list you can simply make a desktop shortcut to &lt;i&gt;chrome.exe&amp;nbsp;--show-app-list&amp;nbsp;&lt;/i&gt;and then pin it.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&quot;C:\Program Files (x86)\Google\Chrome\Application\chrome.exe&quot; --show-app-list&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;
&lt;/i&gt; &lt;i&gt;For the Windows 10 startmenu this becomes&lt;/i&gt;&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuR6lsBvsQMIfgfkt-NnsJ_FktKEc5a0PNN4tU6O6pvKEpQOmweVSQNn8t6t7P_HGNcv_KvG7nD1H07HBK25z2hK6p8oN80Hg-8EBGuEWCBjcTLeuHDAjHWcdRApjHfesaO52EoQ/s1600/27-01-2016+13-44-55+icon+glitch.png&quot; imageanchor=&quot;1&quot;&gt;&lt;/a&gt;&lt;i&gt;cmd /c &quot;chrome.exe --show-app-list&quot;&amp;nbsp;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp; with start folder &quot;&lt;/i&gt;&lt;i&gt;C:\Program Files (x86)\Google\Chrome\Application\&lt;/i&gt;&lt;i&gt;&quot;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;
&lt;/i&gt; &lt;i&gt;&lt;br /&gt;
&lt;/i&gt; &lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blog.jan.hebnes.dk/feeds/4775397844943114401/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/17515961/4775397844943114401?isPopup=true' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/4775397844943114401'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/4775397844943114401'/><link rel='alternate' type='text/html' href='http://blog.jan.hebnes.dk/2016/01/windows-10-start-menu-chrome-apps-icon.html' title='Windows 10 start menu chrome apps icon glitch - fix'/><author><name>Jan</name><uri>http://www.blogger.com/profile/11255494161260284837</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuR6lsBvsQMIfgfkt-NnsJ_FktKEc5a0PNN4tU6O6pvKEpQOmweVSQNn8t6t7P_HGNcv_KvG7nD1H07HBK25z2hK6p8oN80Hg-8EBGuEWCBjcTLeuHDAjHWcdRApjHfesaO52EoQ/s72-c/27-01-2016+13-44-55+icon+glitch.png" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17515961.post-5637113060904450466</id><published>2016-01-15T11:33:00.001+01:00</published><updated>2016-01-15T11:40:57.231+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Gaming"/><category scheme="http://www.blogger.com/atom/ns#" term="Lifehacks"/><title type='text'>Opening a Sennheiser HD570 for repair</title><content type='html'>I have a pair of Sennheiser HD-570 headphones, which I love, but they recently lost sound on the right side. &lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I thought, like anyone, that the 3m cable needed replacement, I bought a &lt;a href=&quot;http://amzn.com/B008JH72IO&quot;&gt;new cable&lt;/a&gt; and foam for the head piece from Amazon only to find that the right side was still dead.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I searched the internet for information on how to take apart the hearpiece to get to the speaker piece but to no avail. I had focused on getting to the speaker from the inside because the external part is so solid, but i have today found the right way to get into the spearker. Only to find that the plug had fallen out !!!&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTG14f_0rih5F7cxFfzmouNzrWs20VC7AYeKrNb6PdPDVz7QlYUkRIWx0n3DkQwfUevtFNwUdFFsVVwIuhZMD4vqnBdAZ4EpEJnT-VKcnGSd0eBNM5PfMGpJGXrxc7SWBLwKKoag/s1600/DSC_4268.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;360&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTG14f_0rih5F7cxFfzmouNzrWs20VC7AYeKrNb6PdPDVz7QlYUkRIWx0n3DkQwfUevtFNwUdFFsVVwIuhZMD4vqnBdAZ4EpEJnT-VKcnGSd0eBNM5PfMGpJGXrxc7SWBLwKKoag/s640/DSC_4268.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;The cable can drop out of the plug on a HD570! &lt;br /&gt;
A very simple fix if you get in.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBXi-a9CDeR7Jd7q_b3l8A4Jppoej1Q8OfrnHSFFGPpFvDT16nuOWuZyLLCPU-q4zSBWlmXgz563nECiZz92r5webv34PLnmtIKzhzIyGuXaj2x6fTcASGzb6kgCIv-WTnAHynug/s1600/DSC_4279.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBXi-a9CDeR7Jd7q_b3l8A4Jppoej1Q8OfrnHSFFGPpFvDT16nuOWuZyLLCPU-q4zSBWlmXgz563nECiZz92r5webv34PLnmtIKzhzIyGuXaj2x6fTcASGzb6kgCIv-WTnAHynug/s320/DSC_4279.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Attack from below with small object&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggQTpCktftRObJi-FmfpdXE3OLsn4-TeWiI3W72UvPQGFQdY6FaSYMqXfkbAydBO0YqPLE3SPcLq5VFAW_BbDw70p347Udg6BATRR9bJZhCqXzSV7pQ1I-xmFJsl5yzh_rzOZ0Bw/s1600/DSC_4278.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggQTpCktftRObJi-FmfpdXE3OLsn4-TeWiI3W72UvPQGFQdY6FaSYMqXfkbAydBO0YqPLE3SPcLq5VFAW_BbDw70p347Udg6BATRR9bJZhCqXzSV7pQ1I-xmFJsl5yzh_rzOZ0Bw/s320/DSC_4278.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot;&gt;&lt;span style=&quot;font-size: xx-small; text-align: start;&quot;&gt;&amp;nbsp;&lt;/span&gt;The bottom is a simple click tab&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBdjbNRVBeCYSxFEJHugDnBvwKJMegdeCneMI7H57M3wXRWdsJIx-AyrAv_3IXqv73D6y7rAT9wgmC-CBHpaUTxJWoa5gUPsqSAO0B2Ey2MUzepZEHYMOMQ-PxisP4p5vz_ugMIw/s1600/DSC_4276.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBdjbNRVBeCYSxFEJHugDnBvwKJMegdeCneMI7H57M3wXRWdsJIx-AyrAv_3IXqv73D6y7rAT9wgmC-CBHpaUTxJWoa5gUPsqSAO0B2Ey2MUzepZEHYMOMQ-PxisP4p5vz_ugMIw/s320/DSC_4276.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot;&gt;The upper part is more of a 90 degree tab.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPHWJ8fOiPCN4x6oMuHqvweOn5fkEHQZwF82N8kIoRrDsBuPwl33wBcoGk0hc0OK8YZWNMWTGyw7__au-jP77LlGh6LWZdSx0mYsvAQ-UV_tlCV43ND7LqYWyXzjR4kY8M6U7WCQ/s1600/DSC_4275.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPHWJ8fOiPCN4x6oMuHqvweOn5fkEHQZwF82N8kIoRrDsBuPwl33wBcoGk0hc0OK8YZWNMWTGyw7__au-jP77LlGh6LWZdSx0mYsvAQ-UV_tlCV43ND7LqYWyXzjR4kY8M6U7WCQ/s320/DSC_4275.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot;&gt;I used a flat screw driver head and force&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhytW9FYeh_PWeUmT46svsZq8QENnzab8wbNklJkkYZ6N0dn7prEIIRDm0IKomznUcUyC2Q1nDSWgnGOUv_d6ETPlMOeLlyM_eXz-m9xQt33LQgl4RZuuBUPciCFZI95M_6Az0vew/s1600/DSC_4273.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhytW9FYeh_PWeUmT46svsZq8QENnzab8wbNklJkkYZ6N0dn7prEIIRDm0IKomznUcUyC2Q1nDSWgnGOUv_d6ETPlMOeLlyM_eXz-m9xQt33LQgl4RZuuBUPciCFZI95M_6Az0vew/s320/DSC_4273.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot;&gt;Take care of the head bar location because the cover is so large.&lt;br /&gt;
Start by clicking off the bottom&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGAnly1eYBG2kCYOIASnGxn3SLKYXtWJcrwPJgUe4eeMgdA0Ys72k4YJ9Adobt4HhmLVtkhTcyLw4C_Qd3tWhqpH7TCnwFgQ2V_9Rjk837TLd1ZvLtEGijJGlGqdHJT0S1jYiD0g/s1600/DSC_4272.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGAnly1eYBG2kCYOIASnGxn3SLKYXtWJcrwPJgUe4eeMgdA0Ys72k4YJ9Adobt4HhmLVtkhTcyLw4C_Qd3tWhqpH7TCnwFgQ2V_9Rjk837TLd1ZvLtEGijJGlGqdHJT0S1jYiD0g/s320/DSC_4272.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot;&gt;&lt;span style=&quot;font-size: xx-small; text-align: start;&quot;&gt;&amp;nbsp;&lt;/span&gt;Open up the head part and click the top part of the external cover&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEif2W1scBoIzB0eIqMlUNFkisgpb6Ce6mz3-6rgwGznyInUGCNi0Ib4VUSZk6luqOuZxD-mJlYWJjED-_Vg-aU4QhCdZbCuQ20zvZ-izkTvOyBNyt1MNtdOEIdm4IUY69I_0litZA/s1600/DSC_4271.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEif2W1scBoIzB0eIqMlUNFkisgpb6Ce6mz3-6rgwGznyInUGCNi0Ib4VUSZk6luqOuZxD-mJlYWJjED-_Vg-aU4QhCdZbCuQ20zvZ-izkTvOyBNyt1MNtdOEIdm4IUY69I_0litZA/s320/DSC_4271.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot;&gt;Move the head bar back to taking of the cover piece.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2ziWmcSQVN_nXfQWb40nMz7tWuMdMH2bY1yzTY3xJsiKbsDlLgTCpDjIU7DabJUbwJndwL7ToM9CrR1kGbb-NQmrc-gpiE7AjSHNlPp_6YD1dUVaqihAJVLrPds35PtpTwE8Wsw/s1600/DSC_4269.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/a&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyTPNbK-M5QLz3rsHT5i2f4loCuXxV1XYkIPOadFZA_apRmBtj-q0vz8iHSHQroee-v00Xyhu9bNcccAYEXYKx_AJveYRlNMwK7jfsrSthkWBt4wC3IBLy7o9E7i3I4afyvG04mA/s1600/DSC_4267.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;360&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyTPNbK-M5QLz3rsHT5i2f4loCuXxV1XYkIPOadFZA_apRmBtj-q0vz8iHSHQroee-v00Xyhu9bNcccAYEXYKx_AJveYRlNMwK7jfsrSthkWBt4wC3IBLy7o9E7i3I4afyvG04mA/s640/DSC_4267.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Become &lt;i&gt;shocked&lt;/i&gt; to find that the cable has just dropped out of connection!&lt;br /&gt;(THIS IS HOW I FOUND IT WHEN I OPENED!)&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2ziWmcSQVN_nXfQWb40nMz7tWuMdMH2bY1yzTY3xJsiKbsDlLgTCpDjIU7DabJUbwJndwL7ToM9CrR1kGbb-NQmrc-gpiE7AjSHNlPp_6YD1dUVaqihAJVLrPds35PtpTwE8Wsw/s1600/DSC_4269.JPG&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;360&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2ziWmcSQVN_nXfQWb40nMz7tWuMdMH2bY1yzTY3xJsiKbsDlLgTCpDjIU7DabJUbwJndwL7ToM9CrR1kGbb-NQmrc-gpiE7AjSHNlPp_6YD1dUVaqihAJVLrPds35PtpTwE8Wsw/s640/DSC_4269.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Close up on the fastening points of the outer piece, so you can see how much violence you are allowed to use ;)&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;div&gt;
Put the cable back where is belongs and cover back on... and done!&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The pads do get worn, but you can still buy replacement pads from Amazon, cheaper than replacing the headset.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The sound in my Sennheiser HD570 is still great after 15+ years of service.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blog.jan.hebnes.dk/feeds/5637113060904450466/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/17515961/5637113060904450466?isPopup=true' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/5637113060904450466'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/5637113060904450466'/><link rel='alternate' type='text/html' href='http://blog.jan.hebnes.dk/2016/01/opening-sennheiser-hd570-for-repair.html' title='Opening a Sennheiser HD570 for repair'/><author><name>Jan</name><uri>http://www.blogger.com/profile/11255494161260284837</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTG14f_0rih5F7cxFfzmouNzrWs20VC7AYeKrNb6PdPDVz7QlYUkRIWx0n3DkQwfUevtFNwUdFFsVVwIuhZMD4vqnBdAZ4EpEJnT-VKcnGSd0eBNM5PfMGpJGXrxc7SWBLwKKoag/s72-c/DSC_4268.JPG" height="72" width="72"/><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17515961.post-3909619294670219209</id><published>2016-01-02T13:00:00.000+01:00</published><updated>2016-01-26T09:14:14.979+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Lifehacks"/><category scheme="http://www.blogger.com/atom/ns#" term="Tools"/><title type='text'>Why WebRTC allows tracking of your local IP online with Chrome and Firefox </title><content type='html'>&lt;br /&gt;
The internal IP information is perceived as necessary information for allowing optimal real time trafic to flow. The primary use case being to route the trafic more optimaly for users of VPN connections or proxies. I have been monitoring the issue since june, and there are no global fixes in the horizon. &lt;br /&gt;
&lt;br /&gt;
You can prevent the leak by using the extension&amp;nbsp;&lt;a href=&quot;https://goo.gl/74pT1m&quot;&gt;https://goo.gl/74pT1m&lt;/a&gt;, but most people wont even know about this issue nor install the extension, so it seems that you can now see the internal IP information as common available information for anyone to use (from Chrome and firefox)... =(&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Note that &lt;a href=&quot;https://goo.gl/74pT1m&quot;&gt;the official extension&lt;/a&gt; does help, but in private mode all extensions are disabled, unless you allow it in incognito from the extension settings...&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;hr /&gt;
&lt;h3&gt;
Background on the leak of internal IP address information&lt;/h3&gt;
&lt;br /&gt;
A year ago an implementation issue was found in Chrome and Firefox. It allows a website you visit to get your local IP information (even proxy and vpn ip&#39;s) without you being able to block it...Documentation can be found at &lt;a href=&quot;https://github.com/diafygi/webrtc-ips&quot;&gt;https://github.com/diafygi/webrtc-ips&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Try it for yourself at &lt;a href=&quot;https://diafygi.github.io/webrtc-ips/&quot;&gt;https://diafygi.github.io/webrtc-ips/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
There is an officiel issue at google Chrome&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://code.google.com/p/chromium/issues/detail?id=457492&quot;&gt;https://code.google.com/p/chromium/issues/detail?id=457492&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://productforums.google.com/forum/#!topic/chrome/QN7jleWJawY&quot;&gt;https://productforums.google.com/forum/#!topic/chrome/QN7jleWJawY&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Comments at reddit: &amp;nbsp;&lt;a href=&quot;https://www.reddit.com/r/VPN/comments/2uxnmh/webrtc_block_extension_for_chrome_now_ineffective/&quot;&gt;https://www.reddit.com/r/VPN/comments/2uxnmh/webrtc_block_extension_for_chrome_now_ineffective/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Going to &lt;b&gt;&lt;u&gt;chrome://flags/&lt;/u&gt;&lt;/b&gt; shows some mentions of WebRTC but none allows disabling that the internal IP getting revealed.&lt;br /&gt;
&lt;br /&gt;
Visiting the &lt;a href=&quot;https://code.google.com/p/chromium/issues/detail?id=457492&quot;&gt;official issue&lt;/a&gt;&amp;nbsp;you will notice that Google has marked the issue as fixed on june 28. but not with a global fix, instead an extension published by &lt;a href=&quot;https://webrtc.org/&quot;&gt;https://webrtc.org/&lt;/a&gt; is required for protecting your internal ip.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot; style=&quot;margin: 0px; padding: 0px 13px;&quot;&gt;
&lt;span class=&quot;author&quot; style=&quot;font-family: &amp;quot;arial&amp;quot; , sans-serif; font-size: 13.12px; margin-bottom: 1em; padding-left: 0.7em;&quot;&gt;&lt;a href=&quot;https://code.google.com/p/chromium/issues/detail?id=457492#c49&quot; name=&quot;c49&quot;&gt;#49&lt;/a&gt;&amp;nbsp;&lt;a class=&quot;userlink&quot; href=&quot;https://code.google.com/u/juberti@chromium.org/&quot; style=&quot;white-space: nowrap;&quot;&gt;juberti@chromium.org&lt;/a&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &amp;quot;arial&amp;quot; , sans-serif; font-size: 13.12px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;font-size: 11.726px; max-width: 80em; padding-left: 0.7em; white-space: pre-wrap;&quot;&gt;We have now released an official Chrome extension to control this behavior. We believe this is better than a checkbox in preferences, since it can be directly linked to, and we can provide a more detailed explanation of what it does.

Extension: &lt;a href=&quot;https://goo.gl/74pT1m&quot; rel=&quot;nofollow&quot;&gt;https://goo.gl/74pT1m&lt;/a&gt;
Details: &lt;a href=&quot;https://groups.google.com/forum/#!topic/discuss-webrtc/bMOsMFx7PFc&quot; rel=&quot;nofollow&quot;&gt;https://groups.google.com/forum/#!topic/discuss-webrtc/bMOsMFx7PFc&lt;/a&gt;

There are certain apps that don&#39;t work properly with this extension right now (e.g. &lt;a href=&quot;https://webrtc.github.io/samples&quot; rel=&quot;nofollow&quot;&gt;https://webrtc.github.io/samples&lt;/a&gt;) We are working on addressing these issues.
&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;br /&gt;
Fingerprinting your specific devices has always been possible by combining the public IP with e.g. your listed plugins or available fonts. But private browser mode has been created to help a bit with this fingerprinting. Since revealing the internal ip&#39;s, affects browsing in private mode and connecting through VPN&#39;s, this basically means that you have no where to hide when using chrome or firefox. Your distinct device can be fully monitored from any online service that wishes to.&lt;br /&gt;
&lt;br /&gt;
&lt;hr /&gt;
&lt;h3&gt;
What is WebRTC ?&lt;/h3&gt;
&lt;br /&gt;
&lt;a href=&quot;https://webrtc.org/&quot;&gt;https://webrtc.org/&lt;/a&gt; a protocol for real time communication directly from the browser. Basically giving a browser with javascript the same access to real-time communication that normally has been the difference between &quot;the web&quot; and local applications.&lt;br /&gt;
&lt;br /&gt;
&lt;hr /&gt;
&lt;h3&gt;
Chrome Extension: &lt;a href=&quot;https://goo.gl/74pT1m&quot;&gt;WebRTC Network Limiter&lt;/a&gt;&amp;nbsp;&lt;/h3&gt;
&lt;div class=&quot;C-b-p-j-Pb&quot; itemprop=&quot;description&quot; style=&quot;background-color: #f1f1f1; color: #333333; font-family: &#39;Open Sans&#39;, arial, sans-serif; font-size: 13px; font-weight: bold; word-wrap: break-word;&quot;&gt;
Configures how WebRTC&#39;s network traffic is routed by changing Chrome&#39;s privacy settings.&lt;/div&gt;
&lt;pre class=&quot;C-b-p-j-Oa&quot; style=&quot;background-color: #f1f1f1; color: #4c4c4c; font-family: &#39;Open Sans&#39;, arial, sans-serif; font-size: 11px; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;★ What it does:
This configures WebRTC to not use certain IP addresses or protocols:
- IP addresses not visible to the public internet (e.g. addresses like 192.168.1.2)
- any public IP addresses associated with network interfaces that are not used for web traffic (e.g. an ISP-provided address, when browsing through a VPN)
- Require WebRTC traffic to go through proxy servers as configured in Chrome. Since most of the proxy servers don&#39;t handle UDP, this effectively turns off UDP until UDP proxy support is available in Chrome and such proxies are widely deployed.
 
Once the extension is installed, WebRTC will only use public IP addresses associated with the interface used for web traffic, typically the same addresses that are already provided to sites in browser HTTP requests.

The extension may also disable non-proxied UDP, but this is not on by default and must be configured using the extension&#39;s Options page.

★ Notes:
This extension may affect the performance of applications that use WebRTC for audio/video or real-time data communication. Because it limits the potential network paths and protocols, WebRTC may pick a path which results in significantly longer delay or lower quality (e.g. through a VPN) or use TCP only through proxy servers which is not ideal for real-time communication. We are attempting to determine how common this is.&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blog.jan.hebnes.dk/feeds/3909619294670219209/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/17515961/3909619294670219209?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/3909619294670219209'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/3909619294670219209'/><link rel='alternate' type='text/html' href='http://blog.jan.hebnes.dk/2016/01/tracking-your-local-ip-online-with.html' title='Why WebRTC allows tracking of your local IP online with Chrome and Firefox '/><author><name>Jan</name><uri>http://www.blogger.com/profile/11255494161260284837</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17515961.post-4278058421442373296</id><published>2015-12-18T13:38:00.003+01:00</published><updated>2015-12-18T13:38:31.865+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Code"/><category scheme="http://www.blogger.com/atom/ns#" term="i18n"/><category scheme="http://www.blogger.com/atom/ns#" term="Sql"/><title type='text'>Localization vs. Internationalization (i18n) in SQL and .NET</title><content type='html'>&lt;blockquote&gt;
Internationalization is often written i18n, where 18 is the number of letters between i and n in the English word. Internationalization typically entails: Designing and developing in a way that removes barriers to localization or international deployment.&lt;/blockquote&gt;
&lt;br /&gt;
More about the term is described elegantly at w3&lt;br /&gt;
&lt;a href=&quot;http://www.w3.org/International/questions/qa-i18n&quot;&gt;http://www.w3.org/International/questions/qa-i18n&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
There are many issues in handling time in systems that span globally. &lt;br /&gt;
One area is the database level and the other is the code level. &lt;br /&gt;
&lt;br /&gt;
Prior to the introduction of the DateTimeOffset type the types offered did not let you save both the UTC time and the actual local timezone in one value. This would typically be handled by composing time upon two stored values, the datetime in UTC and the TimeZoneOffset in another field.&lt;br /&gt;
&lt;br /&gt;
These shortcomings have been handled with the introduction of the DateTimeOffset value in both SQL and .NET. There is still room for improvement because we do not have the Daylight Saving Time Parameter in the type, but this is a value that is set nationally and just a pain to handle ;)&lt;br /&gt;
&lt;h4&gt;
What have the larger systems been doing prior to this?&lt;/h4&gt;
E.g.The Sitecore platform has saved all internal datetime values to the database as UTC time and let the presentation layer handle the formatting to localized time. For internal values like a publishing pipeline or an event queue having a single point of time reference is critical. This is still a relevant for system values where you want to be precise in the time comparison.&lt;br /&gt;
&lt;h3&gt;
DateTimeOffset (from SQL server 2008)&lt;/h3&gt;
&lt;a href=&quot;http://blogs.msdn.com/b/bartd/archive/2009/03/31/the-death-of-datetime.aspx&quot;&gt;http://blogs.msdn.com/b/bartd/archive/2009/03/31/the-death-of-datetime.aspx&lt;/a&gt;&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;br /&gt;
SQL Server 2008 added a new data type named “datetimeoffset”.  This is similar to the old datetime data type, with the following significant differences:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Internally, the time is stored in unambiguous UTC format&lt;/li&gt;
&lt;li&gt;The local time zone offset is stored along with the UTC time, which allows the time to be displayed as a local time value (or converted to any another time zone offset)&lt;/li&gt;
&lt;li&gt;The data type is capable of storing more precise times than datetime&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;br /&gt;
&lt;h3&gt;
DateTimeOffset (from .NET Framework 3.5)&lt;/h3&gt;
The same type has been introduced in .NET v3.5, it can map the new SQL type.&lt;br /&gt;
&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/system.datetimeoffset%28v=vs.110%29.aspx?f=255&amp;amp;MSPPError=-2147217396&quot;&gt;https://msdn.microsoft.com/en-us/library/system.datetimeoffset%28v=vs.110%29.aspx?f=255&amp;amp;MSPPError=-2147217396&lt;/a&gt;&lt;br /&gt;
&lt;h4&gt;
Choosing Between DateTime, DateTimeOffset, TimeSpan, and TimeZoneInfo&lt;br /&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/bb384267%28v=vs.110%29.aspx?f=255&amp;amp;MSPPError=-2147217396&quot;&gt;https://msdn.microsoft.com/en-us/library/bb384267%28v=vs.110%29.aspx?f=255&amp;amp;MSPPError=-2147217396&lt;/a&gt;&lt;/h4&gt;
&lt;h3&gt;
The Daylight Saving Time - the missing link...&amp;nbsp;&lt;/h3&gt;
&lt;div&gt;
I have found one excellent resource for handling Daylight Saving Time. The idea is to let the user select there country of origin, and save the Daylight Offset value at the same time, it can also save the gmt offset if you choose.&lt;br /&gt;
&lt;br /&gt;
The right way is to find the value through the .NET framework with the TimeZone information for a region. But allowing it to be part of a custom value set by the user selection can help give a simplicity around the value.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;http://www.freeformatter.com/time-zone-list-html-select.html&quot;&gt;http://www.freeformatter.com/time-zone-list-html-select.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blog.jan.hebnes.dk/feeds/4278058421442373296/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/17515961/4278058421442373296?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/4278058421442373296'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/4278058421442373296'/><link rel='alternate' type='text/html' href='http://blog.jan.hebnes.dk/2015/12/localization-vs-internationalization.html' title='Localization vs. Internationalization (i18n) in SQL and .NET'/><author><name>Jan</name><uri>http://www.blogger.com/profile/11255494161260284837</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17515961.post-3080230622525133563</id><published>2015-12-18T12:52:00.000+01:00</published><updated>2015-12-18T12:52:31.127+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="Code"/><category scheme="http://www.blogger.com/atom/ns#" term="Security"/><title type='text'>C# Sending secure e-mails that are signed and encrypted</title><content type='html'>Securing email content can be done by sending the email in a closed network setup, directly to the receiving email server or by encrypting the content of the email. If you require the content to be really confidential you should go all the way and authenticate the sender by signing the email with a private certificate from the sender and encrypt the same email with the public certificate of the receiver. &lt;br /&gt;
&lt;br /&gt;
This opens up a couple of failure points since certificates expire. &lt;br /&gt;
The following Gist handles both the signing and the encrypting but also takes care of notifying when the certificates have or are going to expire, and handles when they are expired. &lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/janhebnes/e117146f9b1eb4347f33.js&quot;&gt;&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.jan.hebnes.dk/feeds/3080230622525133563/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/17515961/3080230622525133563?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/3080230622525133563'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/3080230622525133563'/><link rel='alternate' type='text/html' href='http://blog.jan.hebnes.dk/2015/12/c-sending-secure-e-mails-that-are.html' title='C# Sending secure e-mails that are signed and encrypted'/><author><name>Jan</name><uri>http://www.blogger.com/profile/11255494161260284837</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17515961.post-4086989822577312339</id><published>2015-12-17T11:21:00.001+01:00</published><updated>2015-12-17T11:59:16.603+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Code"/><category scheme="http://www.blogger.com/atom/ns#" term="WPF"/><title type='text'>Pressing ctrl+key in a WPF Window Application</title><content type='html'>We had a bug on a WPF application where KeyUp=&quot;MainControl_KeyUp&quot; had been used for detecting ctrl+B &lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;language-csharp&quot;&gt;&lt;code&gt;if (e.Key == Key.B &amp;&amp; (Keyboard.Modifiers &amp; ModifierKeys.Control) == ModifierKeys.Control)&lt;/code&gt;
&lt;/pre&gt;&lt;br /&gt;
This meant that only the B + right control would trigger the event. &lt;br /&gt;
Changing the event to being a KeyDown event and &lt;a href=&quot;http://wpf.2000things.com/2012/08/17/627-detecting-whether-the-ctrl-key-is-pressed-in-a-keydown-event-handler/&quot;&gt;this post&lt;/a&gt; help solve the issue so both control keys now can be used to detect the key combination in the event context.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;language-csharp line-numbers&quot;&gt;&lt;code&gt;
private void TextBox_KeyDown(object sender, KeyEventArgs e)
        {
            if ((e.Key == Key.G) &amp;amp;&amp;amp;
                (Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl)))
                MessageBox.Show(&amp;quot;You pressed Ctrl+G !&amp;quot;);
        }
&lt;/code&gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;a href=&quot;http://wpf.2000things.com/2012/08/17/627-detecting-whether-the-ctrl-key-is-pressed-in-a-keydown-event-handler/&quot;&gt;http://wpf.2000things.com/2012/08/17/627-detecting-whether-the-ctrl-key-is-pressed-in-a-keydown-event-handler/&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://wpf.2000things.com/tag/keydown/&quot;&gt;http://wpf.2000things.com/tag/keydown/&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.jan.hebnes.dk/feeds/4086989822577312339/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/17515961/4086989822577312339?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/4086989822577312339'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/4086989822577312339'/><link rel='alternate' type='text/html' href='http://blog.jan.hebnes.dk/2015/12/pressing-ctrlkey-in-wpf-window.html' title='Pressing ctrl+key in a WPF Window Application'/><author><name>Jan</name><uri>http://www.blogger.com/profile/11255494161260284837</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17515961.post-8173098252541763664</id><published>2015-12-17T10:48:00.002+01:00</published><updated>2015-12-17T15:24:06.284+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="Code"/><category scheme="http://www.blogger.com/atom/ns#" term="Deployment"/><title type='text'>Turn on Compile-time View Checking for ASP.NET MVC </title><content type='html'>The .cshtml files are not natively compiled and therefore cheched for spelling mistakes at compile time. This can be changed, e.g. at build server level.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;language-markup&quot;&gt;&lt;code&gt;&amp;lt;target condition=&quot;&#39;$(MvcBuildViews)&#39;==&#39;true&#39;&quot; name=&quot;AfterBuild&quot;&amp;gt;
&amp;lt;aspnetcompiler physicalpath=&quot;$(ProjectDir)\..\$(ProjectName)&quot; virtualpath=&quot;temp&quot;&amp;gt;&amp;lt;/aspnetcompiler&amp;gt;
&amp;lt;/target&amp;gt;

&amp;lt;propertygroup&amp;gt;
&amp;lt;mvcbuildviews&amp;gt;true&amp;lt;/mvcbuildviews&amp;gt;
&amp;lt;/propertygroup&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
This has been an option since 2010, not many know about it.&lt;br /&gt;
&lt;a href=&quot;http://blogs.msdn.com/b/jimlamb/archive/2010/04/20/turn-on-compile-time-view-checking-for-asp-net-mvc-projects-in-tfs-build-2010.aspx&quot;&gt;http://blogs.msdn.com/b/jimlamb/archive/2010/04/20/turn-on-compile-time-view-checking-for-asp-net-mvc-projects-in-tfs-build-2010.aspx&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.jan.hebnes.dk/feeds/8173098252541763664/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/17515961/8173098252541763664?isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/8173098252541763664'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/8173098252541763664'/><link rel='alternate' type='text/html' href='http://blog.jan.hebnes.dk/2015/12/turn-on-compile-time-view-checking-for.html' title='Turn on Compile-time View Checking for ASP.NET MVC '/><author><name>Jan</name><uri>http://www.blogger.com/profile/11255494161260284837</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-17515961.post-4811072524195112683</id><published>2015-12-16T16:26:00.001+01:00</published><updated>2015-12-16T16:26:28.004+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Code"/><category scheme="http://www.blogger.com/atom/ns#" term="Gaming"/><category scheme="http://www.blogger.com/atom/ns#" term="Lifehacks"/><category scheme="http://www.blogger.com/atom/ns#" term="Sport"/><title type='text'>D3js visualization of Steam Group relations between friends and games using Steam API</title><content type='html'>Last year at the lanparty &lt;a href=&quot;http://netbyte.dk&quot;&gt;http://netbyte.dk&lt;/a&gt; I visualized the Steam Group relations between friends and games using a D3js sample and Steam API.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://netbyte.dk/steam/games/&quot;&gt;http://netbyte.dk/steam/games/&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://netbyte.dk/steam/&quot;&gt;http://netbyte.dk/steam/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
It was done as a code and run feature for generating the source file that could be used for the above renderings.&lt;br /&gt;
Attached is the source for generating the flare files.&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/janhebnes/67d882fa0c066b28f3cd.js&quot;&gt;&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.jan.hebnes.dk/feeds/4811072524195112683/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/17515961/4811072524195112683?isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/4811072524195112683'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17515961/posts/default/4811072524195112683'/><link rel='alternate' type='text/html' href='http://blog.jan.hebnes.dk/2015/12/d3js-visualization-of-steam-group.html' title='D3js visualization of Steam Group relations between friends and games using Steam API'/><author><name>Jan</name><uri>http://www.blogger.com/profile/11255494161260284837</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>