Coder Baba
2.42K subscribers
1.01K photos
23 videos
722 files
723 links
Everything about programming for beginners.
1 and only official telegram channel of CODERBABA India.

Content:
.NET Developer,
Programming (ASP. NET, VB. NET, C#, SQL Server),
& Projects
follow me https://linktr.ee/coderbaba
*Programming
*Coding
*Note
Download Telegram
CB Pharmacy VB dot net Project.rar
1.6 MB
mEDICAL sTORE OR PHARMACY MINI PROJECT vB DOT NET
What is w3css Container and panel?:

Ans:
* - most important classes, and it’s commonly used for <div> tag, <header>, and <footer> tags.

*- using "w3-container" class we create container and "w3-panel" class we created panel.

*- The "w3-container" class adds a 16px left and right padding ,
while the "w3-panel" class adds a 16px top and bottom margin and a 16px left and right padding to an element.
w3css Button class:

The w3-button class create your own desired buttons. variations of the button classes available:

1- w3-button —
a rectangular button with a gray hover effect. The default color is light gray . The default color is inherited from the parent element .

2- w3-bar —
a horizontal bar that can be used to group buttons together
(perfect for horizontal navigation menus)

3- w3-block —
a class that can be used to define a full-width (100%) button.

4- w3-circle —
can be used to define a circular button.

Example:

<button class="w3-button w3-green">w3-button</button>
<button class="w3-button w3-block w3-blue">w3-block</button>
<button class="w3-button w3-circle w3-red">+</button>
keep practice
Card:
the "w3-card" class is a useful class to provide a paperlike effect.




w3css Display:
display elements at a specific position via the display class. You need to have a parent <div> as a container.

example:

<div class="w3-display-container w3-red" style="height:300px;">
<div class="w3-display-topleft">Top Left</div>
<div class="w3-display-topright">Top Right</div>
<div class="w3-display-bottomleft">Bottom Left</div>
<div class="w3-display-bottomright">Bottom Right</div>
<div class="w3-display-left">Left</div>
<div class="w3-display-right">Right</div>
<div class="w3-display-middle">Middle</div>
<div class="w3-display-topmiddle">Top Middle</div>
<div class="w3-display-bottommiddle">Bottom Middle</div>
</div>
Prefix increment (++A):
If you use the ++ operator as a prefix like: ++A, the value of 'A' is incremented by 1; then it returns the New incremented value.

Example 1:
var A=2;
document.write(++A);
output:
3

-----------------------------
Postfix Increment (A++):
If you use the ++ operator as a postfix like: A++, the original value of A is returned first; then A is incremented by 1.
Example :

B=2;

doucument.write(B++);
output: 2

Note: here B++ return old value which is 2 and then after printing 2 it will increment value of B by 1

---------------------------

some examople:

Ex: 1

var a=10;
++a; increment value of a by 1
document.write(a);

document.write("<br>");
document.write(++a); //increment the value of a by 1 then display output

----------------------
output
11
12

-------------------------

ex:2

var num=5;
var result= (++num) + (++num) + (++num);
document.write(result);



------------------------
ex:3

var a=4;
document.write(++a); //increment the value of a by 1 then display output
document.write("<br>");
document.write(a++);// display output then increment the value of a by 1

output:
5
5
Wokring of Increment and Decrement Operators:

example:
<script>
var a, b, c;
a = 10;
b = 20;
c = 1;

c += (a++) * (5) - (--b);

document.write(c);
</script>
----------------------------
step by step execution:

Step 1- a++ is postfix, the current value of a will be used

C+= 10 * 5 - --b;

Step 2- (--b) is prefix, the value of b will be decremented than use values of b.

C+= 10 * 5 - 19;

Step 3- multiply 10 * 5

C+= 50 - 19;

Step 4 - subtract 50-19;

C+=31;

Step 5- (+=) we can write it as x=x+1 or C=31+1

C=31+1;
or c+=31

than
final Result is
C=32;
------------------------
output of C is = 32
Online Shoes Shopping Website
video available on Youtube channel @CODERBABA
Question :1
What is switch statement and define its rules and explain with Example in Javascript.

Ans:

A switch statement allows a variable to be tested for equality against a list of values. Each value is called a case, and the variable being switched on is checked for each switch case.

Syntax:
----------------------------------


switch(expression) {

case expression :
statement1;
break; /* optional */

case expression :
statement2;
break; /* optional */

/* you can have any number of case statements */
default : /* Optional */
statement3;
}

------------------------------

The following rules apply to a switch statement :−



1-: You can have any number of case statements within a switch. Each case is followed by the value to be compared to and a colon.

2-: The expression for a case must be the same data type as the variable in the switch.

3-: When the variable being switched on is equal to a case, the statements following that case will execute until a break statement is reached.

4-: When a break statement is reached, the switch terminates, and the flow of control jumps to the next line following the switch statement.

5-: Not every case needs to contain a break. If no break appears, the flow of control will fall through to subsequent cases until a break is reached.

6-: A switch statement can have an optional default case, which must appear at the end of the switch. The default case can be used for performing a task when none of the cases is true. No break is needed in the default case.


-----------
Example:

<script>

var grade = 'B';

switch(grade) {
case 'A' :
alert("Excellent!\n" );
break;
case 'B' :
case 'C' :
alert("Well done\n" );
break;
case 'D' :
alert("You passed\n" );
break;
case 'F' :
alert("Better try again\n" );
break;
default :
alert("Invalid grade\n" );
}

</script>