.NET – DEVELOPPARADISE

DEVELOPPARADISE

Getting Elevation Data from a Bing Map

Getting Elevation Data from a Bing Map

This article details a C# class that can be used to get elevation data from a Bing map.While developing a mapping project, we were looking for a way to get elevation information for a specified list of location(s). After exploring a few alternatives, we decided to get this information from Bing. However, the Bing map library does not seem to have a way to get elevation information for a specific location and an HTTP query is necessary.

Easy to Use Parallel foreach, that can be Magnitudes Faster than the .NET Version

Easy to Use Parallel foreach, that can be Magnitudes Faster than the .NET Version

I’d like to share a quick solution for a parallel foreach loop, which can potentially increase the performance of certain applications currently using the built in version introduced in .NET 4.0. This custom version is suited to be used in nested loops, where the outer one needs to be processed sequentially. The number of threads has to be set manually, this could provide additional control over the threads.

Music Notation in .NET

Music Notation in .NET

This article briefly describes the most important basics of the library Manufaktura.Controls which I recently released as Open Source project. The project is a continuation of two other projects which I created eight years ago and which are described in the following articles:

WPF Runtime Localization

WPF Runtime Localization

Update (2018): Updated for VS2017, sample also includes a satellite library to show how this method can be extended to manage a more complex setup.

Continuous Integration and Delivery for Beginners (DevOps)

Continuous Integration and Delivery for Beginners (DevOps)

DevOps is a combination of software development and operation (Dev & Ops) which strongly advocate automation at all steps in software development process. This will enable faster delivery, more stable operating environment with minimum human errors, less maintain cost and many more advantages for software development team.

A Simple Pathfinding Laboratory

A Simple Pathfinding Laboratory

In this article, we will take a look into a simple pathfinding laboratory–a web application where users can edit map and compare paths found by different pathfinding algorithms and heuristic functions. The project is built on the following frameworks and technologies:

Working with SQLite in C# & VB

Working with SQLite in C# & VB

See Included Projects (Sample code) for a detailed description of what is inside the zip…Over the last few years, I have worked quite a bit with SQLite and built a library wrapper called DotNet.Core.SQLite. I like to work as close to the metal as possible to ensure that I can get the best performance.

Scaffolding Dapper with CatFactory

Scaffolding Dapper with CatFactory

Dapper is an ORM for .NET and .NET Core, to develop large applications it’s very hard to write code for a lot of objects: entities, contracts and repositories, CatFactory provides an easy way to generate repetitive code and focus on complex logic.

Building a Restful API With ASP.NET Web API

Building a Restful API With ASP.NET Web API

Let’s have a quick review of ASP.NET MVC Architecture. So when the request arrives at our application MVC Framework hands off that request to an action in a controller, this action most of the time returns a view which is then parsed by razor view engine and then eventually HTML markup is returned to the client. So in this approach html markup is generated on the server and then return to the client.

Descriptive statistics and data normalization with CNTK and C#

Descriptive statistics and data normalization with CNTK and C#

As you probably know CNTK is Microsoft Cognitive Toolkit for deep learning. It is open source library which is used by various Microsoft products. Also the CNTK is powerful library for developing custom ML solutions from various fields with different platforms and languages. What is also so powerful in the CNTK is the way of the implementation. In fact the library is implemented as series of computation graphs, which  is fully elaborated into the sequence of steps performed in a deep neural network training.

Let's IoT Hub: Tutorial 2

Let's IoT Hub: Tutorial 2

This tutorial assumes some background knowledge of programming, but no prior experience with Raspbian (or any Linux distribution), GPIO microprocessors (Pi, Arduino, etc), or Python. References may be made to previous tutorials.

Introduction to C# on ReactOS

Introduction to C# on ReactOS

ReactOS is an open source alternative to the Windows operation system. Even if the first version of ReactOS dates back to 1998, there is still no ‘stable’ version of ReactOS. May be, the most important reason is a lack of attention.

ASP.NET Web API, Angular2, TypeScript and WebApiClientGen

ASP.NET Web API, Angular2, TypeScript and WebApiClientGen

This article is on top of “Generate TypeScript Client API for ASP.NET Web API “ and is focused on Angular 2+ code examples and respective SDLC. If you are developing a .NET Core Web API backend, you may need to read Generate C# Client API for ASP.NET Core Web API.

TorpedoSync

TorpedoSync

 They say that “necessity is the mother of invention”, well necessity and sometimes an itch to do the same yourself. This is how TorpedoSync came about, from the use of other software to sync “My Documents” across  my machines and finding them troubling. Hence the immortal cry “I can do better!”.

I start out by using bitsync which then became resilio sync (a free-mium product) which I liked at first but then became a real memory and disk space hog.

After searching a lot, I came across syncthing which is open source and written in go, which I found seemed to be connecting to the internet and was not as nice to use as resilio.

At this point I gave up and decided to write my own.

Let's IoT Hub: Tutorial 3

Let's IoT Hub: Tutorial 3

This tutorial assumes some background knowledge of programming, but no prior experience with Raspbian (or any Linux distribution), GPIO microprocessors (Pi, Arduino, etc.), or Python. References may be made to previous tutorials.

Using NDepend to Understand Complicated .NET Code Base

Using NDepend to Understand Complicated .NET Code Base

In a recent project, I am faced with a challenge to understand a large .NET code base developed by several team members over quite a few years. All of them had left, leaving behind only a couple documents covering the usage of the software; very little documentation is found on the program architecture or algorithms. Comments in the code are also scarce. 

The total code base is tens of thousands of lines long, so I direly need a way to understand the architecture quickly.

Being a visual person, I started with Visual Studio’s class diagram. That helped a little but not too much, because the class diagram only revealed data structures. What’s more important to me is the call diagram among functions which can show me the flow of computation in a bird’s-eye view. I heard somewhere there is such a tool in Visual Studio Enterprise, but I only have the free Visual Studio Community and wouldn’t be able to afford an Enterprise license.

I tried creating function call diagrams myself using drawing programs like Visio, but that soon proved infeasible. So I searched online and found NDepend. After reading abundant reviews, I decided to dive in. I downloaded the trial, installed it, and created an analysis for my project. Then, following the online help, I created a Callers / Callees graph using the menu as shown in Fig. 1.

 

Security in Angular – Part 2

Security in Angular – Part 2

In Part 1 of this article series, you created a set Angular classes for users and user authentication/authorization. You used these classes to login a user, create a set of properties in a class to turn menus and buttons on and off. In this article you learn to authenticate users against a Web API method. That method returns an authorization object with the same properties as the classes you created in Angular. You are also going to learn to secure your Web API methods using JSON Web Tokens (JWT). You use the [Authorize] attribute to secure your methods, and you learn to add security policies too.

QR Code Encoder and Decoder .NET class library written in C#

QR Code Encoder and Decoder .NET class library written in C#

The QR Code library allows your program to create (encode) QR Code image and to read (decode) an image containing one or more QR Codes. QRCodeEncoderDecoderLibrary is a .NET framework class library. The source code is written in C#. It is an open source code. The downloads attached to this article include the .NET library and three demo/test applications.

EPPlus Excel Template Report Engine

EPPlus Excel Template Report Engine

As anyone who as worked in corporate environments knows, is that they love their Excel reports with logos, formatting and formulas, which is in all honesty probably the best way to present data to “higher uppers”.  

Gathering Context Information for Logging

Gathering Context Information for Logging

First, let’s describe the problem we want to solve. I have an ASP.NET MVC Web service. The service accepts POST-requests containing JSON descriptions. After analyzing such description, the service constructs and executes several SQL queries to a database. Then it combines results and returns them to the client.

Deploying an Angular 6 Application with ASP.NET Core 2

Deploying an Angular 6 Application with ASP.NET Core 2

Download sourceThere is nothing like a great Sunday brunch buffet. You can truly have it all, from all-you-can-eat buffets in fancy hotel digs to the plethora of bottomless items to consume. A variety of breakfast-lunch treats await you; mimosas and bloody marys, eggs Benedict, omelets, scrambled eggs, French toast, Belgian waffles, bagels, pasta, chicken, seafood, and carved prime rib. The list is endless. The only limitations are your budget and how much you can and want to eat.

.NET Performance Tip – Know Your Garbage Collection Options

.NET Performance Tip – Know Your Garbage Collection Options

An under-utilised setting that can offer substantial performance gains. 

Workstation GC – is what you’ll be getting by default with a .NET application and might be unaware of another option. It uses smaller segments, which means more frequent collections, which in turn are short, thus minimising application thread suspensions. When used with concurrent GC it is best suited for desktop / GUI applications. With concurrent disabled (all threads will suspend for GC) it uses a little less memory and is best suited for lightweight services on single-core machines, processing intermittently (appropriate use cases are few and far between). 

Tightly Integrating a Lightweight CMS with Angular under .NET Core

Tightly Integrating a Lightweight CMS with Angular under .NET Core

ASP.NET Core combined with Angular is becoming an increasingly popular tech stack for building interactive web apps. However, if you want to manage the content of such a web app, your only choice has been to use a headless CMS service. This can be overkill especially for smaller web apps and doesn’t allow for easy previewing of content changes. Lynicon CMS provides SPA content management with preview for ASP.NET Core, which unlike the more usual headless CMS setup allows you to immediately view the effects of your content changes. It is lightweight and quick to set up, and allows for content to be stored in a file rather than a database.

EntityWorker.Core – An Alternative to Entity Framework

EntityWorker.Core – An Alternative to Entity Framework

EntityWorker.Core is an object-relation mapper that enables .NET developers to work with relations data using objects. EntityWorker is an alternative to entityframework, is more flexible and much faster than entity framework.

©2018 devepar.com