Xamarin PCL – How to URL Encode since there is no HttpUtility

Looking for the HTTPUtility class? Ha, you don’t get it. PCL doesn’t have it. Fret not, though, you can still URL Encode. It’s easy, just in a different spot. How to URLEncode in Xamarin Forms PCL var encodedData = System.Net.WebUtility.UrlEncode(stuffToEncode); Now you know, and now hopefully I will remember! Happy coding!

Visual Studio 2015 error “Object reference not set to an instance of an object”

This fixed my razor intellisense problem and the error after installing the latest ASP.NET tools. Here is how to fix it. Delete the contents from the following folders: C:\Users{user}\AppData\Local\Microsoft\VisualStudio C:\Users{user}\AppData\Local\Microsoft\VSCommon Navigate to the command line now and run devenv from either of these paths: [x64] C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE [x86] C:\Program Files\Microsoft Visual […]

Reset performance counters when getting errors in Perfmon or Load Center

Old thing I was working on over a year ago. Well, maybe it is useful to someone:   PS C:\Windows\system32> cmd Microsoft Windows [Version 6.2.9200] (c) 2012 Microsoft Corporation. All rights reserved. C:\Windows\system32>lodctr /R Error: Unable to rebuild performance counter setting from system backup store, error code is 2 C:\Windows\system32>cd .. C:\Windows>cd syswow64 C:\Windows\SysWOW64>lodctr /R […]

Value was either too large or too small for a UInt32. TFS Error

I got this error in Visual Studio 2015 checking in to TFS. “Value was either too large or too small for a UInt32.” WTF? Turns out it is because I had an open sql query file that wasn’t saved and it get angry. Really stupid error that should read :” You have an saved file, […]

Unity 2D – How to anchor a sprite to the left side of the camera viewport

using UnityEngine; using System.Collections; public class ActualHeroController : MonoBehaviour { // Use this for initialization void Start () { } // Update is called once per frame void Update () { float camHalfHeight = Camera.main.orthographicSize; float camHalfWidth = Camera.main.aspect * camHalfHeight; Bounds bounds = GetComponent().bounds; // Set a new vector to the top left of […]