C:\Discounts> Use code System.OutOfMemoryException and get FREE SHIPPING_

The Programmer 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.

Birthday, Dad, Fathers Day, Gift, Guide

Gifts for Programmer Dads Welcome to the Programmer Dad Gift Guide! Whether you need a Father's Day Gift or Birthday Gift for Dad, we got you. Below we've compiled a list of items that any Programmer Dad would appreciate. We hope to continue to grow this list as we find new Programmer Dad gifts. Reach out if you have any great...

Read more

INNER JOIN, MERGE, SQL, SQL Server, UPDATE

In SQL Server it's possible to INSERT into a table, but can you do the same for UPDATE? The is a common question when learning SQL and learning how to UPDATE from a SELECT in SQL Server.  In SQL Server 2008 (or better), use MERGE MERGE INTO Table_A A USING ( SELECT id, col1, col2 FROM Table_B WHERE tsql = 'cool'...

Read more

SQL, SQL Server

This is a common error when you are attempting to use an OR to satisfy multiple conditions in a WHEN statement. "The OR in the WHEN clause of a CASE statement is not supported." Consider this SQL which currently gives the "The OR in the WHEN clause of a CASE statement is not supported" error: CASE ebv.db_no WHEN 22978 OR 23218 OR 23219 THEN 'WECS 9500' ELSE 'WECS 9520' END as wecs_system...

Read more

PowerShell

Determining the installed PowerShell version on your machine is pretty straightforward. Though there is a few gotcha's so let's go over how to get your currently installed PowerShell version. Solution: Use $PSVersionTable.PSVersion to determine the engine version. If the variable does not exist, you can assume the installed version of PowerShell is version 1.0. PS C:\> $PSVersionTable.PSVersion Major Minor Build Revision ----- ----- -----...

Read more

global, python, variables

A few of the most common Python questions revolve around global variables. How can I create or use a global variable in a function? If you create a global variable in one function, how can it be used as a global variable in another function?  Check out our example of using global variables in a function below.   testvar = 0 def set_testvar_to_one(): global...

Read more