Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Programming Articles - Page 1170 of 3363
601 Views
The Latin square is a matrix that has a special pattern. Let's see different examples to examine the pattern.1 2 2 1 1 2 3 3 1 2 2 3 1 1 2 3 4 4 1 2 3 3 4 1 2 2 3 4 1 The Latin square that you get will be of different size as you notice in the above examples. But, if you carefully observe the above matrices' pattern, you will find out that the last number of the previous row comes as the first element of the next row.That's the pattern ... Read More
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
460 Views
During the development of an application, and even after it’s built, you often need to change various settings that control how the application behaves. Configuration refers to the external values that control an application's behavior, consisting of settings and parameters that the application uses at runtime.The best practice regarding storing configuration values is outside the application, instead of hard-coding them in the source code. You don’t want to recompile and restart the application every time you make a change to the configuration. There are also security implications. You don’t want to store the database connection strings or passwords in the ... Read More
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
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
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
943 Views
When building or using web applications, it’s very common to run into errors. Hence it’s important to configure error handling for your web application and handle the errors gracefully to provide a suitable response to the user. This improves the usability of your application as well as makes it robust.There are many different errors that can happen in a normal application flow. However, the two important types of errors are exceptions and error status codes, e.g. 404, 502. Exceptions occur when the app runs into an unexpected circumstance. A very common example of an exception is the notorious NullReferenceException, which ... Read More
844 Views
Static files refer to content such as HTML, CSS, JavaScript, and images that are served directly to the users without any dynamic computation.In ASP.NET Core, the web root directory holds the static files. By default, it is the {content root}/wwwroot directory, but you can change it using the UseWebRoot() method.In the Program class, the CreateDefaultBuilder() method initializes the content root.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(); ... Read More
1K+ Views
In the context of web application frameworks, routing matches an incoming HTTP request to executable code. The executable code works as an endpoint that handles the request and returns a response.ASP.NET Core defines and configures the endpoints when the application starts. Routing also handles extracting the values from the request, building appropriate objects, and passing them to the methods that handle the request.Routing has been an important part of ASP.NET Core from the beginning. However, ASP.NET Core 3.0 introduced a new routing system called endpoint routing. It decouples routing from the MVC framework and makes it a more fundamental feature ... Read More
2K+ Views
Razor Pages simplify the traditional MVC-based programming model by adopting a file-based routing. Razor Pages focus on page-based scenarios for building web applications rather than using controllers and views like a traditional ASP.NET MVC application.Once the application receives an HTTP request, it moves through the middleware pipeline until it reaches a middleware component that can handle and process it. Typically, it's a routing middleware that matches a URL path to a configured route. This route defines which Razor page to invoke for this particular request.Once the router has selected the Razor Page, the framework executes that Razor Page to generate ... Read More