Tuesday, September 25, 2018

Working with Microsoft Cognitive Text Analytics

Microsoft Cognitive Text Analytics API is a Cloud-based machine learning service that provides advanced natural language processing. The Text Analytics service provides sentiment analysis, key phrase extraction, and language detection. This API supports a total of 120 languages. The Text Analysis API returns the detected language details and a numeric score between 0 and 1; if the score is close to 1, that indicates 100% certainty that the identified language is true.

Compressing and Decompressing Files With C#

To reduce the time needed for files to be transmitted over a network, Compression and Decompression techniques are very useful. Developers prefer to write code to compress files before sending them out to the network for a file upload process. Web applications get the most benefit out of it. The .NET Framework provides the System.IO.Compression namespace, which contains the compressing and decompressing libraries and streams. Developers can use these types to read and modify the contents of a compressed file.

Creating Captcha Images for Security with an ASP.NET Application

CAPTCHA (Completely Automated Public Turing test to Tell Computers and Humans Apart) is a security check to distinguish between humans and computers. Computers or bots are not capable of solving a Captcha problem. Captcha is automatically generated with a random string. Generally, Captcha is generated by using an image with text/numbers or combination of both. A human has to enter the correct Captcha code to pass through the security check. Captcha technology is used mostly to block spammers who try to sign up and hack information from Web sites, blogs, or forums.

Getting Started with LiteDB in .NET

LiteDB is a simple, serverless, fast and lightweight, embedded .NET document database written in .NET C# managed code. It's completely open source and free to use, even for commercial use. It's compatible with .NET 3.5, 4.x, and NET Standard 1.3 and 2.0. LiteDB was developed by Mauricio David; he was inspired by the MongoDB database and its APIs. LiteDB supports Document ACID transaction, storing files and stream data, and provides LINQ support. A developer simply can add a reference of the LiteDB.dll file in the project. Also, LiteDB can be installed via the NuGet Package Manager in Visual Studio or by typing the following command in the NuGet Package Manager command line tool:.

Deciding When to Use Weak References in .NET

The .NET WeakReference Class represents a weak reference, which references an object while still allowing that object to be reclaimed by garbage collection. Now, let's see an example. Create a console application from Visual Studio and name it MyWeakReference.
Create a WeakReference object and pass an object reference to the constructor call. In the following example, I have used the StringBuilder object.

Mocking API Responses in Azure API Management Portal

A mock API imitates a real API call by providing a realistic JSON or XML response to the requester. Mock APIs can be designed on a developer...