Friday, 21 February 2020

How to print Specific area and avoid the some area in javascript

Hi, guys below are an example to print a specific area in javascript, also you can hide the specific area.

Example:

<html>
<body>

<div id="printableArea"> <h1 style="color:red">Print me</h1> </div>
<div><h2>Not print</h1></div>

<input type="button" onclick="printDiv('printableArea')" value="print a div!" />
<script>

function printDiv(divName) {
     var printContents = document.getElementById(divName).innerHTML;
     var originalContents = document.body.innerHTML;
     document.body.innerHTML = printContents;
     window.print();
     document.body.innerHTML = originalContents;
}
</script>

</body>
</html>

Output:


Saturday, 8 February 2020

Write example on Switch Case in c++

Switch case statement is used when we have multiple conditions and we need to perform different actions based on the condition.

Below is an example in c++.

#include <iostream>
using namespace std;
int main(){
   
   int firstnumber,secondnumber,result,option;
   cout<<"-------Calculation of two number---------\n";
   cout<<"Enter First Number: ";
   cin>>firstnumber;
   cout<<"Enter Second Number: ";
   cin>>secondnumber;
   cout<<"\nSelect a below option to perform the actions\n";
   cout<<"1. Addition\n";
   cout<<"2. Subtraction\n";
   cout<<"3. Multiply\n";
   cout<<"4. Division\n";
   cout<<"Enter option: "
   cin>>option;
   
   switch(option) {
      case 1: 
result=firstnumber+secondnumber;
cout<<"Result of Addition is "<<result;
      case 2: 
        result=firstnumber-secondnumber;
cout<<"Result of Subtraction is "<<result;
      case 3: 
        result=firstnumber*secondnumber;
cout<<"Result of Multiply is "<<result;
      case 4: 
  result=firstnumber/secondnumber;
cout<<"Result of Division is "<<result;
  default: 
        cout<<"You have select a wrong option";
   }
   cout<<"\n\n~~~~~~~~~~~THANK YOU FOR VISITING HERE~~~~~~~~~~\n\n";
   return 0;
}

Output 
-------Calculation of two number---------
Enter First Number: 10
Enter Second Number: 20

Select a below option to perform the actions
1. Addition
2. Subtraction
3. Multiply
4. Division

Enter Option: 3
Result of Multiply is 200



*************FOLLOW MY BLOG TO GET UPDATE FROM TECHNICAL GURU*********

Thursday, 6 February 2020

Write a program to display addition of two decimal number in c++.

#include<iostream.h>
int main()
{
 float number1,number2,total;
cout<<"Enter first number: ";
cin>>number1;
cout<<"Enter second number:";
cin>>number2;
total=number1+number2;
cout<<"-----------------------Result------------\n";
cout<<"The first number is enter by you: "<<number1<<endl;
cout<<"The second number is enter by you: "<<number2<<endl;
cout<<"Addition of two number is: "<<total;
return 0;
}

Saturday, 1 February 2020

Html Part 1: What is Html and how to start?

Hello guys,
Today I am going to start an HTML. Here I will explain to you in every detail. How to start HTML and see the output of the Html.
  1. The full form of the Html is HyperText Markup Language.
  2. By using HTML elements we can create a HTML pages.
  3. All HTML elements are designed in < > tags.








in the above picture you can see there are many HTML elements are used. and the above example is divided into 3 part
Section 1: Main Section
Section 2: Head section
Section 3: Body Section
for any HTML code, you have to divide code into 3 parts.

For  main section <html> tag used.
For head section <head> tag used.
For body section <body> tag used.

4. Html tag come in pairs. means there will be an open tag and closing tag.
In the above picture at line number 1 <html> tag open and it closed at line 10 with </html> tag.
All HTML tag closed by forward-slash(/). same as head tag open at line no 2 and closed at line no 4.
In the body section there Heading tag.

this is the output of the above example.









  • Heading Tag: Heading tag is used for display text in bold format as you can see output picture.
        there are 6 heading tags available in HTML which is <H1> to <H6>.
       <h1> defines the most important heading. <h6> defines the least important heading.
  • Paragraph Tag: Paragraph tag is used to display text normal format. 


Example:
<html>
<head>
<title>my first example</title>
</head>
<body>
<h1>This is heading</h1>
<h1>This is another heading</h1>
<p>This is paragraph</p>
</body>
</html>

Follow the below steps to run the above code.
Step 1. open the notepad and copy-paste above code 
Step 2. Save the file with an extension of .html like supposed you want to save your file with the name of example1 then your file name will be example1.html.
Step 3. The saved file open in any browser and see the output.

Thanks for reading, Wait for next post Html Part 2.

**************** Quotes ****************
“There is no end to education. It is not that you read a book, pass an examination, and finish with education. The whole of life, from the moment you are born to the moment you die, is a process of learning.”

Enjoy the post and try to learn something new from every post.

If you have any doubt or any question ask me on Instagram. You can join my telegram channel to get the latest updates on any post.
Telegram Channel: @akhifamily
Instagram : akhilesh_vis17



List of programming language are uses to developing the android application.

Hi guys,
The most popular application is currently required to developing in all business.

And currently mostly people are using android application.

The beginner developer can also select our future in android. Now there many programming languages are listed below for developing android application.









1. BuildFire.js
BuildFire.js leverages the BuildFire SDK and Javascript to allow developers to rapidly build mobile apps with the power of the BuildFire backend.

2. Python
Python is a powerful high-level language that can be used to create android and desktop apps from scratch. Just to give you a hint of how powerful this language is, Dropbox is created in Python

3. Java
Android OS is written in Java so if you learn Java, you will be able to create Android apps of all types and this will put you in the driving seat because you will be in control over the future of app technology.

4. PHP
PHP primarily is a coding language used for creating dynamic websites, but you can create android and iOS apps in PHP, according to Zend.

5. Swift
Google is also considering to make Swift its first-class language instead of Java. If Google shifts to Swift, the demand for Swift apps and developers will skyrocket and there will be no other competing language.
For now, Swift is only available for iOS development but since it works on Linux and is open source, which means it can be used by anyone.

6. C#
Xamarin is the platform that has changed the expectations of the experts and the developers. It’s an app building tool that makes it simpler for C# developers to create apps for Android and iOS.

7. C++
The demand for C++ has always been there. It’s not just about developing mobile apps rather it is a powerful language that is used in all the sectors ranging from finance to manufacturing to banking and several others

8. JavaScript
Creating apps in JavaScript is easy because you have to code the app once and it can be released on all the platforms (Android, iOS, and Windows).

9. HTML5
You can create Android as well as iOS apps in HTML5. The only requirement is using a powerful framework such as PhoneGap.

Thanks for reading 😊

How to print Specific area and avoid the some area in javascript

Hi, guys below are an example to print a specific area in javascript, also you can hide the specific area. Example: <html> <b...