SAI YEWALE

All generations.

typingsSat, 12 Nov 2022

write a code for hospital management system with database connectivity using Gui components in java.

public class Test { private int id; private String name; public Test(int id, String name) { this.id = id; this.name = name; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public void display() { System.out.println("id: " + id + " name: " + name); } }

typingsFri, 09 Dec 2022

write javascript to create auto slideshow

var slideIndex = 0; showSlides(); function showSlides() { var i; var slides = document.getElementsByClassName("mySlides"); for (i = 0; i < slides.length; i++) { slides[i].style.display = "none"; } slideIndex++; if (slideIndex > slides.length) {slideIndex = 1} slides[slideIndex-1].style.display = "block"; setTimeout(showSlides, 2000); // Change image every 2 seconds }

typingsTue, 06 Dec 2022

Write javascript code to create advertisement banner with different images

<script> var images = [ "./assets/img/1.jpg", "./assets/img/2.jpg", "./assets/img/3.jpg", "./assets/img/4.jpg", "./assets/img/5.jpg" ]; var num = 0; function next() { var slider = document.getElementById("slider"); num++; if (num >= images.length) { num = 0; } slider.src = images[num]; } function prev() { var slider = document.getElementById("slider"); num--; if (num < 0) { num = images.length - 1; } slider.src = images[num]; } function slider() { window.setInterval(() => next(), 1000); } </script>

typingsSat, 12 Nov 2022

write a code for aurthonage in html and javascript with database connectivity

#for importing all the modules in one go from flask import * #for creating an app app = Flask(__name__) #for creating a route to python file on which we have to work @app.route('/') def abc(): return render_template('au.html')#this render_template is used to render the html file on the browser if __name__ == '__main__': app.run(debug=True)#this debug=True is used for auto reloading of the website when any changes are occured on the website

typingsThu, 01 Dec 2022

Develop a program to create employee table in database having two columns "emp_id" and "emp_name"in advanced java.

import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import java.sql.Statement; public class CreateTable { public static void main(String[] args) throws ClassNotFoundException, SQLException { //step1 load the driver class Class.forName("oracle.jdbc.driver.OracleDriver"); //step2 create the connection object Connection con=DriverManager.getConnection( "jdbc:oracle:thin:@localhost:1521:xe","system","oracle"); //step3 create the statement object Statement stmt=con.createStatement(); //step4 execute query stmt.executeUpdate("create table employee(emp_id int,emp_name varchar(20))"); System.out.println("table created"); //step5 close the connection object

typingsFri, 25 Nov 2022

write javascript code for arithmetic expression evaluation and print the result using message box.(accept the values from user)

<script> function evaluate(){ var a=parseInt(document.getElementById("a").value); var b=parseInt(document.getElementById("b").value); var c=parseInt(document.getElementById("c").value); var d=parseInt(document.getElementById("d").value); var e=parseInt(document.getElementById("e").value); var f=parseInt(document.getElementById("f").value); var g=parseInt(document.getElementById("g").value); var h=parseInt(document.getElementById("h").value); var i=parseInt(document.getElementById("i").value); var result; result=a+b+c+d+e+f+g+h+i; alert(result); } </script>

typingsSun, 20 Nov 2022

write a program using Socket and ServerSocket to create chat application

import java.io.*; import java.net.*; class ChatServer{ public static void main(String[] args){ try{ ServerSocket ss = new ServerSocket(5000); Socket s = ss.accept(); DataInputStream din = new DataInputStream(s.getInputStream()); DataOutputStream dout = new DataOutputStream(s.getOutputStream()); BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String msgin="", msgout=""; while(!msgin.equals("end")){ msgin = din.readUTF(); System.out.println(msgin); msgout = br.readLine(); dout.writeUTF(msgout); dout.flush(); } s.close(); }catch(Exception e){ } } }

typingsThu, 15 Dec 2022

write a javascript program to create option list of images and then display images in new window as per selection

<select id="mySelect"> <option value="http://www.w3schools.com/tags/smiley.gif">Smiley face</option> <option value="http://www.w3schools.com/tags/planets.gif">Planets</option> <option value="http://www.w3schools.com/tags/mountain.jpg">Mountain</option> <option value="http://www.w3schools.com/tags/sky.jpg">Sky</option> </select> <button type="button" onclick="myFunction()">Try it</button> <script> function myFunction() { var x = document.getElementById("mySelect").value; window.open(x); } </script> <script> function myFunction() { var myWindow = window.open("", "MsgWindow", "width=200,height=100"); myWindow.document.write("<p>This is 'MsgWindow'. I

typingsThu, 15 Dec 2022

write a javascript program to create option list of images and then display images in new window as per selection

<script type="text/javascript"> function dropdownlist(listindex) { switch (listindex) { case "1" : window.open("http://www.c-sharpcorner.com/","_blank","toolbar=yes, location=yes, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=no, copyhistory=yes, width=400, height=400") break; case "2" : window.open("http://www.c-sharpcorner.com/Code/2008/Feb/Expand-Collapse-Div-on-CheckBox-Click.aspx", "_blank","toolbar=yes, location=yes, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=no, copyhistory=yes, width=400, height=400") break; case "3" : window.open("http://www.c-sharpcorner.com/forums/thread/194881/this-will-be-your-first-game-with-

typingsSat, 12 Nov 2022

write a code for hospital management system with database connectivity using Gui components in java.

class Hospital { int id; String name; String address; String contact; Hospital(int id,String name,String address,String contact) { this.id=id; this.name=name; this.address=address; this.contact=contact; } public void HospitalDetails() { System.out.println("Hospital ID : "+id); System.out.println("Hospital Name : "+name); System.out.println("Hospital Address : "+address); System.out.println("Hospital Contact : "+contact); } } class Doctor extends Hospital{ int did; String dname; String dspecial; Doctor(int id,String name,String address,String contact,int did,String dname,String dspecial) { super(id,name,address,contact); this.did=did; this.dname=dname; this.dspecial=dspecial; } public void DoctorDetails() { System.out.println("Doctor ID : "+did);

typingsSat, 12 Nov 2022

write a program to demostrate te use of database in java.

import java.sql.*; public class TestDB { public static void main(String[] args) { try { Class.forName("com.mysql.jdbc.Driver"); Connection con = DriverManager.getConnection( "jdbc:mysql://localhost:3306/db", "root", ""); Statement stmt = con.createStatement(); ResultSet rs = stmt.executeQuery("select * from Employee"); while (rs.next()) System.out.println(rs.getInt(1) + " " + rs.getString(2)); con.close(); } catch (Exception e) { System.out.println(e); } } }

typingsThu, 01 Dec 2022

Develop a program to create employee table in database having two columns "emp_id" and "emp_name"in java

public class Emp{ private int emp_id; private String emp_name; public int getEmp_id() { return emp_id; } public void setEmp_id(int emp_id) { this.emp_id = emp_id; } public String getEmp_name() { return emp_name; } public void setEmp_name(String emp_name) { this.emp_name = emp_name; } public Emp(int emp_id, String emp_name) { this.emp_id = emp_id; this.emp_name = emp_name; } }

typingsSat, 26 Nov 2022

Write javascript code to accept values from user and display the result on button click

<html> <head> <title>Html and Javascript</title> <script type="text/javascript"> function cal() { var x = document.getElementById( "t1" ).value; var y = document.getElementById( "t2" ).value; var r = parseInt(x) + parseInt(y); document.getElementById( "res" ).innerHTML = r; } </script> </head> <body> <p>Enter first number: <input type="text" id="t1"/></p> <p>Enter second number: <input type="text" id="t2"/></p> <input type="button" value="Add" onclick="cal()"/> <p>Result <span id="res"></span></p> </body> </html>

typingsSat, 26 Nov 2022

Write javascript code to create the webpage using different form elements .(design the student registration form)

<!DOCTYPE html> <html> <body> <h2>HTML Forms</h2> <form> First name:<br> <input type="text" name="firstname"><br> Last name:<br> <input type="text" name="lastname"> </form> <form action="/action_page.php"> <label for="fname">First name:</label><br> <input type="text" id="fname" name="fname"><br> <label for="lname">Last name:</label><br> <input type="text" id="lname" name="lname"><br><br> <input type="submit" value="Submit"> </form> <form action="/action_page.php"> <label for="country">Choose a country:</label><br> <select id="country" name="country"> <option value="australia">Australia</option> <option

typingsSat, 12 Nov 2022

write a code for aurthonage in html and javascript with database connectivity

<form> <input type="text" name="firstname" placeholder="First Name"> <input type="text" name="lastname" placeholder="Last Name"> <input type="password" name="password" placeholder="Password"> <input type="text" name="email" placeholder="Email"> <input type="submit" value="Register"> </form> <script type="text/javascript"> $(document).ready(function(){ $("form").submit(function(e){ e.preventDefault(); $.ajax({ url:"register.php", method: "POST", data:$("form").serialize(), dataType:"text", success: function(strmessage){ $("#message").text(strmessage) } }) }) }) </script>

typingsSat, 26 Nov 2022

Write javascript code to create the login form using different form events

<!DOCTYPE html> <html> <body> <form id="loginForm"> <label for="userName">Username:</label> <input type="text" id="userName" name="userName" value=""> <label for="userPassword">Password:</label> <input type="text" id="userPassword" name="userPassword" value=""><br><br> <input type="submit" value="Submit"> </form> <script> var userName = document.getElementById("userName"); userName.addEventListener("input", function (event) { console.log(`username input event ${event.target.value}`); }); var userPassword = document.getElementById("userPassword"); userPassword.addEventListener("input", function (event) { console.log(`userPassword input event ${event.target.value}`); }); var loginForm = document.getElementById("loginForm"); loginForm.onsubmit=function(){ // first your validation code will go here

Questions about programming?Chat with your personal AI assistant