Skip to main content

Posts

Showing posts with the label code

CREATE SPLASH SCREEN USING JAVA

Create a Splash Screen using JAVA Here is the code of this Splash Screen: import java.awt.*; import java.awt.event.*; import javax.swing.*; public class splash { public static void main(String[] args){ fframe f1 = new fframe(); f1.setVisible(true); int i; int x=1; for(i=2; i<=600; i+=4, x+=1){ f1.setLocation(800 - ((i+x)/2), 500 - (i/2)); f1.setSize(i+x,i); try{ Thread.sleep(10); }catch(Exception e){} } } } class fframe extends JFrame implements Runnable{ Thread t1; fframe(){ super("Electricity Billing System"); setLayout(new FlowLayout()); ImageIcon c1 = new ImageIcon(ClassLoader.getSystemResource("icon/elect.jpg")); Image i1 = c1.getImage().getScaledInstance(730, 550,Image.SCALE_DEFAULT); ImageIcon i2 = new ImageIcon(i1); JLabel l1 = new JLabel(i2);

ELECTRICITY BILLING SYSTEM

ELECTRICITY BILLING SYSTEM https://knowledgestreams.blogspot.com/ Create a electricity biilling system using JAVA #knowledge #stream #blog you can find the full source code for the project below. A - Below is the source code of the project. B - Create separate class files for every class. C - Copy the code of one class (ex: login.java) and paste it in Login class file, do it for every class. 1 - Create your first class with name 'conn' and paste the code package Electricity; import java.sql.*;   // knowledgestreams.blogspot.com public class conn{     Connection c;     Statement s;     public conn(){           try{               Class.forName("com.mysql.jdbc.Driver");               c =DriverManager.getConnection("jdbc:mysql:///project","root","");                 s =c.createStatement();           }catch(Exception e){              System.out.println(e);

Python code for converting colored image to black and white

Python code for converting colored image to black and white Libraries used: PIL for python IDE Used: Spyder Tutorial video link: Click Here https://knowledgestreams.blogspot.com/ knowledge streams blog spot dot com free knowledge blog. download free source codes for python and java and other free stuff. from PIL import Image open_image = Image.open("adress of the pictures") open_image.show() convert_to_blackandwhite= open_image.convert("L") convert_to_blackandwhite.show() knowledge streams blog spot dot com free knowledge blog. download free source codes for python and java and other free stuff. Q: How to Install PIL?? A1: pip install PIL A2: pip install pillow #Python #beginner #source_code #image #convert

The Jupyter Notebook

The Jupyter Notebook  is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations and narrative text. Uses include: data cleaning and transformation, numerical simulation, statistical modeling, data visualization, machine learning, and much more. knowledge streams blog spot dot com free knowledge blog. download free source codes for python and java and other free stuff. Try Jupyter here   Install Jupyter here Language of choice Jupyter supports over 40 programming languages, including Python, R, Julia, and Scala. Share notebooks Notebooks can be shared with others using email, Dropbox, GitHub and the  Jupyter Notebook Viewer . Interactive output Your code can produce rich, interactive output: HTML, images, videos, LaTeX, and custom MIME types. Big data integration Leverage big data tools, such as Apache Spark, from Python, R and Scala. Explore that same data with pa