Categories
C# / .NET Program Tutorial

Copying file from one destination to another destination in C# using System.IO.File Class

Step 1: Import System.IO class Step 2: Create a test file in your local system. Step 3: Give Source and Destination Path, which should be available on your system. Step 4: Combine Path with File name using System.IO.Path class. You can also using basic string concordinate. Step 5: Check if Direct is exist before moving […]

Categories
Tutorial

How to center align the label and the textbox in HTML horizontally in webpage

Steps to align textbox and label Step 1: Center a div tag using margin as `0 auto`. Step 2: Align the label to right and make it float to left. Step 3: Align the textbox to left and make it float to right. Step 4: Make both label and textbox to inline-block. HTML  & CSS Live demo […]

Categories
Ruby Tutorial

How to add custom fonts to the Rails Application

Steps to add custom fonts to rails 1. Search and Download your prefered fonts from any website. I prefer google fonts. 2. Move the download files to your rails application’s vendor folder. i.e vendor/assets/fonts 3. Add following configuration to fileconfig/application.rb. config.assets.paths << Rails.root.join(‘vendor’, ‘assets’, ‘fonts’) config.assets.precompile << /\.(?:svg|eot|woff|ttf)$/ 4. Link all your fonts and font types […]

Categories
C# / .NET Program

C# program to group the sequence of number

This program will group the sequence of a number from the list with (-), for this example input 1,2,3,4  the output will be 1-4. If there is no sequence of the number then it should be printed as it is, example: 1,3,10 will provide the following output 1,3,10. Program Output: Enter the number: 1,2,3,4,10,11,12,20,100 1-4,10-12,20,100

Categories
Program Ruby

Ruby program for Happy and Unhappy(sad) Numbers

Description As per Wiki,  Happy Number – A happy number is a number defined by the following process: Starting with any positive integer, replace thenumber by the sum of the squares of its digits, and repeat the process until the number either equals 1 (where it will stay), or it loops endlessly in a cycle that does not include 1, 7, 10, 13, […]

Categories
C# / .NET Program

C# Program to find Happy and Sad Number

Description As per Wiki,  Happy Number – A happy number is a number defined by the following process: Starting with any positive integer, replace thenumber by the sum of the squares of its digits, and repeat the process until the number either equals 1 (where it will stay), or it loops endlessly in a cycle that does not include 1, 7, 10, 13, […]

Categories
C# / .NET Tutorial

Complete guide to integrate CCAvenue Payment gateway into ASP.NET website – with Screenshot

About this tutorial This is an end-to-end guide to integrating a CCAvenue payment gateway into ASP.NET web application using official kit. Starting from account setup to successful payment. Pre-Requirement Visual Studio Active CCAvenue account Merchant ID Access Code Working Key Official CCAvenue kit Little knowledge about C# & ASP.NET Setting up your CCAvenue account for […]

Categories
Program Tutorial

Java program for printing the matrix elements in Spiral Order – Full Explanation

Given 2D Matrix 1 2 3 4 5 6 7 8 9 Explanation Step 1: Print the values from first row. row = 3 & column = 3 1 2 3 4 5 6 7 8 9 Step 2: Print the last column from top to bottom. row = 2 & column = 3 4 […]

Categories
Program Ruby Tutorial

HackerRank – 30 Days of Code – Day 8: Dictionaries and Maps – Ruby Program

Objective Today, we’re learning about Key-Value pair mappings using a Map or Dictionary data structure. Check out the Tutorial tab for learning materials and an instructional video! Task Given n names and phone numbers, assemble a phone book that maps friends’ names to their respective phone numbers. You will then be given an unknown number […]

Categories
Program Ruby Tutorial

HackerRank – 30 Days of Code – Day 7: Arrays – Ruby Program

Objective Today, we’re learning about the Array data structure. Check out the Tutorial tab for learning materials and an instructional video! Task Given an array, A, of N integers, print A’s elements in reverse order as a single line of space-separated numbers. Input Format The first line contains an integer, N(the size of our array). […]