Search Results
737 results found with an empty search
- Get Help In Python Django | Django Project Help
If you are looking python Django project help, Codersarts provide top rated web development services with an affordable price. Django is an open-source and free web frame, coded with the python language. If a user wants to eliminate the repetitive tasks, then he/she can use Django. With its help, web developers can easily develop web applications with ease and in less time. Django aims to simplify the complexity of websites. It has many advanced features like pluggability, less coding, reusability, low coupling, and much more. Nowadays, Django is a highly preferred web frame used for creating a web application. If you need the best Django assignment help, contact our experts now. Get exciting services from us at affordable prices. Codersarts Django professionals help to develop Basic to advance or Enterprise web application. How to install Django Use pip command to install django: pip install django=3.1.0 Creating Django project django-admin startproject project_name Project files structure [projectname]/ ├── [projectname]/ │ ├── __init__.py │ ├── settings.py │ ├── urls.py │ └── wsgi.py └── manage.py Run on local server After creating project you can test it using below "runserver" commnad python manage.py runserver Creating Django App python manage.py startapp app_name App files which used to create web application admin.py apps.py models.py tests.py views.py Are you facing any issue Advance Django: Extending class-based views. Building a REST API. Working with GraphQL. Building a basic schema. Optimizing your environment. Working with Pipenv. How Django handles testing. Securing the Django admin. If you are facing issue with an above any django project topics then our expert ready to help. Features Of Django Excellent Documentation. This is one of the main reasons to start learning Django. Python Web-framework SEO Optimized High Scalability Versatile in Nature Offers High Security Thoroughly Tested Provides Rapid Development Why we use Django Super fast Fully loaded Versatile Secure Scalable Areas covered by Django Prototypes and MVPs Content management systems Customer relationship management (CRM) systems Social networks On-demand delivery apps E-commerce platforms mHealth apps Online marketplaces Business management apps Appointment scheduling apps Our Sample Project Ideas Library Management System Railway Enquiry System Quiz App Web Crawler Online School System Video Subscription App Calorie Counter Weather App To-Do App And More others Contact us to get Django Project help, send your requirement details at contact@codersarts.com and get instant help with an affordable prices
- Register and Login form with Java Swing.
Swing is a part of the JFC (Java Foundation Classes). Building Graphical User Interface in Java requires the use of Swings. Swing Framework contains a large set of components which allow a high level of customization and provide rich functionalities, and is used to create window-based applications. Java swing components are lightweight, platform-independent, provide powerful components like tables, scroll panels, buttons, list, colour chooser, etc. In this blog, we’ll see how to make a Registration form And Login Form. Tools and Technologies used JDK 14 Swing Netbeans IDE Steps to create login and register forms. SIGNUP form : import java.awt.Color; import java.awt.Font; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.io.RandomAccessFile; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JOptionPane; import javax.swing.JPasswordField; import javax.swing.JTextField; public class SignUp extends JFrame implements ActionListener { JLabel l1, l2, l3, l4, l5, l6, l7, l8; //all labels for textField JTextField tf1, tf2, tf5, tf6, tf7; // others fields JButton btn1, btn2; //buttons for signup and clear JPasswordField p1, p2; // password fields File f = new File("C:\\Files"); int ln; void createFolder(){ if(!f.exists()){ f.mkdirs(); } } void readFile(){ try { FileReader fr = new FileReader(f+"\\logins.txt"); System.out.println("file exists!"); } catch (FileNotFoundException ex) { try { FileWriter fw = new FileWriter(f+"\\logins.txt"); System.out.println("File created"); } catch (IOException ex1) { // Logger.getLogger(notepad.class.getName()).log(Level.SEVERE, null, ex1); } } } void addData(String usr,String pswd,String mail,String con,String state,String Phn){ try { RandomAccessFile raf = new RandomAccessFile(f+"\\logins.txt", "rw"); for(int i=0;i<ln;i++){ raf.readLine(); } //if condition added after video to have no lines on first entry if(ln>0){ raf.writeBytes("\r\n"); raf.writeBytes("\r\n"); } raf.writeBytes("Email:"+mail+ "\r\n"); raf.writeBytes("Password:"+pswd+ "\r\n"); raf.writeBytes("Username:"+usr+ "\r\n"); raf.writeBytes("Country:"+con+ "\r\n"); raf.writeBytes("State:"+state+ "\r\n"); raf.writeBytes("Phone No:"+Phn); } catch (FileNotFoundException ex) { //Logger.getLogger(notepad.class.getName()).log(Level.SEVERE, null, ex); } catch (IOException ex) { //Logger.getLogger(notepad.class.getName()).log(Level.SEVERE, null, ex); } } void countLines(){ try { ln=0; RandomAccessFile raf = new RandomAccessFile(f+"\\logins.txt", "rw"); for(int i=0;raf.readLine()!=null;i++){ ln++; } System.out.println("number of lines:"+ln); } catch (FileNotFoundException ex) { // Logger.getLogger(notepad.class.getName()).log(Level.SEVERE, null, ex); } catch (IOException ex) { // Logger.getLogger(notepad.class.getName()).log(Level.SEVERE, null, ex); } } SignUp() { setVisible(true); setSize(700, 700); setLayout(null); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setTitle("Registration Form in Java"); l1 = new JLabel("Registration Form in Windows Form:"); l1.setForeground(Color.blue); l1.setFont(new Font("Serif", Font.BOLD, 20)); l2 = new JLabel("Name:"); l3 = new JLabel("Email-ID:"); l4 = new JLabel("Create Passowrd:"); l5 = new JLabel("Confirm Password:"); l6 = new JLabel("Country:"); l7 = new JLabel("State:"); l8 = new JLabel("Phone No:"); tf1 = new JTextField(); tf2 = new JTextField(); p1 = new JPasswordField(); p2 = new JPasswordField(); tf5 = new JTextField(); tf6 = new JTextField(); tf7 = new JTextField(); btn1 = new JButton("Submit"); btn2 = new JButton("Clear"); btn1.addActionListener(this); btn2.addActionListener(this); l1.setBounds(100, 30, 400, 30); l2.setBounds(80, 70, 200, 30); l3.setBounds(80, 110, 200, 30); l4.setBounds(80, 150, 200, 30); l5.setBounds(80, 190, 200, 30); l6.setBounds(80, 230, 200, 30); l7.setBounds(80, 270, 200, 30); l8.setBounds(80, 310, 200, 30); tf1.setBounds(300, 70, 200, 30); tf2.setBounds(300, 110, 200, 30); p1.setBounds(300, 150, 200, 30); p2.setBounds(300, 190, 200, 30); tf5.setBounds(300, 230, 200, 30); tf6.setBounds(300, 270, 200, 30); tf7.setBounds(300, 310, 200, 30); btn1.setBounds(50, 350, 100, 30); btn2.setBounds(170, 350, 100, 30); add(l1); add(l2); add(tf1); add(l3); add(tf2); add(l4); add(p1); add(l5); add(p2); add(l6); add(tf5); add(l7); add(tf6); add(l8); add(tf7); add(btn1); add(btn2); } public void actionPerformed(ActionEvent e) { if (e.getSource() == btn1) { int x = 0; String s1 = tf1.getText(); String s2 = tf2.getText(); char[] s3 = p1.getPassword(); char[] s4 = p2.getPassword(); String s8 = new String(s3); String s9 = new String(s4); String s5 = tf5.getText(); String s6 = tf6.getText(); String s7 = tf7.getText(); if (s8.equals(s9)) { try { createFolder(); readFile(); countLines(); addData(s1,s8,s2,s5,s6,s7); JOptionPane.showMessageDialog(btn1, "Data Saved Successfully"); } catch (Exception ex) { System.out.println(ex); } } else { JOptionPane.showMessageDialog(btn1, "Password Does Not Match"); } } else { tf1.setText(""); tf2.setText(""); p1.setText(""); p2.setText(""); tf5.setText(""); tf6.setText(""); tf7.setText(""); } } public static void main(String args[]) { new SignUp(); } } login form: import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.io.RandomAccessFile; public class Login extends JFrame implements ActionListener { JLabel l1, l2, l3; //label for email and password JTextField tf1; // email field JButton btn1; // login button JPasswordField p1; // password field File f = new File("C:\\Files"); //file path int ln; // create folder in which record is save void createFolder() { if (!f.exists()) { f.mkdirs(); } } //check file is exist or not void readFile() { try { FileReader fr = new FileReader(f + "\\logins.txt"); System.out.println("file exists!"); } catch (FileNotFoundException ex) { try { FileWriter fw = new FileWriter(f + "\\logins.txt"); System.out.println("File created"); } catch (IOException ex1) { } } } // login logic void logic(String usr, String pswd) { try { RandomAccessFile raf = new RandomAccessFile(f + "\\logins.txt", "rw"); for (int i = 0; i < ln; i += 7) { System.out.println("count " + i); String forUser = raf.readLine().substring(6); String forPswd = raf.readLine().substring(9); System.out.println(forUser + forPswd); if (usr.equals(forUser) & pswd.equals(forPswd)) { JOptionPane.showMessageDialog(null, "Login Successfully!!"); break; } else if (i == (ln - 6)) { JOptionPane.showMessageDialog(null, "incorrect username/password"); break; } for (int k = 1; k <= 5; k++) { raf.readLine(); } } } catch (FileNotFoundException ex) { } catch (IOException ex) { } } //count the number of lines from file void countLines() { try { ln = 0; RandomAccessFile raf = new RandomAccessFile(f + "\\logins.txt", "rw"); for (int i = 0; raf.readLine() != null; i++) { ln++; } System.out.println("number of lines:" + ln); } catch (FileNotFoundException ex) { } catch (IOException ex) { } } Login() { setTitle("Login Form in Windows Form"); setVisible(true); setSize(800, 800); setLayout(null); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); l1 = new JLabel("Login Form in Windows Form:"); l1.setForeground(Color.blue); l1.setFont(new Font("Serif", Font.BOLD, 20)); l2 = new JLabel("Enter Email:"); l3 = new JLabel("Enter Password:"); tf1 = new JTextField(); p1 = new JPasswordField(); btn1 = new JButton("Submit"); l1.setBounds(100, 30, 400, 30); l2.setBounds(80, 70, 200, 30); l3.setBounds(80, 110, 200, 30); tf1.setBounds(300, 70, 200, 30); p1.setBounds(300, 110, 200, 30); btn1.setBounds(150, 160, 100, 30); add(l1); add(l2); add(tf1); add(l3); add(p1); add(btn1); btn1.addActionListener(this); } public void actionPerformed(ActionEvent e) { showData(); } public void showData() { JFrame f1 = new JFrame(); JLabel l, l0; String str1 = tf1.getText(); char[] p = p1.getPassword(); String str2 = new String(p); try { createFolder(); readFile(); countLines(); logic(str1, str2); } catch (Exception ex) { System.out.println(ex); } } public static void main(String arr[]) { new Login(); } } OUTPUT: SignUp successful Login Successful This is the blog in which register and signup form is build using Java Swing. thank you for reading. If you have project or assignment files, You can send atcontact@codersarts.com directly.
- To-do List With Solution
Event Delegation Clicking the red "X" at the right of an item will delete that item. Clicking on the item will style it with a strike-through to show that it has been picked up. Entering an item in the input field at the bottom will add the item if either the "+" button is clicked or the "Enter" key is pressed. Using Delegation 1. Add a click event handler to the list element (ul). This will handle events for both the removing and the marking actions. 2. Add a console.log() in the event handler to display the tagName of the target. Notice that when you click on an item in the list you get "LI" but when you click on the red "X" you get "SPAN". Clicking the item 2. If it was, then add the class completed to the target element. That will cause it to be displayed lighter and with a strike-through.Use an if statement to determine if the element clicked was an li element. 2. If it was, then add the class completed to the target element. That will cause it to be displayed lighter and with a strike-through. Clicking the red "X" 1. Use another if statement to determine if the element clicked was a span element. 2. If it was, delete the li. (This is the target's parent element not the span itself). Adding a new item We want this event to happen two different ways, when the "+" button is clicked or when the "Enter" key is pressed. Therefore we will create a named function that we can use twice. 1. Add a click event handler to the a element (the plus sign) that will console.log a message. 2. Add a keydown event handler on the input element that will console.log a different message. 3. Create a named function that will add a new li element at the bottom of the list with whatever is in the input field. (Hint: input fields have a property value to get the string entered in the field. textContent does not work with inputs.) Make sure you look at the HTML file and create new li elements that look just like the ones that are there. I.E. Make sure you create a span element in it so the red "X" will appear. 4. Call this function from each of the event handlers to add the item. 5. Add code to the keydown event handler to make sure it only adds an item if the "Enter" key is pressed. (Hint: remember the event.key property?) 6. Clear the input box after creating a new list item. (Hint: input elements don't have a textContent property since they are "Empty Elements". The value property is used instead.) Solution start here Introduction: TODO List are the lists that we generally use to maintain our day to day tasks or list of everything that we have to do, It is helpful in planning our daily schedules. We can add moretasks any time and delete a tasks which is completed. 1. Getting Started with HTML The first step of our JavaScript project is adding HTML. The HTML file will contain all the elements we need to show on our page when it loads. The document also includes the location of our CSS and JavaScript files that we will create in the further sections. The following is the content of your HTML file. Shopping List Pepsi Honey Nut Cheerios Frozen Pizza Potato Chips Milk + . 2. Making the webpage attractive Using css file body { background-color: #5F9EA0; font-family: Helvetica, Arial, sans-serif; } body > div { width: 300px; margin:50px auto; } h1 { text-align: center; } .todo-list { list-style: none; padding: 0px; } .todo-item { border: 2px solid #444; margin-top: -2px; padding: 10px; cursor: pointer; display: block; background-color: #ffffff; } .todo-new { display: block; margin-top: 10px; content: "20S"; } .todo-new input[type='text'] { width: 260px; height: 22px; border: 2px solid #444; } .todo-new a { font-size: 1.5em; color: black; text-decoration: none; background-color: #ffffff; border: 2px solid #444; display: block; width: 24px; float: right; text-align: center; } .todo-new a:hover { background-color: #0EB0dd; } .remove { float: right; font-family: Helvetica, Arial, sans-serif; font-size: 0.8em; color: #dd0000; } .remove:before { content: 'X'; } .remove:hover { color: #ffffff; } .todo-item::after:hover{ background-color: #dd0000; color: white; } .todo-item:hover { background-color: #0EB0FF; color: white; } .completed { text-decoration: line-through; opacity: 0.5; } 3. Complete JavaScript code function event_handler(e) { console.log(e.target.tagName); if (e.target.tagName == "LI") { e.target.classList.add("completed"); } else if (e.target.tagName == "SPAN") { e.target.parentNode.remove(); } else { console.log("Unknown TagName: " + e.target.tagName) } } document.getElementsByClassName('todo-list')[0].addEventListener('click', event_handler); function add_new_item() { const list = document.getElementsByClassName('todo-list')[0]; const item = document.createElement('li'); item.classList.add('todo-item'); const spantag = document.createElement('span'); spantag.classList.add('remove'); const input_field = document.getElementById('new-itemtext').value; item.innerHTML = input_field; item.appendChild(spantag); console.log(item); list.appendChild(item); document.getElementById('new-item-text').value = ''; } document.getElementById('add-item').addEventListener('click', () => { console.log("the plus sign Pressed"); add_new_item(); }); document.getElementById('new-itetext').addEventListener('keydown', (e) => { if (e.key == 'Enter' || e.keyCode == 13) { console.log("key " + e.keyCode + " Pressed in Text Field!"); add_new_item(); } }); The styling of the webpage is perfect. It is time to change the page from static to dynamic. We will achieve this task with the help of JavaScript. First we create event handler function. in this function if condition check e.target.tagName == "LI" . condition is true then performe e.target.classList.add("completed"). completed is the class name define it html file. after that one more conditon e.target.tagName == "SPAN". conditon is true then cll remove funtion for revome node then else part.after that we use document.getElementsByClassName to get todo-list class from html file.when we get elementByclass name then we have use indexing [0] other it is show error massage, after that we add event listener and cll event handler by onclick. Then we have created new function it's name is add new_item in this function we define variable it's name list and assign element which class name todo-list using DOM. after that create li element and assign to item variable then add class todo-item on item node after that create span tag and then add class remove on span tag . Get inpu field value by Id and then assign to input_field variable after that put input_field text to item node using innerHTML. Then append chlid node span tag on item node after that append child node item on list node.then out of function add one event listener on element which have id add-item then cll add new_item() onclick. Then one more event linstener in this event we check enter key is pressed or e.keyCode == 13 it is key code of enter key ,condition is ture cll add add_new_item(). If you have project or assignment files, You can send atcontact@codersarts.com directly
- What is Java Swing?
Swing in Java is a Graphical User Interface (GUI) toolkit that includes the GUI components. Swing provides a rich set of widgets and packages to make sophisticated GUI components for Java applications. Swing is a part of Java Foundation Classes(JFC), which is an API for Java programs that provide GUI. The Java Swing library is built on top of the Java Abstract Widget Toolkit (AWT), an older, platform dependent GUI toolkit. You can use the Java GUI programming components like button, textbox, etc. from the library and do not have to create the components from scratch. The javax.swing package provides classes for java swing API such as JButton, JTextField, JTextArea, JRadioButton, JCheckbox, JMenu, JColorChooser etc. Java Swing class Hierarchy Diagram What is a Container Class? Container classes are classes that can have other components on it. So for creating a Java GUI, we need at least one container object. There are 3 types of Java Swing containers. Panel: It is a pure container and is not a window in itself. The sole purpose of a Panel is to organize the components on to a window. Frame: It is a fully functioning window with its title and icons. Dialog: It can be thought of like a pop-up window that pops out when a message has to be displayed. It is not a fully functioning window like the Frame. What is GUI in Java? GUI (Graphical User Interface) in Java is an easy-to-use visual experience builder for Java applications. It is mainly made of graphical components like buttons, labels, windows, etc. through which the user can interact with an application. GUI plays an important role to build easy interfaces for Java applications. Java Swing Examples Let's see a simple swing example where we are creating one button and adding it on the JFrame object inside the main() method. File: FirstSwingExample.java import javax.swing.*; public class FirstSwingExample { public static void main(String[] args) { JFrame f=new JFrame(); //creating instance of JFrame JButton b=new JButton("click"); //creating instance of JButton b.setBounds(130,100,100, 40); //x axis, y axis, width, height f.add(b); //adding button in JFrame f.setSize(400,500); //400 width and 500 height f.setLayout(null); //using no layout managers f.setVisible(true); //making the frame visible } } OUTPUT: Difference between AWT and Swing There are many differences between java awt and swing that are given below. What we will learn in Swing? JButton class JRadioButton class JTextArea class JComboBox class JTable class JColorChooser class JProgressBar class JSlider class Graphics in swing OpenDialog Box BorderLayout GridLayout FlowLayout CardLayout We will discuss these topics in our upcoming blogs. Thank you for read this blog.
- BLOG POST APP WITH MERN STACK
BLOG POST is a web application built with the latest and top notch web technologies. This application features blog creation, blog updating and blog deletion. If talking about inner technical implementation then it is an example of CRUD (Create, Read, Update, Delete) operation`s functionalities. As per the video attached you can simply add new blogs via clicking button "ADD NEW BLOG" and update or delete a individual blog via clicking "DELETE BLOG" and "UPDATE BLOG" buttons respectively. This web application is completely implemented on JavaScript web technologies. If you wish to develop a application like this with extended technologies then you can contact us. The tech stack involving this project is: React.Js : JavaScript library for building the UI components CSS : For Styling the Dom elements. Reactstrap : To enable the application UI responsive and good looking Node.Js : JavaScript runtime environment for server implementation Express : Used for making Restful API used on the top of Node.js by the project Axios : A http request library used to make API calls mongo DB: It is a NoSql document oriented database. It is used in this application for database implementations. Follow CodersArts blogs to get more insights on how this project maintains features like Mobile Responsiveness, API Integration and Building, Reactstrap Components, Axios Http Library and much more Contact us for more MERN Stack Projects by CodersArts specialists who can help you mentor and guide for such Web projects. If you have project or assignment files, You can send at contact@codersarts.com directly.
- BLOG POST WITH MERN STACK
BLOG POST is a web application built on top notch and with latest JavaScript technologies. This app features blog creating, blog updating, and blog deleting mechanism. This application is technically an implementation of a CRUD (Create, Read, Update, Delete) operation`s functionalities. This application is built with the JavaScript web technologies. Specially its a example of small MERN stack CRUD application. We can add-on more feature in backend and frontend of this application on demand. For any kind of MERN application development, development-help or guidance and for assignment help please contact us on below contact details. The tech stack involving this project is: React.Js : JavaScript library for building the UI components CSS : For Styling the Dom elements. Reactstrap : To enable the app to reactstrap components and be responsive Node.Js : JavaScript runtime environment for server implementation and building APIs Express.Js : Used for making restful API on the top of Node.js. It is used in backend implementation for this project Axios : A http request library used to make API calls from frontend to backend(API) Mongo DB: Its a NoSql Document oriented database and it is used for database implementation in this project Follow CodersArts blogs to get more insights on how this project maintains features like Mobile Responsiveness, API development and Integration, Responsive and Pixel Perfect Components, Different Http Library implementation, Security and authentication, authorization implementation and much more. Contact us for more MERN Stack Projects by CodersArts specialists who can help you mentor and guide for such Web projects. If you have project or assignment files, You can send at contact@codersarts.com directly.
- CodersArts E-commerce Sample
This blog features the CodersArts E-commerce platform showcasing a sample e-commerce project. This project is live and supports a payment portal. The techs used to build this project are: React Js: Js library for building the UI components. CSS: For Styling the Dom elements. Material UI: To enable the app to use material design. Commerce.js: A Back-end API supporting product listing. Stripe API: Integrated with the payment portal to secure transactions. Netlify : A hosting platform running the project live. Features for this website: 1) A responsive layout, managed with Material UI. Here's a preview of our website in the mobile view. 2) Stripe Api to manage transactions within the website. 3) Commerce.js to manage Back-end. If you're willing to maintain a custom Back-end service, Our Developers skilled in Node provide as per Client's requirements with Complete Guidance and Control on the developed API. The project is currently live at : https://codersarts-ecommerce.netlify.app/checkout The source code is available at: https://github.com/CodersArts/MERN-ECOMMERCE-SAMPLE Contact us for more Mern Stack Projects by Codersarts specialists who can help you mentor and guide for such Web projects. If you have project or assignment files, You can send at contact@codersarts.com directly.
- University Static Website
A static website made using HTML, CSS, JavaScript which comprises of 6 different static webpages build with: 1) Skeleton CSS responsive boilerplate to allow a responsive design for any screen aspect ratio. 2) Micron.js interactions allowing an interactive user experience with on clicking events attached to buttons. 3) JQuery a fast, small, and feature-rich JavaScript library which makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers allows implantation of Jquery Tabs within the webpages. Our Developer Team specialises in building interactive UI with Bootstrap, Material UI or any CSS framework as per client’s requirements. Such projects being delivered within a week’s span time with constant guidance to the clients and progress reports. Contact us at CodersArts Dev Team to mentor you for such Web Projects. If you have project or assignment files, You can send at contact@codersarts.com directly.
- Weather App With Solution
Introduction we'll be building our very own weather app with HTML, CSS, and JavaScript. To retrieve the data, we'll be using something called an API, or an application programming interface. Well, we're actually going to use API fetch weather data based on the city location we can make a request to a weather source – like OpenWeatherMap — to get weather data based on a city. First off, go ahead and sign up for a free API key on OpenWeatherMap here. Once you're signed in, click on API keys and create a key. It should look something like 5ae4a7ce61e3971248f63df723cde762". Now that we have our API key, we can create our files index.html - for our markup style.css - for styling script .js - for the function(s) to fetch data from our APIs we'll need to go into our html document and make sure we've first linked our stylesheet style. css and javascript file script.js. Then, in our tag, let's create div elements with unique class "app-main and then create one more div it contain one input field for enter city name". An other div with class "weather-body" , it contain one div with class "location-details", inside this div we have two div element one for contain city name and county name and one more div contain date , Months ,day and year. we have three more div which contian temp,min_max degree an other contian weather type then img tag contain image according weather type. index.html City,County Date Month (Day), Year 34°C 00°C(Min) /00°C (Max) Clear Getting Data from API In JavaScript, we can use the fetch API, which provides an interface for fetching resources from anywhere on the internet! We can hit this url to get our data. and than create javascript variable that is seachInputBox it hold input-box ,We can do that by using the document.getElementById function. then one event listener for enter key press. Go ahead and write a function getWeatherReport(),then pass city name to it, script.js const weatherApi = { Key:"5ae4a7ce61e3971248f63df723cde762", baseUrl: "https://api.openweathermap.org/data/2.5/weather", } const searchInputBox = document.getElementById("input-box"); searchInputBox.addEventListener('keypress' , (event) => { if(event.keyCode == 13) { console.log(searchInputBox.value); getWeatherReport(searchInputBox.value); document.querySelector('.weather-body').style.display ="block"; } }); function getWeatherReport(city) { fetch(`${weatherApi.baseUrl}?q=${city}&appid=${weatherApi.Key}&units=metric`) .then(weather => { return weather.json(); }).then(showWeatherReport); } function showWeatherReport(weather) { console.log(weather); let city = document.getElementById('city'); city.innerHTML = `${weather.name}, ${weather.sys.country}`; let tempreature = document.getElementById('temp'); tempreature.innerHTML = `${Math.round(weather.main.temp)}°C`; let minMaxTemp = document.getElementById('min-max'); minMaxTemp.innerHTML = `${Math.floor(weather.main.temp_min)}°C(min)/ ${Math.ceil(weather.main.temp_max)}°C(max)`; let weatherType = document.getElementById('weather'); weatherType.innerHTML =`${weather.weather[0].main}`; let date = document.getElementById('date'); let todayDate = new Date(); date.innerText = dateManage(todayDate) if(weatherType.textContent =='Clear') { //console.log(weather.weatherType.textContent); document.body.style.backgroundImage ='url(images/clear1.jpg)'; } else if(weatherType.textContent =='Clouds') { document.body.style.backgroundImage ='url(images/cloudy.jpg)'; } else if(weatherType.textContent =='Sunny') { document.body.style.backgroundImage ='url(images/sunny.jpg)'; } else if(weatherType.textContent =='Rainy') { document.body.style.backgroundImage ='url(images/rain.jpg)'; } else if(weatherType.textContent =='Windy') { document.body.style.backgroundImage ='url(images/windy.jpg)'; } else if(weatherType.textContent =='Haze') { document.body.style.backgroundImage ='url(images/haze.jpg)'; } else if(weatherType.textContent =='Smoke') { document.body.style.backgroundImage ='url(images/smoke.jpg)'; } if(weatherType.textContent =='Clear') { document.getElementById('img').innerHTML = ''; } else if(weatherType.textContent =='Haze') { document.getElementById('img').innerHTML = ''; } else if(weatherType.textContent =='Clouds') { document.getElementById('img').innerHTML = ''; } else if(weatherType.textContent =='Rainy') { document.getElementById('img').innerHTML = ''; } else if(weatherType.textContent =='Storm') { document.getElementById('img').innerHTML = ''; } } function dateManage(dateArg) { let days = ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday",]; let months = ["january", "february", "march", "April", "may", "june", "july", "August", "September", "October", "novmber", "December"]; let year = dateArg.getFullYear() let month = months[dateArg.getMonth()]; let date = dateArg.getDate(); let day = days[dateArg.getDay()]; return `${date} ${month} (${day}), ${year}`; } Style.css *{ margin: 0; padding: 0; box-sizing: border-box; } body{ background-image: url("images/background2.webp"); height: 100vh; overflow: hidden; background-repeat: no-repeat; background-position: top center; background-size:cover; font-family: Arial, Helvetica, sans-serif; } .app-main{ width: 50vh; margin: 100px auto; background-color: rgba(255, 165, 0); padding: 20px; text-align: center; } .app-main > *{ margin-bottom: 20px; } .input-box{ width: 100%; background-color: rgba(255,255,255,0.6); border: none; outline: none; color: blueviolet; font-size: 1.2rem; height: 50px; border-radius: 5px; padding: 0 10px; text-align: center; } .input-box:focus{ background-color: whitesmoke; } .weather-body{ color: #582233; padding: 20px; line-height: 2rem; border-radius: 10px; background-color: rgba(255,255,255,0.6); height: 50vh; display: none; } .location-details{ font-weight: bold; } .weather-status{ padding: 20px; } .temp{ font-size: 50pt; font-weight: 700; margin: 20px 0; text-shadow: 2px 4px rgba(0,0,0,0.3); } .min-max, .weather{ font-size: 12pt; font-weight: 600; } .img{ overflow: hidden; background-repeat: no-repeat; background-position: top center; background-size:cover; width: 80px; height: 70px; margin-left: 50px; align-items: center; } you'll see weather data in JSON outputted based on the city name you've submitted in the URL! This is exactly the data that we'll be fetching. We can fetch the data by passing in our url into the fetch() web API. Go ahead and write a function showWeatherReport() that have one argument that is weathe.then console the weather . after fetch the data . in this case, we'd want to take the data we should fetched and display it on our webpage, which means setting the innerHTML of the tags we created earlier to the city ,temperature, minMaxTemp, weathertype and date etc from our weather data request!. and then we have write code for manage background according to weather type using if condition. Then dateManage function it have one argument that is dateArg, that function manage date ,day and year. If you have project or assignment files, You can send atcontact@codersarts.com directly
- Quiz App
Description: Practice and test your knowledge by answering questions in a quiz application. As a developer, you can create a quiz application for testing coding skills of other developers. (HTML, CSS, JavaScript, Python, PHP, etc…) User Stories User can start the quiz by pressing a button User can see a question with 4 possible answers After selecting an answer, display the next question to the User. Do this until the quiz is finished In the end, the User can see the following statistics: Time it took to finish the quiz How many correct answers did he get A message showing if he passed or failed the quiz Bonus features User can share the result of a quiz on social media Add multiple quizzes to the application. User can select which one to take User can create an account and have all the scores saved in his dashboard. User can complete a quiz multiple times
- REST API
Rest acronym for Representation state transfer. It is architectural style for distributed hyper media systems and was first represented by fielding in 2000 in his famous, Like any other architectural style REST it also have its own 6 guiding constrains which must be satisfied if an interface need to be referred as Restful, Principles of rest : Client - Server stateless cacheable Uniform Interface Layered System code on demand Rest and HTTP not same A lot of people prefer to compare HTTP with REST. rest and http are not same. REST != HTTP Though, because REST also intends to make the web (internet) more streamline and standard, he advocates using REST principles more strictly. And that’s from where people try to start comparing REST with web (HTTP). Roy fielding, in his dissertation, nowhere mentioned any implementation directive – including any protocol preference and HTTP. Till the time, you are honoring the 6 guiding principles of REST, you can call your interface RESTful. In simplest words, in the REST architectural style, data and functionality are considered resources and are accessed using Uniform Resource Identifiers (URIs). The resources are acted upon by using a set of simple, well-defined operations. The clients and servers exchange representations of resources by using a standardized interface and protocol – typically HTTP. Resources are decoupled from their representation so that their content can be accessed in a variety of formats, such as HTML, XML, plain text, PDF, JPEG, JSON, and others. Metadata about the resource is available and used, for example, to control caching, detect transmission errors, negotiate the appropriate representation format, and perform authentication or access control. And most importantly, every interaction with a resource is stateless Android assignment Related #codersart
- Machine Learning Tools And Frameworks
Here we will learn about some useful machine learning tools and frameworks which is listed below: Tableau Weka SAS studio Rapid Miner Azure Machine Studio Azure Cognitive services DataBricks (Big Data Spark) BigML Heroku Kafka cassandra 1. Tableau Tableau is a data analytics and visualization tool which is used currently in most of data visualization industries or software industries to visualization of given data. It help to understanding data easily by any non technical person. Many businesses or industries need to visualize our data so it covers huge areas. It use drag and drop features so any non-technical person can easily understand its work. This feature helps to perform tasks like sorting, comparing and analyzing, very easily and fast. Tableau is also support multiple sources, including Excel, SQL Server, and cloud-based data repositories which makes it an excellent choice for Data Scientists. Why we will use tableau There are many terms by which we can easily say that "why we will use tableau" Fast Analytics Ease of Use Big Data, Any Data Smart Dashboards Update Automatically Share in Seconds Product Suite Tableau support many product suite: Tableau Desktop Tableau Public Tableau Online Tableau Server Tableau Reader Installation of Tableau You can download tableau directly from official website, which is any try(for 30 days) or paid using below link: https://www.tableau.com/products/desktop/download 2. Weka Weka is a collection of machine learning algorithms for data mining tasks. The algorithms can either be applied directly to a dataset or called from your own Java code. It contains tools for: data pre-processing, classification, regression, clustering, association rules, and visualization. It is also well-suited for developing new machine learning schemes. How it will Download You can download(Latest version 3.6) it using below link: https://www.cs.waikato.ac.nz/ml/weka/ 3. SAS studio When you use SAS University Edition, you are using SAS Studio to access SAS. Many people program in SAS by using an application on their PC desktop or SAS server. It is a tool that you can use to write and run SAS code through your web browser. By using SAS you can access your data files, libraries, and existing programs and write new programs. When you use SAS Studio, you are also using SAS software behind the scenes. SAS Studio connects to a SAS server in order to process SAS commands. With SAS software, you can complete these tasks: access any format data: including SAS tables, Microsoft Excel tables, and database files. manage and manipulate your existing data to get the data that you need. The reports that you create can be saved in a wide variety of formats, including HTML, PDF, and RTF. How we can install it Download university edition using below link: https://www.sas.com/en_in/software/university-edition/download-software.html 4. Rapid Miner Data preparation is an important part of data science, their are many techniques are used for this but it will take lots of time to prepare data. It is a brand-new data prep tool which used to help speed productivity so that it prepare data within short of time(or help to time-consuming data preparation tasks). How we can install it use below link to download this: https://docs.rapidminer.com/latest/server/install/ 5. Azure Machine Studio Azure Machine Learning Studio is a the browser-based workbench for Machine Learning. In this you can create free account and get 10GB space, after go apart from 10GB you can get it using paid. you can look all the details regarding limitations using below link: https://azure.microsoft.com/en-us/pricing/details/machine-learning-studio/ After an account is created, you can log in to: https://studio.azureml.net/ It is collection of complete tutorials and guide related to Azure. Azure Machine Learning can be used for different types of machine learning, classical ml deep learning, supervised, and unsupervised learning. By using this you can write Python or R code with the SDK or work with no-code/low-code options in the studio, you can build, train, and track machine learning and deep-learning models in an Azure Machine Learning Workspace.











