How you can get top grades, to get a best job.

Latest Posts

How to color of text in C-Language using GCC Compiler

agyanadda
Hello

How to color of text in C-Language using GCC Compiler

agyanadda

In C-Language when you will use text color then you must have to know about the color code of C language.

Name         | Value
             |
Black        |   0
Blue         |   1
Green        |   2
Cyan         |   3
Red          |   4
Magenta      |   5
Brown        |   6
Light Gray   |   7
Dark Gray    |   8
Light Blue   |   9
Light Green  |   10
Light Cyan   |   11
Light Red    |   12
Light Magenta|   13
Yellow       |   14
White        |   15
-----------------------
OR
-----------------------
0 = Black
1 = Blue
2 = Green
3 = Aqua
4 = Red
5 = Purple
6 = Yellow
7 = White
8 = Gray
9 = Light Blue
A = Light Green
B = Light Aqua
C = Light Red
D = Light Purple
E = Light Yellow
F = Bright White

Example 1 #include <stdio.h> int main() { /* Some list of combinations 0 = Black 1 = Blue 2 = Green 3 = Aqua 4 = Red 5 = Purple 6 = Yellow 7 = White 8 = Gray 9 = Light Blue A = Light Green B = Light Aqua C = Light Red D = Light Purple E = Light Yellow F = Bright White */ printf("This is a console color change program\n"); system("COLOR F2"); /* This will change the bgcolor F - White and textcolor to 2- Green */ getchar(); return 0; } Example 2 #include <stdio.h> #include <stdlib.h> int main() { system("COLOR FC"); printf("Welcome to the color changing application!\n"); printf("Press any key to change the background color!\n"); getch(); system("COLOR 6C"); printf("Now the background color is Yellow and Text Color is light Red\n"); printf("Press any key to exit..."); getch(); return 0; } Example 3 #include <windows.h> //This is the header file for windows. #include <stdio.h> //C standard library header file void SetColor(int ForgC){ WORD wColor; //This handle is needed to get the current background attribute HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); CONSOLE_SCREEN_BUFFER_INFO csbi; //csbi is used for wAttributes word if(GetConsoleScreenBufferInfo(hStdOut, &csbi)){ //To mask out all but the background attribute, and to add the color wColor = (csbi.wAttributes & 0xF0) + (ForgC & 0x0F); SetConsoleTextAttribute(hStdOut, wColor); } } int main() { printf("Test color"); //Here the text color is white SetColor(4); //Function call to change the text color printf("Test color"); //Now the text color is green return 0; }

How to Filter Table using Jquery

agyanadda

You can create filter table in bootstrap using Jquery

<!--DOCTYPE html--> <html lang="en"> <head> <title>Bootstrap Example</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script> </head> <body> <br><br> <div class="container"> <div class="panel panel-default"> <div class="panel-heading">Filter Tables</div> <div class="panel-body"> <!--========================--> <input class="form-control" id="myInput" type="text" placeholder="Search.."> <br> <table class="table table-bordered table-striped"> <thead> <tr> <th>SR NO</th> <th>EMPLOYEE NAME</th> <th>ADDRESS</th> <th>EMAIL ID</th> </tr> </thead> <tbody id="myTable"> <tr> <td>101</td> <td>Praveen</td> <td>Noida</td> <td>praveen@example.com</td> </tr> <tr> <td>102</td> <td>Nandan</td> <td>Delhi</td> <td>sam@mail.com</td> </tr> <tr> <td>103</td> <td>Deepti</td> <td>Goa</td> <td>deepti@greatstuff.com</td> </tr> <tr> <td>104</td> <td>Mohan</td> <td>Delhi</td> <td>mohan@test.com</td> </tr> </tbody> </table> <!--=======================--> </div> </div> </div> <script> $(document).ready(function(){ $("#myInput").on("keyup", function() { var value = $(this).val().toLowerCase(); $("#myTable tr").filter(function() { $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1) }); }); }); </script> </body> </html>

How to create Constructor in CPP

agyanadda
#include<iostream> using namespace std; //create class class Student{ public: // A.s int id; //D.M string nm; // D.M //member function void insert(int i, string n){ id=i; nm=n; } void disp(){ cout<<"ID:"<<id<<endl; cout<<"NAME:"<<nm<<endl; } }; int main(){ Student obj1; obj1.insert(101,"Neel"); obj1.disp(); return 0; } // Default Constructor Example #include<iostream> using namespace std; //create class class Student{ public: // A.s int id; //D.M string nm; // D.M //member function void insert(){ cout<<"Enter ID & Name: "; cin>>id>>nm; } void disp(){ cout<<"ID:"<<id<<endl; cout<<"NAME:"<<nm<<endl; } }; int main(){ Student obj1; obj1.insert(); obj1.disp(); return 0; } // Parametrized Constructor Example #include<iostream> using namespace std; //create class class Student{ public: int id; string nm; Student(int i, string n){ id=i; nm=n; } void disp(){ cout<<"ID"<<id<<endl<<"NAME:"<<nm; } }; int main(){ Student obj= Student(101,"Neel"); obj.disp(); return 0; }

How to create array in PHP

agyanadda

Array is used to stores multiple values in one single variable

We can create array by using "array" Keyword

Type of Array

  • Indexed arrays - Numeric index
  • Associative arrays -Named keys
  • Multidimensional arrays - Contain one or more arrays

Indexed Array Examples

Example 1 $color=array("red","Green","Blue"); //echo $color[1]; foreach($color as $val){ echo $val."<br>"; } Example 2 $color=array("red","Green","Blue"); //echo $color[1]; foreach($color as $val){ echo $val."<br>"; } Example 3 $array[0]="Shubham"; $array[1]="Rafiya"; foreach($array as $val){ echo $val."<br>"; } echo count($val); Example 4 $col=array("abc","ccv","dsf"); echo count($col); Example 5 $col=array("abc","ccv","dsf"); $arrlen=count($col); for($i=0;$i<$arrlen;$i++){ echo $col[$i]."<br>"; } Example 6 $col=array("abc","ccv","dsf"); $arrlen=count($col); for($i=0;$i<$arrlen;$i++){ echo $col[$i]."<br>"; }

Associative Array Example

Example 1 $col['Green']="#123"; $col['Red']="#123"; $col['White']="#fff"; echo $col['Red']; Example 2 $col=array("Green"=>"#123","White"=>"#231","Red"=>"#44"); echo $col['Green']; Example 3 $col=array("Green"=>"#123","Green"=>"#231","Red"=>"#44"); echo $col['Green']; Example 4 $col['Green']="#123"; $col['Red']="#123"; $col['White']="#fff"; foreach($col as $val=>$n){ echo $val."<br>"; }

Multi Multidimensional Array Example

Example 1 $arr=array( array(1,2,3), array(4,5,6), array(7,8,9) ); echo $arr[1][2]; } Example 2 $arr=array( array(1,2,3), array(4,5,6), array(7,8,9) ); for($r=0;$r<3;$r++){ for($c=0;$c<3;$c++){ echo $arr[$r][$c]; } echo "<br>"; } }

How to clear screen in C Language

agyanadda

We can clear screen in C language according to the compiler.

  1. Using clrscr() - For TurboC Compiler
  2. Using system("cls") - For gcc/g++ & TurboC Compiler windows
  3. Using system("clear") - For gcc/g++ compiler in Linux
/* TurboC Compiler */ #include <stdio.h> #include <conio.h> /*for clrscr()*/ int main(){ int num=100; /*Use after declaration section*/ clrscr(); /*clear output screen*/ printf("value of num: %d\n",num); return 0; } /* GCC compiler and TurboC Compiler For Windows */ #include <stdio.h> #include <stdlib.h> /*for system()*/ int main(){ int num=100; /*Use after declaration section*/ printf("Not display due to clearscr"); system("cls"); /*clear output screen*/ printf("value of num: %d\n",num); return 0; } /* gcc/g++ compiler Linux */ #include <stdio.h> #include <stdlib.h> /*for system()*/ int main(){ int num=100; /*Use after declaration section*/ system("clear"); /*clear output screen*/ printf("value of num: %d\n",num); return 0; }

How to find the length of Array in C_Language

agyanadda

sizeof(): is used to get the data type size in C language.

#include<stdio.h> #include<stdlib.h> int main() { int arr[] = {1,2,3,4,5,6}; int length = sizeof(arr)/sizeof(int); //length of an integer array printf("Array length = %d",length); }

How To Create a Contact Form with CSS

agyanadda

You can create contact form using HTML, CSS and JavaScript. Click Here to Live check

<!--DOCTYPE html--> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> body {font-family: Arial, Helvetica, sans-serif;} * {box-sizing: border-box;} .open-button { background-color: #555; color: white; padding: 16px 20px; border: none; cursor: pointer; opacity: 0.8; position: fixed; bottom: 23px; right: 28px; width: 280px; } .form-popup { display: none; position: fixed; bottom: 0; right: 15px; border: 3px solid #f1f1f1; z-index: 9; } .form-container { max-width: 300px; padding: 10px; background-color: white; } .form-container input[type=text], .form-container input[type=password] { width: 100%; padding: 15px; margin: 5px 0 22px 0; border: none; background: #f1f1f1; } .form-container input[type=text]:focus, .form-container input[type=password]:focus { background-color: #ddd; outline: none; } .form-container .btn { background-color: #4CAF50; color: white; padding: 16px 20px; border: none; cursor: pointer; width: 100%; margin-bottom:10px; opacity: 0.8; } .form-container .cancel { background-color: red; } .form-container .btn:hover, .open-button:hover { opacity: 1; } </style> <script> function openForm() { document.getElementById("myForm").style.display = "block"; } function closeForm() { document.getElementById("myForm").style.display = "none"; } </script> </head> <body> <button class="open-button" onclick="openForm()">Enquery Now</button> <div class="form-popup" id="myForm"> <form action="#" class="form-container"> <input type="text" placeholder="Enter Email" name="email" required> <input type="password" placeholder="Enter Password" name="psw" required> <textarea cols="36" rows="4" placeholder="Enter Message" name="psw" required></textarea> <button type="submit" class="btn">Submit Here</button> <button type="button" class="btn cancel" onclick="closeForm()">Close</button> </form> </div> </body> </html>

How to Launch Bootstrap Modal on page load

agyanadda
You can create bootstrap modal on page load only you have to write some script which is given below
Click Here To Live check
<html lang="en"> <head> <title>Auto Loading Bootstrap Modal on Page Load</title> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"></link> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> <script> $(document).ready(function(){ $("#myModal").modal('show'); }); </script> </head> <body> <br /><br /> <div class="modal fade" id="myModal"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button aria-hidden="true" class="close" data-dismiss="modal" type="button">&#215;</button> <h4 class="modal-title text-center"> How to launch Bootstrap modal on page load</h4> </div> <div class="modal-body"> <form> <div class="form-group"> <input class="form-control" placeholder="Name" type="text" /> </div> <div class="form-group"> <input class="form-control" placeholder="Email Address" type="email" /> </div> <div class="form-group"> <input class="form-control" placeholder="***************" type="password" /> </div> <button class="btn btn-primary btn-block" type="submit">Subscribe</button> </form> </div> </div> </div> </div> </body> </html>

How to create signup and form in bootstrap

agyanadda
How to create signup and login form in bootstrap
If you want to execute live then Click Login & signup form <html lang="en"> <head> <title>Bootstrap Example</title> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css" rel="stylesheet"></link> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script> <style> .nav-tabs>li { float: left; margin-bottom: -1px; width: 50%; text-align:center; } .form-control { border-radius:0px; } .btn1{width:49%;} .btn{border-radius:0px;} body{background: #FF5F6D;background: -webkit-linear-gradient(to right, #FFC371, #FF5F6D);background: linear-gradient(to right, #FFC371, #FF5F6D); } </style> </head> <body> <br /><br /><br /> <div class="container"> <div class="row"> <div class="col-sm-offset-4 col-sm-5"> <div class="panel panel-default"> <div class="panel-body"> <ul class="nav nav-tabs"> <li class="active"><a data-toggle="tab" href="https://www.blogger.com/u/2/blogger.g?blogID=4167567974930350357#home">Login Form</a></li> <li><a data-toggle="tab" href="https://www.blogger.com/u/2/blogger.g?blogID=4167567974930350357#menu1">Registration Form</a></li> </ul> <div class="tab-content"> <div class="tab-pane fade in active" id="home"> <!--============--> <br /> <form action="#"> <div class="form-group"> <input class="form-control" id="email" name="email" placeholder="USERNAME" type="email" /> </div> <div class="form-group"> <input class="form-control" id="pwd" name="pwd" placeholder="***************" type="password" /> </div> <div class="form-group"> <button class="btn btn-success btn1" type="submit">SUBMIT</button> <button class="btn btn-danger btn1" type="submit">RESET</button> </div> </form> <!--============--> </div> <div class="tab-pane fade" id="menu1"> <!--============--> <br /> <form action="#"> <div class="form-group"> <input class="form-control" id="email" name="email" placeholder="USERNAME" type="email" /> </div> <div class="form-group"> <input class="form-control" id="pwd" name="pwd" placeholder="PHONE" type="password" /> </div> <div class="form-group"> <input class="form-control" id="email" name="email" placeholder="EMAIL ADDRESS" type="email" /> </div> <div class="form-group"> <input class="form-control" id="pwd" name="pwd" placeholder="*********************" type="password" /> </div> <button class="btn btn-success btn-block" type="submit">Submit</button> </form> <!--============--> </div> </div> </div> </div> </div> </div> </div> </body> </html>
<

How to create Comment Form using Javascript

agyanadda
<!--DOCTYPE html--> <html lang="en"> <head> <title>Bootstrap Example</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> </head> <body> <br><br> <script> var flag=true; function fcomment(){ var data="<div class='col-sm-offset-4 col-sm-4'><form action='#'><div class='panel panel-default'><div class='panel-body'><div class='form-group'><input type='email' class='form-control' id='email' placeholder='Enter email' name='email'></div><div class='form-group'><input type='password' class='form-control' id='pwd' placeholder='Enter password' name='pwd'></div><div class='form-group'><textarea class='form-control' rows='5' id='comment'></textarea></div><button type='submit' class='btn btn-success btn btn-block'>POST COMMENT</button></form></div></div></div>"; document.getElementById('fid').innerHTML=data; if(flag){ document.getElementById("fid").innerHTML=data; flag=false; }else{ document.getElementById("fid").innerHTML=""; flag=true; } } </script> <div class="container"> <div class="col-sm-offset-1 col-sm-12"> <input type="button" onclick="fcomment()" class="btn btn-primary" value="comment Here"> </div> </div> <div id="fid"></div> </body> </html>

How to create Login Form

agyanadda

Create Responsive Login Form using Bootstrap.

<!--DOCTYPE html--> <html lang="en"> <head> <title>Bootstrap Example</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> <style> .btnw{width:49%;} .login-or { position: relative; font-size: 18px; color: #aaa; margin-top: 10px; margin-bottom: 10px; padding-top: 10px; padding-bottom: 10px; } .span-or { display: block; position: absolute; left: 50%; top: -2px; margin-left: -25px; background-color: #fff; width: 50px; text-align: center; } .hr-or { background-color: #cdcdcd; height: 1px; margin-top: 0px !important; margin-bottom: 0px !important; } .btn-primary{ background-image: -webkit-linear-gradient(top,#e85b54 0,#b22520 100%); } .btn-info{ background-image: -webkit-linear-gradient(top,#295fa0 0,#4c95d6 100%); } .btn-success{ background-image: -webkit-linear-gradient(top,#58e854 0,#70b245 100%); } </style> </head> <body> <br><br> <div class="row"> <div class="container"> <div class="col-sm-offset-4 col-sm-4"> <div class="panel panel-default"> <div class="panel-heading text-center"><strong>Login Form</strong></div> <div class="panel-body"> <form class="form-horizontal" action="#"> <div class="form-group"> <div class="col-sm-12"> <a href="#" class="btn btn-primary btnw">Facebook</a> <a href="#" class="btn btn-info btnw">Google</a> </div> </div> <div class="login-or"> <hr class="hr-or"> <span class="span-or">or</span> </div> <div class="form-group"> <div class="col-sm-12"> <input type="email" class="form-control" id="email" placeholder="Enter email" name="email"> </div> </div> <div class="form-group"> <div class="col-sm-12"> <input type="password" class="form-control" id="pwd" placeholder="Enter password" name="pwd"> </div> </div> <div class="form-group"> <div class=" col-sm-10"> <div class="checkbox"> <label><input type="checkbox" name="remember"> Remember me</label> </div> </div> </div> <div class="form-group"> <div class="col-sm-12"> <button type="submit" class="btn btn-success btn-block">Login</button> </div> </div> </form> </div> </div> </div> </div> </div> </body> </html>

Validation using Javascript Login Form

agyanadda

How to validation using java script

<!--DOCTYPE html--> <html lang="en"> <head> <title>Validation Form using Javascript</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> <style> .error{ color: red; font-weight: 600; } </style> <!-- =============== --> <script> function validationn(){ if(document.forms["frm"]["email"].value==""){ document.forms["frm"]["email"].focus(); document.getElementById("eml").innerHTML="* Enter your Email"; return false; }else{ document.getElementById("eml").innerHTML=""; } /*==========[password]==========*/ if(document.forms["frm"]["pass"].value==""){ document.forms["frm"]["pass"].focus(); document.getElementById("pw").innerHTML="* Enter your Password"; return false; }else{ document.getElementById("pw").innerHTML=""; } } </script> </head> <body> <br> <div class="container"> <div class="row"> <div class=" col-sm-offset-4 col-sm-4"> <div class="panel-group"> <div class="panel panel-default"> <div class="panel-heading text-center"><strong>Login Form Validation</strong></div> <div class="panel-body"> <form class="form-horizontal" action="#" name="frm" onsubmit="return validationn()"> <div class="form-group"> <div class="col-sm-12"> <input type="email" class="form-control" placeholder="Enter your Email" name="email"> <span id="eml" class="error"></span> </div> </div> <div class="form-group"> <div class="col-sm-12"> <input type="password" class="form-control" placeholder="Enter your Password" name="pass"> <span id="pw" class="error"></span> </div> </div> <div class="form-group"> <div class=" col-sm-12"> <button type="submit" class="btn btn-success btn-block">Submit</button> </div> </div> </form> </div> </div> </div> </div> </div> </div> </body> </html>

Our Team

  • Syed Faizan AliMaster / Computers
  • Syed Faizan AliMaster / Computers
  • Syed Faizan AliMaster / Computers
  • Syed Faizan AliMaster / Computers
  • Syed Faizan AliMaster / Computers
  • Syed Faizan AliMaster / Computers