Find my next video in the Power Platform series – Getting Started with Power BI
Find my previous videos in the series here
Praveen's CTO Blog
Find my next video in the Power Platform series – Getting Started with Power BI
Find my previous videos in the series here
From the Azure Portal, create a resource “Text Analytics”
Once created, you should be able to get the Endpoint URL and Key from the “Keys and Endpoint” section
Get the Azure.AI.TextAnalytics nuget package for your solution
Here you go your sample code
using Azure;
using Azure.AI.TextAnalytics;
using System;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
string url = "https://mytestoutlookaddin.cognitiveservices.azure.com/";
string key = "paste_your_key_here";
var client = new TextAnalyticsClient(new Uri(url), new AzureKeyCredential(key));
DocumentSentiment mood = client.AnalyzeSentiment("It's a nice day!");
Console.WriteLine("Mood: {0}", mood.Sentiment );
Console.WriteLine("Positive: {0}", mood.ConfidenceScores.Positive);
Console.WriteLine("Neutral: {0}", mood.ConfidenceScores.Neutral);
Console.WriteLine("Negative: {0}", mood.ConfidenceScores.Negative);
Console.ReadKey();
}
}
}
Below is the output expected:
Watch my new vlog on #Microsoft #PowerAutomate
How to send a daily Quote of the Day mail using Microsoft Power Automate
#PowerPlatform
using System;
using System.Net;
using System.Xml;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
using (WebClient wc = new WebClient())
{
string data =
wc.DownloadString("https://www.brainyquote.com/link/quotebr.rss");
XmlDocument xml = new XmlDocument();
xml.LoadXml(data);
var node = xml.SelectNodes("//rss/channel/item[1]");
Console.ForegroundColor = ConsoleColor.Green;
Console.WriteLine("{0} by {1}",
node[0]["description"].InnerText,
node[0]["title"].InnerText
);
Console.ResetColor();
}
}
}
}
Watch my latest knowledge vlog:
Getting Started with Microsoft Power Virtual Agents
This short video clip demonstrates how to create an Azure Storage Account and upload a index.html file.
Below are some common mistakes developers make while development. Most of the mistakes will not impact the functionality of the application so tendency is to make the mistake subconsciously. Security should be by design and it is not something we should incorporate after the development.
OWASP guidelines should be taken as high priority in addition to this list.
This is the screen demo of my previous blog post.
We don’t deal with .NET framework, or .NET Core anymore. We call it ‘.NET’. As of writing this blog, the latest version available is .NET 5. And, these steps works in previous versions of .NET Core also.
Assuming you have downloaded the latest version of .NET.
Step 1:Open command prompt
Step 2: Type: dotnet new console -name “HelloWorld“
You must see a new folder named “HelloWorld” crated with a directory structure like this:
You can open Program.cs to see its contents. It has a very basic program to display “Hello World!” message.
Step 3: Your .NET console application is ready. First, you have to build it
Type command: dotnet build “HelloWorld”
You can see HelloWorld.exe file is created, in addition to some other files in your folder \HelloWorld\bin\Debug\net5.0
Step 4: Run!
You can simply run the exe file directly going to the location, or by typing this command:
Type command:
Step 5: Alternate way to run the program
Go inside your program folder, i.e., “HelloWorld“, then type command:
dotnet run HelloWorld
or simply, dotnet run