Programmers learn & share

Recent Posts

3 views

This article is more of an answer to a question given to me. The question is “is class a reserved word and it defines only a data type?” I’ll try my best to give all the things I know.

 

Is class a reserved word?

Yes, a class is a reserved word in C++. Class is a keyword i.e., it possesses a special meaning to the...

posted 7 hours ago in c++ by Lalit Kumar (100 points)   | 3 views
3 views

Before moving on to today’s topic, which is how to print a linked list, let’s talk about linked lists. We will be discussing what is a linked list and some of its advantages and then the way of printing a linked list.

 

What is a linked list?

It is a linear data structure like arrays. Linked list elements are linked using pointers and they...

posted 1 day ago in c++ by Lalit Kumar (100 points)   | 3 views
12 views

Squaring any number in mathematics is pretty simple and in C++ it is similar. We can calculate the square of any number by multiplying it by itself. And that's it, that is all for today.

 

How to calculate the square of any number in c++?

 

Approach → 

Define two int in the program. First int will store the number and...

posted 4 days ago in c++ by Lalit Kumar (100 points)   | 12 views
16 views

 

In a variable, we can store some values like integers, characters and et cetera. We can identify them by their data types in the program. But how we are gonna find out if the input is an integer or not. We are going to write a program for finding out in this article. 

We can use this little in many ways like in a particular program we want to take...

posted 4 days ago in c++ by Lalit Kumar (100 points)   | 16 views
3 views

For reversing a string in c++ we can use the inbuilt function, printing reverse string and by creating our own function. In this article, we are going to learn how to reverse a vector?

Example

I am assuming that you already know about the vectors. Here we are taking an example of vector and we are going to reverse it.

 

Vec = {1, 2, 3, 4, 5,...

posted 4 days ago in c++ by Lalit Kumar (100 points)   | 3 views
22 views

How reversing the string works in C++? Assume we have a string as “exam” the reverse form of this string will be “maxe”. There are some methods to reverse a string in c++ and we will be learning them in this article. 

 

Methods

 

By creating a function

Using the inbuilt function

Printing...

posted May 19 in c++ by Lalit Kumar (100 points)   | 22 views
27 views

Solution:

STEP 1: Create a HTML Page with multiple checkboxes

<div class="container"> <form action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="post"> <input type="checkbox" id="Country" name="Country[]"...
posted May 19 in php by Tushar Shuvro (5,460 points)   | 27 views
25 views

Solution:

STEP 1: Though it is not a conventional way however you can try this code

for($i=0;$i<count($data);$i++) { echo('<tr>'); echo('<td>' . $data[$i][0] . '</td>'); echo('<td>' . $data[$i][1] . '</td>'); echo('<td>' . $data[$i][2] . '</td>'); ...
posted May 19 in php by Tushar Shuvro (5,460 points)   | 25 views
15 views

Solution:

STEP 1: Using a comma seprated store it to an array and save the files

Code:

<label for="aoi">Area of Interest:</label> <select id="sel_aoi" name="aoi[]" multiple="multiple"> <option...
posted May 19 in php by Tushar Shuvro (5,460 points)   | 15 views
18 views

Solution:

STEP 1: For getting value of a checked checkbox

Code:

<form action="#" method="post"> <input type="checkbox" name="gender" value="Male">Male</input> <input type="checkbox" name="gender"...
posted May 19 in php by Tushar Shuvro (5,460 points)   | 18 views
57 views

Solution:

1. For Windows – Hold down + Ctrl key for selecting multiple option

2. For Mac – Hold down command key for selecting multiple option

STEP 1: Create a list of item

Code:

posted May 19 in php by Tushar Shuvro (5,460 points)   | 57 views
13 views

Solution:

STEP 1: register.php

Code:

<?php include('process.php') ?> <html> <head> <title>Register</title> <link rel="stylesheet" href="style.css"> </head> <body> <form method="post" action="register.php"...
posted May 19 in php by Tushar Shuvro (5,460 points)   | 13 views
13 views

Solution:

Code: foreach array

$row_data = array(); foreach($_POST['name'] as $row=>$Name) { $issuedate=('Y-m-d'); $issuetime=('h:i:s'); $name=mysql_real_escape_string($Name); $id=mysql_real_escape_string($_POST['id'][$row]); ...
posted May 19 in php by Tushar Shuvro (5,460 points)   | 13 views
30 views

The first thing you will do right-click RandomPic select properties and find out what types of file it is (.jpg, .jpeg, .png or ping).

Solution:

Use the follwing Tag

<image src ="Random_Pic.ping"/>

or,

<img src="
posted May 19 in html by Tushar Shuvro (5,460 points)   | 30 views
10 views

The dirname(--FILE--) function is a built-in function that provides the full path/ absolute path of a directory. The way we do that is by getting help from php. The dirname() is the function to go for which gives the absolute path to a directory in which the file exists. Each file name could be accessed by using the __FILE__ constant. So dirname(__FILE__) can easily give you...

posted May 19 in php by Farkhanda Athar (1,370 points)   | 10 views
5 views

The date default_timezone_set() function is a built-in function in PHP which is used to set the default time zone used by all the date/time functions in a script. This function returns false when the timezone is not valid and returns True otherwise.

Syntax:

The syntax of date_default_timezone_set() function is as;

posted May 19 in php by Farkhanda Athar (1,370 points)   | 5 views
6 views

Php permit users to set some of its settings in the php.ini file by using ini_set() method. The init_set function allows users to change the system attributes that affect the way your script is executed. Changes only affect the current script and revert when the script ends.

Arguments:

This function requires two strings of arguments. The first...

posted May 19 in php by Farkhanda Athar (1,370 points)   | 6 views
9 views

When the user runs the artisan command make: auth in LARAvel 6 to make authentication scaffolding but the following error occurred;

“Command make: auth is not defined”.

Reason:

The reason behind this is that the in Laravel 6 php artisan make: auth command has been removed. From laravel version 6 the command...

posted May 19 in php by Farkhanda Athar (1,370 points)   | 9 views
10 views

The user can perform this function with the help of domain masking. Domain making allows the user to hide the URL of the original website and display the URL of another website

Reason:

When you have an existing website that is hosted fee and you are not ready to pay for the website hosting yet. In this case, you can register a new domain name...

posted May 19 in php by Farkhanda Athar (1,370 points)   | 10 views
111 views

Solution:

STEP 1: File array in input name to send multiple file in the post

<form method='post' action='#' enctype='multipart/form-data'> <div class="form-group"> <input type="file" name="file[]" multiple> </div> <div class="form-group"> ...
posted May 18 in php by Tushar Shuvro (5,460 points)   | 111 views
2,187 questions
2,514 answers
59 comments
241 users