blog RSS

The Programmer Blog is here to help you, the programmer. We do our best to provide useful resources that offer explanations to popular programming problems, across a variety of programming languages. If you would like to suggest a blog topic or have a question, please leave us a message.


admin, c#, c# run as admin

C# - Force .NET application to run as administrator

Forcing your .NET applcation to run as administrator is actually pretty straightforward. WIth a small web.config update your app will boot as admin by default.   Running .NET as Admin First we want to modify the application manifest that is embedded in the program. This will work on Visual Studio 2008 and higher. If your project does not yet have a app manifest file,...

Read more

editor, exit, quit, vi, vim

vi - How to quit the vim editor

Quitting the vi editor can cause quite the headache for newcomers to this Unix editor. After you're more familiar with vi this will seem like a silly article, but until then here's a quick guide on quitting the vim editor! Quitting vi editor Hit the ESC key, this will enter Command mode. ESC Type a colon ( : ), this will enter...

Read more

c#, generic

C# - Calling a generic method

First I'd like to say Happy New Year! I hope that everyone had a good time celebrating NYE 2017. Now let's move onto the fun stuff in 2018, programming! I have been seeing a lot of questions about how to call generic methods using reflection in C# so that will be the topic at focus. Calling generic methods in C#...

Read more

cheatsheet, Javascript

JavaScript Cheat Sheet

We have compiled a list of almost all of the JavaScript functions you will ever need! This is a nice guide to keep on hand when digging into web development with Vanilla JavaScript. Check out our Javascript Cheat Sheet below. JavaScript Booleans toSource() valueOf() toString() JavaScript Strings charAt() slice() charCo­deAt() split()  concat() substr() fromCh­arC­ode() substr­ing() indexOf() toLowe­rCase() lastIn­dexOf() toUppe­rCase() length...

Read more

c#, c# outofmemoryexception, exception, outofmemory, system.outofmemoryexception c#, systemoutofmemory

C# - Out of Memory Exception

C# System.OutOfMemoryException While programming for my web app the other day, my application threw an System.OutOfMemoryException when initializing a list of objects. To me this seemed pretty much impossible because my machine has 4GB RAM. Specifically the error happened when I tried to add an existing collection to a new list. For example: List newShapes = new List(selectedShapes); My original thought...

Read more