Sometimes it is useful to display a progress bar if your Command Line Interface (CLI) based application does processing in the background that takes a long time. This is relatively straightforward to do in a GUI framework based application but it’s also possible to create some kind of a “progress bar” in a CLI as […]
Author: admin
Creating games with C using ASCII characters
While it is possible to use full fledged graphics to create games, but learning how to use a game engine or a game development framework usually takes time. It is equally fun and probably easier to use only ASCII characters and no graphics libraries or game engines to make simple games. ASCII characters can be […]
Visual Studio 2015 won’t launch
I recently had a problem where my installed Visual Studio IDE just wouldn’t launch. Sometimes the startup screen would show up for an instant and then go away. Rebooting my PC didn’t help either. To solve it, I ran the Command prompt with Admin privileges and typed in the following. Running either one of these […]
How to get values in a dictionary as a list in C#
If you have a dictionary with scalar entities, its is fairly straightforward to get either all the Keys or the Values as a list: Let’s say we have: Dictionary<string, string> MyDictionary To get all the keys as a list: MyDictionary.Keys.ToList() To get all the values as a list: MyDictionary.Values.ToList() If you have a case where […]
Embedding images directly into HTML with C#
The usual approach is to reference an image using the image name. But it is also possible to embed the image directly into a webpage. This is especially useful for report generation where it is required to move the report files from one location to another. Embedding an image into the webpage ensures you don’t […]
Scrolling data into View in a WPF Datagrid
There may be cases where you’d want to programmatically select an item in a WPF datagrid or a list. Usually, if the collection is large and only a part of it is visible at a time, you would also want the items to scroll into view automatically. Otherwise there’s no point in “selecting” an item […]
Accessing DataGrid data in C# with WPF
If you need to access row and column data values in a WPF DataGrid you’ll realize it is bit of a pain. It’s definitely easier to do this in WinForms but that may not be what you’re using. So here’s how you can access WPF DataGrid in your code: Do note that I’ve used the […]
Installing XBMC (Kodi) Media Center on Raspberry Pi
Here’s a quick guide to setting up your Raspberry Pi to run XBMC (now known as Kodi). This transforms the Raspberry Pi board into a full-featured media center that actually works quite well. You’ll need: Raspberry Pi board with microUSB power supply microSD card (4GB or more and class 6 or higher, preferably) Flat Panel […]
Using OxyPlot library with C#
If you’ve used built-in charts in .NET framework, you’d realize they’re a bit limited in their functionality and are not very flexible. An excellent alternative is the free OxyPlot library that enables you to add advanced graphical plotting capability to your application. The following steps outline how to use OxyPlot in a Windows Forms application: […]
Setting up Git Source Control in Visual Studio
Git is a well known Source Code Management (SCM) system and two of its popular implementations are GitHub and GitLab. Developers using Visual Studio often like to use Git for their SCM needs and this tutorial is intended to serve as a quick guide for setting up Git with Visual Studio. Here, we have used […]