Export data from MySQL to JSON using PHP

In this tutorial, we are going to learn, how to extract data from MySQL database and export it to a file in JSON format, using PHP. What is JSON? JSON (JavaScript Object Notation) is a lightweight format, used to format data for interchanging. It is based on a subset of JavaScript. The reason for the... » read more

Insert Input values into database using PHP

In this tutorial, we are going to learn how to get values from the user using a text field, text area, and checkboxes and save the values in the database. The following is a simple Pizza order form which asks for a customer’s name, address, and extra topics customer would like to have on his/her pizza.... » read more

Sending Email Using Email Templates in ASP.NET

This tutorial will teach you an easy way to send an email in ASP.NET using an email template. an email template is nothing but an HTML file that you can create and customize based on your needs. What is an Email Template? When you have a predefined structure to achieve a task, it is known to be a... » read more

Introduction to File Handling Methods in C#

The File class belongs to System.IO namespace. It provides static methods to create, open, copy, delete or move the file. The parent class of File is the Stream class. A stream is an abstract class. When you open a file for reading or writing purposes, it becomes a stream. Input and Output are two basic... » read more

Create Cascading Dropdown List in ASP.NET MVC

In this example, you will learn how to create a Cascading Dropdown list in ASP.NET MVC. What is cascading dropdown list? Collection of dropdown list controls dependent on each other while each and every control depends on the parent control or the previous control. Each element in the dropdown list is controlled by the parent... » read more

CRUD in Web API Using SQL Server and C#

Before we move on to discuss the web API, we should know what API means is. Application Programming Interface (API) is a collection of protocols, tools, and definitions that are used to create applications. API exposes interfaces which can be used to access the information of a service. Back to the Web API, it simply... » read more

Block/Unblock USB Ports in windows using VB.NET

In vb.NET, it is possible to control the port of windows, by editing the values in the local registry. Below are two functions that can be used to block and unblock USB ports using VB.NET. First, you need to import namespace below: Imports Microsoft.Win32 Disable/Block USB Port using VB.NET Private Sub BlockUSPPort() Dim regKey As... » read more

How to Log out of session in MVC

Logging out is an important step when it comes to security. Simply closing the browser may not clear the data you were accessing. Below is a function that you use from inside a controller to log out the right way. Log out action in MVC public ActionResult LogOut() { FormsAuthentication.SignOut(); Session.Abandon(); return RedirectToAction("index", "home"); } Happy Coding!!! Related Articles Create... » read more

Create a newline in rich text box in C#

There are two ways to create new lin in RichtTextBox control in C#, by  using: RichTextBox.Text property RichtTextBox.AppendText method RichTextBox.Text property myRichTextBox.Text += Environment.NewLine + "New line goes here"; RichtTextBox.AppendText method myRichTextBox.AppendText(Environment.NewLine + "New line goes here");   Related Articles Export Data from DataTable to PDF in C# using iTextSharp Create Your First C# Program Create... » read more

Basic Authentication in Web API

Authentication is the process of identifying the users based on their credentials, such as username and password. This restricts unauthorized people getting access to data or applications. There are 3 common ways of ensuring authentication. The basic method is to validate the username and password. Next method is to use smart cards and the final... » read more

Convert int to BigInteger in Java

The code below is to convert int to an integer, as well as an integer to a BigInteger. This example uses the namespace java.math. import java.math.BigInteger; public class IntConvertor{ public static void main(String[] args) { int input = 10; //Print out System.out.println(input); // convert int to Integer Integer integer = Integer.valueOf(input); //Print out System.out.println(integer); // convert... » read more

JSON Serialization and Deserialization in C#

Why JSON is important? In most of the cases, we use web services to receive and manipulate data. As well as when we use third party APIs’, they generate JSON data. JSON or the JavaScript Object Notation is the easiest way of serializing and sending data over a network. Due to its lightweight nature and... » read more

Introduction to cursors in Oracle

A PL/SQL package is a group of related subprograms. These subprograms or packages can be called explicitly by users or applications. PL/SQL blocks can include various PL/SQL language constructs. These constructs include variables, constants, cursors, and exceptions. Oracle Cursos explained If you are coming from a programming background, then you must be familiar with terminologies... » read more