Server Side Programming Articles

Page 1937 of 2109

How does parameters 'c' and 'cmap' behave in a Matplotlib scatter plot?

Rishikesh Kumar Rishi
Rishikesh Kumar Rishi
Updated on 08-Jul-2021 1K+ Views

To get a sense of how the parameters c and cmap behave in a Matplotlib scatterplot, we can take the following steps −Set the figure size and adjust the padding between and around the subplots.Initialize a variable N to store the number of sample data.Create x and y data points using numpy.Plot x and y data points using scatter() method, color and colormap.To display the figure, use show() method.Exampleimport numpy as np from matplotlib import pyplot as plt plt.rcParams["figure.figsize"] = [7.50, 3.50] plt.rcParams["figure.autolayout"] = True N = 50 x = np.random.randn(N) y = np.random.randn(N) plt.scatter(x, y, c=x, ...

Read More

How to Install Newman using NPM?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 25-Jun-2021 2K+ Views

We can install Newman using npm. Newman can be installed using npm and Node.js. To download Node.js, navigate to the link − https://nodejs.org/en/download/current/.As we have downloaded Node.js successfully, we can check it with the below command −In Windowsnode --vIn Linuxnode --versionThe npm package becomes available automatically on installing Node.js. We can check it with the below command −In Windowsnpm --vIn Linuxnpm --versionFinally to install Newman, run the below command −For Windowsnewman --vFor Linuxnewman --version

Read More

Explain the ASP.NET Core support for multiple environments for development and production

Akshay Khot
Akshay Khot
Updated on 22-Jun-2021 1K+ Views

Running an application in production for live customers is very different from running it when you are developing it on your local machine. In production, your application is hosted on a server which has very different configurations and specifications than your computer. Various services that your application talks to, such as databases or external APIs change for production.By letting the application know which environment it’s running, you can vary the application’s behavior. ASP.NET Core makes it easy to manage various environments effortlessly. You can configure different configuration settings for different environments, and tweak them without having to recompile the application. ...

Read More

How to schedule background tasks (jobs) in ASP.NET Core?

Akshay Khot
Akshay Khot
Updated on 22-Jun-2021 2K+ Views

Background tasks, also called as jobs, are essentially services that aren’t meant to execute during a normal flow of the application, such as sending email confirmations or periodically cleaning up the database to purge the inactive accounts. These jobs are not meant to interact with the customers or process user input. Rather, they run in the background, handling items from a queue or executing a long-running process.A primary advantage of performing these tasks in a background job or service, you can keep the application responsive. For example, when a user signs up, instead of sending them an email in the ...

Read More

What is SignalR and how to use it?

Akshay Khot
Akshay Khot
Updated on 22-Jun-2021 4K+ Views

In typical web applications, the communication flow is one-way, i.e. from client to the server. The client initiates a request to the server, the server performs some task, and sends the response to the client.SignalR is an open-source project that enables real-time, bi-directional web communication from server to clients. Using SignalR, you can write server-side code that can communicate with the clients instantly.SignalR simplifies the process of adding real-time web functionality to web applications, where the server code pushes content to connected clients as soon as it becomes available. This frees the clients from repeatedly polling the server, and having ...

Read More

What is Kestrel and how does it differ from IIS? (ASP.NET)

Akshay Khot
Akshay Khot
Updated on 22-Jun-2021 10K+ Views

Kestrel is a lightweight, cross-platform, and open-source web server for ASP.NET Core. It is included and enabled by default in ASP.NET Core. Kestrel is supported on all platforms and versions supported by .NET Core.In the Program class, the ConfigureWebHostDefaults() method configures Kestrel as the web server for the ASP.NET Core application.public class Program{    public static void Main(string[] args){       CreateHostBuilder(args).Build().Run();    }    public static IHostBuilder CreateHostBuilder(string[] args) =>       Host.CreateDefaultBuilder(args)          .ConfigureWebHostDefaults(webBuilder =>{             webBuilder.UseStartup();          }); }Though Kestrel can serve an ...

Read More

Explain the purpose of the Startup class in ASP.NET Core

Akshay Khot
Akshay Khot
Updated on 22-Jun-2021 4K+ Views

The Startup class configures your application's services and defines the middleware pipeline.Generally speaking, the Program class is where you configure your application's infrastructure, such as the HTTP server, integration with IIS, and configuration sources. In contrast, the Startup class defines which components and features your application uses and the middleware pipeline for your app.Startup.csHere is a sample Startup.cs file in a standard ASP.NET Core application.using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.HttpsPolicy; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; namespace TutorialsPoint{    public class Startup{       public Startup(IConfiguration configuration){       ...

Read More

Explain the purpose of the Program class in ASP.NET Core

Akshay Khot
Akshay Khot
Updated on 22-Jun-2021 918 Views

An ASP.NET Core application starts similarly to a .NET Console application. It uses the Main() method defined in the Program.cs file as the entry point of the application. The framework calls the Main() method whenever you start the web application.In the ASP.NET Core application, the Main() method builds and runs the Host. The Host object is one of the essential parts of the ASP.NET Core application. It contains the configuration and the webserver (Kestrel) that your application uses.Program.csHere is a sample Program.cs file in a standard ASP.NET Core application.using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; ...

Read More

Explain the purpose of the .csproj file in an ASP.NET application

Akshay Khot
Akshay Khot
Updated on 22-Jun-2021 4K+ Views

The .csproj file tells dotnet how to build the ASP.NET application. It’s one of the most important files in an ASP.NET project.An ASP.NET project can depend on third-party libraries developed by other developers. Usually, these libraries are installed as Nuget packages using Nuget package manager. Once you install a package using Nuget, the name of the package along with its version is listed in the .csproj file.If you are familiar with Node.js, you can think of a .csproj file as a package.json file. Upon running the ‘dotnet restore’ command, dotnet uses the .csproj file to determine the packages to install ...

Read More

What are the benefits of choosing ASP.NET Core over ASP.NET?

Akshay Khot
Akshay Khot
Updated on 22-Jun-2021 3K+ Views

ASP.NET Core is a high-performance, cross-platform, and open-source framework. It allows you to build modern, cloud-enabled, and Internet-connected apps.With ASP.NET Core, you can:Build web applications and services, Internet of Things (IoT) apps, and backends for mobile applications.Work on your favorite operating system such as Windows, macOS, or Linux, and choose the tools and IDEs of your choice.Develop on and Deploy to the cloud or on-premises.Take advantage of containers and Docker to ease the deployment and distribution of your application.Run on the modern, fast, lightweight .NET Core framework.Some of the significant benefits of the ASP.NET Core framework over the ASP.NET framework ...

Read More
Showing 19361–19370 of 21,090 articles
Advertisements