Sponsored

Saturday, April 8, 2023

Smart Home Concept and Choices

Smart Home is a thing for quite some time. Not just for enthusiasts but for pretty much everyone regardless of whether we realize that or not. Smart Home is not necessarily a standalone industry but its ideology spreads out very quickly and its elements get embedded in many areas of our life without our explicit consent. So it's not a question of "if" or "when" but rather how to get onboard and start riding the "smart home" wave to our benefits.

Monday, March 6, 2023

When Your CyberPower UPS is Out of Warranty You are Out of Luck


According to CyberPower support when your CP UPS is out of warranty your only options are:

  1. Recycle and replace the UPS. It's totally up to you if you want to stick with the CyberPower products of switch away in hope of better luck next time.
  2. It may help in some cases to try and replace a battery that you can only purchase from a third party supplier.

How would you know if purchasing a battery might help revive your UPS? Well, you'll need to be brave and open it up and do some research. If you don't feel like digging in the guts of an electrical device, this options is not for you and you may stop reading and go on with the option # 1 in the above list.

Thursday, April 15, 2021

dotPeek: a Totally Free Alternative for .NET Reflector

As a professional .NET developer you recognize the value of a .NET decompiler. There are many scenarios when the original source code is not available but requires an understanding and using a decompiler is definitely one of the best ways to look at the source code. One of the advantages working with a managed framework like .NET is an ability for a decompiler to convert an assembly into an code of a high level programming language like C# instead of a machine code. And this is exactly an expertise in which the dotPeek shines.

Friday, April 9, 2021

Problems Migrating From SQL Server Management Studio (SSMS) v17 to v18

If you are an active multi-year user of Microsoft SQL Server Management Studio you are probably well-used to a controversial history of this product as an arguably one of the most loved and hated at the same time and one of the most outdated as well. Understandably, with so many different active versions of Microsoft SQL Server the requirements for this product are quite challenging but the users (us) continue to vote for this tool to exist and push Microsoft to keep updating it regardless of many other alternatives available on the market.

Wednesday, March 31, 2021

Reorder Columns in Spark DataFrame with Select() and Scala


Sometimes, when dealing with a Spark data frame it may be necessary to reorder columns in a certain order. For example, to keep data consistent when trying to union two or more data frames with the same schema but different order of columns. Let's explore how that can be done relatively easy using a select() Spark SQL function.

Thursday, March 18, 2021

Incorrect ReSharper Behavior for CS1591 Warning

After upgrading from Visual Studio 16.8.x to 16.9.x the JetBrains ReSharper suddenly started marking a lot of public identifiers in the code as compiler errors with a message: "Missing XML comment for publicly visible type or member...". You can imagine how that can be very annoying.

Wednesday, February 3, 2021

.NET Web API: Confusing 404 Response to OPTIONS Request for CORS pre-flight

Problem: when a Angular applications sends an OPTIONS request to its own backend to satisfy CORS preflight policy it unexpectedly receives a 404 response from a .NET Core Web API application that effectively blocks an actual data data request from executing correctly. If you have ever experienced this problem, continue reading to understand what the problem is and how to fix it. 

Saturday, December 26, 2020

C#/.NET: Validate Anonymous Objects During Unit Testing

Say, we have developed a REST API based on .NET Web API framework and need to write a unit test for an end point that returns a collection of objects. This sounds like a usual trivial task that many developers do all the time. Unless, the API method that we need to test, returns a collection of anonymous objects, that is the API method is written using a C# anonymous or dynamic type to construct objects that are included in the list.

It's totally fine when the endpoint is consumed over HTTP as the result is first serialized into JSON for transfer and then de-serialized back into a JavaScript object on a consumer side. If, however, the endpoint is called directly in C# without JSON conversion, like in a unit test, it's an entirely different story. Let's discuss how we can overcome this issue.

Friday, December 18, 2020

Angular: Mock NgRedux for Unit Testing

If you use Redux in your Angular web application (likely it is an NgRedux from Angular Redux) and develop unit tests for components that depend on the Redux store sometimes it's easier to mock the Redux store rather than deal with incorrect values that it may supply in a test scenario. If this sounds like your situation, read on.

Friday, November 27, 2020

.NET Core OData: How to Construct a DateTime Filter

Say, we need to construct a query to an OData endpoint that filters records by DateTime values. Over the years as OData standard had been evolving there have been various different ways to work with DateTime columns depending on OData version and an implementation of an actual OData service that could have been based on various different frameworks. This being said, it's likely, that a single universal way of constructing a DateTime based filter clause for OData services might not exist. Take this under consideration, and note that the solution presented below had only been tested with OData services that are built with .NET Web API Odata v4.

Friday, November 20, 2020

Reuse a MemoryStream without Writing to a FileStream

MemoryStream is a very useful class as it allows working with a Stream-like data in memory without having dependencies on any external resources like files, etc. Even though the MemoryStream implements an IDisposable interface it does not actually have any critical resources to dispose of, so, explicitly disposing of a MemoryStream object is not strictly necessary as the .NET memory management will take care of it. This specifics presents an opportunity of reusing the MemoryStream object if needed across multiple code scopes.

Friday, November 6, 2020

Best Practices of Working with Date in JavaScript/TypeScript

Date is a built-in type in JavaScript/TypeScript (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) and provides most of the basic needs for manipulating with Date and Time values in the code. Being one of the most well-defined and often used basic types of the language it still generates a lot of confusion, questions and erroneously working code among a wide developers' community. Let's try and figure out some of the best practices that should be applied to the JavaScript/TypeScript code when dealing with the Date type.

Thursday, November 5, 2020

A Color Picker in Chrome DevTools

When you are working with CSS and specifically dealing with colors in HEX format it's very handy to be able to quickly find (or pick) a color value anywhere on your screen. There are tools for that, of course, namely, color picker browser extensions, that I used to have. Not anymore. Because, Chrome, that is my main browser, have a Color Picker built into the DevTools. How nice, eh?

Open the DevTools by clicking F12 (or use a menu) and in the Styles panel you can simply click on any color square and the Color Picker will open.

You can use a pipette tool on the left and while it's in the "ON" state and colored blue move it around the screen and click on any color and it will appear in the Color Picker with a HEX value.

Monday, November 2, 2020

New Code Syntax Highlighter Prism

Everyone who posts code samples in their blogs needs a code highlighter. Why? Because without one the code samples would not look nice and readable and your readers would become unhappy and stop reading your blog. Don't like the sound of it? Use a code highlighter.

Monday, May 1, 2017

Deploying a Web App from a Command Line using MSBuild and WebDeploy


Modern CI/CD process especially in an agile/scrum environment often includes a deployment step so the automated and manual testing can be done. Depending on specifics of the development process it can be implemented in variety of ways but for a .NET Web Application the most convenient way is to call the MSBuild to publish a package to a target machine running IIS and instrumented with the Web Deploy.

Thursday, April 20, 2017

Finalized Agenda for the Global Azure Bootcamp 2017 Event


The finalized agenda for the Global Azure Bootcamp 2017 community event is finally available. It is also updated on the event registration page. The organizers (the Toronto Azure/Architecture User Group ArcUG) managed to assemble a group of great speakers to cover an exciting list of topics.

The morning session will include one of the hottest topics "Big Data and Machine Learning" presented by Anthony Bartolo, Microsoft technology evangelist, followed by related hands-on lab.

Thursday, April 13, 2017

Global Azure Bootcamp 2017

All around the world user groups and communities want to learn about Azure and Cloud Computing! On April 22, 2017, all communities will come together once again in the fifth great Global Azure Bootcamp event! Each user group will organize their own one day deep dive class on Azure the way they see fit and how it works for their members. The result is that thousands of people get to learn about Azure and join together online under the social hashtag #GlobalAzure! Join hundreds of other organizers to help out and be part of the experience!

Monday, April 3, 2017

Ingenious USB Flash Drive Repair Utility

Every now and then it happens when you expect it the least: Windows fails to mount and read your trusted USB flash drive that is urgently needed and requests to format it. When you reluctantly agree after struggling to remember whether there was any important information on it (check point: never use USB flash drives for long term storage) you only see that Windows recognized just a tiny portion of the drive as accessible and it's useless because the file you need to copy is way larger. What to do?

Friday, February 17, 2017

Intel Network Cards are a Disappointment: still no solutions

For years, Intel network cards both wired and wireless have been a standard of quality, performance and compatibility in my book. Unfortunately, this situation is changing rather quickly. Recently, the quality of hardware and software drivers of the Intel products have been disappointing. There are compatibility problems with Windows 10 and I haven't found solutions to resolve the problems described below. I am sharing this information in the attempt to help other people avoid the problems if they can.

Friday, January 6, 2017

VPN Site-to-Site connection between Azure VPN Gateway and pfSense: Important Details

When implementing an IaaS solution on Azure for, let's say, hosting a web application, it is important to have a controlled secure access to the Azure network from the office site in order to limit an exposure of the Azure virtual machines to the public Internet and prevent unauthorized access to the Azure network resources. Standard solution for this requirement is a site-to-site VPN that allows continuous encrypted connection between two networks: a physical office network and a virtual network on Azure.