<?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-3984543729645165078</id><updated>2024-08-28T05:27:01.809-04:00</updated><category term=".Net"/><category term="javascript"/><category term="powershell"/><category term="Programming"/><category term="SQL"/><category term="jquery"/><category term="Team Foundation Server"/><category term="asp.net"/><category term="GreaseMonkey"/><category term="SQL Server 2005"/><category term="SharePoint 2010"/><category term="Visual Studio"/><category term="Visual Studio 2010"/><category term="Windows"/><category term="git"/><category term="XML"/><category term="XQuery"/><category term="Xamarin"/><category term="Xamarin Forms"/><category term="AngularJS"/><category term="Best Practices"/><category term="Debug"/><category term="MSBuild"/><category term="OSX"/><category term="SharePoint"/><category term="Software Development"/><category term="Twitter Bootstrap"/><category term="UI"/><category term="Visual Studio 2008"/><category term="Web Service"/><category term="X509 Certificate"/><category term=".Net 3.0"/><category term=".Net 4.0"/><category term="AutoHotKey"/><category term="Batch"/><category term="HTML"/><category term="LDAP"/><category term="Minify"/><category term="Node.js"/><category term="R"/><category term="Security"/><category term="XPath"/><category term="active directory"/><category term="iis"/><category term="warning"/><category term="AES"/><category term="Azure"/><category term="Bitwise"/><category term="Build Configurations"/><category term="CAML"/><category term="CSS"/><category term="Cryptography"/><category term="Custom Membership Provider"/><category term="DOS Batch"/><category term="Daptiv"/><category term="Design Pattern"/><category term="Enterprise Library"/><category term="Enumerations"/><category term="Extension Methods"/><category term="First Data"/><category term="GNU"/><category term="Game Theory"/><category term="Generic Functions"/><category term="Google Reader"/><category term="GridView"/><category term="IIS Express"/><category term="JUnit"/><category term="K2"/><category term="MSDN"/><category term="MVC"/><category term="Mouse"/><category term="Optimization"/><category term="P12 Certificate"/><category term="PSSession"/><category term="Parallel Extensions"/><category term="Performance"/><category term="Remote Debugging"/><category term="Resource Manager"/><category term="Responsive Design"/><category term="Rserve"/><category term="Ruby on Rails"/><category term="Serialization"/><category term="SharePoint 2007"/><category term="Sublime Text"/><category term="Synergy"/><category term="Trello"/><category term="Twitter"/><category term="ULS"/><category term="User Interface Engineering"/><category term="VPN"/><category term="VirtualBox"/><category term="WCF"/><category term="WPF"/><category term="WSDL"/><category term="WinRM"/><category term="Windows Forms"/><category term="Windows Live Writer"/><category term="Windows Remote Management"/><category term="XCode"/><category term="XSL"/><category term="YUICompressor"/><category term="beforeunload"/><category term="chocolatey"/><category term="regular expressions"/><title type='text'>Intellectual Ponderings</title><subtitle type='html'>Problem Solving Through Logic</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://intellectualponderings.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://intellectualponderings.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Brock</name><uri>http://www.blogger.com/profile/15594270479196950758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2P2oe5Hk6uT-uR1qtS8oRWOym3yVhJ0JBXIF8x2473HYdXG1wiGY0tsP1l31UNmCW_0ArboanBy174wQ1t1Wh8USssIcCMNjpjxNHdVsNXQRMwztbxT41_Sbh3GJRofw/s220/profile.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>116</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3984543729645165078.post-1083963278869146876</id><published>2015-09-15T22:00:00.000-04:00</published><updated>2015-09-15T22:00:00.065-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Windows"/><title type='text'>Disable F1 Windows Help and Support on Windows 8.1</title><content type='html'>One of the most useless things built into windows is the F1 help, unfortunately Microsoft doesn&#39;t make it easy to disable.  I think I can say that I may have found the F1 help useful once, and that is probably pretty generous. &lt;br /&gt;
&lt;br /&gt;
Below is a Powershell script which will disable the F1 help in windows.  Basically, it takes control over helppane.exe and then renames it.  Thankfully, if windows can&#39;t find the file, it will not through an error.  If you want to restore the F1 help, just rename the executable back.&lt;br /&gt;
&lt;pre class=&quot;brush: powershell;html-script: false; ruler: true; toolbar: false;&quot;&gt;takeown /f c:\windows\helppane.exe
$acl = Get-Acl &quot;C:\Windows\HelpPane.exe&quot;
$rule = New-Object  System.Security.AccessControl.FileSystemAccessRule(&quot;$([Environment]::UserDomainName)\$([Environment]::UserName)&quot;,&quot;FullControl&quot;,&quot;Allow&quot;)
$acl.SetAccessRule($rule)
Set-Acl &quot;C:\Windows\HelpPane.exe&quot; $acl
Rename-Item &quot;C:\Windows\HelpPane.exe&quot; &quot;C:\Windows\HelpPane1.exe&quot;
&lt;/pre&gt;This may work on other versions of windows, but I have only tested this on Windows 8.1.</content><link rel='replies' type='application/atom+xml' href='http://intellectualponderings.blogspot.com/feeds/1083963278869146876/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3984543729645165078/1083963278869146876' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/1083963278869146876'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/1083963278869146876'/><link rel='alternate' type='text/html' href='http://intellectualponderings.blogspot.com/2015/09/disable-f1-windows-help-and-support-on.html' title='Disable F1 Windows Help and Support on Windows 8.1'/><author><name>Brock</name><uri>http://www.blogger.com/profile/15594270479196950758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2P2oe5Hk6uT-uR1qtS8oRWOym3yVhJ0JBXIF8x2473HYdXG1wiGY0tsP1l31UNmCW_0ArboanBy174wQ1t1Wh8USssIcCMNjpjxNHdVsNXQRMwztbxT41_Sbh3GJRofw/s220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3984543729645165078.post-3169324991459054780</id><published>2015-09-03T22:00:00.000-04:00</published><updated>2015-09-03T22:00:00.262-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="powershell"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows"/><title type='text'>Powershell Open A Windows Explorer Window And Select A File</title><content type='html'>Just a quick useful function that I have used a couple times and always forget about.  If you have a script that persists a file to disk, you can open a Windows Explorer window and select the file with this function.  This can be useful in desktop applications as well.  I&#39;ll leave it to the reader to translate it to C# (it leverages straight-up .Net functions already).&lt;br /&gt;
&lt;pre class=&quot;brush: powershell;html-script: false; ruler: true; toolbar: false;&quot; title=&quot;Show and select file:&quot;&gt;function Show-InExplorer($file) {
 $explorerArgs = &quot;/select, $file&quot;;
 [System.Diagnostics.Process]::Start(&quot;explorer.exe&quot;, $explorerArgs) | Out-Null;
}
&lt;/pre&gt;NOTE:  Dispite what people have said on several StackOverflow posts, I found that I had to have the comma after the &lt;code&gt;/select&lt;/code&gt;.  </content><link rel='replies' type='application/atom+xml' href='http://intellectualponderings.blogspot.com/feeds/3169324991459054780/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3984543729645165078/3169324991459054780' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/3169324991459054780'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/3169324991459054780'/><link rel='alternate' type='text/html' href='http://intellectualponderings.blogspot.com/2015/09/powershell-open-windows-explorer-window.html' title='Powershell Open A Windows Explorer Window And Select A File'/><author><name>Brock</name><uri>http://www.blogger.com/profile/15594270479196950758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2P2oe5Hk6uT-uR1qtS8oRWOym3yVhJ0JBXIF8x2473HYdXG1wiGY0tsP1l31UNmCW_0ArboanBy174wQ1t1Wh8USssIcCMNjpjxNHdVsNXQRMwztbxT41_Sbh3GJRofw/s220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3984543729645165078.post-7966181020198050905</id><published>2015-08-27T22:00:00.000-04:00</published><updated>2015-08-27T22:00:00.214-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="GNU"/><title type='text'>GNU Screen Awesomeness</title><content type='html'>&lt;h3&gt;Introduction&lt;/h3&gt;I have been using &lt;a href=&quot;http://www.gnu.org/software/screen/&quot;&gt;GNU Screen&lt;/a&gt; for a LONG time; it usually comes by default with every *nix distribution that I have used.  It is one of my favorite tools in my *nix toolbox.  Basically it allows you to multiplex your SSH session allowing the ability to switch between full screen shell windows.  I recently worked on a project which used Linux and utilized the tool pretty heavily.  I thought everyone knew about Screen, except my fellow developer had never heard of it, so I figured this topic would be great to share.&lt;br /&gt;
&lt;br /&gt;
Basically, I can have screens for &lt;a href=&quot;https://www.midnight-commander.org/&quot;&gt;GNU Midnight Commander&lt;/a&gt;, MySQL REPL (sometimes I create a tunnel and use Workbench, but I don&#39;t always have access to it), my source directory, and a configuration directory.  This allows me to quickly switch between different tasks/locations without having to do a lot of heavy lifting or have multiple SSH connections or change directories a lot.  &lt;br /&gt;
&lt;br /&gt;
This is all well and great, but it comes with another great benefit.  If you are disconnected for some reason, screen will keep everything waiting for your return.  You can also suspend your screen session via a keyboard shortcut and resume it just the same.  &lt;br /&gt;
&lt;br /&gt;
Let&#39;s get started.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;Getting Started With Screen&lt;/h3&gt;It is really easy to start screen:&lt;br /&gt;
&lt;pre class=&quot;brush: shell;html-script: false; ruler: true; toolbar: false;&quot; title=&quot;Start Screen:&quot;&gt;$ screen
&lt;/pre&gt;You are in!  &lt;br /&gt;
&lt;blockquote&gt;NOTE: The keyboard shortcuts all require the Control key, it is usually abbreviated with Ctrl, but the below will use &quot;C-&quot; because that is how Screen&#39;s help specifies.&lt;/blockquote&gt;Now you have a LOT of shortcuts, but below are the most basic and useful:&lt;br /&gt;
&lt;br /&gt;
&lt;dl&gt; &lt;dt&gt; Create new window &lt;/dt&gt;
 &lt;dd&gt; C-a, c &lt;/dd&gt;
 &lt;dt&gt; View Windows &lt;/dt&gt;
 &lt;dd&gt; C-a, w &lt;/dd&gt;
 &lt;dt&gt; Switch to Window &lt;/dt&gt;
 &lt;dd&gt; C-a, #   (index of the window) &lt;/dd&gt;
 &lt;dt&gt; Disconnecting/Detatching &lt;/dt&gt;
 &lt;dd&gt; C-a, d &lt;/dd&gt;
&lt;/dl&gt;&lt;br /&gt;
&lt;h3&gt;Now, A Bit More Advanced&lt;/h3&gt;&lt;dl&gt;&lt;dt&gt; Name Your Session &lt;/dt&gt;
&lt;dd&gt; C-a :sessionname bars &lt;/dd&gt;
&lt;/dl&gt;Let&#39;s test this out, create a named session.&lt;br /&gt;
&lt;pre class=&quot;brush: shell;html-script: false; ruler: true; toolbar: false; highlight: [8, 9, 13]&quot; title=&quot;Start Named Session:&quot;&gt;screen -S sessionname
&lt;/pre&gt;Enter some commands at the new prompt. And then press&lt;br /&gt;
&lt;pre class=&quot;brush: shell;html-script: false; ruler: true; toolbar: false; highlight: [8, 9, 13]&quot; title=&quot;Detach From The Session:&quot;&gt;C-a, d
&lt;/pre&gt;Now you should be back where you were before you started Screen.  Even if you were you were running Midnight Commander (or anything else).  Now let&#39;s jump back into the session.&lt;br /&gt;
&lt;pre class=&quot;brush: shell;html-script: false; ruler: true; toolbar: false; highlight: [8, 9, 13]&quot; title=&quot;Restore Named Session:&quot;&gt;screen -r sessionname
&lt;/pre&gt;That is it.  So easy.  Use it!&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://intellectualponderings.blogspot.com/feeds/7966181020198050905/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3984543729645165078/7966181020198050905' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/7966181020198050905'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/7966181020198050905'/><link rel='alternate' type='text/html' href='http://intellectualponderings.blogspot.com/2015/08/gnu-screen-awesomeness.html' title='GNU Screen Awesomeness'/><author><name>Brock</name><uri>http://www.blogger.com/profile/15594270479196950758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2P2oe5Hk6uT-uR1qtS8oRWOym3yVhJ0JBXIF8x2473HYdXG1wiGY0tsP1l31UNmCW_0ArboanBy174wQ1t1Wh8USssIcCMNjpjxNHdVsNXQRMwztbxT41_Sbh3GJRofw/s220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3984543729645165078.post-8016242939704308172</id><published>2015-08-21T22:00:00.001-04:00</published><updated>2015-08-21T22:00:01.071-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Azure"/><category scheme="http://www.blogger.com/atom/ns#" term="Resource Manager"/><title type='text'>Azure Resource Manager Templates, The Missing Parts</title><content type='html'>Azure Resource Manager (ARM) is a fantastic addition to the Azure ecosystem.  The fact that you can create a template for your environment is all the better.  Basically, it allows you to describe all of the resources you need in an environment and have an amazing amount of configuration.  &lt;br /&gt;
&lt;br /&gt;
ARM templates are merely JSON files that use JSONSchema.  Visual Studio gives you validation and lets you know if you reference something that is not known.  The support is nice, but there are several things that do not validate, but work against Azure regardless.  &lt;br /&gt;
&lt;br /&gt;
A good place to start looking for template examples is the Azure GitHub repo &lt;a href=&quot;https://github.com/Azure/azure-quickstart-templates&quot;&gt;azure-quickstart-templates&lt;/a&gt;.  There are many examples, but from a development standpoint, good examples putting them all together are difficult to come by.&lt;br /&gt;
&lt;br /&gt;
All is not rainbows and butterflies, there are limitations.  To list a few:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;If you require a GUI, you will be greatly dismayed by the offering in Visual Studio.  It is extremely simplistic and you will quickly out grow it.  There is, however, a very nice JSON Outline pane which will help you navigate the JSON file.&lt;/li&gt;
&lt;li&gt;Database servers cannot be shared across Resource Groups.&lt;/li&gt;
&lt;li&gt;Does not handle Cloud Services (Web/Worker Roles)&lt;/li&gt;
&lt;li&gt;Does not handle Service Bus namespaces&lt;/li&gt;
&lt;li&gt;There are a number of other services that are not supported on the new portal and not in the Resource Manager.&lt;/li&gt;
&lt;/ul&gt;I am sure that in the coming months the unhandled services will be supported.  It is possible to get around the these limitations via Powershell, but you don&#39;t don&#39;t get the template deployment goodness.&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;Build your connection strings&lt;/h4&gt;Assuming you are describing an Azure Web App, you can configure the configuration connectionstrings.  You can build them based on other resources described in the template.&lt;br /&gt;
Here are examples of the ones I have been able to find:&lt;br /&gt;
&lt;pre class=&quot;brush: javascript;html-script: false; ruler: true; toolbar: false;&quot; title=&quot;SQL Database Connection String:&quot;&gt;&quot;DefaultConnection&quot;: {
    &quot;value&quot;: &quot;[concat(&#39;Data Source=tcp:&#39;, reference(concat(&#39;Microsoft.Sql/servers/&#39;, parameters(&#39;serverName&#39;))).fullyQualifiedDomainName, &#39;,1433;Initial Catalog=&#39;, parameters(&#39;databaseName&#39;), &#39;;User Id=&#39;, parameters(&#39;administratorLogin&#39;), &#39;@&#39;, parameters(&#39;serverName&#39;), &#39;;Password=&#39;, parameters(&#39;administratorLoginPassword&#39;), &#39;;&#39;)]&quot;,
    &quot;type&quot;: &quot;SQLAzure&quot;
},
&lt;/pre&gt;&lt;pre class=&quot;brush: javascript;html-script: false; ruler: true; toolbar: false;&quot; title=&quot;SQL Database Connection String:&quot;&gt;&quot;variables&quot;: {
    &quot;storageAccountId&quot;: &quot;[concat(&#39;/subscriptions/&#39;,subscription().subscriptionId,&#39;/resourceGroups/&#39;,resourceGroup().name,&#39;/providers/&#39;,&#39;Microsoft.Storage/storageAccounts/&#39;, parameters(&#39;storageAccountName&#39;))]&quot;,
...
&quot;AzureWebJobsDashboard&quot;: {
    &quot;value&quot;: &quot;[concat(&#39;DefaultEndpointsProtocol=https;AccountName=&#39;, parameters(&#39;storageAccountName&#39;), &#39;;AccountKey=&#39;, listKeys(variables(&#39;storageAccountId&#39;),&#39;2015-05-01-preview&#39;).key1)]&quot;,
    &quot;type&quot;: &quot;custom&quot;
},
&lt;/pre&gt;So this next one is a bit cheating, but it is presently the only way to make it happen (for now).  I will dive more into this later.&lt;br /&gt;
&lt;pre class=&quot;brush: javascript;html-script: false; ruler: true; toolbar: false;&quot; title=&quot;Service Bus Connection String:&quot;&gt;&quot;AzureWebJobsServiceBus&quot;: {
    &quot;value&quot;: &quot;[parameters(&#39;serviceBusConnectionString&#39;)]&quot;,
    &quot;type&quot;: &quot;custom&quot;
},
&lt;/pre&gt;&lt;pre class=&quot;brush: javascript;html-script: false; ruler: true; toolbar: false;&quot; title=&quot;DocumentDb Connection String:&quot;&gt;&quot;WebDocDb&quot;: {
    &quot;value&quot;: &quot;[concat(&#39;AccountEndpoint=&#39;, reference(concat(&#39;Microsoft.DocumentDb/databaseAccounts/&#39;, parameters(&#39;databaseName&#39;))).documentEndpoint, &#39;;AccountKey=&#39;, listKeys(resourceId(&#39;Microsoft.DocumentDb/databaseAccounts&#39;, parameters(&#39;databaseName&#39;)), &#39;2015-04-08&#39;).primaryMasterKey, &#39;;&#39;)]&quot;,
    &quot;type&quot;: &quot;custom&quot;
},
&lt;/pre&gt;&lt;pre class=&quot;brush: javascript;html-script: false; ruler: true; toolbar: false;&quot; title=&quot;Redis Connection String:&quot;&gt;&quot;RedisCache&quot;: {
    &quot;value&quot;: &quot;[listKeys(resourceId(&#39;Microsoft.Cache/Redis&#39;, parameters(&#39;redisName&#39;)), &#39;2014-04-01&#39;).primaryKey]&quot;,
    &quot;type&quot;: &quot;custom&quot;
}
&lt;/pre&gt;&lt;br /&gt;
&lt;h4&gt;Web App With Staging Slot&lt;/h4&gt;Here is a good example of how to create a web application with a staging slot both containing the correct connection strings.&lt;br /&gt;
&lt;pre class=&quot;brush: javascript;html-script: false; ruler: true; toolbar: false;&quot; title=&quot;Web Application With Staging Slot:&quot;&gt;&quot;variables&quot;: {
    &quot;siteNameStage&quot;: &quot;[concat(parameters(&#39;siteName&#39;),&#39;stage&#39;)]&quot;,
    &quot;databaseNameStage&quot;: &quot;[concat(parameters(&#39;databaseName&#39;),&#39;stage&#39;)]&quot;,

    &quot;storageAccountId&quot;: &quot;[concat(&#39;/subscriptions/&#39;,subscription().subscriptionId,&#39;/resourceGroups/&#39;,resourceGroup().name,&#39;/providers/&#39;,&#39;Microsoft.Storage/storageAccounts/&#39;, parameters(&#39;storageAccountName&#39;))]&quot;,
    &quot;storageAccountIdStage&quot;: &quot;[concat(&#39;/subscriptions/&#39;,subscription().subscriptionId,&#39;/resourceGroups/&#39;,resourceGroup().name,&#39;/providers/&#39;,&#39;Microsoft.Storage/storageAccounts/&#39;, variables(&#39;storageAccountNameStage&#39;))]&quot;,

    &quot;storageAccountNameStage&quot;: &quot;[concat(parameters(&#39;storageAccountName&#39;),&#39;stage&#39;)]&quot;
},
&quot;resources&quot;: [

...

    /*** Web App ***/
    {
      &quot;apiVersion&quot;: &quot;2015-06-01&quot;,
      &quot;name&quot;: &quot;[parameters(&#39;siteName&#39;)]&quot;,
      &quot;type&quot;: &quot;Microsoft.Web/Sites&quot;,
      &quot;location&quot;: &quot;[parameters(&#39;siteLocation&#39;)]&quot;,
      &quot;dependsOn&quot;: [ &quot;[concat(&#39;Microsoft.Web/serverFarms/&#39;, parameters(&#39;hostingPlanName&#39;))]&quot; ],
      &quot;tags&quot;: {
        &quot;[concat(&#39;hidden-related:&#39;, resourceGroup().id, &#39;/providers/Microsoft.Web/serverfarms/&#39;, parameters(&#39;hostingPlanName&#39;))]&quot;: &quot;empty&quot;
      },
      &quot;properties&quot;: {
        &quot;name&quot;: &quot;[parameters(&#39;siteName&#39;)]&quot;,
        &quot;serverFarmId&quot;: &quot;[parameters(&#39;hostingPlanName&#39;)]&quot;
      },
      &quot;resources&quot;: [
        {
          &quot;apiVersion&quot;: &quot;2014-11-01&quot;,
          &quot;type&quot;: &quot;config&quot;,
          &quot;name&quot;: &quot;connectionstrings&quot;,
          &quot;dependsOn&quot;: [
            &quot;[concat(&#39;Microsoft.Web/Sites/&#39;, parameters(&#39;siteName&#39;))]&quot;,
            &quot;[resourceId(&#39;Microsoft.Sql/servers&#39;, parameters(&#39;serverName&#39;))]&quot;,
            &quot;[resourceId(&#39;Microsoft.Cache/Redis&#39;, parameters(&#39;redisName&#39;))]&quot;
          ],
          &quot;properties&quot;: {
            &quot;DefaultConnection&quot;: {
              &quot;value&quot;: &quot;[concat(&#39;Data Source=tcp:&#39;, reference(concat(&#39;Microsoft.Sql/servers/&#39;, parameters(&#39;serverName&#39;))).fullyQualifiedDomainName, &#39;,1433;Initial Catalog=&#39;, parameters(&#39;databaseName&#39;), &#39;;User Id=&#39;, parameters(&#39;administratorLogin&#39;), &#39;@&#39;, parameters(&#39;serverName&#39;), &#39;;Password=&#39;, parameters(&#39;administratorLoginPassword&#39;), &#39;;&#39;)]&quot;,
              &quot;type&quot;: &quot;SQLAzure&quot;
            },
            &quot;AzureWebJobsDashboard&quot;: {
              &quot;value&quot;: &quot;[concat(&#39;DefaultEndpointsProtocol=https;AccountName=&#39;, parameters(&#39;storageAccountName&#39;), &#39;;AccountKey=&#39;, listKeys(variables(&#39;storageAccountId&#39;),&#39;2015-05-01-preview&#39;).key1)]&quot;,
              &quot;type&quot;: &quot;custom&quot;
            },
            &quot;AzureWebJobsStorage&quot;: {
              &quot;value&quot;: &quot;[concat(&#39;DefaultEndpointsProtocol=https;AccountName=&#39;, parameters(&#39;storageAccountName&#39;), &#39;;AccountKey=&#39;, listKeys(variables(&#39;storageAccountId&#39;),&#39;2015-05-01-preview&#39;).key1)]&quot;,
              &quot;type&quot;: &quot;custom&quot;
            },
            &quot;AzureWebJobsServiceBus&quot;: {
              &quot;value&quot;: &quot;[parameters(&#39;serviceBusConnectionString&#39;)]&quot;,
              &quot;type&quot;: &quot;custom&quot;
            },
            &quot;WebDocDb&quot;: {
              &quot;value&quot;: &quot;[concat(&#39;AccountEndpoint=&#39;, reference(concat(&#39;Microsoft.DocumentDb/databaseAccounts/&#39;, parameters(&#39;databaseName&#39;))).documentEndpoint, &#39;;AccountKey=&#39;, listKeys(resourceId(&#39;Microsoft.DocumentDb/databaseAccounts&#39;, parameters(&#39;databaseName&#39;)), &#39;2015-04-08&#39;).primaryMasterKey, &#39;;&#39;)]&quot;,
              &quot;type&quot;: &quot;custom&quot;
            },
            &quot;RedisCache&quot;: {
              &quot;value&quot;: &quot;[listKeys(resourceId(&#39;Microsoft.Cache/Redis&#39;, parameters(&#39;redisName&#39;)), &#39;2014-04-01&#39;).primaryKey]&quot;,
              &quot;type&quot;: &quot;custom&quot;
            }
          }
        },
        {
          &quot;apiVersion&quot;: &quot;2015-04-01&quot;,
          &quot;name&quot;: &quot;appsettings&quot;,
          &quot;type&quot;: &quot;config&quot;,
          &quot;dependsOn&quot;: [
            &quot;[concat(&#39;Microsoft.Web/Sites/&#39;, parameters(&#39;siteName&#39;))]&quot;
          ],
          &quot;properties&quot;: {
            &quot;Demo:Environment&quot;: &quot;PROD&quot;,
            &quot;Test:Environment&quot;: &quot;&quot;
          }
        },
        {
          &quot;apiVersion&quot;: &quot;2014-11-01&quot;,
          &quot;name&quot;: &quot;slotconfignames&quot;,
          &quot;type&quot;: &quot;config&quot;,
          &quot;dependsOn&quot;: [
            &quot;[resourceId(&#39;Microsoft.Web/Sites&#39;, parameters(&#39;siteName&#39;))]&quot;
          ],
          &quot;properties&quot;: {
            &quot;connectionStringNames&quot;: [ &quot;DefaultConnection&quot;, &quot;AzureWebJobsDashboard&quot;, &quot;AzureWebJobsStorage&quot;, &quot;AzureWebJobsServiceBus&quot;, &quot;WebDocDb&quot;, &quot;RedisCache&quot; ],
            &quot;appSettingNames&quot;: [ &quot;Demo:Environment&quot;, &quot;Test:Environment&quot; ]
          }
        },
    
        /*** Web App STAGING SLOT ***/
        {
          &quot;apiVersion&quot;: &quot;2015-04-01&quot;,
          &quot;name&quot;: &quot;Staging&quot;,
          &quot;type&quot;: &quot;slots&quot;,
          &quot;location&quot;: &quot;[parameters(&#39;siteLocation&#39;)]&quot;,
          &quot;dependsOn&quot;: [
            &quot;[resourceId(&#39;Microsoft.Web/Sites&#39;, parameters(&#39;siteName&#39;))]&quot;
          ],
          &quot;properties&quot;: {
          },
          &quot;resources&quot;: [
            {
              &quot;apiVersion&quot;: &quot;2014-11-01&quot;,
              &quot;type&quot;: &quot;config&quot;,
              &quot;name&quot;: &quot;connectionstrings&quot;,
              &quot;dependsOn&quot;: [
                &quot;[resourceId(&#39;Microsoft.Web/Sites/slots&#39;, parameters(&#39;siteName&#39;), &#39;Staging&#39;)]&quot;,
                &quot;[resourceId(&#39;Microsoft.Sql/servers&#39;, parameters(&#39;serverName&#39;))]&quot;,
                &quot;[resourceId(&#39;Microsoft.Cache/Redis&#39;, parameters(&#39;redisName&#39;))]&quot;
              ],
              &quot;properties&quot;: {
                &quot;DefaultConnection&quot;: {
                  &quot;value&quot;: &quot;[concat(&#39;Data Source=tcp:&#39;, reference(concat(&#39;Microsoft.Sql/servers/&#39;, parameters(&#39;serverName&#39;))).fullyQualifiedDomainName, &#39;,1433;Initial Catalog=&#39;, variables(&#39;databaseNameStage&#39;), &#39;;User Id=&#39;, parameters(&#39;administratorLogin&#39;), &#39;@&#39;, parameters(&#39;serverName&#39;), &#39;;Password=&#39;, parameters(&#39;administratorLoginPassword&#39;), &#39;;&#39;)]&quot;,
                  &quot;type&quot;: &quot;SQLAzure&quot;
                },
                &quot;AzureWebJobsDashboard&quot;: {
                  &quot;value&quot;: &quot;[concat(&#39;DefaultEndpointsProtocol=https;AccountName=&#39;, variables(&#39;storageAccountNameStage&#39;), &#39;;AccountKey=&#39;, listKeys(variables(&#39;storageAccountIdStage&#39;),&#39;2015-05-01-preview&#39;).key1)]&quot;,
                  &quot;type&quot;: &quot;custom&quot;
                },
                &quot;AzureWebJobsStorage&quot;: {
                  &quot;value&quot;: &quot;[concat(&#39;DefaultEndpointsProtocol=https;AccountName=&#39;, variables(&#39;storageAccountNameStage&#39;), &#39;;AccountKey=&#39;, listKeys(variables(&#39;storageAccountIdStage&#39;),&#39;2015-05-01-preview&#39;).key1)]&quot;,
                  &quot;type&quot;: &quot;custom&quot;
                },
                &quot;AzureWebJobsServiceBus&quot;: {
                  &quot;value&quot;: &quot;[parameters(&#39;serviceBusConnectionStringStage&#39;)]&quot;,
                  &quot;type&quot;: &quot;custom&quot;
                },
                &quot;WebDocDb&quot;: {
                  &quot;value&quot;: &quot;[concat(&#39;AccountEndpoint=&#39;, reference(concat(&#39;Microsoft.DocumentDb/databaseAccounts/&#39;, variables(&#39;databaseNameStage&#39;))).documentEndpoint, &#39;;AccountKey=&#39;, listKeys(resourceId(&#39;Microsoft.DocumentDb/databaseAccounts&#39;, variables(&#39;databaseNameStage&#39;)), &#39;2015-04-08&#39;).primaryMasterKey, &#39;;&#39;)]&quot;,
                  &quot;type&quot;: &quot;custom&quot;
                },
                &quot;RedisCache&quot;: {
                  &quot;value&quot;: &quot;[listKeys(resourceId(&#39;Microsoft.Cache/Redis&#39;, parameters(&#39;redisName&#39;)), &#39;2014-04-01&#39;).primaryKey]&quot;,
                  &quot;type&quot;: &quot;custom&quot;
                }
              }
            },
            {
              &quot;apiVersion&quot;: &quot;2015-04-01&quot;,
              &quot;name&quot;: &quot;appsettings&quot;,
              &quot;type&quot;: &quot;config&quot;,
              &quot;dependsOn&quot;: [
                &quot;[resourceId(&#39;Microsoft.Web/Sites/slots&#39;, parameters(&#39;siteName&#39;), &#39;Staging&#39;)]&quot;
              ],
              &quot;properties&quot;: {
                &quot;Demo:Environment&quot;: &quot;TEST&quot;,
                &quot;Test:Environment&quot;: &quot;TEST&quot;
              }
            }
          ]
        }
      ]
    },

...

&lt;/pre&gt;That is a lot of JSON, but very useful.&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;Service Buses&lt;/h4&gt;Services buses don&#39;t seem to be receiving the love that other Azure resources have received, but it doesn&#39;t make them any less useful.&lt;br /&gt;
&lt;br /&gt;
The trick to using/maintaining Service Buses is to not use the Resource Manager template.  Basically, you can use a Powershell script to create the Service Bus(es), grab the connection string(s), and then pass the connection string into the ARM template deployment as a parameter.&lt;br /&gt;
&lt;pre class=&quot;brush: javascript;html-script: false; ruler: true; toolbar: false;&quot; title=&quot;Create Service Bus Queue:&quot;&gt;function Create-AzureServiceBusQueue($Namespace, $Location) {
 # Query to see if the namespace currently exists
 $CurrentNamespace = Get-AzureSBNamespace -Name $Namespace;

 # Check if the namespace already exists or needs to be created
 if ($CurrentNamespace)
 {
  Write-Host &quot;The namespace [$Namespace] already exists in the [$($CurrentNamespace.Region)] region.&quot;;
 }
 else
 {
  Write-Host &quot;The [$Namespace] namespace does not exist.&quot;;
  Write-Host &quot;Creating the [$Namespace] namespace in the [$Location] region...&quot;;
  New-AzureSBNamespace -Name $Namespace -Location $Location -CreateACSNamespace $false -NamespaceType Messaging;
  $CurrentNamespace = Get-AzureSBNamespace -Name $Namespace;
  Write-Host &quot;The [$Namespace] namespace in the [$Location] region has been successfully created.&quot;;
 }
 return $CurrentNamespace.ConnectionString;
}
&lt;/pre&gt;You may want to dig a little deeper and this page MSDN page, &lt;a href=&quot;https://azure.microsoft.com/en-us/documentation/articles/service-bus-event-hubs-manage-with-ps/&quot;&gt;Use PowerShell to manage Service Bus and Event Hubs resources&lt;/a&gt;, is pretty useful.  &lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;Putting It Together&lt;/h4&gt;With the web application resource section in a template and the Service Bus(es) created via Powershell, how do we deploy the template to put it together? &lt;br /&gt;
&lt;pre class=&quot;brush: powershell;html-script: false; ruler: true; toolbar: false;&quot; title=&quot;Deploy the template:&quot;&gt;# Create the Services Buses
$serviceBusConnectionStrings = @{&quot;Prod&quot;=$(Create-AzureServiceBusQueue $ServiceBusName $ResourceGroupLocation);
     &quot;Stage&quot;=$(Create-AzureServiceBusQueue &quot;$($ServiceBusName)stage&quot; $ResourceGroupLocation);
     &quot;Dev&quot;=$(Create-AzureServiceBusQueue &quot;$($ServiceBusName)dev&quot; $ResourceGroupLocation);}

...

$rg = Get-AzureResourceGroup | ? { $_.ResourceGroupName -eq $ResourceGroupName };
if ($rg -eq $null) {
 # Create the Resource Group
 New-AzureResourceGroup -Name $ResourceGroupName -Location $ResourceGroupLocation;
}
# Start a Resource Group deployment
$results = New-AzureResourceGroupDeployment `
  -Name WebAppDeployment `
  -ResourceGroupName $ResourceGroupName `
  -TemplateFile $TemplateFile `
  -TemplateParameterFile $TemplateParameterFile `
  -storageAccountNameFromTemplate $DefaultStorage `
  -serviceBusConnectionString $($serviceBusConnectionStrings.Prod) `
  -serviceBusConnectionStringStage $($serviceBusConnectionStrings.Stage);
Write-Output $results;
Write-Output &quot;ServiceBus Prod: $($serviceBusConnectionStrings.Prod)&quot;;
Write-Output &quot;ServiceBus Stage: $($serviceBusConnectionStrings.Stage)&quot;;
Write-Output &quot;ServiceBus Dev: $($serviceBusConnectionStrings.Dev)&quot;;
&lt;/pre&gt;This will configure the web app and populate the correct connection strings on the correct slot.  Hopefully, Microsoft will add the capability to maintain Cloud Services and Service Buses soon, but until then, this will be helpful.</content><link rel='replies' type='application/atom+xml' href='http://intellectualponderings.blogspot.com/feeds/8016242939704308172/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3984543729645165078/8016242939704308172' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/8016242939704308172'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/8016242939704308172'/><link rel='alternate' type='text/html' href='http://intellectualponderings.blogspot.com/2015/08/azure-resource-manager-templates.html' title='Azure Resource Manager Templates, The Missing Parts'/><author><name>Brock</name><uri>http://www.blogger.com/profile/15594270479196950758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2P2oe5Hk6uT-uR1qtS8oRWOym3yVhJ0JBXIF8x2473HYdXG1wiGY0tsP1l31UNmCW_0ArboanBy174wQ1t1Wh8USssIcCMNjpjxNHdVsNXQRMwztbxT41_Sbh3GJRofw/s220/profile.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3984543729645165078.post-732845655180778044</id><published>2015-08-17T22:00:00.000-04:00</published><updated>2015-08-17T22:00:00.868-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AutoHotKey"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows"/><title type='text'>A Couple AutoHotKey Windows 10 Helpers</title><content type='html'>With Windows 10 comes a bunch of new features and shortcuts.  I have long been a fan of VirtuaWin, it&#39;s context menu driven virtual desktop paradigm is a bit of a hurdle, but it is easy to get used to.  Windows 10 brings the concept of virtual desktops to the masses.  It is pretty simplistic and has much room for improvement, but probably a good starting point.&lt;br /&gt;
&lt;br /&gt;
Here are a couple tweaks that make navigating multiple desktop with your mouse.&lt;br /&gt;
&lt;pre class=&quot;brush: text;html-script: false; ruler: true; toolbar: false;&quot;&gt;; Show Task View, Wheel/Middle click on desktop
#IfWinActive ahk_class Progman
MButton::sendevent {LWin down}{Tab down}{Tab up}{Lwin up}
Return
#IfWinActive

; Move to the desktop left of the current desktop
$WheelLeft::send ^#{Left}

; Move to the desktop right of the current desktop
$WheelRight::send ^#{Right}
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://intellectualponderings.blogspot.com/feeds/732845655180778044/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3984543729645165078/732845655180778044' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/732845655180778044'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/732845655180778044'/><link rel='alternate' type='text/html' href='http://intellectualponderings.blogspot.com/2015/08/a-couple-autohotkey-windows-10-helpers.html' title='A Couple AutoHotKey Windows 10 Helpers'/><author><name>Brock</name><uri>http://www.blogger.com/profile/15594270479196950758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2P2oe5Hk6uT-uR1qtS8oRWOym3yVhJ0JBXIF8x2473HYdXG1wiGY0tsP1l31UNmCW_0ArboanBy174wQ1t1Wh8USssIcCMNjpjxNHdVsNXQRMwztbxT41_Sbh3GJRofw/s220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3984543729645165078.post-2952972711917570507</id><published>2015-08-07T22:00:00.000-04:00</published><updated>2015-08-07T22:00:00.838-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Programming"/><category scheme="http://www.blogger.com/atom/ns#" term="R"/><title type='text'>R Create Data.Frame Like Read.Csv</title><content type='html'>In exploring using &lt;a href=&quot;https://rdotnet.codeplex.com/&quot;&gt;R.NET&lt;/a&gt; and &lt;a href=&quot;http://sourceforge.net/projects/rservelink/&quot;&gt;RserveLink&lt;/a&gt; inside of C#, I ran into a couple performance issues with my scenario.  In load balanced environments which will need to pull the random forests and the cached CSV data saving the files to a network share makes sense, but there is a cost.  My initial process was:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;In C#, load and prep the data.&lt;/li&gt;
&lt;li&gt;Serialize the data into CSV format and save to a network share.&lt;/li&gt;
&lt;li&gt;Use R.NET or RServeLink, send the below commands to pull the Random Forest and the CSV data and run the data through the Random Forest.&lt;/li&gt;
&lt;/ol&gt;Below is the proof of concept R code.  &lt;br /&gt;
&lt;pre class=&quot;brush: powershell;html-script: false; ruler: true; toolbar: false;&quot; title=&quot;CSV Data Source:&quot;&gt;library(&quot;randomForest&quot;)
library(&quot;caret&quot;)

mydata = read.csv(file=&quot;IntPonAllTheData.csv&quot;,head=TRUE,row.names=&quot;IntPonID&quot;)

test.predict &lt;- predict(readRDS(&#39;//intponsrv/Data/RandomForest/CLASS123.rf&#39;), mydata)
write.table(test.predict)
&lt;/pre&gt;
I was able to combine several of the lines, but it didn&#39;t improve the performance very much.  However, if I could remove 2 of the network and file I/O trips, that would greatly improve the performance.  The only question was, how do I create a data.frame in R that would produce the same object as &lt;code&gt;read.csv&lt;/code&gt;.  I inquired to the #R freenode channel (they are awesome, check them out and stay a while) and they suggested that I look into the &lt;code&gt;save&lt;/code&gt; function or &lt;code&gt;dputs&lt;/code&gt; function.  I was able to use &lt;code&gt;dputs&lt;/code&gt; and serialize the data.frame.  The format of the serialization wasn&#39;t an exact match, but it was close enough that I could figure out how the data.frame is structured relative to the CSV data.  

The following is my converted code which generates a data.frame directly.
&lt;pre class=&quot;brush: powershell;html-script: false; ruler: true; toolbar: false;&quot; title=&quot;Data.Frame Source:&quot;&gt;library(&quot;randomForest&quot;)
library(&quot;caret&quot;)

df &lt;- data.frame(Q1 = c(0.301775147928994,0.301775147928994,0.301775147928994,0.301775147928994),Q2 = c(0.301775147928994,0.301775147928994,0.301775147928994,0.301775147928994),Q2 = c(0.094674556213018,0.094674556213018,0.094674556213018,0.094674556213018),Q3 = c(0.301775147928994,0.301775147928994,0.301775147928994,0.301775147928994),Q4 = c(0.082840236686391,0.082840236686391,0.082840236686391,0.082840236686391),row.names = c(&quot;baseline&quot;,&quot;TEST1&quot;,&quot;TEST2&quot;,&quot;TEST3&quot;))
write.table(df)

test.predict &lt;- predict(readRDS(&#39;//intponsrv/Data/RandomForest/CLASS123.rf&#39;), df)
write.table(test.predict)
&lt;/pre&gt;
Instead of generating the CSV, I can generate the data.frame statement with the same result.  After integrating it with my C# code, this produced a 60-80% improvement in processing time per prediction, when repeatedly processing large data sets.  </content><link rel='replies' type='application/atom+xml' href='http://intellectualponderings.blogspot.com/feeds/2952972711917570507/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3984543729645165078/2952972711917570507' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/2952972711917570507'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/2952972711917570507'/><link rel='alternate' type='text/html' href='http://intellectualponderings.blogspot.com/2015/08/r-create-dataframe-like-readcsv.html' title='R Create Data.Frame Like Read.Csv'/><author><name>Brock</name><uri>http://www.blogger.com/profile/15594270479196950758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2P2oe5Hk6uT-uR1qtS8oRWOym3yVhJ0JBXIF8x2473HYdXG1wiGY0tsP1l31UNmCW_0ArboanBy174wQ1t1Wh8USssIcCMNjpjxNHdVsNXQRMwztbxT41_Sbh3GJRofw/s220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3984543729645165078.post-4076417037094463677</id><published>2015-07-24T22:00:00.000-04:00</published><updated>2015-07-24T22:00:00.787-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".Net"/><category scheme="http://www.blogger.com/atom/ns#" term="R"/><category scheme="http://www.blogger.com/atom/ns#" term="Rserve"/><title type='text'>RserveLink Eval Failed Even When Successful</title><content type='html'>I have been playing with &lt;a href=&quot;http://sourceforge.net/projects/rservelink/&quot;&gt;RserveLink&lt;/a&gt; and Rserve recently and found that it worked very well, except in one case (which is not really a fringe case) where it reliably returns an &quot;Eval Failed&quot; exception when the command actually succeeded.  I was able to run the command in &lt;a href=&quot;http://www.rstudio.com/&quot;&gt;RStudio&lt;/a&gt; (Awesome R IDE) and RGUI successfully.  &lt;br /&gt;
&lt;br /&gt;
I am not going to include the R statement that generated the issue because it is large, but suffice it to say that it reliably works with much larger statements.&lt;br /&gt;
&lt;br /&gt;
The response we get for the 4th index is 0 and the library jumps over the if statement.  However, dragging the debug arrow onto the DataLength line and run the code, it continues without error.  &lt;br /&gt;
&lt;pre class=&quot;brush: csharp;html-script: false; ruler: true; toolbar: false;&quot; title=&quot;Original Code:&quot;&gt;if (response[4] != 0)
{
    Int32 DataLength = BitConverter.ToInt32(response, 4);
&lt;/pre&gt;I changed the section of code converting the code to the following.  Essentially, just getting the response data length and assume that a data length greater than 0 is successful.  &lt;br /&gt;
&lt;pre class=&quot;brush: csharp;html-script: false; ruler: true; toolbar: false;&quot; title=&quot;Fixed Codee:&quot;&gt;Int32 DataLength = BitConverter.ToInt32(response, 4);
if (DataLength != 0)
{
&lt;/pre&gt;The original code was posted in a zip file on SourceForge and posted back in 2007.  I have emailed the author (awaiting reply) and posted my change on my &lt;a href=&quot;https://github.com/0xbrock/RserveLink&quot;&gt;RserveLink&lt;/a&gt; GitHub repository.  The binary library targeting 4.0 Client and 4.5.1 can be found in the &lt;a href=&quot;https://github.com/0xbrock/RserveLink/releases/tag/v0.1.0.0&quot;&gt;releases&lt;/a&gt; section.&lt;br /&gt;
&lt;br /&gt;
I have also published an &lt;a href=&quot;https://www.nuget.org/packages/RserveLink/&quot;&gt;RserveLink Nuget package&lt;/a&gt; for ease of adding to .Net projects.  </content><link rel='replies' type='application/atom+xml' href='http://intellectualponderings.blogspot.com/feeds/4076417037094463677/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3984543729645165078/4076417037094463677' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/4076417037094463677'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/4076417037094463677'/><link rel='alternate' type='text/html' href='http://intellectualponderings.blogspot.com/2015/07/rservelink-eval-failed-even-when.html' title='RserveLink Eval Failed Even When Successful'/><author><name>Brock</name><uri>http://www.blogger.com/profile/15594270479196950758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2P2oe5Hk6uT-uR1qtS8oRWOym3yVhJ0JBXIF8x2473HYdXG1wiGY0tsP1l31UNmCW_0ArboanBy174wQ1t1Wh8USssIcCMNjpjxNHdVsNXQRMwztbxT41_Sbh3GJRofw/s220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3984543729645165078.post-609181978020457892</id><published>2015-07-11T22:00:00.000-04:00</published><updated>2015-07-11T22:00:00.529-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AngularJS"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><title type='text'>AngularJS UTC to Local Time Filter</title><content type='html'>In a previous post I detailed how to to implement the &lt;a href=&quot;http://intellectualponderings.blogspot.com/2015/07/javascript-utc-to-local-time-for-display.html&quot;&gt;UTC time to local time conversion in Vanilla JS&lt;/a&gt;.  Now let&#39;s take it a step further and utilize it in an &lt;a href=&quot;https://angularjs.org/&quot;&gt;AngularJS&lt;/a&gt; application.  The best path forward will be to create a filter which will format the string being rendered.  The end result will allow us to do something like the following:&lt;br /&gt;
&lt;pre class=&quot;brush: html;html-script: false; ruler: true; toolbar: false; highlight: [8, 9, 13]&quot; title=&quot;AngularJS Filter Example:&quot;&gt;&amp;lt;div class=&quot;row&quot; ng-repeat=&quot;time in viewModel.times&quot;&amp;gt;
  &amp;lt;div class=&quot;col-md-6&quot;&amp;gt;
    &amp;lt;time datetime=&quot;{{time}}&quot;&amp;gt;{{ time | utctolocal }}&amp;lt;/time&amp;gt;
  &amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/pre&gt;Basic usage is thus: create the filter, add the script tag to load the filter, add the module to be a dependency on the app.  &lt;br /&gt;
&lt;pre class=&quot;brush: javascript;html-script: true; ruler: true; toolbar: false;&quot; title=&quot;AngularJS Filter Source:&quot;&gt;angular.module(&#39;intPonfilters&#39;, [])
 .filter(&#39;utctolocal&#39;, function () {

 var LeadingZero = function (val) {
  return (val &lt; 10) ? &quot;0&quot; + val : val;
 },
 ToDateString = function (dateObj, dateFormat) {
  var curr_year = dateObj.getFullYear(),
   curr_month = LeadingZero(dateObj.getMonth() + 1),
   curr_date = LeadingZero(dateObj.getDate()),
   curr_hour = LeadingZero(dateObj.getHours()),
   curr_min = LeadingZero(dateObj.getMinutes()),
   curr_sec = LeadingZero(dateObj.getSeconds()),
   curr_ampm = &quot;AM&quot;;
  if (curr_hour &gt; 11) {
   curr_ampm = &quot;PM&quot;;
   curr_hour = (curr_hour == 12) ? 12 : curr_hour - 12;
  }
    var timestamp = curr_year + &quot;-&quot; + curr_month + &quot;-&quot; + curr_date + &quot; &quot; + curr_hour + &quot;:&quot; + curr_min + &quot;:&quot; + curr_sec + &quot; &quot; + curr_ampm + &quot; &quot; + LocalTimeZone();
  return timestamp;
 },
  LocalTimeZone = function() {
    // From http://stackoverflow.com/questions/2897478/get-client-timezone-not-gmt-offset-amount-in-js
    var now = new Date().toString(),
        timezone = now.indexOf(&#39;(&#39;) &gt; -1 ?
          //now.match(/\([^\)]+\)/)[0] :  // Uncomment this line to return the full time zone text
          now.match(/\([^\)]+\)/)[0].match(/[A-Z]/g).join(&#39;&#39;) :  // Uncomment this line to return the full time zone abbreviation
          now.match(/[A-Z]{3,4}/)[0];
    if (timezone == &quot;GMT&quot; &amp;&amp; /(GMT\W*\d{4})/.test(now))
      timezone = RegExp.$1;
    return timezone;
  };

 return function (input) {
  var inputDate = new Date(input);
  var dateString = ToDateString(inputDate);
  return dateString;
 };
});

&lt;/pre&gt;&lt;br /&gt;
An example can be found in my &lt;a href=&quot;https://github.com/0xbrock/UTCtoLocalAngularJS&quot;&gt;UTCtoLocalAngularJS&lt;/a&gt; GitHub repository.&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://intellectualponderings.blogspot.com/feeds/609181978020457892/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3984543729645165078/609181978020457892' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/609181978020457892'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/609181978020457892'/><link rel='alternate' type='text/html' href='http://intellectualponderings.blogspot.com/2015/07/angularjs-utc-to-local-time-filter.html' title='AngularJS UTC to Local Time Filter'/><author><name>Brock</name><uri>http://www.blogger.com/profile/15594270479196950758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2P2oe5Hk6uT-uR1qtS8oRWOym3yVhJ0JBXIF8x2473HYdXG1wiGY0tsP1l31UNmCW_0ArboanBy174wQ1t1Wh8USssIcCMNjpjxNHdVsNXQRMwztbxT41_Sbh3GJRofw/s220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3984543729645165078.post-5278054920896857535</id><published>2015-07-04T22:00:00.000-04:00</published><updated>2015-07-04T22:00:00.265-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><title type='text'>Javascript UTC to Local Time for Display</title><content type='html'>If you are developing an application which will only be used by a people in one timezone, then DateTime.Now with the current time zone will work for you.  This is a rather short sighted.  As the userbase grows, users will have to translate the dates manually.  Additionally, if you have migrate the application to servers in different locations which have a different time zone set or a time zone that you can&#39;t control, the date and times generated will be off.  This is especially true when developing applications for the cloud (which by and large use UTC).  &lt;br /&gt;
&lt;br /&gt;
There are a couple options:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Have a setting per users which indicates the users timezone and convert the times on every view/page render&lt;/li&gt;
&lt;li&gt;Have the user&#39;s browser handle the conversion&lt;br /&gt;
&lt;li&gt;&lt;br /&gt;
&lt;/ol&gt;The former requires significantly more development, user interaction, and more processing time.  The latter requires a bit of HTML5 and javascript.  So let&#39;s see what it takes to do it in javascript.

There are javascript libraries like &lt;a href=&quot;http://momentjs.com/&quot;&gt;Moment.js&lt;/a&gt; which do this with potentially more robustness, but it is more than 12KB minified and gzipped.  If it can be done in 1-2KB&#39;s, why tote the rest around.  When page load times are so important, every kilobyte saved is time spent loading your page.  Lets say we want to render the following render the following HTML to the browser.
&lt;pre class=&quot;brush: xml;html-script: false; ruler: true; toolbar: false;&quot; title=&quot;HTML Source:&quot;&gt;&amp;lt;time datetime=&quot;@Html.DisplayFor(modelItem =&amp;gt; item.Created) UTC&quot;&amp;gt;
 @Html.DisplayFor(modelItem =&amp;gt; item.Created) UTC
&amp;lt;/time&amp;gt;
&lt;/pre&gt;We can iterate over all of the time elements and convert the UTC times and leverage javascript to translate the times to local with the following code.
&lt;pre class=&quot;brush: javascript;html-script: false; ruler: true; toolbar: false;&quot; title=&quot;Javascript Source:&quot;&gt;function UtcTimesToLocal() {
 $(&quot;time&quot;).each(function (index, element) {
  var el = $(element),
   time = el.attr(&quot;datetime&quot;),
   converted = new Date(time);
  var dateString = ToDateString(converted);
  el.text(dateString);
 });
}

function ToDateString(dateObj, dateFormat) {
 var curr_year = dateObj.getFullYear(),
  curr_month = LeadingZero(dateObj.getMonth() + 1),
  curr_date = LeadingZero(dateObj.getDate()),
  curr_hour = LeadingZero(dateObj.getHours()),
  curr_min = LeadingZero(dateObj.getMinutes()),
  curr_sec = LeadingZero(dateObj.getSeconds()),
  curr_ampm = &quot;AM&quot;;
 if (curr_hour &amp;gt; 11) {
  curr_ampm = &quot;PM&quot;;
  curr_hour = (curr_hour == 12) ? 12 : curr_hour - 12;
 }
 var timestamp = curr_year + &quot;-&quot; + curr_month + &quot;-&quot; + curr_date + &quot; &quot; + curr_hour + &quot;:&quot; + curr_min + &quot;:&quot; + curr_sec + &quot; &quot; + curr_ampm + &quot; &quot; + LocalTimeZone();
 return timestamp;
}

function LeadingZero(val) {
 return (val &amp;lt; 10) ? &quot;0&quot; + val : val;
}

function LocalTimeZone () {
  // From http://stackoverflow.com/questions/2897478/get-client-timezone-not-gmt-offset-amount-in-js
  var now = new Date().toString(),
      timezone = now.indexOf(&#39;(&#39;) &amp;gt; -1 ?
        //now.match(/\([^\)]+\)/)[0] :  // Uncomment this line to return the full time zone text
        now.match(/\([^\)]+\)/)[0].match(/[A-Z]/g).join(&#39;&#39;) :  // Uncomment this line to return the full time zone abbreviation
        now.match(/[A-Z]{3,4}/)[0];
  if (timezone == &quot;GMT&quot; &amp;&amp; /(GMT\W*\d{4})/.test(now))
    timezone = RegExp.$1;
  return timezone;
}
&lt;/pre&gt;Then at the bottom of the page, run the &lt;code&gt;UtcTimesToLocal&lt;/code&gt; function.
&lt;pre class=&quot;brush: xml;html-script: false; ruler: true; toolbar: false;&quot; title=&quot;Usage:&quot;&gt;&amp;lt;script&amp;gt;
 $(function() { UtcTimesToLocal(); });
&amp;lt;/script&amp;gt;
&lt;/pre&gt;
An example project can be found on my &lt;a href=&quot;https://github.com/0xbrock/UTCtoLocalJS&quot;&gt;UTCtoLocalJS&lt;/a&gt; GitHub repository.</content><link rel='replies' type='application/atom+xml' href='http://intellectualponderings.blogspot.com/feeds/5278054920896857535/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3984543729645165078/5278054920896857535' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/5278054920896857535'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/5278054920896857535'/><link rel='alternate' type='text/html' href='http://intellectualponderings.blogspot.com/2015/07/javascript-utc-to-local-time-for-display.html' title='Javascript UTC to Local Time for Display'/><author><name>Brock</name><uri>http://www.blogger.com/profile/15594270479196950758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2P2oe5Hk6uT-uR1qtS8oRWOym3yVhJ0JBXIF8x2473HYdXG1wiGY0tsP1l31UNmCW_0ArboanBy174wQ1t1Wh8USssIcCMNjpjxNHdVsNXQRMwztbxT41_Sbh3GJRofw/s220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3984543729645165078.post-8083432462286534116</id><published>2014-12-23T22:00:00.000-05:00</published><updated>2015-01-05T11:16:03.691-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="HTML"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><title type='text'>Javascript Client Side File Size Validation</title><content type='html'>When you attempt to upload a file that is larger than the web server will accept, it just stops processing.  It might be OK, but you don&#39;t have a way to be notified.  It would be nice to be able to do have something like the following code snippet.&lt;br /&gt;
&lt;pre class=&quot;brush: javascript;html-script: false; ruler: true; toolbar: false;&quot; title=&quot;Client Side File Size Validation:&quot;&gt;$(&quot;#editDialog form&quot;).submit(function( event ) {
    return validateFileSize(&#39;profile_image&#39;, 1024*1024*2, &#39;Profile Image&#39;, event);
});
&lt;/pre&gt;The solution is very simple with the HTML5 file reader functionality.  We can add some JavaScript to run before we attempt to send the bad files.  The following achieves the validation needed.  &lt;br /&gt;
&lt;pre class=&quot;brush: javascript;html-script: false; ruler: true; toolbar: false;&quot; title=&quot;Client Side File Size Validation:&quot;&gt;function validateFileSize(id, limit, label, event) {
    if (typeof FileReader !== &quot;undefined&quot; &amp;&amp; document.getElementById(id).files.length &gt; 0) {
        var size = document.getElementById(id).files[0].size;
        if (size &amp;gt; limit) {
            alert(label + &#39; is too large.  The file must be less than &#39; + formatSize(limit) + &#39;.&#39;);
            event.preventDefault();
            return false;
        }
    }
    return true;
}
&lt;/pre&gt;I am utilizing my JavaScript function from my previous post &lt;a href=&quot;http://intellectualponderings.blogspot.com/2011/09/javascript-format-file-size-truncate.html&quot;&gt;JavaScript Format File Size Truncate Decimals&lt;/a&gt;.  This allows me to format the file size very nicely.  &lt;br /&gt;
&lt;pre class=&quot;brush: javascript;html-script: false; ruler: true; toolbar: false;&quot; title=&quot;Format File Size:&quot;&gt;function formatSize(bytes, decimals) {
    if (!!!bytes) return &#39;n/a&#39;;
    var sizes = [&#39;Bytes&#39;, &#39;KB&#39;, &#39;MB&#39;, &#39;GB&#39;, &#39;TB&#39;],
        i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024))),
        decMult = Math.pow(10, decimals || 2);
    return (Math.round((bytes / Math.pow(1024, i)) * decMult)) / decMult + &#39; &#39; + sizes[i];
}
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://intellectualponderings.blogspot.com/feeds/8083432462286534116/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3984543729645165078/8083432462286534116' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/8083432462286534116'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/8083432462286534116'/><link rel='alternate' type='text/html' href='http://intellectualponderings.blogspot.com/2014/12/javascript-client-side-file-size.html' title='Javascript Client Side File Size Validation'/><author><name>Brock</name><uri>http://www.blogger.com/profile/15594270479196950758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2P2oe5Hk6uT-uR1qtS8oRWOym3yVhJ0JBXIF8x2473HYdXG1wiGY0tsP1l31UNmCW_0ArboanBy174wQ1t1Wh8USssIcCMNjpjxNHdVsNXQRMwztbxT41_Sbh3GJRofw/s220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3984543729645165078.post-3182767225120444686</id><published>2014-12-19T22:00:00.000-05:00</published><updated>2014-12-19T22:00:03.418-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".Net"/><category scheme="http://www.blogger.com/atom/ns#" term="Xamarin"/><category scheme="http://www.blogger.com/atom/ns#" term="Xamarin Forms"/><title type='text'>Checking For Network Reachabilty In Xamarin</title><content type='html'>Just ran into this little gem.  Everything that I found on how to detect network reachability in says that the following code should be used.&lt;br /&gt;
&lt;pre class=&quot;brush: powershell;html-script: false; ruler: true; toolbar: false;&quot; title=&quot;Source:&quot;&gt;await Network.IsReachable(url, new TimeSpan(NetworkTimeout))
&lt;/pre&gt;This worked on every iOS device I could get, except the most important device - the client&#39;s.  It works on iPhone 4s, 5, and 5s, also it worked on my iPad, but not the client&#39;s iPhone 5.  After much research and frustration, I started diving into the &lt;code&gt;Network.InternetConnectionStatus()&lt;/code&gt; function to see if that would be fruitful.  I tried the following: &lt;br /&gt;
&lt;pre class=&quot;brush: powershell;html-script: false; ruler: true; toolbar: false;&quot; title=&quot;Source:&quot;&gt;return !Network.InternetConnectionStatus().HasFlag(NetworkStatus.NotReachable);
&lt;/pre&gt;which naturally (for Xamarin) it is not reliable.  I ended up trying the following setup, which seemed to work for on my devices.&lt;br /&gt;
&lt;pre class=&quot;brush: powershell;html-script: false; ruler: true; toolbar: false;&quot; title=&quot;Source:&quot;&gt;var networkstatus = Network.InternetConnectionStatus();
return 
    networkstatus.HasFlag(NetworkStatus.ReachableViaWiFiNetwork) || 
    networkstatus.HasFlag(NetworkStatus.ReachableViaCarrierDataNetwork);
&lt;/pre&gt;After pushing the build out to the client, he was able to log in.  This way has some downsides, as it doesn&#39;t check to see if you can actually reach the site you want, but at least you can detect if there is network connectivity.  &lt;br /&gt;
&lt;br /&gt;
I would love to submit a bug, but I am not sure how to reliably recreate the issue.  It is little things like this that do not build my confidence in Xamarin.&lt;br /&gt;
&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://intellectualponderings.blogspot.com/feeds/3182767225120444686/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3984543729645165078/3182767225120444686' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/3182767225120444686'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/3182767225120444686'/><link rel='alternate' type='text/html' href='http://intellectualponderings.blogspot.com/2014/12/checking-for-network-reachabilty-in.html' title='Checking For Network Reachabilty In Xamarin'/><author><name>Brock</name><uri>http://www.blogger.com/profile/15594270479196950758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2P2oe5Hk6uT-uR1qtS8oRWOym3yVhJ0JBXIF8x2473HYdXG1wiGY0tsP1l31UNmCW_0ArboanBy174wQ1t1Wh8USssIcCMNjpjxNHdVsNXQRMwztbxT41_Sbh3GJRofw/s220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3984543729645165078.post-9088025913077289221</id><published>2014-12-17T22:00:00.000-05:00</published><updated>2014-12-17T22:00:03.532-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".Net"/><category scheme="http://www.blogger.com/atom/ns#" term="Xamarin"/><category scheme="http://www.blogger.com/atom/ns#" term="Xamarin Forms"/><title type='text'>Xamarin Forms Non-Native CheckBox</title><content type='html'>Having experience developing iOS applications, I know that there is no &quot;check box&quot; per say.  When I searched for a Xamarin Forms built in check box and was left with only an native implementation, this would have been acceptable, except that they were causing some significant performance issues/lag when a view containing the controls would be added to the navigation stack.&lt;br /&gt;
&lt;br /&gt;
In my last couple posts, I dove into creating non-native controls in Xamarin Forms.  I can build on that knowledge to build a Xamarin Forms checkbox hopefully improve performance.  This definitely renders a lot faster.&lt;br /&gt;
&lt;pre class=&quot;brush: xml;html-script: false; ruler: true; toolbar: false;&quot; title=&quot;Usage:&quot;&gt;&amp;lt;localcontrol:CheckBoxView Checked=&quot;{Binding SomeBooleanProperty}&quot; DefaultText=&quot;Check Box Text&quot; ReadOnly=&quot;true&quot; HorizontalOptions=&quot;FillAndExpand&quot; TextColor=&quot;#000000&quot; FontSize=&quot;12&quot; /&amp;gt;
&lt;/pre&gt;The source code...&lt;br /&gt;
&lt;pre class=&quot;brush: xml;html-script: false; ruler: true; toolbar: false;&quot; title=&quot;XAML:&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;
&amp;lt;ContentView xmlns=&quot;http://xamarin.com/schemas/2014/forms&quot;
       xmlns:x=&quot;http://schemas.microsoft.com/winfx/2009/xaml&quot;
       x:Class=&quot;IntPonApp.Controls.CheckBoxView&quot;&gt;

 &amp;lt;StackLayout x:Name=&quot;CheckBoxStack&quot; Orientation=&quot;Horizontal&quot;&gt;
  &amp;lt;StackLayout.GestureRecognizers&gt;
   &amp;lt;TapGestureRecognizer 
      Command=&quot;{Binding CheckCommand}&quot;
      CommandParameter=&quot;#&quot; /&gt;
  &amp;lt;/StackLayout.GestureRecognizers&gt;
  &amp;lt;Image x:Name=&quot;boxImage&quot; 
      Source=&quot;{Binding BoxImageSource}&quot; /&gt;
  &amp;lt;Label x:Name=&quot;textLabel&quot; 
      Text=&quot;{Binding Text}&quot; 
      LineBreakMode=&quot;WordWrap&quot; 
      XAlign=&quot;Center&quot; 
      HorizontalOptions=&quot;StartAndExpand&quot; 
      VerticalOptions=&quot;Center&quot; 
      TextColor=&quot;{Binding TextColor}&quot; 
      Font=&quot;{Binding Font}&quot; /&gt;
 &amp;lt;/StackLayout&gt;
 
&amp;lt;/ContentView&gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;pre class=&quot;brush: csharp;html-script: false; ruler: true; toolbar: false;&quot; title=&quot;View Code Behind:&quot;&gt;using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
using Xamarin.Forms.Labs;
using CustomControls;
using System.Diagnostics;
using System.Windows.Input;

namespace Check123Mobile.Controls
{
    public partial class CheckBoxView
    {
        #region Properties

        /// &amp;lt;summary&amp;gt;
        /// The width request in inches property.
        /// &amp;lt;/summary&amp;gt;
        public static readonly BindableProperty CheckedProperty =
            BindableProperty.Create&amp;lt;CheckBoxView, bool&amp;gt;(
                p =&amp;gt; p.Checked, false
                , propertyChanged: new BindableProperty.BindingPropertyChangedDelegate&amp;lt;bool&amp;gt;(
                    (BindableObject obj, bool oldPlaceHolderValue, bool newPlaceHolderValue) =&amp;gt;
                    {
                        var cbv = (CheckBoxView)obj;
                        cbv.BoxImageSource = cbv.GetCheckBoxImageSource();
                    })
                );

        protected static readonly BindableProperty BoxImageSourceProperty =
            BindableProperty.Create&amp;lt;CheckBoxView, ImageSource&amp;gt;(
                p =&amp;gt; p.BoxImageSource, null);

        /// &amp;lt;summary&amp;gt;
        /// The read only property.
        /// &amp;lt;/summary&amp;gt;
        public static readonly BindableProperty ReadOnlyProperty =
            BindableProperty.Create&amp;lt;CheckBoxView, bool&amp;gt;(
                p =&amp;gt; p.ReadOnly, false);

        /// &amp;lt;summary&amp;gt;
        /// The checked text property.
        /// &amp;lt;/summary&amp;gt;
        public static readonly BindableProperty CheckedTextProperty =
            BindableProperty.Create&amp;lt;CheckBoxView, string&amp;gt;(
                p =&amp;gt; p.CheckedText, string.Empty);

        /// &amp;lt;summary&amp;gt;
        /// The unchecked text property.
        /// &amp;lt;/summary&amp;gt;
        public static readonly BindableProperty UncheckedTextProperty =
            BindableProperty.Create&amp;lt;CheckBoxView, string&amp;gt;(
                p =&amp;gt; p.UncheckedText, string.Empty);

        /// &amp;lt;summary&amp;gt;
        /// The checked image property.
        /// &amp;lt;/summary&amp;gt;
        public static readonly BindableProperty CheckedImageProperty =
            BindableProperty.Create&amp;lt;CheckBoxView, string&amp;gt;(
                p =&amp;gt; p.CheckedImage, string.Empty);

        /// &amp;lt;summary&amp;gt;
        /// The unchecked image property.
        /// &amp;lt;/summary&amp;gt;
        public static readonly BindableProperty UncheckedImageProperty =
            BindableProperty.Create&amp;lt;CheckBoxView, string&amp;gt;(
                p =&amp;gt; p.UncheckedImage, string.Empty);

        /// &amp;lt;summary&amp;gt;
        /// The default text property.
        /// &amp;lt;/summary&amp;gt;
        public static readonly BindableProperty DefaultTextProperty =
            BindableProperty.Create&amp;lt;CheckBoxView, string&amp;gt;(
                p =&amp;gt; p.Text, string.Empty);

        /// &amp;lt;summary&amp;gt;
        /// Identifies the TextColor bindable property.
        /// &amp;lt;/summary&amp;gt;
        /// 
        /// &amp;lt;remarks/&amp;gt;
        public static readonly BindableProperty TextColorProperty =
            BindableProperty.Create&amp;lt;CheckBoxView, Color&amp;gt;(
                p =&amp;gt; p.TextColor, Color.Black);

        /// &amp;lt;summary&amp;gt;
        /// The font size property
        /// &amp;lt;/summary&amp;gt;
        public static readonly BindableProperty FontSizeProperty =
            BindableProperty.Create&amp;lt;CheckBoxView, double&amp;gt;(
                p =&amp;gt; p.FontSize, -1);

        /// &amp;lt;summary&amp;gt;
        /// The font name property.
        /// &amp;lt;/summary&amp;gt;
        public static readonly BindableProperty FontNameProperty =
            BindableProperty.Create&amp;lt;CheckBoxView, string&amp;gt;(
                p =&amp;gt; p.FontName, string.Empty);

        public static ImageSource CheckedImageSource { get; protected set; }

        public static ImageSource UncheckedImageSource { get; protected set; }

        /// &amp;lt;summary&amp;gt;
        /// The checked changed event.
        /// &amp;lt;/summary&amp;gt;
        public EventHandler&amp;lt;EventArgs&amp;lt;bool&amp;gt;&amp;gt; CheckedChanged;

        /// &amp;lt;summary&amp;gt;
        /// Gets or sets a value indicating whether the control is checked.
        /// &amp;lt;/summary&amp;gt;
        /// &amp;lt;value&amp;gt;The checked state.&amp;lt;/value&amp;gt;
        public bool Checked
        {
            get
            {
                return this.GetValue&amp;lt;bool&amp;gt;(CheckedProperty);
            }

            set
            {
                this.SetValue(CheckedProperty, value);
                var eventHandler = this.CheckedChanged;
                if (eventHandler != null)
                {
                    eventHandler.Invoke(this, value);
                }
            }
        }

        /// &amp;lt;summary&amp;gt;
        /// Gets or sets a value indicating whether the control is checked.
        /// &amp;lt;/summary&amp;gt;
        /// &amp;lt;value&amp;gt;The checked state.&amp;lt;/value&amp;gt;
        public bool ReadOnly
        {
            get
            {
                return this.GetValue&amp;lt;bool&amp;gt;(ReadOnlyProperty);
            }

            set
            {
                this.SetValue(ReadOnlyProperty, value);
            }
        }

        /// &amp;lt;summary&amp;gt;
        /// Gets or sets a value indicating the checked text.
        /// &amp;lt;/summary&amp;gt;
        /// &amp;lt;value&amp;gt;The checked state.&amp;lt;/value&amp;gt;
        /// &amp;lt;remarks&amp;gt;
        /// Overwrites the default text property if set when checkbox is checked.
        /// &amp;lt;/remarks&amp;gt;
        public string CheckedText
        {
            get
            {
                return this.GetValue&amp;lt;string&amp;gt;(CheckedTextProperty);
            }

            set
            {
                this.SetValue(CheckedTextProperty, value);
            }
        }

        /// &amp;lt;summary&amp;gt;
        /// Gets or sets a value indicating whether the control is checked.
        /// &amp;lt;/summary&amp;gt;
        /// &amp;lt;value&amp;gt;The checked state.&amp;lt;/value&amp;gt;
        /// &amp;lt;remarks&amp;gt;
        /// Overwrites the default text property if set when checkbox is checked.
        /// &amp;lt;/remarks&amp;gt;
        public string UncheckedText
        {
            get
            {
                return this.GetValue&amp;lt;string&amp;gt;(UncheckedTextProperty);
            }

            set
            {
                this.SetValue(UncheckedTextProperty, value);
            }
        }

        public ImageSource BoxImageSource
        {
            get
            {

                return this.GetValue&amp;lt;ImageSource&amp;gt;(BoxImageSourceProperty) ?? GetCheckBoxImageSource();
            }

            set
            {
                this.SetValue(BoxImageSourceProperty, value);
            }
        }

        /// &amp;lt;summary&amp;gt;
        /// Gets or sets a value indicating the checked text.
        /// &amp;lt;/summary&amp;gt;
        /// &amp;lt;value&amp;gt;The checked state.&amp;lt;/value&amp;gt;
        /// &amp;lt;remarks&amp;gt;
        /// Overwrites the default text property if set when checkbox is checked.
        /// &amp;lt;/remarks&amp;gt;
        public string CheckedImage
        {
            get
            {
                return this.GetValue&amp;lt;string&amp;gt;(CheckedImageProperty);
            }

            set
            {
                this.SetValue(CheckedImageProperty, value);
            }
        }

        /// &amp;lt;summary&amp;gt;
        /// Gets or sets a value indicating whether the control is checked.
        /// &amp;lt;/summary&amp;gt;
        /// &amp;lt;value&amp;gt;The checked state.&amp;lt;/value&amp;gt;
        /// &amp;lt;remarks&amp;gt;
        /// Overwrites the default text property if set when checkbox is checked.
        /// &amp;lt;/remarks&amp;gt;
        public string UncheckedImage
        {
            get
            {
                return this.GetValue&amp;lt;string&amp;gt;(UncheckedImageProperty);
            }

            set
            {
                this.SetValue(UncheckedImageProperty, value);
            }
        }

        /// &amp;lt;summary&amp;gt;
        /// Gets or sets the text.
        /// &amp;lt;/summary&amp;gt;
        public string DefaultText
        {
            get
            {
                return this.GetValue&amp;lt;string&amp;gt;(DefaultTextProperty);
            }

            set
            {
                this.SetValue(DefaultTextProperty, value);
            }
        }

        public Color TextColor
        {
            get
            {
                return this.GetValue&amp;lt;Color&amp;gt;(TextColorProperty);
            }

            set
            {
                this.SetValue(TextColorProperty, value);
            }
        }

        /// &amp;lt;summary&amp;gt;
        /// Gets or sets the size of the font.
        /// &amp;lt;/summary&amp;gt;
        /// &amp;lt;value&amp;gt;The size of the font.&amp;lt;/value&amp;gt;
        public double FontSize
        {
            get
            {
                return (double)GetValue(FontSizeProperty);
            }
            set
            {
                SetValue(FontSizeProperty, value);
            }
        }

        /// &amp;lt;summary&amp;gt;
        /// Gets or sets the name of the font.
        /// &amp;lt;/summary&amp;gt;
        /// &amp;lt;value&amp;gt;The name of the font.&amp;lt;/value&amp;gt;
        public string FontName
        {
            get
            {
                return (string)GetValue(FontNameProperty);
            }
            set
            {
                SetValue(FontNameProperty, value);
            }
        }

        public Font Font
        {
            get
            {
                return Font.SystemFontOfSize(FontSize);
            }
        }

        public string Text
        {
            get
            {
                return this.Checked
                    ? (string.IsNullOrEmpty(this.CheckedText) ? this.DefaultText : this.CheckedText)
                        : (string.IsNullOrEmpty(this.UncheckedText) ? this.DefaultText : this.UncheckedText);
            }
        }

        public ICommand CheckCommand { get; protected set; }

        #endregion Properties

        #region Constructor

        public CheckBoxView()
        {
            CheckCommand = new Command((object s) =&amp;gt;
                {
                    if (!ReadOnly)
                    {
                        Checked = !Checked;
                    }
                });
            InitializeComponent();
            LoadImages();
            CheckBoxStack.BindingContext = this;
            boxImage.BindingContext = this;
            textLabel.BindingContext = this;
        }

        #endregion Constructor
         
        #region Image Functions

        protected void LoadImages()
        {
            if (CheckedImageSource == null)
            {
                CheckedImageSource = ImageSource.FromResource(GetCheckedImage());
            }
            if (UncheckedImageSource == null)
            {
                UncheckedImageSource = ImageSource.FromResource(GetUncheckedImage());
            }
        }

        private ImageSource GetCheckBoxImageSource()
        {
            return this.Checked ? CheckedImageSource : UncheckedImageSource;
        }

        private string GetCheckBoxImage()
        {
            return this.Checked
                        ? GetCheckedImage()
                        : GetUncheckedImage();
        }

        private string GetCheckedImage()
        {
            return (string.IsNullOrEmpty(this.CheckedImage) ?
                            &quot;Check123Mobile.Resources.checked_checkbox.png&quot; :
                            this.CheckedImage);
        }

        private string GetUncheckedImage()
        {
            return (string.IsNullOrEmpty(this.UncheckedImage) ?
                            &quot;Check123Mobile.Resources.unchecked_checkbox.png&quot; :
                            this.UncheckedImage);
        }

        #endregion Image Functions
    }
}
&lt;/pre&gt;&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://intellectualponderings.blogspot.com/feeds/9088025913077289221/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3984543729645165078/9088025913077289221' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/9088025913077289221'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/9088025913077289221'/><link rel='alternate' type='text/html' href='http://intellectualponderings.blogspot.com/2014/12/xamarin-forms-non-native-checkbox.html' title='Xamarin Forms Non-Native CheckBox'/><author><name>Brock</name><uri>http://www.blogger.com/profile/15594270479196950758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2P2oe5Hk6uT-uR1qtS8oRWOym3yVhJ0JBXIF8x2473HYdXG1wiGY0tsP1l31UNmCW_0ArboanBy174wQ1t1Wh8USssIcCMNjpjxNHdVsNXQRMwztbxT41_Sbh3GJRofw/s220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3984543729645165078.post-1314257325417125540</id><published>2014-11-28T22:00:00.000-05:00</published><updated>2014-11-28T22:00:00.193-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="VPN"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows"/><title type='text'>Windows 7 IKEv2 VPN &quot;Verifying User and Password...&quot;</title><content type='html'>I VPN quite often and recently something changed on my old laptop running Windows 7 which prevented me from connecting.  I was able to connect using my laptop running Windows 8.  After some hunting I came across this &lt;a href=&quot;https://social.technet.microsoft.com/Forums/windows/en-US/32c5e5b5-b2a2-43d3-b702-9cd0c8ef2c67/windows-7-vpn-hangs-at-verifying-username-and-password?forum=w7itpronetworking&quot;&gt;TechNet thread&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
The fix ended up being very simple, but not intuitive.  &lt;br /&gt;
&lt;ol&gt;&lt;li&gt;View your network adaptors by going to Control Panel &gt; Network and Internet &gt; Network Connection&lt;/li&gt;
&lt;li&gt;Right-click on the offending VPN adapter and click Properties&lt;/li&gt;
&lt;li&gt;Click on the Security tab&lt;/li&gt;
&lt;li&gt;Change the &quot;Type of VPN&quot; value from IKEv2 to Point to Point Tunneling Protocol (PPTP)&lt;/li&gt;
&lt;li&gt;Click OK&lt;/li&gt;
&lt;/ol&gt;From the thread:&lt;br /&gt;
&lt;blockquote&gt;It seems that when this property is set to Automatic the WAN Miniport defaults to IKEv2 (and gets stuck if this is not the VPN type used).&lt;br /&gt;
&lt;/blockquote&gt;Translated: it is a feature not a bug.  &lt;br /&gt;
&lt;br /&gt;
Now attempt to connect again.  Short of other issues, it will connect successfully.</content><link rel='replies' type='application/atom+xml' href='http://intellectualponderings.blogspot.com/feeds/1314257325417125540/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3984543729645165078/1314257325417125540' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/1314257325417125540'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/1314257325417125540'/><link rel='alternate' type='text/html' href='http://intellectualponderings.blogspot.com/2014/11/windows-7-ikev2-vpn-verifying-user-and.html' title='Windows 7 IKEv2 VPN &quot;Verifying User and Password...&quot;'/><author><name>Brock</name><uri>http://www.blogger.com/profile/15594270479196950758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2P2oe5Hk6uT-uR1qtS8oRWOym3yVhJ0JBXIF8x2473HYdXG1wiGY0tsP1l31UNmCW_0ArboanBy174wQ1t1Wh8USssIcCMNjpjxNHdVsNXQRMwztbxT41_Sbh3GJRofw/s220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3984543729645165078.post-5655988172951638724</id><published>2014-11-20T22:00:00.000-05:00</published><updated>2014-11-20T22:00:03.759-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="git"/><title type='text'>Git Filter-Branch Saves The Day Again</title><content type='html'>&lt;h3&gt;Disclaimer&lt;/h3&gt;You can really mess things up, make sure you back up your files/repositories before you wield this axe.  &lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;Removing a large file from a Git repository&lt;/h3&gt;Recently I committed and pushed a commit to my remote repository.  The push took an unusually long time.  Looking at the commit, I discovered that I had committed/pushed a vagrant box into the repository.  Doh!  Now the repository was ~500MB.  Here is what I did to clean up the repository and remove the large file.  &lt;br /&gt;
&lt;br /&gt;
I can&#39;t remember where I found this command (I may have assembled it from many locations).  It is supposed to remove all references and the file from the repository.&lt;br /&gt;
&lt;pre class=&quot;brush: bash;html-script: false; ruler: true; toolbar: false&quot; title=&quot;Clean the Tree:&quot;&gt;git filter-branch --prune-empty -d /dev/shm/scratch --index-filter &quot;git rm --cached -f --ignore-unmatch ubuntu-precise32-intpon.box&quot; --tag-name-filter cat -- --all
&lt;/pre&gt;This seemed to clean up the git tree, but didn&#39;t actually remove the file from the repository.  So, on we go...&lt;br /&gt;
&lt;br /&gt;
I ran across an Atlassian page which detailed several new steps to &lt;a href=&quot;https://confluence.atlassian.com/display/BITBUCKET/Maintaining+a+Git+Repository&quot;&gt;remove a large file&lt;/a&gt;.  I skipped the first 3 steps because the above command seemed to do the same thing.&lt;br /&gt;
&lt;br /&gt;
The next step was to prune all of the reflog references from now on back.&lt;br /&gt;
&lt;pre class=&quot;brush: bash;html-script: false; ruler: true; toolbar: false&quot; title=&quot;Reflog:&quot;&gt;git reflog expire --expire=now --all&lt;/pre&gt;&lt;br /&gt;
Then repack the repository by running the garbage collector and pruning old objects.&lt;br /&gt;
&lt;pre class=&quot;brush: bash;html-script: false; ruler: true; toolbar: false&quot; title=&quot;Prune:&quot;&gt;git gc --prune=now&lt;/pre&gt;&lt;br /&gt;
Finally, push all your changes back to the remote repository.&lt;br /&gt;
&lt;pre class=&quot;brush: bash;html-script: false; ruler: true; toolbar: false&quot; title=&quot;Push:&quot;&gt;git push origin master --force&lt;/pre&gt;&lt;br /&gt;
Looking at my repository, it was back at ~45MB.  I can pretend it never happened and life is good again.  As long as I don&#39;t tell anyone about it.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;Changing the author information&lt;/h3&gt;If you are committing to a public repository, you may not want your private email address exposed to the world.  &lt;a href=&quot;https://help.github.com/articles/changing-author-info/&quot;&gt;GitHub&#39;s change author info&lt;/a&gt; page has an excellent script that can fix that issue if you accidentally commit with the wrong email address.  In case the page changes or disappears, here is the script:&lt;br /&gt;
&lt;pre class=&quot;brush: bash;html-script: false; ruler: true; toolbar: false&quot; title=&quot;Fix Author Email:&quot;&gt;#!/bin/sh
 
git filter-branch --env-filter &#39;
 
OLD_EMAIL=&quot;your-old-email@example.com&quot;
CORRECT_NAME=&quot;Your Correct Name&quot;
CORRECT_EMAIL=&quot;your-correct-email@example.com&quot;
 
if [ &quot;$GIT_COMMITTER_EMAIL&quot; = &quot;$OLD_EMAIL&quot; ]
then
export GIT_COMMITTER_NAME=&quot;$CORRECT_NAME&quot;
export GIT_COMMITTER_EMAIL=&quot;$CORRECT_EMAIL&quot;
fi
if [ &quot;$GIT_AUTHOR_EMAIL&quot; = &quot;$OLD_EMAIL&quot; ]
then
export GIT_AUTHOR_NAME=&quot;$CORRECT_NAME&quot;
export GIT_AUTHOR_EMAIL=&quot;$CORRECT_EMAIL&quot;
fi
&#39; --tag-name-filter cat -- --branches --tags
&lt;/pre&gt;Once it completes, you need to push the changes to the remote repository.&lt;br /&gt;
&lt;pre class=&quot;brush: bash;html-script: false; ruler: true; toolbar: false&quot; title=&quot;Force push new history to origin:&quot;&gt;git push --force --tags origin &#39;refs/heads/*&#39;
&lt;/pre&gt;Your email is now changed.  </content><link rel='replies' type='application/atom+xml' href='http://intellectualponderings.blogspot.com/feeds/5655988172951638724/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3984543729645165078/5655988172951638724' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/5655988172951638724'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/5655988172951638724'/><link rel='alternate' type='text/html' href='http://intellectualponderings.blogspot.com/2014/11/git-filter-branch-saves-day-again.html' title='Git Filter-Branch Saves The Day Again'/><author><name>Brock</name><uri>http://www.blogger.com/profile/15594270479196950758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2P2oe5Hk6uT-uR1qtS8oRWOym3yVhJ0JBXIF8x2473HYdXG1wiGY0tsP1l31UNmCW_0ArboanBy174wQ1t1Wh8USssIcCMNjpjxNHdVsNXQRMwztbxT41_Sbh3GJRofw/s220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3984543729645165078.post-986528644726012401</id><published>2014-10-21T22:00:00.000-04:00</published><updated>2014-10-21T22:00:00.915-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JUnit"/><category scheme="http://www.blogger.com/atom/ns#" term="XML"/><category scheme="http://www.blogger.com/atom/ns#" term="XSL"/><title type='text'>A JUnit XSL Transform For PHPUnit Logging</title><content type='html'>I recently worked on a PHP application with a PHPUnit test suite.  Not finding a good way to view the test run results, I settled on logging the output into JUnit format and then applied the style sheet to the XML file so that I can through the XML file into a browser.&lt;br /&gt;
&lt;pre class=&quot;brush: bash;html-script: false; ruler: true; toolbar: false;&quot; title=&quot;PHPUnit Execution and XML Update&quot;&gt;time phpunit --testsuite &quot;Application Test Suite&quot; --log-junit public/testresults.xml &amp; sed -i &#39;s/&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;/&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;\n&lt;?xml-stylesheet type=&quot;text\/xsl&quot; href=&quot;junit.xslt&quot;?&gt;/g&#39; public/testresults.xml
&lt;/pre&gt;Not sure why, but finding a decent transform for the JUnit output was more diffcult than expected.  I decided to extended an XSL transform in this StackOverflow &lt;a href=&quot;http://stackoverflow.com/questions/9470060/what-xslt-converts-junit-xml-format-to-junit-plain-format&quot;&gt;answer&lt;/a&gt;.  It is a pretty good start, plain text, but I can work with it.&lt;br /&gt;
&lt;br /&gt;
After applying Bootstrap styling, the end result is a pleasantly styled JUnit view in a browser.  For some reason, FireFox was not applying the bootstrap CSS file, so I just brought in the styles that I needed, thus the &lt;code&gt;style&lt;/code&gt; block.  &lt;br /&gt;
&lt;pre class=&quot;brush: xml;html-script: false; ruler: true; toolbar: false;&quot; title=&quot;Source:&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&amp;lt;xsl:stylesheet version=&quot;1.0&quot; xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot;&gt;
    &amp;lt;xsl:output method=&quot;html&quot; encoding=&quot;UTF-8&quot; indent=&quot;yes&quot;/&gt;

    &amp;lt;xsl:template match=&quot;/testsuites&quot;&gt;
        &amp;lt;!-- &amp;lt;xsl:text disable-output-escaping=&#39;yes&#39;&gt;&amp;amp;lt;!DOCTYPE html&gt;&amp;lt;/xsl:text&gt; --&gt;
        &amp;lt;html class=&quot;no-js&quot; lang=&quot;en&quot;&gt;
        &amp;lt;head&gt;
            &amp;lt;meta charset=&quot;utf-8&quot; /&gt;
            &amp;lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=edge&quot; /&gt;
            &amp;lt;title&gt;PHPUnit Test Results&amp;lt;/title&gt;
            &amp;lt;meta name=&quot;description&quot; content=&quot;&quot; /&gt;
            &amp;lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1&quot; /&gt;
            &amp;lt;!-- &amp;lt;link rel=&quot;stylesheet&quot; href=&quot;//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css&quot; /&gt; --&gt;
            &amp;lt;style&gt;
                html {
                  font-family: sans-serif;
                  -webkit-text-size-adjust: 100%;
                      -ms-text-size-adjust: 100%;
                  font-size: 10px;
                  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
                }
                body {
                  margin: 0;
                  font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;
                  font-size: 14px;
                  line-height: 1.42857143;
                  color: #333;
                  background-color: #fff;
                }
                article,
                aside,
                details,
                figcaption,
                figure,
                footer,
                header,
                hgroup,
                main,
                nav,
                section,
                summary {
                  display: block;
                }
                hr {
                  height: 0;
                  -webkit-box-sizing: content-box;
                     -moz-box-sizing: content-box;
                          box-sizing: content-box;
                }
                pre {
                  overflow: auto;
                  font-family: monospace, monospace;
                  font-size: 1em;
                }

                .container {
                  padding-right: 15px;
                  padding-left: 15px;
                  margin-right: auto;
                  margin-left: auto;
                }
                .page-header {
                    padding-bottom: 9px;
                    margin: 40px 0 20px;
                    border-bottom: 1px solid #eee;
                }
                .failure, .error {
                    padding: 0px 20px;
                }
                .failure pre, .error pre {
                    border: 1px solid #DDD;
                    padding: 10px;
                }
            &amp;lt;/style&gt;
        &amp;lt;/head&gt;
        &amp;lt;body&gt;
            &amp;lt;div class=&quot;container&quot;&gt;
                &amp;lt;xsl:apply-templates select=&quot;testsuite&quot; /&gt;
            &amp;lt;/div&gt;
        &amp;lt;/body&gt;
        &amp;lt;/html&gt;
    &amp;lt;/xsl:template&gt;

    &amp;lt;xsl:template match=&quot;testsuite&quot;&gt;
        &amp;lt;header class=&quot;page-header&quot;&gt;
        &amp;lt;h1&gt;Testsuite: &amp;lt;xsl:value-of select=&quot;@name&quot; /&gt;&amp;lt;/h1&gt;
        &amp;lt;div&gt;
            &amp;lt;xsl:text&gt;
            Tests run: &amp;lt;/xsl:text&gt;
            &amp;lt;xsl:value-of select=&quot;@tests&quot; /&gt;
            &amp;lt;xsl:text&gt;, Failures: &amp;lt;/xsl:text&gt;
            &amp;lt;xsl:value-of select=&quot;@failures&quot; /&gt;
            &amp;lt;xsl:text&gt;, Errors: &amp;lt;/xsl:text&gt;
            &amp;lt;xsl:value-of select=&quot;@errors&quot; /&gt;
            &amp;lt;xsl:text&gt;, Time elapsed: &amp;lt;/xsl:text&gt;
            &amp;lt;xsl:value-of select=&quot;@time&quot; /&gt;
            &amp;lt;xsl:text&gt; sec&amp;lt;/xsl:text&gt;
        &amp;lt;/div&gt;
        &amp;lt;/header&gt;
        &amp;lt;xsl:apply-templates select=&quot;system-out&quot; /&gt;
        &amp;lt;xsl:apply-templates select=&quot;system-err&quot; /&gt;
        &amp;lt;div&gt;
            &amp;lt;xsl:apply-templates select=&quot;//testcase&quot; /&gt;
        &amp;lt;/div&gt;
    &amp;lt;/xsl:template&gt;

    &amp;lt;xsl:template match=&quot;testcase&quot;&gt;
        &amp;lt;p&gt;
            &amp;lt;xsl:text&gt;
            Testcase: &amp;lt;/xsl:text&gt;
            &amp;lt;xsl:value-of select=&quot;@name&quot; /&gt;
            &amp;lt;xsl:text&gt; took &amp;lt;/xsl:text&gt;
            &amp;lt;xsl:value-of select=&quot;@time&quot; /&gt;
        &amp;lt;/p&gt;
        &amp;lt;xsl:apply-templates select=&quot;failure&quot; /&gt;
        &amp;lt;xsl:apply-templates select=&quot;error&quot; /&gt;
    &amp;lt;/xsl:template&gt;

    &amp;lt;xsl:template match=&quot;failure&quot;&gt;
        &amp;lt;div class=&quot;failure&quot;&gt;
            &amp;lt;span style=&quot;color: #ff4136;&quot;&gt;
                &amp;lt;xsl:text&gt;
                    Failure:
                &amp;lt;/xsl:text&gt;
                &amp;lt;xsl:value-of select=&quot;@type&quot; /&gt;
            &amp;lt;/span&gt;
            &amp;lt;pre&gt;
                &amp;lt;xsl:value-of select=&quot;.&quot; /&gt;
            &amp;lt;/pre&gt;
        &amp;lt;/div&gt;
    &amp;lt;/xsl:template&gt;

    &amp;lt;xsl:template match=&quot;error&quot;&gt;
        &amp;lt;div class=&quot;error&quot;&gt;
            &amp;lt;span style=&quot;color: #F00;&quot;&gt;
                &amp;lt;xsl:text&gt;
                    Error:
                &amp;lt;/xsl:text&gt;
                &amp;lt;xsl:value-of select=&quot;@type&quot; /&gt;
            &amp;lt;/span&gt;
            &amp;lt;pre&gt;
                &amp;lt;xsl:value-of select=&quot;.&quot; /&gt;
            &amp;lt;/pre&gt;
        &amp;lt;/div&gt;
    &amp;lt;/xsl:template&gt;

    &amp;lt;xsl:template match=&quot;system-out&quot;&gt;
        &amp;lt;div&gt;
            &amp;lt;xsl:text&gt;
            ------ Standard output ------
            &amp;lt;/xsl:text&gt;
            &amp;lt;pre&gt;
                &amp;lt;xsl:value-of select=&quot;.&quot; /&gt;
            &amp;lt;/pre&gt;
        &amp;lt;/div&gt;
    &amp;lt;/xsl:template&gt;

    &amp;lt;xsl:template match=&quot;system-err&quot;&gt;
        &amp;lt;div&gt;
            &amp;lt;xsl:text&gt;
            ------ Error output ------
            &amp;lt;/xsl:text&gt;
            &amp;lt;pre&gt;
                &amp;lt;xsl:value-of select=&quot;.&quot; /&gt;
            &amp;lt;/pre&gt;
        &amp;lt;/div&gt;
    &amp;lt;/xsl:template&gt;

&amp;lt;/xsl:stylesheet&gt;
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://intellectualponderings.blogspot.com/feeds/986528644726012401/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3984543729645165078/986528644726012401' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/986528644726012401'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/986528644726012401'/><link rel='alternate' type='text/html' href='http://intellectualponderings.blogspot.com/2014/10/a-junit-xsl-transform-for-phpunit.html' title='A JUnit XSL Transform For PHPUnit Logging'/><author><name>Brock</name><uri>http://www.blogger.com/profile/15594270479196950758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2P2oe5Hk6uT-uR1qtS8oRWOym3yVhJ0JBXIF8x2473HYdXG1wiGY0tsP1l31UNmCW_0ArboanBy174wQ1t1Wh8USssIcCMNjpjxNHdVsNXQRMwztbxT41_Sbh3GJRofw/s220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3984543729645165078.post-6655323294512378720</id><published>2014-10-07T22:00:00.000-04:00</published><updated>2014-10-07T22:00:00.538-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".Net"/><category scheme="http://www.blogger.com/atom/ns#" term="Xamarin"/><category scheme="http://www.blogger.com/atom/ns#" term="Xamarin Forms"/><title type='text'>Xamarin Forms Custom Controls Without Native Renderers</title><content type='html'>My last blog post discussed how to create reusable custom content views.  It involved leveraging the &lt;code&gt;ContentPage&lt;/code&gt; element&#39;s ViewModel.  This is great when you want to easily pull common code out and make it reusable.  This will be a great place to start building.  &lt;br /&gt;
&lt;br /&gt;
As with my last blog post, I was not able to find examples of people doing this pattern.  It seems like such a common thing to want to do.  I digress.&lt;br /&gt;
&lt;br /&gt;
Let&#39;s say that there is a repeated layout structure which only differs by the ViewModel properties.  What about making a custom control which do not depend on a ViewModel?  &lt;br /&gt;
&lt;br /&gt;
A custom control which doesn&#39;t depend on a ViewModel internally, will need to have properties which we can bind to a &lt;code&gt;ContentPage&lt;/code&gt; ViewModel&#39;s property.  We want to end up with something like:&lt;br /&gt;
&lt;pre class=&quot;brush: xml;html-script: false; ruler: true; toolbar: false&quot; title=&quot;Preferred End Result:&quot;&gt;&amp;lt;localcontrol:CountLabelView
    CountText=&quot;{Binding path=MessageCount}&quot;
    Text=&quot;{Binding path=MessageText}&quot; /&gt;
&lt;/pre&gt;The first task is to add a new &lt;code&gt;Forms Xaml Page&lt;/code&gt; to the project.  I&#39;ll call it &quot;CountLabelView&quot;.&lt;br /&gt;
&lt;br /&gt;
Then, my experience with building native controls comes in handy.  We can add &lt;code&gt;BindableProperty&lt;/code&gt; fields to our custom control&#39;s code behind.  One for each property we want to have available to our control.  &lt;br /&gt;
&lt;pre class=&quot;brush: xml;html-script: false; ruler: true; toolbar: false&quot; title=&quot;Bindable Property:&quot;&gt;public static readonly BindableProperty TextProperty =
    BindableProperty.Create&amp;lt;CountLabelView, string&gt;(
        p =&gt; p.Text, 
        &quot;&quot;, 
        BindingMode.TwoWay, 
        null,
        new BindableProperty.BindingPropertyChangedDelegate&amp;lt;string&gt;(TextChanged), 
        null, 
        null);

public string Text
{
    get { return (string)GetValue(TextProperty); }
    set { SetValue(TextProperty, value); }
}

static void TextChanged(
    BindableObject obj, 
    string oldPlaceHolderValue, 
    string newPlaceHolderValue)
{
    
}
&lt;/pre&gt;Now we have a way for a &lt;code&gt;ContentPage&lt;/code&gt; to bind properties to custom &lt;code&gt;ContentView&lt;/code&gt; controls.&lt;br /&gt;
&lt;br /&gt;
Next we can move our layout into the &lt;code&gt;ContentView&lt;/code&gt;.&lt;br /&gt;
&lt;pre class=&quot;brush: xml;html-script: false; ruler: true; toolbar: false&quot; title=&quot;Custom Control XAML:&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;
&amp;lt;ContentView 
    xmlns=&quot;http://xamarin.com/schemas/2014/forms&quot;
    xmlns:x=&quot;http://schemas.microsoft.com/winfx/2009/xaml&quot;
    xmlns:local=&quot;clr-namespace:IntPonApp;assembly=IntPonApp&quot;
    xmlns:custom=&quot;clr-namespace:CustomControls.Controls;assembly=CustomControls, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null&quot;
    x:Class=&quot;IntPonApp.Controls.CountLabelView&quot;&gt;
 
 &amp;lt;StackLayout 
        Orientation=&quot;Horizontal&quot; 
        HorizontalOptions=&quot;FillAndExpand&quot; 
        VerticalOptions=&quot;FillAndExpand&quot; 
        Padding=&quot;0&quot;&gt;
  &amp;lt;custom:RoundFrame 
            HorizontalOptions=&quot;CenterAndExpand&quot; 
            VerticalOptions=&quot;CenterAndExpand&quot; 
            Padding=&quot;7,1&quot; 
            BorderRadius=&quot;40&quot; 
            FillColor=&quot;#333333&quot; 
            HasShadow=&quot;false&quot;&gt;

   &amp;lt;Label    x:Name=&quot;CountTextLabel&quot;
                Text=&quot;{Binding CountText}&quot; 
                VerticalOptions=&quot;Center&quot; 
                XAlign=&quot;Center&quot; 
                TextColor=&quot;#FFFFFF&quot; /&gt;

  &amp;lt;/custom:RoundFrame&gt;

  &amp;lt;StackLayout 
            Spacing=&quot;0&quot; 
            HorizontalOptions=&quot;StartAndExpand&quot; 
            VerticalOptions=&quot;CenterAndExpand&quot; 
            Padding=&quot;0&quot;&gt;

   &amp;lt;Label    x:Name=&quot;TextLabel&quot;
                Text=&quot;{Binding Text}&quot; 
                LineBreakMode=&quot;WordWrap&quot; 
                XAlign=&quot;Center&quot; 
                HorizontalOptions=&quot;StartAndExpand&quot; 
                VerticalOptions=&quot;Center&quot; 
                TextColor=&quot;#DEDEDE&quot; /&gt;

  &amp;lt;/StackLayout&gt;
 &amp;lt;/StackLayout&gt;
 
&amp;lt;/ContentView&gt;
&lt;/pre&gt;This is great except, if you run this, the application will fail (unless &lt;code&gt;CountText&lt;/code&gt; and &lt;code&gt;Text&lt;/code&gt; happen to exist in your &lt;code&gt;ContentPage&lt;/code&gt;&#39;s ViewModel.  This is problematic, but not an insurmountable obstacle.  We may have a couple options:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;We can remove the binding from the elements, assign names to the elements which need binding, hook up onchange events (not useful in this case because we are using labels and not Entry elements) which would assign the value back to the &lt;code&gt;BindableProperty&lt;/code&gt;, and then find the named elements and assign the value from the &lt;code&gt;BindableProperty&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;We can assign names to the elements which need binding and then find the named elements and assign the &lt;code&gt;BindingContext&lt;/code&gt; to the custom control object.&lt;/li&gt;
&lt;li&gt;We can assign the custom control&#39;s &lt;code&gt;BindingContext&lt;/code&gt; to the custom control itself.&lt;/li&gt;
&lt;/ol&gt;Option 1 would be a mess to implement and maintain.  It has to be replicated for every control which needs binding and there is a good chance that the bindings won&#39;t work as one should expect.&lt;br /&gt;
&lt;br /&gt;
Option 2: We are able to bind in a much more expected fashion and changes will cascade as we expect.  However this will still result in extra 1 line of code per control needing to be bound.&lt;br /&gt;
&lt;br /&gt;
Option 3: It gets rid of the inherited &lt;code&gt;BindingContext&lt;/code&gt; and forces the control to be self sufficient and thus reusable regardless of the ViewModel.  Plus, the bindings work as one expects and it is only ONE line of code. &lt;br /&gt;
&lt;br /&gt;
In testing Option 3, I found that the &lt;code&gt;BindingContext&lt;/code&gt; was not being inherited correctly to the child controls.  I suspect this is a bug in Xamarin.  So, at the moment Option 2 is the best option that works.&lt;br /&gt;
&lt;br /&gt;
Below is the code behind for the custom control.&lt;br /&gt;
&lt;pre class=&quot;brush: csharp;html-script: false; ruler: true; toolbar: false&quot; title=&quot;Custom Control Code Behind:&quot;&gt;public partial class CountLabelView
{
    #region Properties

    public static readonly BindableProperty TextProperty =
        BindableProperty.Create&amp;lt;CountLabelView, string&gt;(
            p =&gt; p.Text, 
            &quot;&quot;, 
            BindingMode.TwoWay, 
            null,
            new BindableProperty.BindingPropertyChangedDelegate&amp;lt;string&gt;(TextChanged), 
            null, 
            null);

    public string Text
    {
        get { return (string)GetValue(TextProperty); }
        set { SetValue(TextProperty, value); }
    }

    static void TextChanged(
        BindableObject obj, 
        string oldPlaceHolderValue, 
        string newPlaceHolderValue)
    {
        
    }


    public static readonly BindableProperty CountTextProperty =
        BindableProperty.Create&amp;lt;CountLabelView, string&gt;(
            p =&gt; p.CountText, 
            &quot;&quot;, 
            BindingMode.TwoWay, 
            null,
            new BindableProperty.BindingPropertyChangedDelegate&amp;lt;string&gt;(CountTextChanged), 
            null, 
            null);

    public string CountText
    {
        get { return (string)GetValue(CountTextProperty); }
        set { SetValue(CountTextProperty, value); }
    }

    static void CountTextChanged(
        BindableObject obj, 
        string oldPlaceHolderValue, 
        string newPlaceHolderValue)
    {

    }

    #endregion Properties

    #region Constructor

    public CountLabelView()
    {
        InitializeComponent();
        CountText = &quot;1&quot;;
        //this.BindingContext = this;
        CountTextLabel.BindingContext = this;
        Text1Label.BindingContext = this;
        Text2Label.BindingContext = this;
    }

    #endregion Constructor
}
&lt;/pre&gt;A point of note, the constructor contains this line &lt;code&gt;CountText = &quot;1&quot;;&lt;/code&gt;.  This is required because there is a custom native control surrounding the label with a binding.  For some reason the rendering process executes initially before the binding finishes and not having an initial value on the control will result in the custom native control&#39;s height to be ~1px.  I suspect that this is another bug in Xamarin.&lt;br /&gt;
&lt;br /&gt;
Then you add the XML namespace to the &lt;code&gt;ContentPage&lt;/code&gt; declaration and add the custom control.&lt;br /&gt;
&lt;pre class=&quot;brush: xml;html-script: false; ruler: true; toolbar: false&quot; title=&quot;XML Namespace:&quot;&gt;xmlns:localcontrol=&quot;clr-namespace:IntPonApp.Controls;assembly=IntPonApp&quot;
&lt;/pre&gt;&lt;pre class=&quot;brush: xml;html-script: false; ruler: true; toolbar: false&quot; title=&quot;Using The Custom Control:&quot;&gt;&amp;lt;localcontrol:CountLabelView
    CountText=&quot;{Binding path=MessageCount}&quot;
    Text=&quot;{Binding path=MessageText}&quot; /&gt;
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://intellectualponderings.blogspot.com/feeds/6655323294512378720/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3984543729645165078/6655323294512378720' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/6655323294512378720'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/6655323294512378720'/><link rel='alternate' type='text/html' href='http://intellectualponderings.blogspot.com/2014/10/xamarin-forms-custom-controls-without.html' title='Xamarin Forms Custom Controls Without Native Renderers'/><author><name>Brock</name><uri>http://www.blogger.com/profile/15594270479196950758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2P2oe5Hk6uT-uR1qtS8oRWOym3yVhJ0JBXIF8x2473HYdXG1wiGY0tsP1l31UNmCW_0ArboanBy174wQ1t1Wh8USssIcCMNjpjxNHdVsNXQRMwztbxT41_Sbh3GJRofw/s220/profile.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3984543729645165078.post-2126635169481985979</id><published>2014-10-01T22:00:00.000-04:00</published><updated>2015-07-04T08:47:08.685-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".Net"/><category scheme="http://www.blogger.com/atom/ns#" term="Xamarin"/><category scheme="http://www.blogger.com/atom/ns#" term="Xamarin Forms"/><title type='text'>Xamarin Forms Reusable Custom Content Views</title><content type='html'>There is a lot (relatively) of information on how to make reusable native controls with renderers and native views.  However there is next to nothing about how to make reusable controls which don&#39;t require renderers or native views.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;[Edit 2014-12-05]&lt;/b&gt; The project I developed required the same header on each page, so I figured I would use that as a way to describe how to create resuable controls.  Performance-wise, it shouldn&#39;t be any worse than loading the information on every page.  I needed the NavigationPage functionality, but without the navigation bar.  It is probably not ideal, but it is what the design imposed.&lt;br /&gt;
&lt;br /&gt;
Let&#39;s assume that we have the following XAML which needs to be replicated on several pages.  &lt;br /&gt;
&lt;pre class=&quot;brush: xml;html-script: false; ruler: true; toolbar: false&quot; title=&quot;Reused XAML:&quot;&gt;&amp;lt;Grid x:Name=&quot;SharedHeaderBar&quot; HorizontalOptions=&quot;FillAndExpand&quot; Padding=&quot;5,10,5,-5&quot; BackgroundColor=&quot;#3FB5C1&quot; &gt;
    &amp;lt;Grid.RowDefinitions&gt;
      &amp;lt;RowDefinition Height=&quot;45&quot; /&gt;
    &amp;lt;/Grid.RowDefinitions&gt;
    &amp;lt;Grid.ColumnDefinitions&gt;
      &amp;lt;ColumnDefinition Width=&quot;Auto&quot; /&gt;
      &amp;lt;ColumnDefinition Width=&quot;*&quot; /&gt;
      &amp;lt;ColumnDefinition Width=&quot;Auto&quot; /&gt;
    &amp;lt;/Grid.ColumnDefinitions&gt;
    &amp;lt;Image x:Name=&quot;homeImageiOS&quot; Source=&quot;{local:ImageResource IntPonApp.Resources.IntPon-Logo.png}&quot; Grid.Row=&quot;0&quot; Grid.Column=&quot;0&quot; /&gt;
    &amp;lt;Button x:Name=&quot;logoffButtoniOS&quot; Text=&quot;{Binding Path=FullName}&quot; TextColor=&quot;#FFFFFF&quot; Grid.Row=&quot;0&quot; Grid.Column=&quot;2&quot; /&gt;
  &amp;lt;/Grid&gt;
&lt;/pre&gt;My first foray into this was unsuccessful because I tried using a &lt;code&gt;View&lt;/code&gt;.  I stumbled upon the &lt;code&gt;ContentView&lt;/code&gt;.  I couldn&#39;t find any examples of people using it.  Having had a lot of experience with WPF and knowing what I wanted to achieve, this seemed to be the most promising path.&lt;br /&gt;
&lt;br /&gt;
I created a new &lt;code&gt;Forms Xaml Page&lt;/code&gt; and changed the &lt;code&gt;ContentPage&lt;/code&gt; tags to &lt;code&gt;ContentView&lt;/code&gt;. Then I moved the reused XAML into the &lt;code&gt;ContentView&lt;/code&gt;.&lt;br /&gt;
&lt;pre class=&quot;brush: xml;html-script: false; ruler: true; toolbar: false&quot; title=&quot;Shared View XAML:&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;
&amp;lt;ContentView xmlns=&quot;http://xamarin.com/schemas/2014/forms&quot;
        xmlns:x=&quot;http://schemas.microsoft.com/winfx/2009/xaml&quot;
             xmlns:local=&quot;clr-namespace:IntPonApp;assembly=IntPonApp&quot;
        x:Class=&quot;IntPonApp.Controls.SharedHeaderView&quot;&gt;
  
  &amp;lt;Grid x:Name=&quot;SharedHeaderBar&quot; HorizontalOptions=&quot;FillAndExpand&quot; Padding=&quot;5,10,5,-5&quot; BackgroundColor=&quot;#3FB5C1&quot; &gt;
    &amp;lt;Grid.RowDefinitions&gt;
      &amp;lt;RowDefinition Height=&quot;45&quot; /&gt;
    &amp;lt;/Grid.RowDefinitions&gt;
    &amp;lt;Grid.ColumnDefinitions&gt;
      &amp;lt;ColumnDefinition Width=&quot;Auto&quot; /&gt;
      &amp;lt;ColumnDefinition Width=&quot;*&quot; /&gt;
      &amp;lt;ColumnDefinition Width=&quot;Auto&quot; /&gt;
    &amp;lt;/Grid.ColumnDefinitions&gt;
    &amp;lt;Image x:Name=&quot;homeImageiOS&quot; Source=&quot;{local:ImageResource IntPonApp.Resources.IntPon-Logo.png}&quot; Grid.Row=&quot;0&quot; Grid.Column=&quot;0&quot; /&gt;
    &amp;lt;Button x:Name=&quot;logoffButtoniOS&quot; Text=&quot;{Binding Path=FullName}&quot; TextColor=&quot;#FFFFFF&quot; Grid.Row=&quot;0&quot; Grid.Column=&quot;2&quot; /&gt;
  &amp;lt;/Grid&gt;

&amp;lt;/ContentView&gt;
&lt;/pre&gt;It is important to understand the state of the binding context.  The binding context will be inherited from the parent control where it is used.  This is very convenient because I wanted to pull a value from the &lt;code&gt;ContentPage&lt;/code&gt;&#39;s ViewModel.&lt;br /&gt;
&lt;br /&gt;
I pulled over the event bindings and the needed navigation functions.  Part of the functionality that I wanted to move into the &lt;code&gt;ContentView&lt;/code&gt; needed to raise a &lt;code&gt;DisplayAlert&lt;/code&gt; which, as it turns out, isn&#39;t available on the &lt;code&gt;ContentView&lt;/code&gt; element.  So I flexed my recursive skills and created the following to get the &lt;code&gt;ContentPage&lt;/code&gt; element.&lt;br /&gt;
&lt;pre class=&quot;brush: csharp;html-script: false; ruler: true; toolbar: false&quot; title=&quot;Find The Page Element:&quot;&gt;public ContentPage FindParentPage(Element el = null)
{
    if (el == null)
        el = this;
    return 
          (el is ContentPage) ? (ContentPage)el
        : (el.Parent != null) ? FindParentPage(el.Parent) 
        : null;
}
&lt;/pre&gt;Then I was able to display alert messages.&lt;br /&gt;
&lt;br /&gt;
Below is the resulting code behind.&lt;br /&gt;
&lt;pre class=&quot;brush: csharp;html-script: false; ruler: true; toolbar: false&quot; title=&quot;Shared View Code Behind:&quot;&gt;public partial class SharedHeaderView
{
    public SharedHeaderView()
    {
        InitializeComponent();

        string platformName = Device.OS.ToString();

        this.FindByName&amp;lt;Button&gt;(&quot;logoffButton&quot; + platformName)
            .Clicked += OnLogoffClicked;
        this.FindByName&amp;lt;Image&gt;(&quot;homeImage&quot; + platformName)
            .GestureRecognizers.Add(new TapGestureRecognizer((view, args) =&gt;
        {
            this.Navigation.PopToRootAsync();
        }));
    }

    protected async void OnLogoffClicked(object sender, EventArgs e)
    {
        if (!string.IsNullOrEmpty(App.ApiKey))
        {
            string errorMessage = &quot;&quot;;
            try
            {
                if (await FindParentPage()
                    .DisplayAlert(&quot;Sign Off&quot;, &quot;Are you sure?&quot;, &quot;Yes&quot;, &quot;No&quot;))
                {
                    App.Logout();
                }
            }
            catch (Exception ex)
            {
                errorMessage = ex.Message;
            }

            if (!string.IsNullOrEmpty(errorMessage))
            {
                await FindParentPage()
                    .DisplayAlert(&quot;Help&quot;, errorMessage, &quot;OK&quot;);
            }
        }
    }

    public ContentPage FindParentPage(Element el = null)
    {
        if (el == null)
            el = this;
        return 
              (el is ContentPage) ? (ContentPage)el
            : (el.Parent != null) ? FindParentPage(el.Parent) 
            : null;
    }
}
&lt;/pre&gt;Then you add the XML namespace to the &lt;code&gt;ContentPage&lt;/code&gt; declaration and add the XML node.  &lt;br /&gt;
&lt;pre class=&quot;brush: xml;html-script: false; ruler: true; toolbar: false&quot; title=&quot;XML Namespace:&quot;&gt;xmlns:localcontrol=&quot;clr-namespace:IntPonApp.Controls;assembly=IntPonApp&quot;
&lt;/pre&gt;&lt;pre class=&quot;brush: xml;html-script: false; ruler: true; toolbar: false&quot; title=&quot;Using The Shared View:&quot;&gt;&amp;lt;localcontrol:SharedHeaderView /&gt;
&lt;/pre&gt;Getting this to work has really saved me a lot of unneeded duplication.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Edit 2014-12-05&lt;/b&gt;: Edited to add comment/response/excuse to a question on StackOverflow: &lt;a href=&quot;http://stackoverflow.com/questions/27589702/is-it-possible-to-create-a-custom-page-layout-with-xamarin-forms&quot;&gt;Is it possible to create a custom page layout with Xamarin.Forms?&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://intellectualponderings.blogspot.com/feeds/2126635169481985979/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3984543729645165078/2126635169481985979' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/2126635169481985979'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/2126635169481985979'/><link rel='alternate' type='text/html' href='http://intellectualponderings.blogspot.com/2014/10/xamarin-forms-reusable-custom-content.html' title='Xamarin Forms Reusable Custom Content Views'/><author><name>Brock</name><uri>http://www.blogger.com/profile/15594270479196950758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2P2oe5Hk6uT-uR1qtS8oRWOym3yVhJ0JBXIF8x2473HYdXG1wiGY0tsP1l31UNmCW_0ArboanBy174wQ1t1Wh8USssIcCMNjpjxNHdVsNXQRMwztbxT41_Sbh3GJRofw/s220/profile.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3984543729645165078.post-1076427224901297449</id><published>2014-09-25T22:00:00.000-04:00</published><updated>2014-09-25T22:00:01.965-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="OSX"/><category scheme="http://www.blogger.com/atom/ns#" term="Synergy"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows"/><title type='text'>Synergy Desktop Path Error</title><content type='html'>I recently started working on a mobile project which afforded me the opportunity to flex my iOS development skills again.  I installed the latest version of &lt;a href=&quot;http://synergy-project.org/&quot;&gt;Synergy&lt;/a&gt; on my MacBook and my main laptop.  I used the setup I had before which loaded correctly, but I started receiving this error which prevented me from connecting my Mac to my PC host.  &lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: text;html-script: false; ruler: true; toolbar: false; highlight: [8, 9, 13]&quot; title=&quot;Source:&quot;&gt;ERROR: failed to get desktop path, no drop target available, error=2
&lt;/pre&gt;&lt;br /&gt;
Googling wasn&#39;t fruitful so I looked at the settings which looked as I expected.  I finally tried unchecking the &quot;Elevate&quot; checkbox and clicked &quot;Apply&quot;.  The error went away and I was able to connect.  &quot;Elevate&quot; should mean that the service will run in elevated/administrator mode.  I found no events being raised in the event log and I believe I had the Synergy application successfully using the Elevate option in the past.  Whatever the root cause was, not using the &quot;Elevate&quot; option fixed the issue.&lt;br /&gt;
&lt;br /&gt;
For those that do not know about &lt;a href=&quot;http://synergy-project.org/&quot;&gt;Synergy&lt;/a&gt;, it is an&lt;br /&gt;
application which allows you to share your keyboard and mouse with other computers over a network.  I have been using Synergy for years and find is especially useful when I need to switch between multiple computers frequently.</content><link rel='replies' type='application/atom+xml' href='http://intellectualponderings.blogspot.com/feeds/1076427224901297449/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3984543729645165078/1076427224901297449' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/1076427224901297449'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/1076427224901297449'/><link rel='alternate' type='text/html' href='http://intellectualponderings.blogspot.com/2014/09/synergy-desktop-path-error.html' title='Synergy Desktop Path Error'/><author><name>Brock</name><uri>http://www.blogger.com/profile/15594270479196950758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2P2oe5Hk6uT-uR1qtS8oRWOym3yVhJ0JBXIF8x2473HYdXG1wiGY0tsP1l31UNmCW_0ArboanBy174wQ1t1Wh8USssIcCMNjpjxNHdVsNXQRMwztbxT41_Sbh3GJRofw/s220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3984543729645165078.post-6496882227691534839</id><published>2014-09-03T22:00:00.000-04:00</published><updated>2014-09-03T22:00:00.517-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AngularJS"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="Twitter Bootstrap"/><title type='text'>IP Subnet Mask Expander The Web Client</title><content type='html'>In a previous post, I created a &lt;a href=&quot;http://nodejs.org/&quot;&gt;Node.Js&lt;/a&gt; project, &lt;a href=&quot;https://github.com/0xbrock/IPSubnetMaskToIPRange&quot;&gt;IPSubnetMaskToIPRange&lt;/a&gt;, that takes a file with a list of IP subnet masks and then outputs 2 CSV files (one of the IP ranges and one of the expanded IP ranges).&lt;br /&gt;
&lt;br /&gt;
Sometimes when I create a cool project, I end up having flashes of changes and improvements that I can make to it.  This is one of those cases.&lt;br /&gt;
&lt;br /&gt;
This project uses the same base functionality as the Node.Js project.  This has the same functionality, except it is completely run from the browser leveraging &lt;a href=&quot;https://angularjs.org/&quot;&gt;AngularJS&lt;/a&gt; and &lt;a href=&quot;http://getbootstrap.com/&quot;&gt;Bootstrap 3&lt;/a&gt;.  It outputs the ranges to the screen and provides buttons to download the IP ranges and the expanded IP ranges.  &lt;br /&gt;
&lt;br /&gt;
The working site can be found at &lt;a href=&quot;https://0xbrock.github.io/IPSubnetMaskExpander&quot;&gt;IP Subnet Mask Expander&lt;/a&gt; and the source can be found on &lt;a href=&quot;https://github.com/0xbrock/IPSubnetMaskExpander&quot;&gt;GitHub&lt;/a&gt;.&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://intellectualponderings.blogspot.com/feeds/6496882227691534839/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3984543729645165078/6496882227691534839' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/6496882227691534839'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/6496882227691534839'/><link rel='alternate' type='text/html' href='http://intellectualponderings.blogspot.com/2014/09/ip-subnet-mask-expander-web-client.html' title='IP Subnet Mask Expander The Web Client'/><author><name>Brock</name><uri>http://www.blogger.com/profile/15594270479196950758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2P2oe5Hk6uT-uR1qtS8oRWOym3yVhJ0JBXIF8x2473HYdXG1wiGY0tsP1l31UNmCW_0ArboanBy174wQ1t1Wh8USssIcCMNjpjxNHdVsNXQRMwztbxT41_Sbh3GJRofw/s220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3984543729645165078.post-6589054741469757924</id><published>2014-08-18T22:00:00.000-04:00</published><updated>2015-09-28T08:23:35.510-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AngularJS"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><title type='text'>Angular.JS Service to Download Data Generated in Browser</title><content type='html'>I ran into a situation where I wanted to be able to download data that was generated in the browser.  There are several libraries that handle this scenario, but I thought it should have been simpler than those large libraries.  &lt;br /&gt;
&lt;br /&gt;
Below is the result.  It supports IE 10+ (potentially 9 haven&#39;t tested), FireFox, and Chrome.&lt;br /&gt;
&lt;pre class=&quot;brush: javascript;html-script: false; ruler: true; toolbar: false;&quot; title=&quot;Source:&quot;&gt;angular.module(&#39;FileDownload&#39;)
.service(&#39;SaveFileService&#39;, [function () {
        this.Save = function(data, filename, mimeType) {
            var blob = new Blob([data.join(&#39;\n&#39;)], {type: mimeType});
            if (/\bMSIE\b|\bTrident\b|\bEdge\b/.test(navigator.userAgent)) {
                window.navigator.msSaveOrOpenBlob(blob, filename);
            } else {
                var url  = window.URL || window.webkitURL,
                    link = document.createElementNS(&quot;http://www.w3.org/1999/xhtml&quot;, &quot;a&quot;),
                    event = document.createEvent(&quot;MouseEvents&quot;);
                
                link.href = url.createObjectURL(blob);
                link.download = filename;

                event.initEvent(&quot;click&quot;, true, false);
                link.dispatchEvent(event);
            }
        };
    }]);
&lt;/pre&gt;Basically, the Save function does a couple things.  For IE browsers, it creates the blob and calls the &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ie/hh779016%28v=vs.85%29.aspx&quot;&gt;msSaveOrOpenBlob&lt;/a&gt; (the msSaveBlob function would make IE only display a save dialog and not give the user the option to open it).  For all other browsers, it creates the blob, generates a link element, creates a mouse click event, and has the link dispatch the created event.&lt;br /&gt;
&lt;br /&gt;
To use the service, just inject the service into the controller and call the Save function w/ the needed parameters.&lt;br /&gt;
&lt;br /&gt;
UPDATE 2015-09-28: Per Kevin&#39;s feedback, I have updated the regular expression to catch the Edge browser (so much for Microsoft making a standards evergreen browser).  I have verified that the above change works as advertised.</content><link rel='replies' type='application/atom+xml' href='http://intellectualponderings.blogspot.com/feeds/6589054741469757924/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3984543729645165078/6589054741469757924' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/6589054741469757924'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/6589054741469757924'/><link rel='alternate' type='text/html' href='http://intellectualponderings.blogspot.com/2014/08/angularjs-service-to-download-data.html' title='Angular.JS Service to Download Data Generated in Browser'/><author><name>Brock</name><uri>http://www.blogger.com/profile/15594270479196950758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2P2oe5Hk6uT-uR1qtS8oRWOym3yVhJ0JBXIF8x2473HYdXG1wiGY0tsP1l31UNmCW_0ArboanBy174wQ1t1Wh8USssIcCMNjpjxNHdVsNXQRMwztbxT41_Sbh3GJRofw/s220/profile.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3984543729645165078.post-7433451526899589720</id><published>2014-08-13T22:00:00.001-04:00</published><updated>2014-08-13T22:00:00.903-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".Net"/><category scheme="http://www.blogger.com/atom/ns#" term="First Data"/><category scheme="http://www.blogger.com/atom/ns#" term="P12 Certificate"/><category scheme="http://www.blogger.com/atom/ns#" term="Security"/><category scheme="http://www.blogger.com/atom/ns#" term="Web Service"/><category scheme="http://www.blogger.com/atom/ns#" term="WSDL"/><category scheme="http://www.blogger.com/atom/ns#" term="X509 Certificate"/><title type='text'>First Data Global Gateway Integration and the HTTP 401 Unauthorized Error</title><content type='html'>A project recently required integrating with &lt;a href=&quot;https://www.firstdata.com/en_us/home.html&quot;&gt;First Data&lt;/a&gt; for payment processing.  This isn&#39;t my first rodeo integrating with a payment processor, but it was the first time I interfaced with First Data.  Sounds easy enough, right? Following the &lt;a href=&quot;https://www.firstdata.com/downloads/marketing-merchant/fdgg-web-service-api-v6.0.pdf&quot;&gt;Global Gateway version 6&lt;/a&gt; documentation shouldn&#39;t be very difficult.  Except when it isn&#39;t.  &lt;br /&gt;
&lt;br /&gt;
The documentation is terribly antiquated.  The setup assumes you are on Windows XP and using IIS5/6.  Thankfully have developed application in that environment and felt confident that I could translate the instructions to Windows 8.1 and IIS Express.&lt;br /&gt;
&lt;br /&gt;
The first obstacle was getting the certificates.  The original email I had said that I would receive the certificates in my email.  When it didn&#39;t arrive, I was slightly confused.  I called support and they instructed me to jump into the Virtual Terminal and download them there.  I was back on track with the documentation.&lt;br /&gt;
&lt;br /&gt;
I was able to use the Certificate MMC snap-in to import the P12 certificate into the Computer Account/Personal store.  I then used the WinHttpCertCfg tool to grant the needed users access to the Certificate.  The documentation specifies the IWAM_MachineName user, but knowing that doesn&#39;t exist, I opted to grant IIS_IUSRS, IUSR, NETWORK SERVICE, and my own account (because IIS Express runs under the users permissions).  You may need to grant permission to &quot;DefaultAppPool&quot; if you are using IIS 7.5.  Essentially, whatever user the application is going to run as, needs access to the certificate.&lt;br /&gt;
&lt;br /&gt;
The next obstacle was getting the WSDL.  Accessing the WSDL link from the documentation, &lt;a href=&quot;https://ws.merchanttest.firstdataglobalgateway.com/fdggwsapi/services/order.wsdl&quot;&gt;https://ws.merchanttest.firstdataglobalgateway.com/fdggwsapi/services/order.wsdl&lt;/a&gt;, yielded SSL/TLS authentication handshake connection errors.  It didn&#39;t matter which browser I was using.&lt;br /&gt;
&lt;br /&gt;
After verifying that my setup followed the documentation and Google not finding anything that I hadn&#39;t already tried, I called support again.  I was told that I was pointing to the wrong address and instead should point to the following addresses:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://www.staging.linkpointcentral.com/fdggwsapi/services/order.wsdl&quot;&gt;https://www.staging.linkpointcentral.com/fdggwsapi/services/order.wsdl&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://www.staging.linkpointcentral.com/fdggwsapi/schemas_us/v1.xsd&quot;&gt;https://www.staging.linkpointcentral.com/fdggwsapi/schemas_us/v1.xsd&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://www.staging.linkpointcentral.com/fdggwsapi/schemas_us/a1.xsd&quot;&gt;https://www.staging.linkpointcentral.com/fdggwsapi/schemas_us/a1.xsd&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://www.staging.linkpointcentral.com/fdggwsapi/schemas_us/fdggwsapi.xsd&quot;&gt;https://www.staging.linkpointcentral.com/fdggwsapi/schemas_us/fdggwsapi.xsd&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
At this point my confidence in the documentation was extremely low.  These URLs were accessible so I felt good and was back on track with the documentation.  I was able to generate the web reference and reworked the example to fit my environment.  It compiled and I pointed my unit test to my shiny new payment service.  What could possibly go wrong?&lt;br /&gt;
&lt;br /&gt;
Well, I received a WebException HTTP 401: Unauthorized error.  I probably should have expected another issue, but I try to be optimistic.  After a LOT of googling and trying any suggestion I could find related to First Data and this exception.  There were a lot of results; obviously I wasn&#39;t the only one experiencing this.  The last option that I found was requesting the certificates to be regenerated.  After exhausting all the other fruitful paths forward, I called support again.&lt;br /&gt;
&lt;br /&gt;
I got a support person named Derek and requested to have the certificates regenerated.  He ran the existing certificates through their test process and found that they worked.  I told him about my environment and the other issues that I was having.  He said that the WSDL URL I was told to use was not correct and that I should use the ones in the documentation (now my confidence was pretty thoroughly gone).  After some testing, further information gathering, and research, he found that Windows 8 requires extra steps to get the WSDL.  The end result was that he was going to send me the needed WSDL and XSDs and an unpublished document (hopefully they publish it soon) detailing the steps needed to setup the environment.  Once I received the files I created a new web reference using the new WSDL/XSDs and used the documentation URLs.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://ws.merchanttest.firstdataglobalgateway.com/fdggwsapi/services/order.wsdl&quot;&gt;https://ws.merchanttest.firstdataglobalgateway.com/fdggwsapi/services/order.wsdl&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://ws.merchanttest.firstdataglobalgateway.com/fdggwsapi/schemas_us/fdggwsapi.xsd&quot;&gt;https://ws.merchanttest.firstdataglobalgateway.com/fdggwsapi/schemas_us/fdggwsapi.xsd&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://ws.merchanttest.firstdataglobalgateway.com/fdggwsapi/schemas_us/v1.xsd&quot;&gt;https://ws.merchanttest.firstdataglobalgateway.com/fdggwsapi/schemas_us/v1.xsd&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://ws.merchanttest.firstdataglobalgateway.com/fdggwsapi/schemas_us/a1.xsd&quot;&gt;https://ws.merchanttest.firstdataglobalgateway.com/fdggwsapi/schemas_us/a1.xsd&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://ws.merchanttest.firstdataglobalgateway.com/fdggwsapi/services&quot;&gt;https://ws.merchanttest.firstdataglobalgateway.com/fdggwsapi/services&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
I updated my code, compiled and ran my unit tests.  Then, I received a failed transaction because the card information I submitted was expired.  It meant that it worked!  I changed the expiration to a point in the future, tried again, and received an APPROVED response.  What a great feeling!  Derek stayed on the line through the whole process (which took quite a while).  Thank you Derek.&lt;br /&gt;
&lt;br /&gt;
Later I went through the unpublished document and specifically the part about getting the WSDL file.  Basically, the P12 file needs to be imported into the browser.  To do that do the following:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Open Internet Explorer&lt;/li&gt;
&lt;li&gt;In the menu, click Tools-&gt;Internet Options&lt;/li&gt;
&lt;li&gt;Click the Content tab&lt;/li&gt;
&lt;li&gt;Click Certificates&lt;/li&gt;
&lt;li&gt;Click Import&lt;/li&gt;
&lt;li&gt;Select the P12 file&lt;/li&gt;
&lt;li&gt;Enter the password&lt;/li&gt;
&lt;li&gt;Click Next, then Finish&lt;/li&gt;
&lt;/ol&gt;You may need to restart the browser.  Now I could access the WSDL from all browsers.&lt;br /&gt;
&lt;br /&gt;
I can&#39;t believe that I have had to call support so many times.  Perhaps I was making up for not needing to call support before.  I would include the documentation that I received, but it will get stale over time.  The steps in this post are pretty thorough and should be sufficient.  Good luck.&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://intellectualponderings.blogspot.com/feeds/7433451526899589720/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3984543729645165078/7433451526899589720' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/7433451526899589720'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/7433451526899589720'/><link rel='alternate' type='text/html' href='http://intellectualponderings.blogspot.com/2014/08/first-data-global-gateway-integration.html' title='First Data Global Gateway Integration and the HTTP 401 Unauthorized Error'/><author><name>Brock</name><uri>http://www.blogger.com/profile/15594270479196950758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2P2oe5Hk6uT-uR1qtS8oRWOym3yVhJ0JBXIF8x2473HYdXG1wiGY0tsP1l31UNmCW_0ArboanBy174wQ1t1Wh8USssIcCMNjpjxNHdVsNXQRMwztbxT41_Sbh3GJRofw/s220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3984543729645165078.post-866178055814635551</id><published>2014-07-02T22:00:00.000-04:00</published><updated>2014-07-02T22:00:00.055-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="Node.js"/><title type='text'>Expand IP Ranges From IP Subnet Masks</title><content type='html'>I ran into a situation where I had a third party authentication system which required a list of IP addresses.  This probably isn&#39;t an issue until you start dealing w/ the environments which only list IP subnet masks.  I found a great site (&lt;a href=&quot;http://www.tuxgraphics.org/toolbox/network_address_calculator_add.html&quot;&gt;Network and IP address calculator&lt;/a&gt;) by Guido Socher that took a subnet mask and displayed a IP range (first and last address).  It is not very efficient if you have more than a couple.  Thankfully, the calculator was implemented in javascript and I could easily create a Node.js script to handle the automation.&lt;br /&gt;
&lt;br /&gt;
An interesting bit from my code was the the function that expands the IP ranges that were calculated from Guido&#39;s calculator code.  Googling did not yield any algorithms, so I took a stab at it.  This really feels like it should be a recursive function, but I could not think of an elegant way to implement it.  &lt;br /&gt;
&lt;pre class=&quot;brush: javascript;html-script: false; ruler: true; toolbar: false;&quot; title=&quot;Source:&quot;&gt;function expandIPRange(ipform) {
    var expanded = [];
    var o1 = ipform.firstadr_1;
    while (o1 &lt;= ipform.lastadr_1) {
        var o2 = ipform.firstadr_2;
        while ((o1 &lt; ipform.lastadr_1 &amp;&amp; o2 &lt;= 255) || (o1 == ipform.lastadr_1 &amp;&amp; o2 &lt;= ipform.lastadr_2)) {
            var o3 = ipform.firstadr_3;
            while ((o2 &lt; ipform.lastadr_2 &amp;&amp; o3 &lt;= 255) || (o2 == ipform.lastadr_2 &amp;&amp; o3 &lt;= ipform.lastadr_3)) {
                var o4 = ipform.firstadr_4;
                while ((o3 &lt; ipform.lastadr_3 &amp;&amp; o4 &lt;= 255) || (o3 == ipform.lastadr_3 &amp;&amp; o4 &lt;= ipform.lastadr_4)) {
                    expanded.push(util.format(&quot;%s.%s.%s.%s&quot;, o1, o2, o3, o4));
                    o4++;
                    if (o3 &lt;= ipform.lastadr_3 &amp;&amp; o4 &gt; 255) {
                        o3++;
                        o4 = 0;
                    }
                }
                o3++;
                if (o2 &lt;= ipform.lastadr_2 &amp;&amp; o3 &gt; 255) {
                    o2++;
                    o3 = 0;
                }
            }
            o2++
            if (o1 &lt;= ipform.lastadr_1 &amp;&amp; o2 &gt; 255) {
                o1++;
                o2 = 0;
            }
        }
        o1++;
    }

    return expanded;
}
&lt;/pre&gt;The Node.js application can be found at my GitHub project, &lt;a href=&quot;https://github.com/0xbrock/IPSubnetMaskToIPRange&quot;&gt;IPSubnetMaskToIPRange&lt;/a&gt;.  The application takes a file of IP subnet masks and outputs 2 CSV files.  A CSV file containing the IP ranges calculated by the calculator and a file containing the expanded IP addresses from the calculated ranges.</content><link rel='replies' type='application/atom+xml' href='http://intellectualponderings.blogspot.com/feeds/866178055814635551/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3984543729645165078/866178055814635551' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/866178055814635551'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/866178055814635551'/><link rel='alternate' type='text/html' href='http://intellectualponderings.blogspot.com/2014/07/expand-ip-ranges-from-ip-subnet-masks.html' title='Expand IP Ranges From IP Subnet Masks'/><author><name>Brock</name><uri>http://www.blogger.com/profile/15594270479196950758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2P2oe5Hk6uT-uR1qtS8oRWOym3yVhJ0JBXIF8x2473HYdXG1wiGY0tsP1l31UNmCW_0ArboanBy174wQ1t1Wh8USssIcCMNjpjxNHdVsNXQRMwztbxT41_Sbh3GJRofw/s220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3984543729645165078.post-5338476936660099704</id><published>2014-04-24T22:00:00.000-04:00</published><updated>2014-04-25T15:22:32.824-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="GreaseMonkey"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="Team Foundation Server"/><title type='text'>Hide Done Column On TFS Web Portal Task Boards</title><content type='html'>Working with TFS&#39;s kanbon board layout can be difficult as the number of tasks grow and the number of tasks in your done column ever increase.  If the done column is hidden, it becomes easier to scroll to find things that are still in play.  Below is a script that I use to accomplish that.&lt;br /&gt;
&lt;br /&gt;
This script handles custom setups where the Done column is not in it&#39;s default location.  &lt;br /&gt;
&lt;pre class=&quot;brush: javascript;html-script: false; ruler: true; toolbar: false&quot; title=&quot;Source:&quot;&gt;// ==UserScript==
// @name        TFS Boards Hide Done Column
// @namespace   net.intellectualponderings.TFSBoardsHideDoneColumn
// @include     http://*:8080/tfs/*/_boards*
// @require     http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js
// @version     1
// @grant       GM_addStyle
// @grant       unsafeWindow
// ==/UserScript==

// Default easy method, doesn&#39;t work on customized layouts.
//GM_addStyle(&#39;#taskboard-table_s3, td[axis=&quot;taskboard-table_s3&quot;] { display: none ! important; }&#39;);

var ob = (function () {
    var MutationObserver = window.MutationObserver || window.WebKitMutationObserver,
    eventListenerSupported = window.addEventListener;
    return function (obj, callback) {
        if (MutationObserver) {
            var obs = new MutationObserver(function (mutations, observer) {
                if (mutations[0].addedNodes.length || mutations[0].removedNodes.length)
                callback();
            });
            obs.observe(obj, {
                childList: true,
                subtree: true
            });
        } else if (eventListenerSupported) {
            obj.addEventListener(&#39;DOMNodeInserted&#39;, callback, false);
            obj.addEventListener(&#39;DOMNodeRemoved&#39;, callback, false);
        }
    }
}) ();
ob(document.getElementById(&#39;taskboard&#39;), function () {
    var dth = $(&#39;.taskboard-row th:contains(&quot;Done&quot;)&#39;);
    if (dth) {
        var col = dth[0].id;
        // Hide the column
        GM_addStyle(&#39;#&#39; + col + &#39;, td[axis=&quot;&#39; + col + &#39;&quot;] { display: none ! important; }&#39;);
        var numColumns = $(&#39;th.taskboard-cell:not(.taskboard-parent):visible&#39;).length
        if (numColumns &gt; 0) {
            var newColumnWidth = 100 / numColumns;
            GM_addStyle(&#39;th.taskboard-cell:not(.taskboard-parent) { width: &#39; + newColumnWidth + &#39;% !important; }&#39;);
        }
    }
});

&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://intellectualponderings.blogspot.com/feeds/5338476936660099704/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3984543729645165078/5338476936660099704' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/5338476936660099704'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/5338476936660099704'/><link rel='alternate' type='text/html' href='http://intellectualponderings.blogspot.com/2014/04/hide-done-column-on-tfs-web-portal-task.html' title='Hide Done Column On TFS Web Portal Task Boards'/><author><name>Brock</name><uri>http://www.blogger.com/profile/15594270479196950758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2P2oe5Hk6uT-uR1qtS8oRWOym3yVhJ0JBXIF8x2473HYdXG1wiGY0tsP1l31UNmCW_0ArboanBy174wQ1t1Wh8USssIcCMNjpjxNHdVsNXQRMwztbxT41_Sbh3GJRofw/s220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3984543729645165078.post-2385404256309479974</id><published>2014-02-11T22:00:00.000-05:00</published><updated>2014-02-11T22:00:04.666-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Debug"/><category scheme="http://www.blogger.com/atom/ns#" term="IIS Express"/><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio"/><title type='text'>Enable Remote Requests To IIS Express</title><content type='html'>I ran into a situation where I had an issue with a web application that was isolated to the iPad running the latest OS.  Using Safari&#39;s WebInspector functionality yielded nothing fruitful, so I looked to ways that I could debug the remote requests coming to my web application in visual studio.  &lt;br /&gt;
&lt;br /&gt;
I found a &lt;a href=&quot;http://www.codefromjames.com/wordpress/?p=97&quot;&gt;SharpProxy&lt;/a&gt; and &lt;a href=&quot;https://github.com/scottiemc7/IISExpressProxy&quot;&gt;IISExpressProxy&lt;/a&gt;, both ran, but neither worked.  I stumbled upon a Hanselman blog post titled &lt;a href=&quot;http://www.hanselman.com/blog/WorkingWithSSLAtDevelopmentTimeIsEasierWithIISExpress.aspx&quot;&gt;Working with SSL at Development Time is easier with IISExpress&lt;/a&gt;.  The title wasn&#39;t very useful to my situation, however lack of other options pushed me on to reading further.&lt;br /&gt;
&lt;br /&gt;
About a third of the way down there is a section called &quot;Getting IIS Express to serve externally...&quot;.  This peeked my interest and ended up being the key to what I was attempting to achieve.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;The solution&lt;/h3&gt;&lt;h6&gt;Initially this did not work.  I was able to run all of the commands, however I ended up having to restart Visual Studio to get the config to update.&lt;/h6&gt;The blog post has a bit of out dated information regarding the firewall command.  Below is the command that worked for me.  Run the following commands from the Developer Console in Administrator mode.  Obviously you&#39;ll have to change the ComputerName and the port to your situation.&lt;br /&gt;
&lt;pre class=&quot;brush: powershell;html-script: false; ruler: true; toolbar: false; highlight: [8, 9, 13]&quot; title=&quot;Source:&quot;&gt;netsh http add urlacl url=http://ComputerName:58144/ user=everyone

netsh advfirewall firewall add rule name=&quot;IISExpressWeb&quot; dir=in action=allow program=&quot;IISExpressWeb&quot; enable=yes

&quot;c:\Program Files (x86)\IIS Express\appcmd.exe&quot; set site /site.name:Web1 /+bindings.[protocol=&#39;http&#39;,bindingInformation=&#39;*:58144:ComputerName&#39;]

&quot;c:\Program Files (x86)\IIS Express\appcmd.exe&quot; set site /site.name:Web1 /+bindings.[protocol=&#39;http&#39;,bindingInformation=&#39;*:58144:ComputerName.domain&#39;]
&lt;/pre&gt;If the firewall line doesn&#39;t work, you may need to change the program=&quot;IISExpressWeb&quot; to program=&quot;c:\Program Files (x86)\IIS Express\iisexpress.exe&quot;.  &lt;br /&gt;
&lt;br /&gt;
If you have Visual Studio open, restart it and make sure all instances of IIS Express are closed.  If you don&#39;t want to run the application from Visual Studio, you can start IIS Express from the command line with (change Web1 to whatever the site name is for your web application): &lt;br /&gt;
&lt;pre class=&quot;brush: powershell;html-script: false; ruler: true; toolbar: false; highlight: [8, 9, 13]&quot; title=&quot;Source:&quot;&gt;&quot;c:\Program Files (x86)\IIS Express\iisexpress.exe&quot; /site:Web1
&lt;/pre&gt;You should be able to access your website from your remote web browser. </content><link rel='replies' type='application/atom+xml' href='http://intellectualponderings.blogspot.com/feeds/2385404256309479974/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3984543729645165078/2385404256309479974' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/2385404256309479974'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/2385404256309479974'/><link rel='alternate' type='text/html' href='http://intellectualponderings.blogspot.com/2014/02/enable-remote-requests-to-iis-express.html' title='Enable Remote Requests To IIS Express'/><author><name>Brock</name><uri>http://www.blogger.com/profile/15594270479196950758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2P2oe5Hk6uT-uR1qtS8oRWOym3yVhJ0JBXIF8x2473HYdXG1wiGY0tsP1l31UNmCW_0ArboanBy174wQ1t1Wh8USssIcCMNjpjxNHdVsNXQRMwztbxT41_Sbh3GJRofw/s220/profile.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3984543729645165078.post-6073362519524062868</id><published>2014-01-31T22:00:00.000-05:00</published><updated>2014-01-31T22:00:02.485-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Team Foundation Server"/><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio"/><title type='text'>Duplicate TFS Query in Visual Studio&#39;s Team Explorer</title><content type='html'>Just a quick post on how to duplicate TFS Queries.  In my environment, I don&#39;t have permission to add columns to the Shared Queries, but I can edit my own queries.  Instead of creating my own version of the Product Back Log from scratch, I wanted to duplicate the query as my own.  It turns out that it is as easy as copying the query and pasting the query to the &quot;My Queries&quot; folder.  &lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRBlvIxy2MSarxQ9Hdkt7HnutqyMudYFe_oICs-EUbxl5hax87AdII9SlVSdWini4KU-dL0fl4EdgK1R1iC2J9Z1l07Y_Ea4jlmeKzHyyVBQym2zOdaDhvfzwJMmxyJCQ3F3MB-aPiNBCc/s1600/DuplicateTFSQuery-TeamExplorer.png&quot; imageanchor=&quot;1&quot; &gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRBlvIxy2MSarxQ9Hdkt7HnutqyMudYFe_oICs-EUbxl5hax87AdII9SlVSdWini4KU-dL0fl4EdgK1R1iC2J9Z1l07Y_Ea4jlmeKzHyyVBQym2zOdaDhvfzwJMmxyJCQ3F3MB-aPiNBCc/s1600/DuplicateTFSQuery-TeamExplorer.png&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
If you paste to the same directory or there is a name collision, you will be prompted to enter a new name.  &lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3DgfY0aS2whZ4LuRpfPJOGmdTkj7Js1k5t9Y6HK42pmX0Ij9zZOw8Cxjz9iIs9ahzjL8tvmkv5nagnuMr8zDzvtg_StCwPanh6zWRhk3iYuwqjL9eC2DkVaL_mufljXh7hdYx7KbWmZHZ/s1600/DuplicateTFSQuery-NewName.png&quot; imageanchor=&quot;1&quot; &gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3DgfY0aS2whZ4LuRpfPJOGmdTkj7Js1k5t9Y6HK42pmX0Ij9zZOw8Cxjz9iIs9ahzjL8tvmkv5nagnuMr8zDzvtg_StCwPanh6zWRhk3iYuwqjL9eC2DkVaL_mufljXh7hdYx7KbWmZHZ/s1600/DuplicateTFSQuery-NewName.png&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Incredibly easy, but not obvious.   I am surprised how many things I can do from the Team Explorer panel.  It makes life much easier.&lt;br /&gt;
&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://intellectualponderings.blogspot.com/feeds/6073362519524062868/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/3984543729645165078/6073362519524062868' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/6073362519524062868'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3984543729645165078/posts/default/6073362519524062868'/><link rel='alternate' type='text/html' href='http://intellectualponderings.blogspot.com/2014/01/duplicate-tfs-query-in-visual-studios.html' title='Duplicate TFS Query in Visual Studio&#39;s Team Explorer'/><author><name>Brock</name><uri>http://www.blogger.com/profile/15594270479196950758</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2P2oe5Hk6uT-uR1qtS8oRWOym3yVhJ0JBXIF8x2473HYdXG1wiGY0tsP1l31UNmCW_0ArboanBy174wQ1t1Wh8USssIcCMNjpjxNHdVsNXQRMwztbxT41_Sbh3GJRofw/s220/profile.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRBlvIxy2MSarxQ9Hdkt7HnutqyMudYFe_oICs-EUbxl5hax87AdII9SlVSdWini4KU-dL0fl4EdgK1R1iC2J9Z1l07Y_Ea4jlmeKzHyyVBQym2zOdaDhvfzwJMmxyJCQ3F3MB-aPiNBCc/s72-c/DuplicateTFSQuery-TeamExplorer.png" height="72" width="72"/><thr:total>0</thr:total></entry></feed>