Azure Based COVID19 PPE Hospital Forecasting Using Azure Server-less Architecture

Introduction This project was born from Rush’s Medical Center development of the same project which was implemented using Jupyter Notebook & hosting it on a virtual machine using Voila. Rush’s Medical Center calculates forecasting based on 3 models: Exponential Regression Logistic Regression Polynomial Regression Deploy to Azure To deploy this solution to Azure click here to access … More Azure Based COVID19 PPE Hospital Forecasting Using Azure Server-less Architecture

Write class instance to XML File and read file contents

You have a class and you need to save values to of the class to an xml file to be consumed later on  [code source=”C#”] public class TemplateInformation { public string StoredProcedure { get; set; } public List<string> Parameters { get; set; } public string TemplatePath { get; set; } public string TemplateName { get; … More Write class instance to XML File and read file contents

OAuth2 – Pass Access Token – C#

Now that you have your Access Token – in case you missed it, here is the link to how to get it OAuth2: Get an Access Token – C#, you can now pass your authorization token to interact with your API. Make sure to add a header to your request with your authorization token [code … More OAuth2 – Pass Access Token – C#

OAuth2 – Get an Access Token – C#

What is OAuth2? OAuth 2.0 is the industry-standard protocol for authorization. OAuth 2.0 supersedes the work done on the original OAuth protocol created in 2006. OAuth 2.0 focuses on client developer simplicity while providing specific authorization flows for web applications, desktop applications, mobile phones, and living room devices. reference: https://oauth.net/2/ Who uses OAuth2? Among them … More OAuth2 – Get an Access Token – C#

Handy C#, VB.Net & SQL Code Snippets

Date time – how to initialize a date [code language=”csharp”] DateTime value = new DateTime(2017, 1, 18); [/code] Concatenate string list into comma separated string [code language=”csharp”] List<string> message = new List<string>(); message.Add("Record exists"); message.Add("Invalid data format"); message.Add("Duplicated record"); string output = String.Join(", ", message.Where( m=> (m.Length != 0))); Console.WriteLine(output); [/code] Initialize a string list … More Handy C#, VB.Net & SQL Code Snippets

Refactoring IV – Finally There

On the previous post, we moved validation functionality to the Scraping object. The resulting function was this: [code language=”csharp”] private void btnStockSales_Click(object sender, RoutedEventArgs e) { TickerDataCollection = new ObservableCollection&amp;amp;amp;amp;lt;TickerData&amp;amp;amp;amp;gt;(); var stockList = ReadStockData(); foreach (var item in stockList) { Scraper y = new Scraper(); TickerData x = y.Scraping(item); TickerDataCollection.Add(new TickerData(x.Ticker) { High = x.High, … More Refactoring IV – Finally There

Refactoring III -Why is this here?

On the previous post I moved URL parsing code by extending the StockData class and creating a property called Url, now we are left with this code, but if you look at the highlighted code, there are way too many things happening here!. [code language=”csharp” highlight=”14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29″] private void btnStockSales_Click(object sender, RoutedEventArgs e) { TickerDataCollection = new ObservableCollection(); // … More Refactoring III -Why is this here?

Refactoring II- Encapsulating

On my previous post, I started refactoring a function that reads stock and dates, checks the data against Yahoo Finance and returns some data. In this function, I take the Stock Ticker and the data and parse the URL to be evaluated by our web scrapper object. [code language=”csharp” highlight=”13,14,15,16,17,18,19,20,21,22,23″] private void btnStockSales_Click(object sender, RoutedEventArgs … More Refactoring II- Encapsulating

Refactoring I -Convert Linq Anonymous Types to List

Refactoring is an important process to crafting readable and maintainable code. Functions should follow  the single responsibility principle – a function should do one thing and one thing only and should have few lines of code. Like with everything, you should apply this with measure and wisdom. I was asked to write a function that … More Refactoring I -Convert Linq Anonymous Types to List

Books every software developer should read in 2016 – if you have not done so

The obligatory reflection on what have we accomplished in 2015 … always a sticky question. But if keep it to my book, training and research, it does not look that bad, I managed to keep the momentum going. Software Development Cracking the coding Interview – Gayle Laakman This is a great book with brain teasers and … More Books every software developer should read in 2016 – if you have not done so

Sum and Group Data Table Records Using Linq

The Problem You have a data table and you need to group and sum records dynamically. Solution I needed to group information by a field and the sum the values on a different field; For example, I want to group employees by department and then sum their salary. Below is the linq code to this: … More Sum and Group Data Table Records Using Linq

Basic Data Structures: AVL Trees

Basic Data Structures : AVL Trees Now to AVL trees, another neat data structure to store lists of information.. This my friends is a courtesy of communism (gasp!) yes, AVL trees were invented by these soviet guys: Georgy Adelson-Velsky and E. M. Landis; for the history lesson and more theory you can check WikipediA – … More Basic Data Structures: AVL Trees

Basic Data Structure: Linked Lists

Basic Data Structures: Linked Lists In a return to basics – and plenty of nothing to do – I implemented my own little linked list. Given the state of modern computing I have never really needed to implement a linked list, .Net framework has excellent libraries that manage lists and arrays, however, I guess it … More Basic Data Structure: Linked Lists