Snippets Collections
public static DirPartyRelationship findByChildParty(DirPartyRecId             _parentParty,
                                                    DirPartyRecId             _childParty,
                                                    boolean _forupdate = false)
    {
        DirPartyRelationship  partyRelationship = null;
        ;

        partyRelationship.selectForUpdate(_forupdate);

        select firstonly partyRelationship
        index hint TypeParentChildIdx
        where partyRelationship.ParentParty == _parentParty &&
              partyRelationship.ChildParty == _childParty;

        return partyRelationship;
    }

    public static void lookupDependentsByParentParty(FormStringControl _formControl, DirPartyRecId _ParentParty)
    {

        SysTableLookup          sysTableLookup = SysTableLookup::newParameters(tableNum(DirPartyRelationship),_formControl);
        Query                   query = new Query();
        QueryBuildDataSource    queryBuildDataSource = query.addDataSource(tableNum(DirPartyRelationship));
        QueryBuildRange         queryBuildRangeJournalType = queryBuildDataSource.addRange(fieldNum(DirPartyRelationship, ParentParty));

        sysTableLookup.addLookupfield(fieldNum(DirPartyRelationship, RelationshipTypeId));
        sysTableLookup.addLookupfield(fieldNum(DirPartyRelationship, ChildParty));

        queryBuildRangeJournalType.value(queryValue(_ParentParty));

        sysTableLookup.parmQuery(query);
        sysTableLookup.performFormLookup();
    }
1.	Create a web page using the advanced features of CSS Grid. Apply transitions and animations to the contents of the web page.

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Minimal CSS Grid</title>
  <style>
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }
    body {
      font-family: Arial, sans-serif;
      background: #f4f4f4;
      color: #333;
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100vh;
    }
    .container {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 10px;
      width: 80%;
      max-width: 800px;
    }

    .item {
      background: #ffffff;
      border: 1px solid #ddd;
      border-radius: 5px;
      padding: 20px;
      text-align: center;
      transition: transform 0.3s ease, background-color 0.3s ease;
    }
    .item:hover {
      transform: scale(1.05);
      background-color: #f0f8ff;
    }
    @keyframes fadeIn {
      from {
        opacity: 0;
      }
      to {
        opacity: 1;
      }
    }
    .container {
      animation: fadeIn 1s ease-in-out;
    }
  </style>
</head>
<body>
  <div class="container">
    <div class="item">Item 1</div>
    <div class="item">Item 2</div>
    <div class="item">Item 3</div>
    <div class="item">Item 4</div>
    <div class="item">Item 5</div>
    <div class="item">Item 6</div>
  </div>
</body>
</html>
2.	Create a web page using the advanced features of CSS Flexbox. Apply transitions and animations to the contents of the web page.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Basic Flexbox with Animation</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        body {
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            background: #f0f0f0;
            font-family: Arial, sans-serif;
        }

        .container {
            display: flex;
            flex-wrap: wrap;
            justify-content: space-around;
            gap: 20px;
        }
        .card {
            background: #fff;
            padding: 20px;
            text-align: center;
            border-radius: 8px;
            width: 200px;
            transition: transform 0.3s ease;
        }
        .card:hover {
            transform: scale(1.05);
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="card">
            <h3>Card 1</h3>
            <p>Some interesting text.</p>
        </div>
        <div class="card">
            <h3>Card 2</h3>
            <p>More details here.</p>
        </div>
        <div class="card">
            <h3>Card 3</h3>
            <p>Additional content.</p>
        </div>
    </div>
</body>
</html>
3.	Demonstrate pop-up box alerts, confirm, and prompt using JavaScript.

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>JavaScript Pop-ups</title>
</head>
<body>
  <button onclick="showAlert()">Show Alert</button>
  <button onclick="showConfirm()">Show Confirm</button>
  <button onclick="showPrompt()">Show Prompt</button>
  <script>
    function showAlert() {
      alert("This is a simple alert box!");
    }
    function showConfirm() {
      const result = confirm("Do you want to proceed?");
      if (result) {
        alert("You chose to proceed!");
      } else {
        alert("You chose to cancel.");
      }
    }
    function showPrompt() {
      const name = prompt("What is your name?");
      if (name) {
        alert(`Hello, ${name}! Welcome!`);
      } else {
        alert("You didn't enter a name.");
      }
    }
  </script>
</body>
</html>
4.	Demonstrate Responsive Web Design using Media Queries to create a webpage.
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Simple Media Query</title>
  <style>
    body {
      color: black;
    }
    @media (max-width: 600px) {
      body {
        color: blue;
      }
    }
  </style>
</head>
<body>
  Resize the browser to see the text color change!
</body>
</html>
5.	Write a JavaScript program to demonstrate the working of callbacks, promises, and async/await.
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>JavaScript Callbacks, Promises, Async/Await</title>
</head>
<body>
  <h1>JavaScript Callbacks, Promises, and Async/Await Demo</h1>
  <script>
    // Callback Example
    function doSomething(callback) {
      setTimeout(() => {
        callback("Callback done!");
      }, 1000);
    }
    doSomething(console.log);
    // Promise Example
    let promise = new Promise((resolve, reject) => {
      setTimeout(() => resolve("Promise resolved!"), 1000);
    });
    promise.then(console.log);
    // Async/Await Example
    async function asyncFunction() {
      let result = await promise;
      console.log(result);
    }
    asyncFunction();
  </script>
</body>
</html>
6.	Write an XML file that displays book information with the following fields: Title of the book, Author Name, ISBN number, Publisher name, Edition, and Price. Define a Document Type Definition (DTD) to validate the XML document created above.
Book.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE books SYSTEM "books.dtd">
<books>
  <book>
    <title>The Great Gatsby</title>
    <author>F. Scott Fitzgerald</author>
    <isbn>9780743273565</isbn>
    <publisher>Scribner</publisher>
    <edition>1st</edition>
    <price>10.99</price>
.
  </book>
  <book>
    <title>1984</title>
    <author>George Orwell</author>
    <isbn>9780451524935</isbn>
    <publisher>Signet Classic</publisher>
    <edition>Revised</edition>
    <price>9.99</price>
  </book>
</books>

Book.dtd

<!ELEMENT books (book+)>
<!ELEMENT book (title, author, isbn, publisher, edition, price)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT author (#PCDATA)>
<!ELEMENT isbn (#PCDATA)>
<!ELEMENT publisher (#PCDATA)>
<!ELEMENT edition (#PCDATA)>
<!ELEMENT price (#PCDATA)>
7.	Write an XML file that displays book information with the following fields: Title of the book, Author Name, ISBN number, Publisher name, Edition, and Price. Define an XML schema to validate the XML document created above.
Books.xml
<?xml version="1.0" encoding="UTF-8"?>
<books xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://example.com/books books.xsd">
  <book>
    <title>The Great Gatsby</title>
    <author>F. Scott Fitzgerald</author>
    <isbn>9780743273565</isbn>
    <publisher>Scribner</publisher>
    <edition>1st</edition>
    <price>10.99</price>
  </book>
  <book>
    <title>1984</title>
    <author>George Orwell</author>
    <isbn>9780451524935</isbn>
    <publisher>Signet Classic</publisher>
    <edition>Revised</edition>
    <price>9.99</price>
  </book>
</books>

Books.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://example.com/books" targetNamespace="http://example.com/books" elementFormDefault="qualified">
  
  <!-- Define the root element -->
  <xs:element name="books">
    <xs:complexType>
      <xs:sequence>
        <!-- The 'book' element can occur one or more times -->
        <xs:element name="book" maxOccurs="unbounded">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="title" type="xs:string"/>
              <xs:element name="author" type="xs:string"/>
              <xs:element name="isbn" type="xs:string"/>
              <xs:element name="publisher" type="xs:string"/>
              <xs:element name="edition" type="xs:string"/>
              <xs:element name="price" type="xs:decimal"/>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

8.	Write a Java application to validate the XML document using the DOM parser.
import javax.xml.parsers.DocumentBuilder; 
import javax.xml.parsers.DocumentBuilderFactory; 
import org.w3c.dom.Document; import org.xml.sax.SAXException;  
import java.io.File; public class DOMDTDValidator {     
public static void main(String[] args) {         
try {             
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();             
factory.setValidating(true);              
factory.setNamespaceAware(false);              
DocumentBuilder builder = factory.newDocumentBuilder();             
File xmlFile = new File("books.xml");             
builder.parse(xmlFile);             
System.out.println("The XML document is valid.");         
} catch (SAXException e) {             
System.out.println("Validation error: " + e.getMessage());         
} catch (Exception e) {             
System.out.println("Error: " + e.getMessage());         
}     } }
 
books.xml

<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE books SYSTEM "books.dtd"> 
<books>     
<book>         
<title>The Great Gatsby</title>         
<author>F. Scott Fitzgerald</author>         
<isbn>9780743273565</isbn>         
<price>10.99</price>     
</book>     
<book>         
<title>1984</title>         
<author>George Orwell</author>         
<isbn>9780451524935</isbn>         
<price>9.99</price>     
</book> 
</books> 


Books.dtd

<!ELEMENT books (book+)> 
<!ELEMENT book (title, author, isbn, price)> 
<!ELEMENT title (#PCDATA)> 
<!ELEMENT author (#PCDATA)> 
<!ELEMENT isbn (#PCDATA)> 
<!ELEMENT price (#PCDATA)> 





9.	Write a Java application to validate the XML document using the SAX parser.


Java code

import org.xml.sax.SAXException;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import java.io.File;

public class SAXValidationExample {
    public static void main(String[] args) {
        try {
            SAXParserFactory factory = SAXParserFactory.newInstance();
            factory.setValidating(true); 
            factory.setNamespaceAware(true); 
            SAXParser saxParser = factory.newSAXParser();
            saxParser.parse(new File("example.xml"), new SimpleHandler());
            System.out.println("XML is valid.");
        } catch (SAXException e) {
            System.out.println("Validation error: " + e.getMessage());
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}


books.xml
<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE books SYSTEM "books.dtd"> 
<books>     
<book>         
<title>The Great Gatsby</title>         
<author>F. Scott Fitzgerald</author>        
<isbn>9780743273565</isbn>         
<price>10.99</price>     
</book>     
<book>         
<title>1984</title>         
<author>George Orwell</author>         
<isbn>9780451524935</isbn>         
<price>9.99</price>     
</book> </books>


Books.dtd
<!ELEMENT books (book+)> <!ELEMENT book (title, author, isbn, price)> <!ELEMENT title (#PCDATA)> <!ELEMENT author (#PCDATA)> <!ELEMENT isbn (#PCDATA)> <!ELEMENT price (#PCDATA)> 
All three in same folder complie and run the java file

   
10. Write a Java program to access the metadata of an SQL database.
import java.sql.*;

public class DatabaseMetadataDemo {
    public static void main(String[] args) {
        String url = "jdbc:mysql://localhost:3306/your_database_name"; // Replace with your DB name
        String user = "root"; // Replace with your DB username
        String password = "your_password"; // Replace with your DB password

        try (Connection conn = DriverManager.getConnection(url, user, password)) {
            DatabaseMetaData metaData = conn.getMetaData();
            System.out.println("Database: " + metaData.getDatabaseProductName());
            System.out.println("Version: " + metaData.getDatabaseProductVersion());

            System.out.println("\nTables:");
            ResultSet tables = metaData.getTables(null, null, "%", new String[]{"TABLE"});
            while (tables.next()) {
                System.out.println("- " + tables.getString("TABLE_NAME"));
            }
        } catch (SQLException e) {
            e.printStackTrace();
        }
    }
}

11.Java script scientific Calculator
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Simple Calculator</title>
</head>
<body>
    <h2>Simple Calculator</h2>
    <input type="text" id="result" disabled>
    <br>
    <button onclick="appendToResult('1')">1</button>
    <button onclick="appendToResult('2')">2</button>
    <button onclick="appendToResult('3')">3</button>
    <button onclick="appendToResult('+')">+</button>
    <br>
    <button onclick="appendToResult('4')">4</button>
    <button onclick="appendToResult('5')">5</button>
    <button onclick="appendToResult('6')">6</button>
    <button onclick="appendToResult('-')">-</button>
    <br>
    <button onclick="appendToResult('7')">7</button>
    <button onclick="appendToResult('8')">8</button>
    <button onclick="appendToResult('9')">9</button>
    <button onclick="appendToResult('*')">*</button>
    <br>
    <button onclick="appendToResult('0')">0</button>
    <button onclick="clearResult()">C</button>
    <button onclick="calculateResult()">=</button>
    <button onclick="appendToResult('/')">/</button>

    <script>
        function appendToResult(value) {
            document.getElementById('result').value += value;
        }

        function clearResult() {
            document.getElementById('result').value = '';
        }

        function calculateResult() {
            const resultField = document.getElementById('result');
            try {
                resultField.value = eval(resultField.value);
            } catch (e) {
                resultField.value = 'Error';
            }
        }
    </script>
</body>
</html>

12.Demonstrate Servlet Lifecyle by implementing Servlet Interface
import javax.servlet.*; 
import java.io.IOException; 
import java.io.PrintWriter;  
public class MyServlet implements Servlet {   
public void init(ServletConfig config) throws ServletException {}   
public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException {     
PrintWriter out = res.getWriter();     
out.println("Hello Servlet Lifecycle!");   }   
public void destroy() {}   
public ServletConfig getServletConfig() { return null; }   
public String getServletInfo() { return null; } } 



13.Demonstrate Creation of Servlet program using Http Servlet class.

import javax.servlet.*; 
import javax.servlet.http.*; 
import java.io.IOException; 
import java.io.PrintWriter;  
public class HelloServlet extends HttpServlet {   
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {     
PrintWriter out = response.getWriter();     out.println("Hello from HttpServlet!");   } }




14.Write a java program to establish a connection to a database and execute simple SQL queries.
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;

public class SimpleDatabaseConnection {
    public static void main(String[] args) {
        // Database credentials
        String url = "jdbc:mysql://localhost:3306/your_database_name"; // Replace 'your_database_name'
        String user = "root"; // Replace 'root' with your username
        String password = "your_password"; // Replace 'your_password'

        // SQL query
        String query = "SELECT * FROM your_table_name"; // Replace 'your_table_name'

        // Establish connection and execute query
        try (Connection conn = DriverManager.getConnection(url, user, password);
             Statement stmt = conn.createStatement();
             ResultSet rs = stmt.executeQuery(query)) {

            System.out.println("Connected to the database!");

            // Process the result set
            while (rs.next()) {
                int id = rs.getInt("id"); // Replace 'id' with your column name
                String name = rs.getString("name"); // Replace 'name' with your column name
                System.out.println("ID: " + id + ", Name: " + name);
            }

        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

15.Write a java program to demonstrate the usage of JDBC in performing various DML statements using prepared statements.

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.SQLException;

public class JdbcDmlDemo {
    public static void main(String[] args) {
        // Database connection details
        String url = "jdbc:mysql://localhost:3306/your_database_name"; // Replace with your DB name
        String user = "root"; // Replace with your DB username
        String password = "your_password"; // Replace with your DB password

        // SQL queries
        String insertQuery = "INSERT INTO users (name, email) VALUES (?, ?)";
        String updateQuery = "UPDATE users SET email = ? WHERE id = ?";
        String deleteQuery = "DELETE FROM users WHERE id = ?";

        try (Connection conn = DriverManager.getConnection(url, user, password)) {
            System.out.println("Connected to the database!");

            // INSERT operation
            try (PreparedStatement insertStmt = conn.prepareStatement(insertQuery)) {
                insertStmt.setString(1, "John Doe");
                insertStmt.setString(2, "john.doe@example.com");
                int rowsInserted = insertStmt.executeUpdate();
                System.out.println(rowsInserted + " row(s) inserted.");
            }

            // UPDATE operation
            try (PreparedStatement updateStmt = conn.prepareStatement(updateQuery)) {
                updateStmt.setString(1, "john.newemail@example.com");
                updateStmt.setInt(2, 1); // Assuming user with ID 1 exists
                int rowsUpdated = updateStmt.executeUpdate();
                System.out.println(rowsUpdated + " row(s) updated.");
            }

            // DELETE operation
            try (PreparedStatement deleteStmt = conn.prepareStatement(deleteQuery)) {
                deleteStmt.setInt(1, 1); // Assuming user with ID 1 exists
                int rowsDeleted = deleteStmt.executeUpdate();
                System.out.println(rowsDeleted + " row(s) deleted.");
            }

        } catch (SQLException e) {
            e.printStackTrace();
        }
    }
}

16.Write a java based application to demonstrate the Scrollable Result sets.
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class ScrollableResultSetDemo {
    public static void main(String[] args) {
        // Database connection details
        String url = "jdbc:mysql://localhost:3306/your_database_name"; // Replace with your DB name
        String user = "root"; // Replace with your DB username
        String password = "your_password"; // Replace with your DB password

        // SQL query
        String query = "SELECT * FROM users";

        try (Connection conn = DriverManager.getConnection(url, user, password);
             Statement stmt = conn.createStatement(
                     ResultSet.TYPE_SCROLL_INSENSITIVE, // Allows scrolling
                     ResultSet.CONCUR_READ_ONLY          // Read-only ResultSet
             );
             ResultSet rs = stmt.executeQuery(query)) {

            System.out.println("Connected to the database!");

            // Move to the last row
            if (rs.last()) {
                System.out.println("Last Record:");
                System.out.println("ID: " + rs.getInt("id") + ", Name: " + rs.getString("name"));
            }

            // Move to the first row
            if (rs.first()) {
                System.out.println("\nFirst Record:");
                System.out.println("ID: " + rs.getInt("id") + ", Name: " + rs.getString("name"));
            }

            // Move to a specific row (e.g., second row)
            if (rs.absolute(2)) {
                System.out.println("\nSecond Record:");
                System.out.println("ID: " + rs.getInt("id") + ", Name: " + rs.getString("name"));
            }

            // Iterate backward from the end
            System.out.println("\nIterating Backward:");
            rs.afterLast(); // Move to after the last row
            while (rs.previous()) {
                System.out.println("ID: " + rs.getInt("id") + ", Name: " + rs.getString("name"));
            }

        } catch (SQLException e) {
            e.printStackTrace();
        }
    }
}

17.Write a program to accept request parameters from a form and generate the response.

<!DOCTYPE html>
<html>
<head>
    <title>Form Example</title>
</head>
<body>
    <h1>Enter Your Details</h1>
    <form action="FormHandler" method="POST">
        <label for="name">Name:</label>
        <input type="text" id="name" name="name" required>
        <br><br>
        <label for="email">Email:</label>
        <input type="email" id="email" name="email" required>
        <br><br>
        <button type="submit">Submit</button>
    </form>
</body>
</html>

import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

// Map the servlet to a URL
@WebServlet("/FormHandler")
public class FormHandler extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        // Set the response content type
        response.setContentType("text/html");
        // Retrieve form parameters
        String name = request.getParameter("name");
        String email = request.getParameter("email");
        // Generate the response
        PrintWriter out = response.getWriter();
        out.println("<!DOCTYPE html>");
        out.println("<html>");
        out.println("<head><title>Form Response</title></head>");
        out.println("<body>");
        out.println("<h1>Form Submitted Successfully</h1>");
        out.println("<p>Name: " + name + "</p>");
        out.println("<p>Email: " + email + "</p>");
        out.println("</body>");
        out.println("</html>");
    }
}
Jdbc
folder->settings icon->commad pallete->in search bar java: create project..->no build tools->a window will be opend selcr the option “select project location”->type project name(click enter new window will be opened)->in src folder you’ll have app.java file->rename the file and give the java code here (in app.java)->id run not suitable exception found error(mysql is not connected)->in search “mysql 8.0 command client”->java projects in vs code palette->select reference libraries->this pc,program files*86,my sql foler,connector (select t he jar file)->run the java code
Talabat app includes multiple on-demand delivery options in their platforms. A lot of young entrepreneurs want to integrate these features into their food and grocery delivery apps. For that, they need customization options in the competitive market for anybody to reform their platform with their developers. At this time Appticz acknowledges and addresses the user's demand in all aspects of customization options they deliver a lot of possibilities for their users. Our Talabat clone scripts come with multifarious levels of customizations that can be done effortlessly. Here, we list out the customization options for the users
◦ Implement your own logo, branding, color, web/app design
◦ customize your platform menus, and options, alter discounts and offers at any time, and Add or modify features such as order history, favorites, and quick reorder options.
◦ Include multiple languages for broader accessibility, accommodating diverse customer bases.
◦ Customize payment options by integrating various payment gateways that best suit your target market (e.g., Stripe, PayPal).
◦ Personalize push notifications for order updates, promotions, and customer engagement based on user preferences.
◦ Customize the admin dashboard to provide tailored insights and controls over orders, user management, and analytics.
◦ Adjust UI elements like buttons, fonts, and icons to create a user-friendly experience that reflects your brand.
◦ Implement unique features such as loyalty programs, referral systems, or in-app chat support for enhanced customer interaction.
◦ Integrate custom analytics tools to monitor performance metrics like sales trends and user behavior tailored to your business needs.
◦ Customize geolocation features to define delivery zones or areas effectively.

These are the list of customization possibilities using the Talabat clone script to expand your business.
# Import required libraries
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from sklearn.preprocessing import StandardScaler, MinMaxScaler
from sklearn.cluster import KMeans

# Given Data
data = {
    'Feature1': [10, 20, 30, 40, 50],
    'Feature2': [100, 200, 300, 400, 500]
}

# Step 1: Create a DataFrame
df = pd.DataFrame(data)

# Step 1.1: Apply Standard Scaler
scaler_standard = StandardScaler()
df_standard = scaler_standard.fit_transform(df)

# Step 1.2: Apply Min-Max Scaler
scaler_minmax = MinMaxScaler()
df_minmax = scaler_minmax.fit_transform(df)

# Step 2: Apply KMeans Clustering (2 clusters for demonstration)
kmeans = KMeans(n_clusters=2, random_state=42)

# Fitting KMeans on both scaled datasets
kmeans_standard = kmeans.fit_predict(df_standard)
kmeans_minmax = kmeans.fit_predict(df_minmax)

# Step 3: Pie Chart Visualization for KMeans (using standard scaled data as an example)
# Count the occurrences of each cluster
labels_standard = pd.Series(kmeans_standard).value_counts()

# Plot the pie chart
plt.figure(figsize=(6, 6))
plt.pie(labels_standard, labels=[f"Cluster {i}" for i in labels_standard.index], autopct='%1.1f%%', startangle=90)
plt.title('Pie Chart of KMeans Clusters (Standard Scaled Data)')
plt.show()
# Import necessary libraries
import pandas as pd
from sklearn.preprocessing import LabelEncoder, OneHotEncoder
from sklearn.compose import ColumnTransformer
import matplotlib.pyplot as plt

# Step 1: Create the DataFrame
data = {
    'name': ['Alice', 'Bob', 'Charlie', 'David', 'Eve', 'Frank', 'Grace', 'Hannah', 'Ian', 'Jane'],
    'score': [85, 92, 88, 74, 95, 67, 78, 81, 89, 90],
    'sport': ['Basketball', 'Soccer', 'Tennis', 'Cricket', 'Baseball', 'Swimming', 'Soccer', 'Basketball', 'Tennis', 'Cricket'],
    'sex': ['F', 'M', 'M', 'M', 'F', 'M', 'F', 'F', 'M', 'F']
}

df = pd.DataFrame(data)
print("Original DataFrame:\n", df)

# Step 2: Add extra columns (gender and age)
df['gender'] = df['sex'].map({'F': 'Female', 'M': 'Male'})  # Map 'F' to 'Female' and 'M' to 'Male'
df['age'] = [20, 22, 19, 21, 23, 18, 22, 20, 24, 21]  # Adding age column
print("\nDataFrame after adding gender and age columns:\n", df)

# Step 3: Create custom index
df.index = ["one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten"]
print("\nDataFrame with custom index:\n", df)

# Step 4: Apply Label Encoding on 'gender' column
label_encoder = LabelEncoder()
df['gender_encoded'] = label_encoder.fit_transform(df['gender'])
print("\nDataFrame after Label Encoding:\n", df)

# Step 5: Apply One Hot Encoding using OneHotEncoder on 'sport' column
one_hot_encoder = OneHotEncoder(sparse_output=False)  # Use sparse=False to get a dense array
sport_encoded = one_hot_encoder.fit_transform(df[['sport']])  # Fit and transform 'sport' column

# Create a DataFrame for the encoded data
sport_encoded_df = pd.DataFrame(sport_encoded, columns=one_hot_encoder.get_feature_names_out(['sport']), index=df.index)

# Combine with the original DataFrame
df = pd.concat([df, sport_encoded_df], axis=1)
print("\nDataFrame after One Hot Encoding using OneHotEncoder:\n", df)

# Step 6: Bar Plot for Categorical Data
# Count the occurrences of each sport
sport_counts = df['sport'].value_counts()

# Plot the bar chart
plt.figure(figsize=(8, 6))
sport_counts.plot(kind='bar', color='skyblue')
plt.title('Frequency of Sports Participation')
plt.xlabel('Sport')
plt.ylabel('Frequency')


plt.show()
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
 
# Creating a DataFrame with Name, Age, and City
data = {
    "Name": ["Alice", "Bob", "Charlie", "David", "Eve"],
    "Age": [25, 30, 35, 40, 28],
    "City": ["New York", "Los Angeles", "Chicago", "Houston", "Phoenix"],
}
df = pd.DataFrame(data)
 
# Display the DataFrame
print("DataFrame:")
print(df)
 
# 1.1 Box Plot for Age
plt.figure(figsize=(8, 6))
sns.boxplot(x=df["Age"], color="skyblue")
plt.title("Box Plot of Age", fontsize=14)
plt.xlabel("Age", fontsize=12)
plt.show()
 
# Example Data for Heatmap
sales = [12000, 15000, 17000, 13000, 16000, 19000]
profit = [3000, 5000, 7000, 4000, 6000, 8000]
products_sold = [200, 250, 300, 220, 280, 310]
 
# Creating a DataFrame for the heatmap
heatmap_data = {
    "Sales": sales,
    "Profit": profit,
    "Products Sold": products_sold,
}
df_heatmap = pd.DataFrame(heatmap_data)
 
# 1.2 Heatmap of Correlations
plt.figure(figsize=(8, 6))
correlation_matrix = df_heatmap.corr()
sns.heatmap(correlation_matrix, annot=True)
plt.title("Heatmap of Correlations", fontsize=14)
plt.show()
# Import necessary libraries
import pandas as pd
import numpy as np
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LinearRegression
from sklearn.metrics import mean_squared_error, r2_score
 
# Step 1: Create a dataset (sample data for house rentals)
data = {
    'Size (sq ft)': [850, 900, 1200, 1500, 1800, 2000, 2300, 2500, 2700, 3000],
    'Bedrooms': [2, 2, 3, 3, 4, 4, 5, 5, 5, 6],
    'Age (years)': [5, 10, 3, 20, 15, 10, 8, 12, 30, 20],
    'Location Score': [8, 7, 9, 6, 8, 8, 9, 9, 7, 6],
    'Rental Price (USD)': [1500, 1700, 2500, 3000, 3500, 3700, 4200, 4500, 4700, 5000]
}
 
df = pd.DataFrame(data)
 
# Step 2: Split the data into features (X) and target (y)
X = df[['Size (sq ft)', 'Bedrooms', 'Age (years)', 'Location Score']]
y = df['Rental Price (USD)']
 
# Step 3: Split the dataset into training and testing sets
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=42)
 
# Step 4: Train the Multiple Linear Regression model
model = LinearRegression()
model.fit(X_train, y_train)
 
# Step 5: Make predictions on the test set
y_pred = model.predict(X_test)
 
# Step 6: Evaluate the model
mse = mean_squared_error(y_test, y_pred)
r2 = r2_score(y_test, y_pred)
 
print("Model Evaluation:")
print(f"Mean Squared Error (MSE): {mse:.2f}")
print(f"R² Score: {r2:.2f}")
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler
from sklearn.neighbors import KNeighborsClassifier
from sklearn.metrics import accuracy_score, confusion_matrix,classification_report

# Step 1: Load Iris dataset
file_path = "/content/iris.csv"  # Replace with the actual file path
iris_data = pd.read_csv(file_path)

# Separate features (X) and target (y)
X = iris_data.drop(["Species"], axis=1)  # Drop unnecessary columns
y = iris_data["Species"]

# Step 2: Split the dataset
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)

# Step 3: Apply StandardScaler
scaler = StandardScaler()
X_train = scaler.fit_transform(X_train)
X_test = scaler.fit_transform(X_test)

# Step 4: Load KNN model
knn = KNeighborsClassifier(n_neighbors=5)  # Default k=5

# Step 5: Train the model and make predictions
knn.fit(X_train, y_train)
y_pred = knn.predict(X_test)

# Step 6: Evaluate the model
accuracy = accuracy_score(y_test, y_pred)
conf_matrix = confusion_matrix(y_test, y_pred)
classification_report=classification_report(y_test,y_pred)

# Display results
print("Accuracy Score:", accuracy)
print("Confusion Matrix:\n", conf_matrix)
print("Confusion Matrix:\n", classification_report)
from sklearn.datasets import load_iris
from sklearn.cluster import KMeans
import matplotlib.pyplot as plt
import seaborn as sns
import pandas as pd
 
# Load the Iris dataset
data = load_iris()
X = data.data  # Features
 
# Initialize the KMeans model with 3 clusters (since there are 3 species in the Iris dataset)
kmeans = KMeans(n_clusters=3, random_state=42)
 
# Fit the model to the data
kmeans.fit(X)
 
# Predict the cluster labels
y_pred = kmeans.predict(X)
 
# Create a DataFrame for visualization
df = pd.DataFrame(X, columns=data.feature_names)
df['Cluster'] = y_pred
 
# Plot the clusters (using only the first two features for simplicity)
plt.figure(figsize=(8, 6))
sns.scatterplot(data=df, x=data.feature_names[0], y=data.feature_names[1], hue='Cluster')#, palette='viridis', s=100)
plt.title('K-Means Clustering on Iris Dataset (2D)')
plt.xlabel(data.feature_names[0])
plt.ylabel(data.feature_names[1])
plt.show()
 
# Print the cluster centers
print("Cluster Centers (Centroids):")
print(kmeans.cluster_centers_)
import pandas as pd
 
# Step 1.1: Convert the dictionary to a DataFrame
data = {
    'Category': ['A', 'B', 'A', 'C', 'B']
}
df = pd.DataFrame(data)
 
# Step 1.2: Apply One-Hot Encoding
df_encoded = pd.get_dummies(df, columns=['Category'])
 
# Step 1.3: Print the DataFrame with One-Hot Encoding
print(df_encoded)
import pandas as pd
import matplotlib.pyplot as plt
 
# Create the DataFrame
data = {
    'Feature1': [10, 20, 30, 40, 50],
    'Feature2': [100, 200, 300, 400, 500]
}
df = pd.DataFrame(data)
 
# Calculate the sum of each feature for pie chart visualization
sizes = [df['Feature1'].sum(), df['Feature2'].sum()]
 
# Labels for the pie chart
labels = ['Feature1', 'Feature2']
 
# Plotting the Pie Chart
plt.pie(sizes, labels=labels)
plt.title("Proportion of Feature1 and Feature2")
plt.show()
# Import necessary libraries
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.tree import DecisionTreeClassifier
from sklearn.metrics import accuracy_score

# Load the dataset
data = pd.read_csv('/content/Soybean (1).csv')  # Replace 'soybean.csv' with your actual file name

# Split the data into features (X) and target (y)
X = data.drop(columns=['Class'])  # 'Class' is the target column
y = data['Class']

# Split the dataset into training and testing sets
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=42)

# Create and train the Decision Tree model
model = DecisionTreeClassifier(random_state=42)
model.fit(X_train, y_train)

# Predict on the test set
y_pred = model.predict(X_test)

# Calculate and print the accuracy
accuracy = accuracy_score(y_test, y_pred)
print(f"Accuracy of the Decision Tree model: {accuracy * 100:.2f}%")
# Import necessary libraries
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LinearRegression
from sklearn.metrics import mean_squared_error, r2_score
 
# Sample Dataset (replace this with your actual dataset)
# Let's assume we have a dataset with features: 'height', 'weight', and 'experience'
data = {
    'height': [150, 160, 170, 180, 190],
    'weight': [50, 60, 70, 80, 90],
    'experience': [2, 3, 4, 5, 6],
    'age': [25, 28, 30, 35, 40]  # This is the target variable
}
 
# Create a DataFrame
df = pd.DataFrame(data)
 
 
 
# Step 2: Data Preprocessing
# Define features (X) and target (y)
X = df[['height', 'weight', 'experience']]  # Independent variables
y = df['age']  # Dependent variable (age)
 
# Step 3: Train-Test Split
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=42)
 
# Step 4: Train the Regression Model (Linear Regression)
model = LinearRegression()
model.fit(X_train, y_train)
 
# Step 5: Make Predictions
y_pred = model.predict(X_test)
 
# Step 6: Model Evaluation
# Calculate Mean Squared Error (MSE)
mse = mean_squared_error(y_test, y_pred)
print(f"Mean Squared Error: {mse}")
 
# Calculate R-squared (R²) value
r2 = r2_score(y_test, y_pred)
print(f"R-squared value: {r2}")
 
# Import necessary libraries
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
from sklearn.model_selection import train_test_split
from sklearn.naive_bayes import GaussianNB
from sklearn.metrics import accuracy_score, classification_report

# Step 1: Load the dataset
df = pd.read_csv('Iris.csv')  # Replace with the correct path if needed

# Step 1.1: Data Exploration
print("Dataset Preview:")
print(df.head())

# Data Overview
print("\nDataset Information:")
print(df.info())

# Step 1.2: Verify Missing Values
print("\nMissing Values:")
print(df.isnull().sum())

# Step 1.3: Verify Duplicates
print("\nDuplicate Rows:")
print(df.duplicated().sum())

# Step 1.4: Detect and Remove Outliers using IQR method
# IQR method to detect outliers
Q1 = df.select_dtypes(include=[np.number]).quantile(0.25)
Q3 = df.select_dtypes(include=[np.number]).quantile(0.75)
IQR = Q3 - Q1

# Outliers are those outside the range (Q1 - 1.5*IQR) and (Q3 + 1.5*IQR)
outliers_iqr = ((df.select_dtypes(include=[np.number]) < (Q1 - 1.5 * IQR)) | 
                (df.select_dtypes(include=[np.number]) > (Q3 + 1.5 * IQR))).any(axis=1)

# Removing outliers
df_no_outliers_iqr = df[~outliers_iqr]
print(f"\nShape after removing outliers: {df_no_outliers_iqr.shape}")

# Step 1.5: Split Dataset and Perform Naive Bayes Classification
# Define features (X) and target (y)
X = df_no_outliers_iqr.drop(['Id', 'Species'], axis=1)  # Drop 'Id' and 'Species'
y = df_no_outliers_iqr['Species']

# Split the data into training and testing sets (70% training, 30% testing)
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=42)

# Initialize Naive Bayes classifier (GaussianNB for continuous data)
nb_classifier = GaussianNB()

# Train the model
nb_classifier.fit(X_train, y_train)

# Make predictions on the test set
y_pred = nb_classifier.predict(X_test)

# Evaluate the model
accuracy = accuracy_score(y_test, y_pred)
print(f"\nAccuracy of the Naive Bayes model: {accuracy * 100:.2f}%")
print("\nClassification Report:")
print(classification_report(y_test, y_pred))

# Optional: Visualize the distribution of data and outliers
plt.figure(figsize=(10, 6))
sns.boxplot(data=df_no_outliers_iqr.drop(['Id', 'Species'], axis=1))
plt.title('Boxplot to Visualize Outliers After Removal')
plt.show()
from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split
 
from sklearn.svm import SVC
from sklearn.metrics import accuracy_score,confusion_matrix
import matplotlib.pyplot as plt
from sklearn.decomposition import PCA
 
# Load the Iris dataset
iris = pd.read_csv('/content/iris.csv')
X = iris.drop(columns=["Species"]) # Features
y = iris["Species"]  # Labels
 
 
 
# Split the dataset into training and testing sets
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
 
# Train the SVC model with a linear kernel
model = SVC(kernel='linear', random_state=42)
model.fit(X_train, y_train)
 
# Make predictions
y_pred = model.predict(X_test)
 
# Evaluate the model
accuracy = accuracy_score(y_test, y_pred)
print(f"Model Accuracy: {accuracy:.2f}")
 
conf_matrix = confusion_matrix(y_test, y_pred)
print('Confusion Matrix:')
print(conf_matrix)
import pandas as pd
import numpy as np
from sklearn.tree import DecisionTreeClassifier
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy_score

# Step 1.1: Convert dictionary to DataFrame
data = {
    'Feature1': [1, 2, np.nan, 4, 5],
    'Feature2': [5, np.nan, np.nan, 8, 9]
}

df = pd.DataFrame(data)


df['Feature1'].fillna(df['Feature1'].mean(), inplace=True)

# Step 1.4: Fill missing values in 'Feature2' with median
df['Feature2'].fillna(df['Feature2'].median(), inplace=True)





df['Target'] = [0, 1, 0, 1, 0]  # Example target values for classification


X = df.drop(columns=['Target'])  # Features (without 'Target')
y = df['Target']  # Target variable

X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)

# Step 3: Load Decision Tree Classifier
clf = DecisionTreeClassifier(random_state=42)

# Step 4: Train the model
clf.fit(X_train, y_train)

# Step 5: Make predictions
y_pred = clf.predict(X_test)

# Step 6: Evaluate the model
accuracy = accuracy_score(y_test, y_pred)
print(f"\nDecision Tree Classifier Accuracy: {accuracy * 100:.2f}%")

import java.util.Scanner;

public class Prims {
    private static int N;  // Number of vertices
    
    // Function to get the vertex with the minimum cost that is not yet in MST
    public static int getMin(int[] costs, boolean[] isInMST) {
        int min = Integer.MAX_VALUE;
        int minVertex = -1;
        
        // Iterate over all vertices to find the one with the minimum cost
        for (int i = 0; i < costs.length; i++) {
            if (!isInMST[i] && costs[i] < min) {  // Only consider vertices not in MST
                min = costs[i];
                minVertex = i;
            }
        }
        return minVertex;
    }
    
    // Function to perform Prim's algorithm to find the MST
    public static void solution(int[][] matrix) {
        int[] parent = new int[N];  // To store the parent of each vertex in MST
        int[] costs = new int[N];   // To store the minimum cost for each vertex
        boolean[] isInMST = new boolean[N];  // To check if a vertex is in MST
        
        // Initialize all costs to infinity, and mark all vertices as not in MST
        for (int i = 0; i < N; i++) {
            costs[i] = Integer.MAX_VALUE;
            isInMST[i] = false;
        }
        
        // The starting vertex (0) has cost 0, and no parent
        costs[0] = 0;
        parent[0] = -1;
        
        // Run Prim's algorithm to find the MST
        for (int i = 0; i < N - 1; i++) {
            int curr = getMin(costs, isInMST);  // Get the vertex with the minimum cost
            isInMST[curr] = true;  // Add it to the MST
            
            // Update the costs of the adjacent vertices
            for (int adj = 0; adj < N; adj++) {
                // If there is an edge, and the vertex is not in MST, and the cost is smaller
                if (matrix[curr][adj] != 0 && !isInMST[adj] && matrix[curr][adj] < costs[adj]) {
                    parent[adj] = curr;  // Set the parent
                    costs[adj] = matrix[curr][adj];  // Update the cost
                }
            }
        }
        
        // Print the results (the MST edges and total cost)
        printResults(parent, matrix);
    }
    
    // Function to print the edges and their weights
    public static void printResults(int[] parent, int[][] matrix) {
        int totalCost = 0;
        System.out.println("Edge\tWeight");
        
        // Print each edge in the MST
        for (int i = 1; i < N; i++) {
            System.out.println(parent[i] + " - " + i + " \t" + matrix[i][parent[i]]);
            totalCost += matrix[i][parent[i]];  // Add the edge weight to the total cost
        }
        System.out.println("Total cost of MST: " + totalCost);
    }
    
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        // Read the number of vertices
        System.out.print("Enter the number of vertices: ");
        N = sc.nextInt();
        
        // Initialize the adjacency matrix
        int[][] matrix = new int[N][N];
        
        System.out.println("Enter the adjacency matrix (0 for no edge):");
        // Read the adjacency matrix from the user
        for (int i = 0; i < N; i++) {
            for (int j = 0; j < N; j++) {
                matrix[i][j] = sc.nextInt();
            }
        }
        
        // Call Prim's algorithm to find the MST
        solution(matrix);
        
        // Close the scanner
        sc.close();
    }
}
#8. Violin Plot
#Violin plots are used to show the distribution of data across different categories.
# Example: Violin plot for Sales in different regions
import seaborn as sns

# Sample data for different regions
data = {
    'Region': ['North', 'East', 'West', 'South', 'North', 'East', 'West', 'South'],
    'Sales': [12000, 15000, 17000, 13000, 16000, 19000, 18000, 15000]
}

df = pd.DataFrame(data)

sns.violinplot(x='Region', y='Sales', data=df)
plt.title("Violin Plot of Sales by Region")
plt.show()
#7. Heatmap
#Heatmaps are used to visualize the correlation between different variables.
import seaborn as sns
import pandas as pd

# Example: Heatmap of correlations
data = {
    'Sales': sales,
    'Profit': profit,
    'Products Sold': products_sold
}
df = pd.DataFrame(data)
correlation_matrix = df.corr()

sns.heatmap(correlation_matrix, annot=True, cmap='coolwarm')
plt.title("Correlation Heatmap")
plt.show()
#6. Scatter Plot
#Scatter plots are used to visualize relationships between two variables.
# Example: Scatter plot of Sales vs. Profit
profit = [4000, 6000, 7000, 3000, 5000, 8000]

plt.scatter(sales, profit, color='green')
plt.title("Sales vs. Profit")
plt.xlabel("Sales ($)")
plt.ylabel("Profit ($)")
plt.show()
#5. Box Plot
#Box plots are used to show the distribution of data based on quartiles.
# Example: Box plot of Sales
sales = [12000, 15000, 17000, 13000, 16000, 19000]

plt.boxplot(sales)
plt.title("Box Plot of Sales")
plt.ylabel("Sales ($)")
plt.show()
#4. Pie Chart
#Pie charts are used to show proportions of a whole.
# Example: Pie chart of Profit distribution by Region
profit_by_region = [7000, 11000, 7000, 8000]
regions = ["North", "East", "West", "South"]

plt.pie(profit_by_region, labels=regions, autopct='%1.1f%%', colors=['gold', 'lightblue', 'lightgreen', 'pink'])
plt.title("Profit Distribution by Region")
plt.show()

#3. Histogram
#Histograms are used to visualize the distribution of a dataset.
# Example: Histogram of Products Sold
products_sold = [120, 130, 140, 110, 135, 150]

plt.hist(products_sold, bins=5, color='orange')
plt.title("Distribution of Products Sold")
plt.xlabel("Number of Products Sold")
plt.ylabel("Frequency")
plt.show()
#2. Bar Plot
#Bar plots are used to compare different categories.
# Example: Bar plot for Sales by Region
regions = ["North", "East", "West", "South"]
sales_by_region = [25000, 31000, 17000, 19000]

plt.bar(regions, sales_by_region, color='red')
plt.title("Sales by Region")
plt.xlabel("Region")
plt.ylabel("Sales ($)")
plt.show()
#data visulization
#1. Line Plot
#Line plots are used to visualize data points over time.

import matplotlib.pyplot as plt

# Example: Line plot for Sales over months
months = ["January", "February", "March", "April",
          "May", "June"]
sales = [12000, 15000, 17000, 13000, 16000, 19000]

plt.plot(months, sales, marker='*')
plt.title("Sales Over Time")
plt.xlabel("Month")
plt.ylabel("Sales ($)")
plt.show()
import java.util.Arrays;

import java.util.Comparator;

import java.util.Scanner;

class Item {

    int id;

    int weight;

    int profit;

    double cost;

    public Item(int id, int weight, int profit) {

        this.id = id;

        this.weight = weight;

        this.profit = profit;

        this.cost = (double) profit / weight;

    }

}

public class FractionalKnapsack {

    public static double fractionalKnapsack(Item[] items, int capacity, float[] solutionVector) {

        Arrays.sort(items, Comparator.comparingDouble(item -> -item.cost));

        double totalProfit = 0.0;

        for (Item item : items) {

            if (capacity == 0) {

                break;

            }

            if (item.weight <= capacity) {

                totalProfit += item.profit;

                capacity -= item.weight;

                solutionVector[item.id - 1] = 1.0f;

            } else {

                float fraction = (float) capacity / item.weight;

                totalProfit += item.profit * fraction;

                solutionVector[item.id - 1] = fraction;

                capacity = 0;

            }

        }

        return totalProfit;

    }

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);

        System.out.print("Enter the number of items: ");

        int n = scanner.nextInt();

        System.out.print("Enter the capacity of the knapsack: ");

        int capacity = scanner.nextInt();

        Item[] items = new Item[n];

        float[] solutionVector = new float[n];

        for (int i = 0; i < n; i++) {

            System.out.print("Enter weight and profit of item " + (i + 1) + ": ");

            int weight = scanner.nextInt();

            int profit = scanner.nextInt();

            items[i] = new Item(i + 1, weight, profit);

            solutionVector[i] = 0.0f;

        }

        double maxProfit = fractionalKnapsack(items, capacity, solutionVector);

        System.out.printf("Maximum profit in Knapsack = %.2f\n", maxProfit);

        System.out.print("Solution vector (ID: fraction included): ");

        for (int i = 0; i < n; i++) {

            System.out.printf(" %d: %.2f ", items[i].id, solutionVector[i]);

        }

        System.out.println();

        

    }

}
from sklearn import datasets

from sklearn.model_selection import train_test_split

from sklearn.svm import SVC

from sklearn.metrics import accuracy_score, confusion_matrix

# Step 1: Load the Iris dataset

iris = datasets.load_iris()

X = iris.data

y = iris.target

# Step 2: Select only two classes ('setosa' and 'versicolor')

X = X[y != 2]   # Remove 'virginica' class

y = y[y != 2]   # Keep only classes 0 and 1

# Step 3: Split the dataset

X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=42)

# Step 4: Train the SVC model

model = SVC(kernel='linear')

model.fit(X_train, y_train)

# Step 5: Make predictions and evaluate

y_pred = model.predict(X_test)

accuracy = accuracy_score(y_test, y_pred)

conf_matrix = confusion_matrix(y_test, y_pred)

print("Accuracy:", accuracy)

print("Confusion Matrix:\n", conf_matrix)
#include <stdio.h>

void SumOfSub(int s, int k, int r, int w[], int n, int x[]) {
    // Base case: if the sum of weights equals the target
    if (s == r) {
        printf("Subset found: { ");
        for (int i = 0; i < k; i++) {
            if (x[i] == 1) {
                printf("%d ", w[i]);
            }
        }
        printf("}\n");
        return;
    }

    // If we exceed the number of weights or if the sum exceeds the target
    if (k >= n || s > r) {
        return;
    }

    // Generate left child: include current weight
    x[k] = 1; // Include w[k]
    SumOfSub(s + w[k], k + 1, r, w, n, x);

    // Generate right child: exclude current weight
    x[k] = 0; // Exclude w[k]
    SumOfSub(s, k + 1, r, w, n, x);
}

int main() {
    int n;
    printf("Enter the number of elements: ");
    scanf("%d", &n);
    
    int w[n];
    printf("Enter the elements (non-decreasing order): ");
    for (int i = 0; i < n; i++) {
        scanf("%d", &w[i]);
    }
    
    int m;
    printf("Enter the target sum: ");
    scanf("%d", &m);

    int x[n]; // Array to store inclusion/exclusion of weights
    SumOfSub(0, 0, m, w, n, x); // Start with sum 0 and index 0

    return 0;
}
INPUT:
Enter the number of elements: 5
Enter the elements (non-decreasing order): 1 2 3 4 5
Enter the target sum: 5
OUTPUT:
Subset found: { 1 4 }
Subset found: { 2 3 }
Subset found: { 5 }

import java.util.Scanner;

public class Main {

    // Method to find all subsets with sum equal to the target sum
    public static void SumOfSub(int s, int k, int r, int[] w, int n, int[] x) {
        // Base case: if the sum of weights equals the target
        if (s == r) {
            System.out.print("Subset found: { ");
            for (int i = 0; i < k; i++) {
                if (x[i] == 1) {
                    System.out.print(w[i] + " ");
                }
            }
            System.out.println("}");
            return;
        }

        // If we exceed the number of weights or if the sum exceeds the target
        if (k >= n || s > r) {
            return;
        }

        // Generate left child: include current weight
        x[k] = 1; // Include w[k]
        SumOfSub(s + w[k], k + 1, r, w, n, x);

        // Generate right child: exclude current weight
        x[k] = 0; // Exclude w[k]
        SumOfSub(s, k + 1, r, w, n, x);
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        // Input for number of elements
        System.out.print("Enter the number of elements: ");
        int n = scanner.nextInt();

        // Input for the elements (weights)
        int[] w = new int[n];
        System.out.print("Enter the elements (non-decreasing order): ");
        for (int i = 0; i < n; i++) {
            w[i] = scanner.nextInt();
        }

        // Input for the target sum
        System.out.print("Enter the target sum: ");
        int m = scanner.nextInt();

        // Array to store inclusion/exclusion of weights
        int[] x = new int[n];

        // Start the recursion
        SumOfSub(0, 0, m, w, n, x);

        // Close the scanner
        scanner.close();
    }
}
index.html:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Add numbers</title>
</head>
<body>
	
	<form action="add" method="get">
		enter num1:<input type="text" name="num1"><br>
		Enter num2:<input type="text" name="num2">
		
		<br>
		<input type="submit" value="Add">
	</form>
</body>
</html>

Add.java:
package com.Add;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@WebServlet( urlPatterns={"/add"})
public class Add extends HttpServlet {
    public void service(HttpServletRequest req, HttpServletResponse res) throws IOException {
    	
    	int i=Integer.parseInt(req.getParameter("num1"));
    	int j=Integer.parseInt(req.getParameter("num2"));
    	
    	int k=i+j;
    	PrintWriter out=res.getWriter();
    	out.println(k);
    			
    }

}

web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd" id="WebApp_ID" version="4.0">
  <display-name>ParamDemo</display-name>
  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>default.html</welcome-file>
    <welcome-file>default.jsp</welcome-file>
    <welcome-file>default.htm</welcome-file>
  </welcome-file-list>
</web-app>

HelloServlet.java:
import java.io.IOException;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.servlet.annotation.WebServlet;

@WebServlet("/hello")
public class HelloServlet extends HttpServlet {
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        response.setContentType("text/html");
        response.getWriter().println("<h1>Hello, World!</h1>");
    }
}

web.xml:
<web-app xmlns="http://java.sun.com/xml/ns/javaee" version="3.0">
    <servlet>
        <servlet-name>HelloServlet</servlet-name>
        <servlet-class>HelloServlet</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>HelloServlet</servlet-name>
        <url-pattern>/hello</url-pattern>
    </servlet-mapping>
</web-app>

Output:
It displays in Web Browser:
Hello, World

Demo.java:
import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


@WebServlet("/Demo")
public class Demo extends HttpServlet {
	private static final long serialVersionUID = 1L;
    
    public Demo() {
        super();
        
    }

	
    @Override
    public void init(ServletConfig config) throws ServletException {
        super.init(config);
        // Initialization code here
        System.out.println("Servlet init() method called.");
    }


    @Override
    public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException {
        // Handle request
        System.out.println("Servlet service() method called.");
        super.service(req, res);
    }
    @Override
    public void destroy() {
        // Cleanup code here
        System.out.println("Servlet destroy() method called.");
    }

}

web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd" id="WebApp_ID" version="4.0">
  <display-name>Demo1</display-name>
  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>default.html</welcome-file>
    <welcome-file>default.jsp</welcome-file>
    <welcome-file>default.htm</welcome-file>
  </welcome-file-list>
</web-app>
jQuery('.testimonialsSlider').slick({
  slidesToShow: 1,
  slidesToScroll: 1,
  arrows: true,
  prevArrow: "<button type='button' class='slick-prev pull-left'><span class='list-icon fas fa-chevron-left'></span></button>",
  nextArrow: "<button type='button' class='slick-next pull-right'><span class='list-icon fas fa-chevron-right'></span></button>",
  dots: false,
  autoplay: false,
  autoplaySpeed: 2000,
  infinite: true,
  adaptiveHeight: false,

  responsive: [
    {
      breakpoint: 1024,
      settings: {
        slidesToShow: 1,
        slidesToScroll: 1,
      }
    },
    {
      breakpoint: 768,
      settings: {
        slidesToShow: 1,
        slidesToScroll: 1
      }
    },
    {
      breakpoint: 480,
      settings: {
        slidesToShow: 1,
        slidesToScroll: 1
      }
    }
  ]
});

For arrows copy paste this link in header.php
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" />


     jQuery('.ser-content').slick({
                slidesToShow: 2,
                slidesToScroll: 1,
                arrows: false,
                // prevArrow:\"<button type='button' class='slick-prev pull-left'><span class='list-icon fas fa-chevron-left'></span></button>\",
                // nextArrow:\"<button type='button' class='slick-next pull-right'><span class='list-icon fas fa-chevron-right'></span></button>\",
                dots: false,
                autoplay: true,
                autoplaySpeed: 2000,
                infinite: true,
                adaptiveHeight: false,
                responsive: [
                    {
                        breakpoint: 1024,
                        settings: {
                            slidesToShow: 3,
                            slidesToScroll: 1,
                        }
                    },
                    {
                        breakpoint: 768,
                        settings: {
                            slidesToShow: 2,
                            slidesToScroll: 1
                        }
                    },
                    {
                        breakpoint: 480,
                        settings: {
                            slidesToShow: 1,
                            slidesToScroll: 1
                        }
                    }
                ]
            });
import pandas as pd
import numpy as np
from sklearn import datasets
from sklearn.model_selection import train_test_split
from sklearn.svm import SVC
from sklearn.metrics import accuracy_score, confusion_matrix, classification_report
import matplotlib.pyplot as plt
import seaborn as sns

# Step 1.1: Load the Iris dataset
iris = datasets.load_iris()
df = pd.DataFrame(data=iris.data, columns=iris.feature_names)
df['target'] = iris.target
df['species'] = df['target'].map({0: 'setosa', 1: 'versicolor', 2: 'virginica'})
print("Original Iris DataFrame:\n", df.head())

# Step 1.2: Select two classes ('setosa' and 'versicolor')
df_binary = df[df['species'].isin(['setosa', 'versicolor'])]
X = df_binary.iloc[:, :-2].values  # Features
y = df_binary['target'].values     # Target labels

# Step 1.3: Split the dataset into training and testing sets
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=42)

# Step 1.4: Load the SVC Model
svc_model = SVC(kernel='linear', random_state=42)
svc_model.fit(X_train, y_train)

# Step 1.5: Perform prediction
y_pred = svc_model.predict(X_test)

# Calculate accuracy
accuracy = accuracy_score(y_test, y_pred)
print("\nAccuracy of SVC Model:", accuracy)

# Confusion Matrix
conf_matrix = confusion_matrix(y_test, y_pred)
print("\nConfusion Matrix:\n", conf_matrix)

# Classification Report
print("\nClassification Report:\n", classification_report(y_test, y_pred, target_names=['setosa', 'versicolor']))

# Plot the Confusion Matrix
plt.figure(figsize=(6, 4))
sns.heatmap(conf_matrix, annot=True, cmap='Blues', fmt='d', xticklabels=['setosa', 'versicolor'], yticklabels=['setosa', 'versicolor'])
plt.title('Confusion Matrix')
plt.xlabel('Predicted Labels')
plt.ylabel('True Labels')
plt.show()
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("Enter the number of elements:");
        int n = sc.nextInt();
        int[] arr = new int[n];
        System.out.println("Enter the elements:");
        for (int i = 0; i < n; i++) {
            arr[i] = sc.nextInt();
        }
        System.out.println("Enter the target sum:");
        int target = sc.nextInt();
        System.out.println("Subsets with sum equal to " + target + " are:");
        findSubsets(arr, n, target);
        sc.close();
    }
    private static void findSubsets(int[] arr, int n, int target) {
        List<Integer> currentSubset = new ArrayList<>();
        subsetSumHelper(arr, n, 0, 0, target, currentSubset);
    }
    private static void subsetSumHelper(int[] arr, int n, int index, int currentSum, int target, List<Integer> currentSubset) {
        if (currentSum == target) {
            System.out.println(currentSubset);
            return;
        }
        if (index >= n || currentSum > target) {
            return;
        }
        currentSubset.add(arr[index]);
        subsetSumHelper(arr, n, index + 1, currentSum + arr[index], target, currentSubset);
        currentSubset.remove(currentSubset.size() - 1);
        subsetSumHelper(arr, n, index + 1, currentSum, target, currentSubset);
    }
}
#include <stdio.h>
#include <limits.h>

#define INF INT_MAX 

int Prim(int cost[][100], int n, int t[][2]) {
    int near[100], mincost = 0;
    int i, j, k, l;

    for (i = 1; i <= n; i++) {
        near[i] = 0;
    }

    mincost = INF;
    for (i = 1; i <= n; i++) {
        for (j = i + 1; j <= n; j++) {
            if (cost[i][j] < mincost) {
                mincost = cost[i][j];
                k = i;
                l = j;
            }
        }
    }

    t[1][0] = k;
    t[1][1] = l;

    for (i = 1; i <= n; i++) {
        if (cost[i][l] < cost[i][k]) {
            near[i] = l;
        } else {
            near[i] = k;
        }
    }
    near[k] = near[l] = 0;

    for (i = 2; i <= n; i++) {
        int min_edge_cost = INF;
        for (j = 1; j <= n; j++) {
            if (near[j] != 0 && cost[j][near[j]] < min_edge_cost) {
                min_edge_cost = cost[j][near[j]];
                k = j;
                l = near[j];
            }
        }

        t[i][0] = k;
        t[i][1] = l;

        mincost += cost[k][l];

        near[k] = 0;

        for (j = 1; j <= n; j++) {
            if (near[j] != 0 && cost[j][near[j]] > cost[j][k]) {
                near[j] = k;
            }
        }
    }

    return mincost;
}

int main() {
    int cost[100][100], t[100][2], n, i, j;

    printf("Enter the number of vertices: ");
    scanf("%d", &n);

    printf("Enter the cost adjacency matrix:\n");
    for (i = 1; i <= n; i++) {
        for (j = 1; j <= n; j++) {
            scanf("%d", &cost[i][j]);
            if (cost[i][j] == 0) {
                cost[i][j] = INF;
            }
        }
    }

    int mincost = Prim(cost, n, t);

    printf("Minimum cost of the spanning tree: %d\n", mincost);

    printf("Edges in the minimum spanning tree:\n");
    for (i = 1; i < n; i++) {
        printf("Edge: (%d, %d)\n", t[i][0], t[i][1]);
    }

    return 0;
}
import java.util.*;
public class Main {
 
    private static void sumOfSubSet(int[] set, int n, int targetSum, int index, List<Integer> currentSubset) {
        if (index == n) {
            int sum = 0;
            for (int num : currentSubset) {
                sum += num;
            }
 
            if (sum == targetSum) {
                System.out.println(currentSubset);
            }
            return;
        }
 
        currentSubset.add(set[index]);
        sumOfSubSet(set, n, targetSum, index + 1, currentSubset);
 
        currentSubset.remove(currentSubset.size() - 1);
        sumOfSubSet(set, n, targetSum, index + 1, currentSubset);
    }
 
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
 
        System.out.print("Enter the number of elements in the set: ");
        int n = scanner.nextInt();
 
        int[] set = new int[n];
        
        System.out.println("Enter the elements of the set: ");
        for (int i = 0; i < n; i++) {
            set[i] = scanner.nextInt();
        }
 
        System.out.print("Enter the target sum: ");
        int targetSum = scanner.nextInt();
 
        System.out.println("Subsets whose sum equals " + targetSum + ":");
        List<Integer> currentSubset = new ArrayList<>();
        sumOfSubSet(set, n, targetSum, 0, currentSubset);
 
        scanner.close();
    }
}
import java.util.*; 
 
public class Articulation { 
    private int n; 
    private int[][] arr; 
    private int[] dfn; 
    private int[] low; 
    private int num; 
    private Set<Integer> s; 
 
    public Articulation(int n) { 
        this.n = n; 
        arr = new int[n][n]; 
        dfn = new int[n]; 
        low = new int[n]; 
        num = 1; 
        s = new HashSet<>(); 
    } 
 
    public void read(Scanner scan) { 
        for (int i = 0; i < n; i++) { 
            for (int j = 0; j < n; j++) 
                arr[i][j] = scan.nextInt(); 
            dfn[i] = 0; 
        } 
    } 
 
    public void art(int u, int v) { 
        dfn[u] = num; 
        low[u] = num; 
        num++; 
        int child = 0; 
        for (int j = 0; j < n; j++) { 
            if (arr[u][j] == 1 && dfn[j] == 0) { 
                if (v == -1) 
                    child++; 
                art(j, u); 
                if (v != -1 && low[j] >= dfn[u]) 
                    s.add(u); 
                low[u] = Math.min(low[u], low[j]); 
            } else if (arr[u][j] == 1 && j != v) 
                low[u] = Math.min(low[u], dfn[j]); 
        } 
        if (v == -1 && child > 1) 
            s.add(u); 
    } 
 
    public void printVisited() { 
        System.out.println("articulation points" + s); 
        for (int i = 0; i < n; i++) 
            System.out.print(dfn[i] - 1 + " "); 
        System.out.println(); 
    } 
 
    public static void main(String[] args) { 
        Scanner scan = new Scanner(System.in); 
        System.out.println("enter no of vertices"); 
        int n = scan.nextInt(); 
        Articulation art = new Articulation(n); 
        System.out.println("adjacent matrix"); 
        art.read(scan); 
        art.art(0, -1); 
        System.out.println("vertices"); 
        art.printVisited(); 
    } 
} 
/@version=5
indicator("LMR with Bullish and Bearish Arrows", overlay=true)

// --- Price and Volume Definitions for Previous Days ---
price1 = close[1]
price2 = close[2]
price3 = close[3]

volume1 = volume[1]
volume2 = volume[2]
volume3 = volume[3]

// --- LMR Calculations ---
MR1 = (price1 - close) / volume1  // Price change relative to previous volume
LMR2 = (price2 - price1) / (volume2 + volume1)  // Price change relative to combined volume of last two days
LMR3 = (price3 - price2) / (volume3 + volume2 + volume1)  // Price change relative to combined volume of last three days

// --- Plot Raw LMR Values ---
plot(MR1, color=color.green, title="MR1 (Raw)")
plot(LMR2, color=color.orange, title="LMR2 (Raw)")
plot(LMR3, color=color.purple, title="LMR3 (Raw)")

// --- Simplified Bullish Signal Condition ---
bullishSignal = (close > price1 and volume > ta.sma(volume, 20))  // Bullish if current price is higher than previous and volume is above average

// --- Simplified Bearish Signal Condition ---
bearishSignal = (close < price1 and volume > ta.sma(volume, 20))  // Bearish if current price is lower than previous and volume is above average

// --- Plot Bullish Signal as Background Color ---
bgcolor(bullishSignal ? color.new(color.green, 90) : na, title="Bullish Signal") // Green: Bullish Signal

// --- Plot Bullish Arrow (Below Bar) ---
plotshape(bullishSignal, title="Bullish Signal Arrow", location=location.belowbar, color=color.green, style=shape.arrowup, size=size.small)

// --- Plot Bearish Arrow (Above Bar) ---
plotshape(bearishSignal, title="Bearish Signal Arrow", location=location.abovebar, color=color.red, style=shape.arrowdown, size=size.small)

// --- Optional: Adding Alerts for Bullish and Bearish Signals ---
alertcondition(bullishSignal, title="Bullish Signal Alert", message="Bullish signal detected!")
alertcondition(bearishSignal, title="Bearish Signal Alert", message="Bearish signal detected!")

// --- Optional: Smoothed LMR Values for Reduced Noise ---
LMR1_smooth = ta.sma(MR1, 10)  // Smooth MR1 over 10 periods
LMR2_smooth = ta.sma(LMR2, 10)  // Smooth LMR2 over 10 periods
LMR3_smooth = ta.sma(LMR3, 10)  // Smooth LMR3 over 10 periods

// --- Plot Smoothed LMR Values ---
plot(LMR1_smooth, color=color.green, title="Smoothed MR1")
plot(LMR2_smooth, color=color.orange, title="Smoothed LMR2")
plot(LMR3_smooth, color=color.purple, title="Smoothed LMR3")
/@version=5
indicator("LMR with Bullish and Bearish Arrows", overlay=true)

// --- Price and Volume Definitions for Previous Days ---
price1 = close[1]
price2 = close[2]
price3 = close[3]

volume1 = volume[1]
volume2 = volume[2]
volume3 = volume[3]

// --- LMR Calculations ---
MR1 = (price1 - close) / volume1  // Price change relative to previous volume
LMR2 = (price2 - price1) / (volume2 + volume1)  // Price change relative to combined volume of last two days
LMR3 = (price3 - price2) / (volume3 + volume2 + volume1)  // Price change relative to combined volume of last three days

// --- Plot Raw LMR Values ---
plot(MR1, color=color.green, title="MR1 (Raw)")
plot(LMR2, color=color.orange, title="LMR2 (Raw)")
plot(LMR3, color=color.purple, title="LMR3 (Raw)")

// --- Simplified Bullish Signal Condition ---
bullishSignal = (close > price1 and volume > ta.sma(volume, 20))  // Bullish if current price is higher than previous and volume is above average

// --- Simplified Bearish Signal Condition ---
bearishSignal = (close < price1 and volume > ta.sma(volume, 20))  // Bearish if current price is lower than previous and volume is above average

// --- Plot Bullish Signal as Background Color ---
bgcolor(bullishSignal ? color.new(color.green, 90) : na, title="Bullish Signal") // Green: Bullish Signal

// --- Plot Bullish Arrow (Below Bar) ---
plotshape(bullishSignal, title="Bullish Signal Arrow", location=location.belowbar, color=color.green, style=shape.arrowup, size=size.small)

// --- Plot Bearish Arrow (Above Bar) ---
plotshape(bearishSignal, title="Bearish Signal Arrow", location=location.abovebar, color=color.red, style=shape.arrowdown, size=size.small)

// --- Optional: Adding Alerts for Bullish and Bearish Signals ---
alertcondition(bullishSignal, title="Bullish Signal Alert", message="Bullish signal detected!")
alertcondition(bearishSignal, title="Bearish Signal Alert", message="Bearish signal detected!")

// --- Optional: Smoothed LMR Values for Reduced Noise ---
LMR1_smooth = ta.sma(MR1, 10)  // Smooth MR1 over 10 periods
LMR2_smooth = ta.sma(LMR2, 10)  // Smooth LMR2 over 10 periods
LMR3_smooth = ta.sma(LMR3, 10)  // Smooth LMR3 over 10 periods

// --- Plot Smoothed LMR Values ---
plot(LMR1_smooth, color=color.green, title="Smoothed MR1")
plot(LMR2_smooth, color=color.orange, title="Smoothed LMR2")
plot(LMR3_smooth, color=color.purple, title="Smoothed LMR3")
{"version":"2.0.126.1","settings":{"blur":0,"brightness":100,"contrast":100,"grayscale":0,"huerotate":0,"invert":0,"saturate":100,"sepia":0,"applyvideofilters":false,"backgroundcolor":"#000000","backgroundopacity":85,"blackbars":false,"blockautoplay":true,"blockhfrformats":false,"blockwebmformats":false,"boostvolume":false,"cinemamode":false,"cinemamodewideplayer":true,"controlbar":{"active":true,"autohide":false,"centered":true,"position":"absolute"},"controls":["loop","reverse-playlist","volume-booster","cards-end-screens","cinema-mode","size","pop-up-player","speed","video-filters","screenshot","keyboard-shortcuts","options"],"controlsvisible":false,"controlspeed":true,"controlspeedmousebutton":false,"controlvolume":false,"controlvolumemousebutton":false,"convertshorts":false,"customcolors":{"--main-color":"#00adee","--main-background":"#111111","--second-background":"#181818","--hover-background":"#232323","--main-text":"#eff0f1","--dimmer-text":"#cccccc","--shadow":"#000000"},"customcssrules":"","customscript":"","customtheme":false,"darktheme":false,"date":1703498547766,"defaultvolume":false,"disableautoplay":false,"executescript":false,"expanddescription":false,"filter":"none","hidecardsendscreens":false,"hidechat":false,"hidecomments":false,"hiderelated":false,"hideshorts":false,"ignoreplaylists":true,"ignorepopupplayer":true,"localecode":"en_US","localedir":"ltr","message":false,"miniplayer":true,"miniplayerposition":"_top-left","miniplayersize":"_400x225","newestcomments":false,"overridespeeds":true,"pauseforegroundtab":false,"pausevideos":true,"popuplayersize":"640x360","qualityembeds":"medium","qualityembedsfullscreen":"hd1080","qualityplaylists":"hd720","qualityplaylistsfullscreen":"hd1080","qualityvideos":"hd720","qualityvideosfullscreen":"hd1080","reload":false,"reversemousewheeldirection":false,"selectquality":false,"selectqualityfullscreenoff":false,"selectqualityfullscreenon":false,"speed":1,"speedvariation":0.1,"stopvideos":false,"theatermode":false,"theme":"default-dark","themevariant":"youtube-deep-dark.css","update":1717756335131,"volume":50,"volumemultiplier":3,"volumevariation":5,"wideplayer":false,"wideplayerviewport":false}}
clc; 
clear all; 
close all;

Fs = 1e6;  % Sampling frequency
fd = 100;  % Doppler frequency

% Custom Rayleigh fading implementation
n = 1000; % Number of samples
pathDelays = [0 1e-5 2e-5];
pathGains_dB = [0 -3 -6];
pathGains = 10.^(pathGains_dB/10); % Convert to linear scale

% Generate Rayleigh fading samples
t = (0:n-1)/Fs; % Time vector
rayleigh_fading = zeros(n, length(pathDelays));
for i = 1:length(pathDelays)
    doppler_phase = 2 * pi * fd * t; % Doppler effect
    rayleigh_fading(:, i) = sqrt(pathGains(i)) * ...
        abs(1/sqrt(2) * (randn(1, n) + 1j * randn(1, n))) .* exp(1j * doppler_phase);
end

% Custom Rician fading implementation
k = 10; % Rician K-factor
rician_fading = sqrt(k/(k+1)) + sqrt(1/(k+1)) * rayleigh_fading;

% Generate random input signal
x = randn(n, 1);

% Pass the signal through the custom Rayleigh and Rician channels
y_rayleigh = sum(rayleigh_fading, 2) .* x;
y_rician = sum(rician_fading, 2) .* x;

% Extract impulse responses
impulse_response_rayleigh = rayleigh_fading;
impulse_response_rician = rician_fading;

% Plot Rayleigh channel impulse response
figure;
subplot(2, 1, 1);
plot(abs(impulse_response_rayleigh));
title('Rayleigh Fading Channel Impulse Response');
xlabel('Sample Number');
ylabel('Amplitude');

% Plot Rician channel impulse response
subplot(2, 1, 2);
plot(abs(impulse_response_rician));
title('Rician Fading Channel Impulse Response');
xlabel('Sample Number');
ylabel('Amplitude');

% Calculate and plot Rician channel power delay profile
Pd_rician = mean(abs(impulse_response_rician).^2, 1); % Average power per path
figure;
stem(10*log10(Pd_rician), 'filled'); % Power in dB
title('Rician Fading Channel Power Delay Profile');
xlabel('Path Index');
ylabel('Power (dB)');

% Compute FFT of the Rayleigh and Rician faded signals
fft_rayleigh = fft(y_rayleigh);
fft_rician = fft(y_rician);

% Plot frequency spectrum
figure;
subplot(2, 1, 1);
plot(abs(fft_rayleigh));
title('Frequency Spectrum of Rayleigh Fading Signal');
xlabel('Frequency Index');
ylabel('Amplitude');

subplot(2, 1, 2);
plot(abs(fft_rician));
title('Frequency Spectrum of Rician Fading Signal');
xlabel('Frequency Index');
ylabel('Amplitude');
Viterbi Decoding Algorithm for Convolutional Codes 
Program1: 
input_seq = [1 0 1]; % Original input sequence 
input_seq = [1 0 1]; % Original input sequence 
g = [1 0 1; 1 1 1]; % Generator polynomials for (2,1) code 
% Create trellis structure 
trellis = poly2trellis(3,[5,7]); 
% Convolutional encoding 
encoded_seq = convenc(input_seq, trellis); 
disp('Encoded Sequence:'); 
disp(encoded_seq); 
% Simulate transmission with noise (introducing errors) 
received_seq = encoded_seq; 
% error_indices = randperm(length(encoded_seq), 2); % Introduce 
2 errors 
% received_seq(error_indices) = ~received_seq(error_indices); % 
Flip bits 
% disp('Received Sequence (with errors):'); 
disp(received_seq); 
% Viterbi decoding 
decoded_seq = vitdec(received_seq, trellis, 2, 'trunc','hard'); 
disp('Decoded Sequence:'); 
disp(decoded_seq); 
Program2 
trellis = poly2trellis([4 3],[4 5 17;7 4 2]); 
x = ones(100,1); 
code = convenc(x,trellis); 
tb = 2; 
decoded = vitdec(code,trellis,tb,'trunc','hard'); 
isequal(decoded,ones(100,1))
clc
clear

% Generation of Sample bits
sequence=round(rand(1,20));    % Generating 20 bits
input_signal=[];                 % input signal declaration                
carrier_signal=[];               % carrier signal declaration  
time=[0:2*pi/119:2*pi];          % Number of samples - Creating a vector of 120 total values including end point [0:0.052:6.28]  


for k = 1 :20
    if sequence(1,k)==0
        sig=-ones(1,120);    % -1 value for binary input 0
    else
        sig=ones(1,120);     % +1 value for binary input 1
    end
    c=cos(time);             % Carrier frequency is calculated.  
    carrier_signal = [carrier_signal c];  %signal that is generated which will transmitted with input signal
    input_signal = [input_signal sig];    %Original signal to be transmitted
end



figure(1)
subplot(4,1,1);               
plot(input_signal);    % Plotting input signal
axis([-100 2400 -1.5 1.5]);   
title('\bf\it Original 20 bit Sequence');

% BPSK Modulation of the signal
bpsk_mod_signal=input_signal.*carrier_signal;   % Modulating the signal
subplot(4,1,2);   
plot(bpsk_mod_signal);  %Plotting BPSK Modulated signal
axis([-100 2400 -1.5 1.5]);
title('\bf\it BPSK Modulated Signal');

% Preparation of 6 new carrier frequencies
%6 frequencies are randomly selected by the PN sequence generator
time1=[0:2*pi/9:2*pi];  %[0:0.698:6.28]
time2=[0:2*pi/19:2*pi]; %[0:0.331:6.28]
time3=[0:2*pi/29:2*pi]; %[0:0.217:6.28]
time4=[0:2*pi/39:2*pi]; %[0:0.161:6.28]
time5=[0:2*pi/59:2*pi]; %[0:0.106:6.28]
time6=[0:2*pi/119:2*pi];%[0:0.052:6.28]
carrier1=cos(time1);
carrier1=[carrier1 carrier1 carrier1 carrier1 carrier1 carrier1 carrier1 carrier1 carrier1 carrier1 carrier1 carrier1];
carrier2=cos(time2);
carrier2=[carrier2 carrier2 carrier2 carrier2 carrier2 carrier2];
carrier3=cos(time3);
carrier3=[carrier3 carrier3 carrier3 carrier3];
carrier4=cos(time4);
carrier4=[carrier4 carrier4 carrier4];
carrier5=cos(time5);
carrier5=[carrier5 carrier5];
carrier6=cos(time6);

% Random frequency hopps to form a spread signal
spread_signal=[];
for n=1:20
    c=randi([1 6],1,1);     %6 frequencies are randomly are selected by the PN generator
    switch(c)
        case(1)
            spread_signal=[spread_signal carrier1];
        case(2)
            spread_signal=[spread_signal carrier2];
        case(3)
            spread_signal=[spread_signal carrier3];
        case(4)
            spread_signal=[spread_signal carrier4];
        case(5)        
            spread_signal=[spread_signal carrier5];
        case(6)
            spread_signal=[spread_signal carrier6];
    end
end
subplot(4,1,3)
plot([1:2400],spread_signal);
axis([-100 2400 -1.5 1.5]);
title('\bf\it Spread Signal with 6 frequencies');

% Spreading BPSK Signal
freq_hopped_sig=bpsk_mod_signal.*spread_signal;    %This is the signal which is being finallay transmitted
subplot(4,1,4)
plot([1:2400],freq_hopped_sig);
axis([-100 2400 -1.5 1.5]);
title('\bf\it Frequency Hopped Spread Spectrum Signal');      

% Demodulation of BPSK Signal
bpsk_demodulated=freq_hopped_sig./spread_signal;        %The received signal is FFH demodualted
figure(2)
subplot(2,1,1)
plot([1:2400],bpsk_demodulated);
axis([-100 2400 -1.5 1.5]);
title('\bf Demodulated BPSK Signal from Wide Spread');

original_BPSK_signal=bpsk_demodulated./carrier_signal;     %FFH demodulated signal is data demodulated by means of BPSK Signal 
subplot(2,1,2)
plot([1:2400],original_BPSK_signal);
axis([-100 2400 -1.5 1.5]);
title('\bf Transmitted Original Bit Sequence');
import java.util.*;

class Solution {
    private static void merge(int[] arr, int low, int mid, int high) {
        ArrayList<Integer> temp = new ArrayList<>();
        int left = low;
        int right = mid + 1;

        while (left <= mid && right <= high) {
            if (arr[left] <= arr[right]) {
                temp.add(arr[left]);
                left++;
            } else {
                temp.add(arr[right]);
                right++;
            }
        }

        while (left <= mid) {
            temp.add(arr[left]);
            left++;
        }

        while (right <= high) {
            temp.add(arr[right]);
            right++;
        }

        for (int i = low; i <= high; i++) {
            arr[i] = temp.get(i - low);
        }
    }

    public static void mergeSort(int[] arr, int low, int high) {
        if (low >= high) return;
        int mid = (low + high) / 2;
        mergeSort(arr, low, mid);
        mergeSort(arr, mid + 1, high);
        merge(arr, low, mid, high);
    }
}

public class tUf {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int n = 7;
        int arr[] = { 9, 4, 7, 6, 3, 1, 5 };
        System.out.println("Before sorting array: ");
        for (int i = 0; i < n; i++) {
            System.out.print(arr[i] + " ");
        }
        System.out.println();
        Solution.mergeSort(arr, 0, n - 1);
        System.out.println("After sorting array: ");
        for (int i = 0; i < n; i++) {
            System.out.print(arr[i] + " ");
        }
        System.out.println();
    }
}

import matplotlib.pyplot as plt

# Example data points: input sizes and their corresponding execution times
input_sizes = [1000, 5000, 10000, 50000, 100000]
execution_times_quick = [1.8, 9.5, 21.3, 110.7, 250.3]  # Replace these with actual results

plt.plot(input_sizes, execution_times_quick, marker='o', linestyle='-', color='r', label='Quick Sort')
plt.title('Quick Sort Time Complexity')
plt.xlabel('Input Size (n)')
plt.ylabel('Execution Time (ms)')
plt.grid(True)
plt.legend()
plt.show()
OFDM     clc; close all; clear all;

% Parameters
numsubcar = 64;          % Number of subcarriers
numofsym = 100;          % Number of OFDM symbols
cplen = 16;              % Cyclic prefix length
snrange = 0:2:20;        % SNR range in dB
ifft_size = numsubcar;   % IFFT size (equal to number of subcarriers)

% Generate random data bits
databits = randi([0, 1], numsubcar * numofsym, 1); % Generate random bits

% Plot the first 10 bits
figure;
subplot(4, 1, 1);
stem(databits(1:10));
xlabel('Bit Index');
ylabel('Bit Value');
title('Input Data Bits');

% BPSK Modulation (map 0 -> -1, 1 -> +1)
mod_data = 2 * databits - 1;

% Reshape modulated data to match subcarriers and symbols
mod_data = reshape(mod_data, numsubcar, numofsym);

% Perform IFFT
ifft_data = ifft(mod_data, ifft_size);

% Plot the IFFT (real part of the first symbol)
subplot(4, 1, 2);
plot(real(ifft_data(:, 1)));
xlabel('Sample Index');
ylabel('Amplitude');
title('IFFT Output (First Symbol)');

% Add Cyclic Prefix
ofdm_symbols = [ifft_data(end-cplen+1:end, :); ifft_data];

% Serialize OFDM symbols to form the transmit signal
tx_signal = ofdm_symbols(:);

% Plot the real part of the transmitted signal
subplot(4, 1, 3);
plot(real(tx_signal(1:200))); % Plot first 200 samples
xlabel('Sample Index');
ylabel('Amplitude');
title('Transmitted OFDM Signal');

% Initialize BER values
bervalues = zeros(size(snrange));

% Loop over SNR values to compute BER
for idx = 1:length(snrange)
    snr = snrange(idx);
    
    % Calculate signal power
    signal_power = mean(abs(tx_signal).^2);
    
    % Calculate noise power
    noise_power = signal_power / (10^(snr / 10));
    
    % Generate AWGN
    noise = sqrt(noise_power) * randn(size(tx_signal));
    
    % Add noise to the signal
    rx_signal = tx_signal + noise;
    
    % Reshape received signal to matrix form and remove cyclic prefix
    rx_ofdm_symbols = reshape(rx_signal, numsubcar + cplen, []);
    rx_ofdm_symbols = rx_ofdm_symbols(cplen+1:end, :);
    
    % Perform FFT on received symbols
    fft_data = fft(rx_ofdm_symbols, ifft_size);
    
    % BPSK Demodulation (decision rule: > 0 -> 1, <= 0 -> 0)
    demod_data = real(fft_data(:)) > 0;
    
    % Compute BER
    numerrors = sum(databits ~= demod_data);
    ber = numerrors / length(databits);
    bervalues(idx) = ber;
end

% Plot BER vs SNR
subplot(4, 1, 4);
semilogy(snrange, bervalues, '-o');
xlabel('SNR (dB)');
ylabel('BER');
title('BER vs. SNR for OFDM System');
grid on;
lambda=0.3;
ht100=100;
ht30=30;
ht2=2;
hr=2;
axis=[];
p100=[];
p30=[];
p2=[];
pfs1=[];
for i=1000:5000
    d=10^(i/1000);
    axis=[axis d];
    fspower=(lambda/(4*3.1415*d))^2;
    power100=fspower*4*(sin(2*3.1415*hr*ht100/(lambda*d)))^2;
    power30=fspower*4*(sin(2*3.1415*hr*ht30/(lambda*d)))^2;
    power2=fspower*4*(sin(2*3.1415*hr*ht2/(lambda*d)))^2;
    p100=[p100,10*log10(power100)];
    p30=[p30,10*log10(power30)];
    p2=[p2,10*log10(power2)];
    pfs1=[pfs1,10*log10(fspower)];
end
text('FontSize',18);
semilogx(axis,p100,'g-',axis,p30,'b-',axis,p2,'r',axis,pfs1,'y-');
xlabel('distance in m');
ylabel('pathloss');
text(1000,-66,'blue: hr=30m');
text(1000,-74,'red: hr=2m');
text(1000,-58,'green: hr=100m');
text(1000,-50,'yellow:freespace');
text(50,-180,'lambda=0.30m');
text(50,-190,'hr=2m');
//@version=5
indicator("LMR with Flat Candles and Rising/Falling Band Logic", overlay=true)

// --- Input for Donchian Channel Period ---
donchianPeriod = input.int(20, title="Donchian Channel Period", minval=1)
flatCandleCount = input.int(3, title="Number of Flat Candles", minval=1)  // Number of candles to check for flatness

// --- Donchian Channel Calculations ---
donchianHigh = ta.highest(high, donchianPeriod)
donchianLow = ta.lowest(low, donchianPeriod)
donchianMid = (donchianHigh + donchianLow) / 2

// --- Plot Donchian Channel ---
plot(donchianHigh, color=color.new(color.blue, 0), title="Donchian High")
plot(donchianLow, color=color.new(color.red, 0), title="Donchian Low")
plot(donchianMid, color=color.new(color.gray, 0), title="Donchian Midline", linewidth=1)

// --- Flat Candle Detection (Checking multiple candles for flatness) ---
isFlatCandle(candleIndex) =>
    math.abs(close[candleIndex] - close[candleIndex-1]) < (high[candleIndex] - low[candleIndex]) * 0.2  // Price change is small compared to range

flatCandles = true
for i = 1 to flatCandleCount
    flatCandles := flatCandles and isFlatCandle(i)  // All previous candles must be flat

// --- Current Band Movement Detection ---
isUpperBandRising = donchianHigh > donchianHigh[1]  // Upper band is rising in the current candle
isUpperBandFlat = donchianHigh == donchianHigh[1]  // Upper band is flat in the current candle
isLowerBandFalling = donchianLow < donchianLow[1]  // Lower band is falling in the current candle

// --- Debugging: Plot the band changes to visualize them ---
plotshape(isUpperBandRising, title="Upper Band Rising", location=location.abovebar, color=color.green, style=shape.triangledown, size=size.small)
plotshape(isUpperBandFlat, title="Upper Band Flat", location=location.abovebar, color=color.blue, style=shape.triangledown, size=size.small)
plotshape(isLowerBandFalling, title="Lower Band Falling", location=location.belowbar, color=color.red, style=shape.triangleup, size=size.small)

// --- Long Condition (Flat candles + Rising Upper Band) ---
longCondition = flatCandles and isUpperBandRising  // Flat candles and upper band rising in current candle

// --- Short Condition (Flat candles + Falling Lower Band + Upper Band Flat) ---
shortCondition = flatCandles and isUpperBandFlat and isLowerBandFalling  // Flat candles and upper band flat + lower band falling

// --- Plot Background Colors for Signals ---
bgcolor(longCondition ? color.new(color.green, 90) : na, title="Long Condition Signal")
bgcolor(shortCondition ? color.new(color.red, 90) : na, title="Short Condition Signal")

// --- Plot Arrows for Signals ---
plotshape(longCondition, title="Long Signal Arrow", location=location.belowbar, color=color.green, style=shape.arrowup, size=size.small)
plotshape(shortCondition, title="Short Signal Arrow", location=location.abovebar, color=color.red, style=shape.arrowdown, size=size.small)

// --- Alerts ---
alertcondition(longCondition, title="Long Signal Alert", message="Flat candles detected, and upper band is rising.")
alertcondition(shortCondition, title="Short Signal Alert", message="Flat candles detected, and upper band is flat and lower band is falling.")

import java.util.Scanner;

public class QuickSort {
    
    public static void quickSort(int[] a, int lb, int ub) {
        if (lb < ub) {
            int pivotIndex = partition(a, lb, ub);
            quickSort(a, lb, pivotIndex - 1);
            quickSort(a, pivotIndex + 1, ub);
        }
    }

    public static int partition(int[] a, int lb, int ub) {
        int pivot = a[lb];
        int start = lb;
        int end = ub;
        while (start < end) {
            while (start <= ub && a[start] <= pivot) {
                start++;
            }
            while (a[end] > pivot) {
                end--;
            }
            if (start < end) {
                int temp = a[start];
                a[start] = a[end];
                a[end] = temp;
            }
        }
        int temp = a[end];
        a[end] = a[lb];
        a[lb] = temp;
        return end;
    }

    public static void display(int[] a) {
        System.out.println("Sorted array:");
        for (int i : a) {
            System.out.print(i + "\t");
        }
        System.out.println();
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("Enter array size:");
        int n = sc.nextInt();
        int[] a = new int[n];
        
        System.out.println("Enter elements into array:");
        for (int i = 0; i < n; i++) {
            a[i] = sc.nextInt();
        }
        
        quickSort(a, 0, n - 1);
        display(a);
        
        sc.close();
    }
}

import matplotlib.pyplot as plt
import numpy as np

n = np.linspace(1, 1000, 100)
best_case = n * np.log2(n) 
average_case = n * np.log2(n)  
worst_case = n ** 2  

plt.figure(figsize=(10, 6))
plt.plot(n, best_case, label='Best Case (O(n log n))', color='green')
plt.plot(n, average_case, label='Average Case (O(n log n))', color='blue')
plt.plot(n, worst_case, label='Worst Case (O(n^2))', color='red')

plt.title('Quick Sort Time Complexity')
plt.xlabel('Input Size (n)')
plt.ylabel('Number of Operations')
plt.legend()
plt.grid(True)
plt.show()

star

Tue Nov 19 2024 11:04:14 GMT+0000 (Coordinated Universal Time)

@mkhassan

star

Tue Nov 19 2024 06:22:21 GMT+0000 (Coordinated Universal Time) https://www.coinsclone.com/create-nft-marketplace-like-opensea/

@LilianAnderson #nftmarketplacedevelopment #buildnftplatform #openseaclonescript #blockchainbusinessideas #createnftmarketplace

star

Tue Nov 19 2024 06:09:21 GMT+0000 (Coordinated Universal Time)

@cseb26

star

Tue Nov 19 2024 05:15:40 GMT+0000 (Coordinated Universal Time) https://appticz.com/talabat-clone

@aditi_sharma_

star

Tue Nov 19 2024 04:48:08 GMT+0000 (Coordinated Universal Time)

@login123

star

Tue Nov 19 2024 04:47:25 GMT+0000 (Coordinated Universal Time)

@login123

star

Tue Nov 19 2024 04:47:03 GMT+0000 (Coordinated Universal Time)

@login123

star

Tue Nov 19 2024 04:46:34 GMT+0000 (Coordinated Universal Time)

@login123

star

Tue Nov 19 2024 04:45:56 GMT+0000 (Coordinated Universal Time)

@login123

star

Tue Nov 19 2024 04:45:19 GMT+0000 (Coordinated Universal Time)

@login123

star

Tue Nov 19 2024 04:44:40 GMT+0000 (Coordinated Universal Time)

@login123

star

Tue Nov 19 2024 04:44:01 GMT+0000 (Coordinated Universal Time)

@login123

star

Tue Nov 19 2024 04:43:02 GMT+0000 (Coordinated Universal Time)

@login123

star

Tue Nov 19 2024 04:42:19 GMT+0000 (Coordinated Universal Time)

@login123

star

Tue Nov 19 2024 04:41:24 GMT+0000 (Coordinated Universal Time)

@login123

star

Tue Nov 19 2024 04:40:19 GMT+0000 (Coordinated Universal Time)

@login123

star

Tue Nov 19 2024 04:39:45 GMT+0000 (Coordinated Universal Time)

@login123

star

Tue Nov 19 2024 02:58:49 GMT+0000 (Coordinated Universal Time)

@signup_returns

star

Tue Nov 19 2024 02:51:44 GMT+0000 (Coordinated Universal Time)

@login123

star

Tue Nov 19 2024 02:51:13 GMT+0000 (Coordinated Universal Time)

@login123

star

Tue Nov 19 2024 02:50:42 GMT+0000 (Coordinated Universal Time)

@login123

star

Tue Nov 19 2024 02:50:13 GMT+0000 (Coordinated Universal Time)

@login123

star

Tue Nov 19 2024 02:49:48 GMT+0000 (Coordinated Universal Time)

@login123

star

Tue Nov 19 2024 02:49:17 GMT+0000 (Coordinated Universal Time)

@login123

star

Tue Nov 19 2024 02:48:48 GMT+0000 (Coordinated Universal Time)

@login123

star

Tue Nov 19 2024 02:48:15 GMT+0000 (Coordinated Universal Time)

@login123

star

Tue Nov 19 2024 02:44:19 GMT+0000 (Coordinated Universal Time)

@wtlab

star

Tue Nov 19 2024 02:37:16 GMT+0000 (Coordinated Universal Time)

@wtlab

star

Tue Nov 19 2024 01:53:35 GMT+0000 (Coordinated Universal Time)

@wtlab

star

Tue Nov 19 2024 01:09:33 GMT+0000 (Coordinated Universal Time)

@varuntej #java

star

Tue Nov 19 2024 01:08:19 GMT+0000 (Coordinated Universal Time)

@varuntej #java

star

Tue Nov 19 2024 00:57:58 GMT+0000 (Coordinated Universal Time)

@shahmeeriqbal

star

Tue Nov 19 2024 00:57:39 GMT+0000 (Coordinated Universal Time)

@shahmeeriqbal

star

Tue Nov 19 2024 00:27:43 GMT+0000 (Coordinated Universal Time)

@signup_returns

star

Mon Nov 18 2024 21:20:35 GMT+0000 (Coordinated Universal Time)

@signin

star

Mon Nov 18 2024 20:46:29 GMT+0000 (Coordinated Universal Time)

@hi123

star

Mon Nov 18 2024 20:35:31 GMT+0000 (Coordinated Universal Time)

@hi123

star

Mon Nov 18 2024 20:17:40 GMT+0000 (Coordinated Universal Time)

@hi123

star

Mon Nov 18 2024 19:09:41 GMT+0000 (Coordinated Universal Time)

@pk20

star

Mon Nov 18 2024 19:08:49 GMT+0000 (Coordinated Universal Time)

@pk20

star

Mon Nov 18 2024 19:00:54 GMT+0000 (Coordinated Universal Time)

@zily

star

Mon Nov 18 2024 18:49:50 GMT+0000 (Coordinated Universal Time)

@lord

star

Mon Nov 18 2024 18:37:36 GMT+0000 (Coordinated Universal Time)

@lord

star

Mon Nov 18 2024 18:07:42 GMT+0000 (Coordinated Universal Time)

@lord

star

Mon Nov 18 2024 17:54:53 GMT+0000 (Coordinated Universal Time)

@badram123

star

Mon Nov 18 2024 17:47:54 GMT+0000 (Coordinated Universal Time)

@lord

star

Mon Nov 18 2024 17:46:48 GMT+0000 (Coordinated Universal Time)

@lord

star

Mon Nov 18 2024 17:38:48 GMT+0000 (Coordinated Universal Time)

@pk20

star

Mon Nov 18 2024 17:34:22 GMT+0000 (Coordinated Universal Time)

@badram123

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension