Snippets Collections
<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>replit</title>
  <link href="style.css" rel="stylesheet" type="text/css" />
</head>

<body>
  <div class="dropdown">
    <button class="dropbtn">Menu</button>
    <div class="dropdown-content">
      <a href="https://index-1.hebbaraarush105.repl.co/">HomePage</a>
      <a href="https://contactushtml.hebbaraarush105.repl.co/">AboutUs</a>
      <a href="https://arcade-games.hebbaraarush105.repl.co/">Arcade Games</a>
      
    </div> 
  </div>
  
  <h1 style="text-align:center; font-size: 40px;">Popular Arcade Games That We Provide</h1><b>
    
  <style>
    table {
      border-collapse: collapse;
      width: 100%;  
      display: block;
      text-align: right;

    }

    th, td {
      padding: 8px;
      text-align: right;
      border-bottom: 1px solid #ddd;  
    }
    
  </style>

  <table>

      <tr>
        <th>Dollars</th>
        <th>Credits</th>
      </tr>

      <tr>
        <td>$5.99</td>
        <td>20</td>
      </tr>

      <tr>
        <td>$11.99</td>
        <td>50</td>
      </tr>

      <tr>
        <td>$23.99</td>  
        <td>100</td>
      </tr> 
      <td>$30.00</td>
      <td> Infinite(Delay) </td>
  </table>
  <ul style="list-style: none; display: flex; flex-wrap: wrap; justify-content: center;">

    <li style="flex-basis: 30%; border: 1px solid #ccc; padding: 10px; text-align: center; margin: 10px;">

      <div>Pac-Man</div>

      <span style="font-size: 24px; font-weight: bold;">5 Credits</span>

      <div>Played: <span id="pacManPlays">4269</span> times</div>

      <div><img src="shopping.webp" /></div>

    </li>

    <li style="flex-basis: 30%; border: 1px solid #ccc; padding: 10px; text-align: center; margin: 10px;">

      <div>Space Invaders</div>

      <span style="font-size: 24px; font-weight: bold;">4 Credits</span>

      <div>Played: <span id="spaceInvadersPlays">5023</span> times</div>

      <div><img src="spaceinvader.webp" /></div>

    </li>

    <li style="flex-basis: 30%; border: 1px solid #ccc; padding: 10px; text-align: center; margin: 10px;">

      <div>Street Fighter II</div>

      <span style="font-size: 24px; font-weight: bold;">2 Credits</span>

      <div>Played: <span id="streetFighterPlays">1598</span> times</div>

      <div><img src="streetfighter.jpg" /></div>

    </li>

    <li style="flex-basis: 30%; border: 1px solid #ccc; padding: 10px; text-align: center; margin: 10px;">

      <div>Donkey Kong</div>

      <span style="font-size: 24px; font-weight: bold;">6 Credits</span>

      <div>Played: <span id="donkeyKongPlays">8485</span> times</div>

      <div><img src="donkeykong.jpg" /></div>

    </li>

    <li style="flex-basis: 30%; border: 1px solid #ccc; padding: 10px; text-align: center; margin: 10px;">

      <div>Crossy Road</div>

      <span style="font-size: 24px; font-weight: bold;">7 Credits</span>

      <div>Played: <span id="crossyRoadPlays">4376</span> times</div>

      <div><img src="download (1).jpg" /></div>

    </li>

    <li style="flex-basis: 30%; border: 1px solid #ccc; padding: 10px; text-align: center; margin: 10px;">

      <div>Pong</div>

      <span style="font-size: 24px; font-weight: bold;">7 Credits</span>

      <div>Played: <span id="pongPlays">1734</span> times</div>

      <div><img src="pong.jpg" /></div>

    </li>
    
    
</body>

</html>
html {
  height: 100%;
  width: 100%;
}

.dropbtn {
  background-color: #3498DB;
  color: white;
  padding: 16px;
  font-size: 16px;
  border: 10px;
  cursor: pointer;
}

.dropdown {
  position: relative;  
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #f9f9f9;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1;
}

.dropdown-content a {
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  text-align:center;
}

.dropdown:hover .dropdown-content {
  display: block;
}
.dropdown-content a:hover {
  background-color: #555;
  color: white;
}
<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>replit</title>
  <link href="style.css" rel="stylesheet" type="text/css" />
</head>

<body>
  <div class="dropdown">
    <button class="dropbtn">Menu</button>
    <div class="dropdown-content">
      <a href="https://index-1.hebbaraarush105.repl.co/">HomePage</a>
      <a href="https://contactushtml.hebbaraarush105.repl.co/">AboutUs</a>
      <a href="https://arcade-games.hebbaraarush105.repl.co/">Arcade Games</a>
    </div> 
  </div>
  <!DOCTYPE html>
  <html>

  <head>
    <meta charset="UTF-8">
    <title>Game On! Arcade</title>

    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
    <link rel="stylesheet" href="style.css">

  </head>

  <body>
  <header id="home">
      <h1>Welcome to Game On!</h1>
      <p>Your number one spot for fun arcade games.</p>
    </header>

    <section id="about">
      <h2>About Us</h2>
      <p>Game On! was founded by Aarush and Siddharth. Our mission is to provide an awesome arcade gaming experience for players of all ages.</p>
    </section>

    <section id="games">
      <h2>Our Games</h2>
      <div class="game-list">
       </div>
    </section>

    <footer id="contact">
      <p>3330 Quimby Rd, San Jose | <a href="mailto:aarush.hebbar@gmail.com" target="_blank">aarush.hebbar@gmail.com</a> | 555-GAME-ON</p> 
      <p>&copy; Game On Arcade</p>
    </footer>

  </body>
  </html>
</body> 

</html>
body {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  margin: 0;
  background-color: silver;

}

.gameon {
  text-align: center;
  padding: 50px;
  width: 500%;
  height: 90%;
  position: relative;

}

i {
  font-weight: bold;
  font-style: italic;
}

li {
  list-style-position: inside;
}

.dropbtn {
  background-color: #3498DB;
  color: white;
  padding: 16px;
  font-size: 16px;
  border: 1px;
  cursor: pointer;
}

.dropdown {
  position: fixed;
  top: 20px; 
  left: 20px;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #f9f9f9;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1;
}

.dropdown-content a {
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  text-align:center;
}

.dropdown:hover .dropdown-content {
  display: block;
}


.footer {
  background-color: silver;
  text-align: center;
  padding: 10px;
  font-size: 12px;
  color: black;
  border-top: 1px solid black;
}
a {
  text-align: right;
}
.footer-dropdown {
  position: relative;
  display: inline-block;
}

.footer-dropdown-content {
  display: none;
  position: absolute;
  top: 0;
  background-color: #fff;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1;
}

.footer-dropdown:hover .footer-dropdown-content {
  display: block;
}
marquee {
  animation: blink 1s infinite; 
}

@keyframes blink {
  50% {
    color: red;
  }
}
.dropdown-content a:hover {
  background-color: #555;
  color: white;
}
<!DOCTYPE html>

<html>

<head>
<!-- Link to external CSS stylesheet -->
<link rel="stylesheet" href="style.css">
<title> Game Zone</title>
</head>

<body>

<div class="gameon">
<!-- Website logo image -->  
<img src="websitelogo.png" width="700" height="400" style="margin: 0 auto; display: flex;">

<div style="position: absolute; top: 10%; left: 50%; transform: translate(-50%, -50%);">
<!-- Website name text -->
<span style="font-size: 30px; font-weight: bold; color: black;">GAMEZONE</span>

</div>

<!-- Website Mission statement -->
<i style="font-size: 25px; margin-top: 10px; ">"Our mission is to reignite the joy and nostalgia in the arcade experience"</i>

<marquee scrollamount="8"
direction="left"
behavior="scroll">
<!-- Announcement marquee -->  
<h1>Attention Customers, Lightning Deal On Sale Now 50% Off Everything!!!
</marquee>

<div style="position: relative; left: 50px; top: 100px;">
</div>

<div style="position: relative; top: -20px; font-size: 20px;text-align: left;"
<!-- How to create account instructions -->
<h1>How To Create a Account</h1>

<ol>
<li>Click on Sign In (In Menu)</li>
<li>Enter A Email </li> 
<li>Enter Your Password and then you're in!</li>
</ol>

</div>

<div style="position: relative; top: -1px;font-size: 9px;text-align: left;" 
<!-- Website disclaimer -->
<h1>Disclaimer</h1>  

<li>All purchases are Non-Refundable</li>
<li>Points can not be transferred across accounts</li>  
<li>Prices may be changed at any time without further notice</li>
<li>We have the right to refuse service to anyone</li>
</ul>

</div>

  <nav class="dropdown">

    <!-- Website menu -->
    
    <button class="dropbtn">Menu</button>

    <div class="dropdown-content">

      <a href="https://index-1.hebbaraarush105.repl.co/">HomePage</a>

      <a href="https://contactushtml.hebbaraarush105.repl.co/">About Us</a>

      <a href="https://arcade-games.hebbaraarush105.repl.co/">Arcade Games</a>

      <a href="https://createaccount.hebbaraarush105.repl.co/">Sign In</a>

      <a href="https://f78636c2-61d0-4bb2-ad3d-e31e1595f7a0-00-10um3h265swk6.worf.replit.dev/"><h1>Schedule a Visit</h1></a>
      </div>
    

  </nav>



<div class="footer">
<!-- Website footer with copyright and links -->
&copy; 2023 Aarush and Siddharth. All rights reserved.  
</div>

<div class="footer-dropdown">

<a href="#">Credits</a>   

<div class="footer-dropdown-content">  

<!-- Links to external game info pages -->
<a href="https://www.canva.com/design/DAF0F9nX2D8/IRk\_pak6JC0BX3mrlifWDA/edit?utm\_content=DAF0F9nX2D8&utm\_campaign=designshare&utm\_medium=link2&utm\_source=sharebutton" target="\_blank">CanvasDesign</a>

<a href="https://en.wikipedia.org/wiki/Donkey\_Kong\_%28character%29" target="\_blank">DonkeyKong</a>  

<a href="https://poki.com/en/g/crossy-road" target="\_blank">CrossyRoad</a>

<a href="https://www.amazon.com/Arcade-Arcade1Up-PAC-MAN-Head-Head-Table/dp/B09B1DNQDQ?source=ps-sl-shoppingads-lpcontext&ref\_=fplfs&psc=1&smid=A1DXN92KCKEQV4" target="\_blank">PacMan</a>

<a href="https://en.wikipedia.org/wiki/Street\_Fighter\_II" target="\_blank">Street Fighter</a>  

<a href="https://www.thepinballcompany.com/product/space-invaders-frenzy-arcade-game/" target="\_blank">SpaceInvaders</a>  

<a href="https://www.walmart.com/ip/Arcade1Up-PONG-Head-to-head-H2H-Gaming-Table/974088112/" target="\_blank">Pong</a>

</div>



</body>

</html>
#!/bin/bash
# Short script to split videos by filesize using ffmpeg by LukeLR
# source:https://stackoverflow.com/a/52158160
# usage: . ./split-video.sh huge-video.mov 90000000 "-c:v libx264 -crf 23 -c:a copy -vf scale=640:-2"

if [ $# -ne 3 ]; then
    echo 'Illegal number of parameters. Needs 3 parameters:'
    echo 'Usage:'
    echo './split-video.sh FILE SIZELIMIT "FFMPEG_ARGS'
    echo
    echo 'Parameters:'
    echo '    - FILE:        Name of the video file to split'
    echo '    - SIZELIMIT:   Maximum file size of each part (in bytes)'
    echo '    - FFMPEG_ARGS: Additional arguments to pass to each ffmpeg-call'
    echo '                   (video format and quality options etc.)'
    exit 1
fi

FILE="$1"
SIZELIMIT="$2"
FFMPEG_ARGS="$3"

# Duration of the source video
DURATION=$(ffprobe -i "$FILE" -show_entries format=duration -v quiet -of default=noprint_wrappers=1:nokey=1 | cut -d. -f1)

# Duration that has been encoded so far
CUR_DURATION=0

# Filename of the source video (without extension)
BASENAME="${FILE%.*}"

# Extension for the video parts
#EXTENSION="${FILE##*.}"
EXTENSION="mp4"

# Number of the current video part
i=1

# Filename of the next video part
NEXTFILENAME="$BASENAME-$i.$EXTENSION"

echo "Duration of source video: $DURATION"

# Until the duration of all partial videos has reached the duration of the source video
while [[ $CUR_DURATION -lt $DURATION ]]; do
    # Encode next part
    echo ffmpeg -i "$FILE" -ss "$CUR_DURATION" -fs "$SIZELIMIT" $FFMPEG_ARGS "$NEXTFILENAME"
    ffmpeg -ss "$CUR_DURATION" -i "$FILE" -fs "$SIZELIMIT" $FFMPEG_ARGS "$NEXTFILENAME"

    # Duration of the new part
    NEW_DURATION=$(ffprobe -i "$NEXTFILENAME" -show_entries format=duration -v quiet -of default=noprint_wrappers=1:nokey=1 | cut -d. -f1)

    # Total duration encoded so far
    CUR_DURATION=$((CUR_DURATION + NEW_DURATION))

    i=$((i + 1))

    echo "Duration of $NEXTFILENAME: $NEW_DURATION"
    echo "Part No. $i starts at $CUR_DURATION"

    NEXTFILENAME="$BASENAME-$i.$EXTENSION"
done
class A
{  
    void C()
    {
        int a=20; int b=30; int c;
        c=a+b;
        System.out.println(c);
    }
    void C(int x,int y)
    {
        int c;
        c=x+y;
        System.out.println(c);
    }
    void C(int x,double y)
    {
        double c;
        c=x+y;
        System.out.println(c);
    }
    public static void main(String[] args)
    {
        A r= new A();
        r.C();
        r.C(10,20);
        r.C(11,22.33);
    }

}
class A
{
    void SHOW()
    {
        System.out.println(this);
    }
    public static void main(String[] args)
    {
        A r = new A();
        System.out.println(r);
        r.SHOW();
    }

}
import serial
import matplotlib.pyplot as plt

# Establish serial connection
ser = serial.Serial('COM5', 921600)  # Replace 'COM3' with your port
plt.ion()  # Turn on interactive mode for live plotting

voltage_data = []
current_data = []
power_data = []

fig, axs = plt.subplots(3, 1)

# Initialize empty plots
lines = [ax.plot([], [], label=label)[0] for ax, label in zip(axs, ['Voltage (V)', 'Current (A)', 'Power (W)'])]

for ax in axs:
    ax.legend()

plt.show(block=False)  # Ensure non-blocking plot

while True:
    # Read data from serial port
    arduino_data = ser.readline().decode().strip()
    if arduino_data:
        data_values = arduino_data.split(',')
        if len(data_values) >= 3:  # Check for at least 3 values
            try:
                voltage = float(data_values[0])
                current = float(data_values[1])
                power = float(data_values[2])

                voltage_data.append(voltage)
                current_data.append(current)
                power_data.append(power)

                lines[0].set_data(range(len(voltage_data)), voltage_data)
                lines[1].set_data(range(len(current_data)), current_data)
                lines[2].set_data(range(len(power_data)), power_data)

                for ax in axs:
                    ax.relim()
                    ax.autoscale_view()

                plt.draw()
                plt.pause(0.01)  # Update plot every 0.01 seconds

            except ValueError as e:
                print(f"Error: {e}. Invalid data format received: {arduino_data}")
        else:
            print(f"Incomplete data received: {arduino_data}")

    else:
        print("No data received from Arduino")

# Close serial connection
ser.close()
#include "LiquidCrystal.h"

LiquidCrystal lcd(8, 9, 4, 5, 6, 7);

float input_voltage = 0.0;
float temp=0.0;


void setup()
{
   Serial.begin(9600);     //  opens serial port, sets data rate to 9600 bps
   lcd.begin(16, 2);       //// set up the LCD's number of columns and rows: 
   lcd.print("DIGITAL VOLTMETER");
}
void loop()
{

//Conversion formula for voltage
   
   int analog_value = analogRead(A0);
   input_voltage = (analog_value * 5.0) / 1024.0; 

   
   if (input_voltage < 0.1) 
   {
     input_voltage=0.0;
   } 
    Serial.print("v= ");
    Serial.println(input_voltage);
    lcd.setCursor(0, 1);
    lcd.print("Voltage= ");
    lcd.print(input_voltage);
    delay(300);
} 
int baselineTemp = 0;
int celsius = 0;

void setup()
{
pinMode(A0, INPUT);
Serial.begin(9600);

pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
digitalWrite(2, LOW);
digitalWrite(3, LOW);
}
void loop()
{
baselineTemp = 20;
celsius = map(((analogRead(A0) - 20) * 3.04), 0, 1023, -40, 125);
Serial.print(celsius);
Serial.println(" C, ");
if (celsius < baselineTemp) {
digitalWrite(2, LOW);
digitalWrite(3, LOW);
}
if (celsius >= baselineTemp && celsius < baselineTemp + 2) {
digitalWrite(2, HIGH);
digitalWrite(3, LOW);
}
if (celsius >= baselineTemp + 2 && celsius < baselineTemp + 4) {
digitalWrite(2, LOW);
digitalWrite(3, HIGH);
}
if (celsius >= baselineTemp + 4) {
digitalWrite(2, HIGH);
digitalWrite(3, HIGH);
}
delay(1000);
}
#define echo 2
#define trig 3

#define LED8 11
#define LED7 10
#define LED6 9
#define LED5 8
#define LED4 7
#define LED3 6
#define LED2 5
#define LED1 4

float   duration;
float  distance;

void setup() {

  pinMode(trig, OUTPUT);
  pinMode(echo, INPUT);

  for (int i = 4; i <= 11; i++)
    pinMode(i, OUTPUT);


  Serial.begin(9600);

}

void loop() {

  time_Measurement();
  distance = duration * (0.0343) / 2;
  Serial.println(distance);

  led_Check();
  delay(10);

  for (int i = LED1; i <= LED8; i++) {
    digitalWrite(i, LOW);
  }
}


void time_Measurement()
{
  digitalWrite(trig, LOW);
  delayMicroseconds(2);

  digitalWrite(trig, HIGH);
  delayMicroseconds(10);
  digitalWrite(trig, LOW);

  duration = pulseIn(echo, HIGH);
}

void led_Check() {
  
  if (11 < distance && distance <= 15)
    digitalWrite(LED8, HIGH);
  else if (10 < distance && distance <= 11)
    digitalWrite(LED7, HIGH);
  else if (9 < distance && distance <= 10)
    digitalWrite(LED6, HIGH);
  else if (8 < distance && distance <= 9)
    digitalWrite(LED5, HIGH);
  else if (7 < distance && distance <= 8)
    digitalWrite(LED4, HIGH);
  else if (6 < distance && distance <= 7)
    digitalWrite(LED3, HIGH);
  else if (5 < distance && distance <= 6)
    digitalWrite(LED2, HIGH);
  else if (1 < distance && distance <= 5)
    digitalWrite(LED1, HIGH);

  else {
    for (int i = LED1; i <= LED8; i++)
      digitalWrite(i, LOW);
  }

}
int count = 0;
int TrigPin = A0; 
int EchoPin = A1;
  
long duration;
// PULSE WIDTH

void setup() {
    // set Serial communication
    Serial.begin(115200);
    // set pin mode
    pinMode(TrigPin, OUTPUT);
    pinMode(EchoPin, INPUT);
    // init pin
    digitalWrite(TrigPin, LOW);
    delay(1);
}

void loop() {
    Serial.println(count++);
    Serial.println(getDistance());
    Serial.println("");
    Serial.println("");
    delay(1000);
}

long getDistance() {
    // trig
    digitalWrite(TrigPin, LOW);
    delayMicroseconds(2);
    digitalWrite(TrigPin, HIGH);
    delayMicroseconds(10);
    digitalWrite(TrigPin, LOW);
    // echo
    duration = pulseIn(EchoPin, HIGH);     // unit: us
    return duration * 0.34029 / 2;         // unit: mm
}
const int potPin = A0;
const int rightLED = 5;
const int leftLED = 4;
const int enable = 9;
const int in1 = 8;
const int in2 = 7;
String direction = "";

void setup()
{
  pinMode(rightLED, OUTPUT);
  pinMode(leftLED, OUTPUT);
  pinMode(potPin, INPUT);
  attachInterrupt(0, setDirectionClockWise, RISING);
  attachInterrupt(1, setDirectionCounterClockWise, RISING);
  //Turn off motor
  digitalWrite(in1, LOW);
  digitalWrite(in2, LOW);  
}

void loop()
{
  int motorSpeed = analogRead(potPin);
  Serial.println(motorSpeed);
  motorSpeed = map(motorSpeed, 0, 1023, 0, 255);
  Serial.println(motorSpeed);
  
  directionControl();
  delay(100);
  speedControl(motorSpeed);
  delay(100);
}

void setDirectionClockWise(){
  direction = "CW";
}

void setDirectionCounterClockWise(){
  direction = "CCW";
}

void directionControl(){
  if(direction == "CW"){
    digitalWrite(in1, HIGH);
    digitalWrite(in2, LOW);
    digitalWrite(rightLED, HIGH);
    digitalWrite(leftLED, LOW);  
  }
  
  else if(direction == "CCW"){
    digitalWrite(in1, LOW);
    digitalWrite(in2, HIGH);
    digitalWrite(rightLED, LOW);
    digitalWrite(leftLED, HIGH);
  }
}

void speedControl(int motorSpeed){
  analogWrite(enable, motorSpeed);
}
#include <LiquidCrystal.h>
#include <Servo.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2); // Set up the LCD pins
Servo myservo; // Create a Servo object

const int led = 13; // LED connection to digital pin 13
const int led1 = 6; // LED connection to digital pin 6

byte leds = 0;

void setup() {
  lcd.begin(16, 2); // Initialize the LCD screen
  pinMode(led, OUTPUT);
  pinMode(led1, OUTPUT);
  myservo.attach(10); // Attach the servo motor to digital pin 10
}

void loop() {
  // Turn on the LED and rotate the servo and display message "on"
  digitalWrite(led, HIGH);
  digitalWrite(led1, LOW);
  lcd.setCursor(0, 0);
  lcd.print("    NOVVA ON");
  myservo.write(0); // Rotate the servo to 90 degrees

  delay(3000); // Delay for 3 seconds

  // Turn off the LED and stop the servo and display message "off"
  digitalWrite(led, LOW);
  digitalWrite(led1, HIGH);
  lcd.clear(); // Clear the LCD Display
  lcd.setCursor(0, 0);
  lcd.print("   NOVVA OFF!");
  myservo.write(90); // Stop the servo motor

  delay(3000); // Delay for 3 seconds
}
#include <Servo.h>
Servo Serv1; //create a servo object named Serv1

//use a PWM pin (3,5,6,9,10,11)
int pinServo1=8;

void setup(){
Serv1.attach(pinServo1);
}

void loop(){
//move the servo 20 degrees
Serv1.write(20);
//allow enough time to move
delay(1000);
//move the servo 100 degrees
Serv1.write(100);
//allow enough time to move
delay(1000);
}
#include <LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2); // Set up the LCD pins

const int led = 13; // Green LED connection to digital pin 13
const int led1 = 6; // Red LED connection to digital pin 6

byte leds = 0;

void setup() {
lcd.begin(16, 2); // Initialize the LCD screen
pinMode(led, OUTPUT);
pinMode(led1, OUTPUT);
}
void loop() {
// Turn on the Green LED and display message "NOVVA ON!"
digitalWrite(led, HIGH);
digitalWrite(led1, LOW);
lcd.setCursor(0, 0);
lcd.print(" NOVVA ON");
delay(2000); // Delay for 2 seconds

// Turn on the Red LED and display message "NOVVA OFF!"
digitalWrite(led, LOW);
digitalWrite(led1, HIGH);
lcd.clear(); // Clear the LCD Display
lcd.setCursor(0, 0);
lcd.print(" NOVVA OFF!");

delay(2000); // Delay for 2 seconds
}
const int LED1=12;
const int LED2=13;
int val=0;
void setup()
{
pinMode(LED1, OUTPUT);
pinMode(LED2, OUTPUT);
pinMode(7, INPUT);
}
void loop(){
val=digitalRead(7);
if(val==HIGH)
{
digitalWrite(LED1,HIGH);
digitalWrite(LED2,LOW);
}
else
{
digitalWrite(LED2,HIGH);
digitalWrite(LED1,LOW);
}
delay(100);
}
 ng new app-with-modules --routing --standalone false
const articles = document.getElementsByTagName('article');

const paragraphs = document.getElementsByTagName('p');

​

const firstArticle = articles[0];

const secondParagraph = paragraphs[1];
void handleWdbMessage(AdafruitIO_Data *data) {
  // ... (Function definition not included in snippet)
}

void loop() {
  // ... (Loop function definition not included in snippet)
}
class A
{
    
        int a=20;
        
}
class B extends A
{
    int a=10;
    void S()
    {
        System.out.println(super.a);
        System.out.println(a);
    }
}
class C
{
    public static void main(String[] args)
{
    B r= new B();
    r.S();
}
}
void connectWiFi() {
  // ... (Function definition not included in snippet)
}

void MQTT_connect() {
  // ... (Function definition not included in snippet)
}

void setup() {
  // ... (Setup function definition not included in snippet)
}
class A
{
    void S()
    {
        System.out.println("srk");
    }
}
class B
{
    void S()
    {
        super.show();
        System.out.println("srk");
    }
}
class C
{
    public staic void main (String[] args)

{
    B r= new B();
    r.S();
}

}
DHT dht(DHTPIN, DHTTYPE);

WiFiClient client;
Adafruit_MQTT_Client mqtt(&client, AIO_SERVER, AIO_SERVERPORT, AIO_USERNAME, AIO_KEY);

Adafruit_MQTT_Publish temperature = Adafruit_MQTT_Publish(&mqtt, AIO_USERNAME "/feeds/temperature");
Adafruit_MQTT_Publish humidity = Adafruit_MQTT_Publish(&mqtt, AIO_USERNAME "/feeds/humidity");

AdafruitIO_WiFi io(AIO_USERNAME, AIO_KEY, WLAN_SSID, WLAN_PASS);

AdafruitIO_Feed *wdbFeed = io.feed("wdb");
#include <WiFi.h>
#include "Adafruit_MQTT.h"
#include "Adafruit_MQTT_Client.h"
#include "AdafruitIO_WiFi.h"
#include "DHT.h"

#define WLAN_SSID       "X"
#define WLAN_PASS       "asdfghjk"

#define AIO_SERVER      "io.adafruit.com"
#define AIO_SERVERPORT  1883
#define AIO_USERNAME    "chathurazju"
#define AIO_KEY         "aio_fTGR25ihhqnx65rtc2aTOdaL8ODV"

#define DHTPIN 4        // Pin where the DHT11 is connected
#define DHTTYPE DHT11   // Type of DHT sensor (DHT11 or DHT22)

#define RED_LED_PIN    5 // Pin number for the red LED
#define GREEN_LED_PIN  13 // Pin number for the green LED
const articles = document.getElementsByTagName('article');

const paragraphs = document.getElementsByTagName('p');

​

const firstArticle = articles[0];

const secondParagraph = paragraphs[1];
const articles = document.getElementsByTagName('article');

const paragraphs;
const articles = document.getElementsByTagName('article');

const paragraphs;
#include <WiFi.h>
#include "AdafruitIO_WiFi.h"

#define WIFI_SSID     "Your_WiFi_SSID"
#define WIFI_PASS     "Your_WiFi_Password"
#define IO_USERNAME   "Your_AdafruitIO_Username"
#define IO_KEY        "Your_AdafruitIO_Key"

AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);

AdafruitIO_Feed *wdbFeed = io.feed("wdb");

void setup() {
  Serial.begin(115200);
  
  while (!Serial) {
    delay(100); // Wait for Serial to be available
  }

  Serial.println("Booting...");

  Serial.print("Connecting to Wi-Fi");
  io.connect();

  while (io.status() < AIO_CONNECTED) {
    Serial.print(".");
    delay(500);
  }

  Serial.println();
  Serial.println("Connected to Adafruit IO!");

  // Your data to send to Adafruit IO (replace this with your actual data)
  int sensorValue = 123; // Replace with your sensor data or variable value

  // Publish the data to the "wdb" feed on Adafruit IO
  wdbFeed->save(sensorValue);

  Serial.print("Data sent to Adafruit IO: ");
  Serial.println(sensorValue);
}

void loop() {
  io.run();
  // Other tasks can be performed here
}
wdbFeed->save(sensorValue);
void setup() {
  // Initialization code
}
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
AdafruitIO_Feed *wdbFeed = io.feed("wdb");
class A
{
    
    void ADD()
    {
        
        System.out.println("enter your name ");
    }
}
class B extends A
{
void SUB()
    {
        
        System.out.println("Enter your enrollemnet number");
    }
}
class C extends A
 
{
    void MULTI()
    {
        
        System.out.println("enter your college name ");
    }
}
    
class D
{
    public static void main(String[] args)
    {
       B r = new B();
       C r2= new C();
       
       r.ADD(); r.SUB();
       r2.ADD(); r2.MULTI();
    }
}
#define WIFI_SSID     "Your_WiFi_SSID"
#define WIFI_PASS     "Your_WiFi_Password"
#define IO_USERNAME   "Your_AdafruitIO_Username"
#define IO_KEY        "Your_AdafruitIO_Key"
#include <WiFi.h>
#include "AdafruitIO_WiFi.h"
#include <WiFi.h>
#include "Adafruit_MQTT.h"
#include "Adafruit_MQTT_Client.h"

#define WLAN_SSID       "Your_WiFi_SSID"
#define WLAN_PASS       "Your_WiFi_Password"

#define AIO_SERVER      "io.adafruit.com"
#define AIO_SERVERPORT  1883
#define AIO_USERNAME    "Your_AdafruitIO_Username"
#define AIO_KEY         "Your_AdafruitIO_Key"

WiFiClient client;
Adafruit_MQTT_Client mqtt(&client, AIO_SERVER, AIO_SERVERPORT, AIO_USERNAME, AIO_KEY);

Adafruit_MQTT_Publish data = Adafruit_MQTT_Publish(&mqtt, AIO_USERNAME "/feeds/your_feed_name"); // Change "your_feed_name" to your Adafruit IO feed name

void connectWiFi() {
  WiFi.begin(WLAN_SSID, WLAN_PASS);
  while (WiFi.status() != WL_CONNECTED) {
    delay(1000);
    Serial.println("Connecting to WiFi...");
  }
  Serial.println("Connected to WiFi");
}

void MQTT_connect() {
  int8_t ret;

  if (mqtt.connected()) {
    return;
  }

  Serial.print("Connecting to Adafruit IO... ");
  while ((ret = mqtt.connect()) != 0) {
    Serial.println(mqtt.connectErrorString(ret));
    Serial.println("Retrying MQTT connection in 5 seconds...");
    mqtt.disconnect();
    delay(5000);
  }
  Serial.println("MQTT Connected!");
}

void setup() {
  Serial.begin(115200);
  delay(100);

  connectWiFi();
}

void loop() {
  MQTT_connect();

  // Your logic to obtain sensor data or any variable
  float yourData = 25.5; // Replace this with your actual data source

  Serial.print("Sending data: ");
  Serial.println(yourData);

  if (!data.publish(yourData)) {
    Serial.println("Failed to publish data!");
  }

  delay(5000); // Adjust delay as needed
}
if (!data.publish(yourData)) {
  Serial.println("Failed to publish data!");
}
void loop() {
  // Main code that runs repeatedly
}
void setup() {
  // Initialization code
}
void MQTT_connect() {
  // Code to establish a connection with Adafruit IO (MQTT Broker)
}
void connectWiFi() {
  // Code to connect to WiFi network
}
WiFiClient client;
Adafruit_MQTT_Client mqtt(&client, AIO_SERVER, AIO_SERVERPORT, AIO_USERNAME, AIO_KEY);
#define WLAN_SSID       "Your_WiFi_SSID"
#define WLAN_PASS       "Your_WiFi_Password"

#define AIO_SERVER      "io.adafruit.com"
#define AIO_SERVERPORT  1883
#define AIO_USERNAME    "Your_AdafruitIO_Username"
#define AIO_KEY         "Your_AdafruitIO_Key"
#include <WiFi.h>
#include "Adafruit_MQTT.h"
#include "Adafruit_MQTT_Client.h"
class A
{
    int a; int b; int c;
    void ADD()
    {
        a=1;
        b=2;
        c=a+b;
        System.out.println("addition of number "+c );
    }
    void SUB()
    {
        a=1;
        b=2;
        c=a-b;
        System.out.println("subtraction of number "+c );
    }
}
class B extends A
{
    void MULTI()
    {
        a=1;
        b=2;
        c=a*b;
        System.out.println("multiplication of number "+c );
    }
}
class C extends B
{
        void REMAINDER()
    {
        a=1;
        b=2;
        c=a%b;
        System.out.println("remainder of number "+c );
    }
}
class D{
    public static void main(String[] args)
    {
        C r = new C();
        r.ADD();
        r.SUB();
        r.MULTI();
        r.REMAINDER();
    }
}
def is_prime(n):
    
    # Assume the number is prime and try to find counterexamples
    flag = True

    # Deal with special cases
    if n == 0 or n == 1:
        flag = False
    
    # Loop through all numbers between 2 and n - 1, and check if n is NOT prime
    i = 2
    while i < n:
        if n % i == 0:
            flag = False
        i = i + 1
    
    # Output the current value of flag
    return flag
# If the program reached this point, that means the number is prime
return True  
star

Tue Jan 09 2024 03:36:04 GMT+0000 (Coordinated Universal Time) https://replit.com/@hebbaraarush105/Arcade-Games#index.html

@wtrmln

star

Tue Jan 09 2024 03:31:22 GMT+0000 (Coordinated Universal Time) https://replit.com/@hebbaraarush105/contactushtml#style.css

@wtrmln

star

Tue Jan 09 2024 03:30:37 GMT+0000 (Coordinated Universal Time) https://replit.com/@hebbaraarush105/contactushtml#index.html

@wtrmln

star

Tue Jan 09 2024 03:26:46 GMT+0000 (Coordinated Universal Time) https://replit.com/@hebbaraarush105/index-1#style.css

@wtrmln

star

Tue Jan 09 2024 03:24:23 GMT+0000 (Coordinated Universal Time) https://replit.com/@hebbaraarush105/index-1

@wtrmln

star

Tue Jan 09 2024 03:09:21 GMT+0000 (Coordinated Universal Time) https://marketplace.visualstudio.com/items?itemName

@rapldezddl

star

Tue Jan 09 2024 02:42:51 GMT+0000 (Coordinated Universal Time)

@vs #bash

star

Tue Jan 09 2024 01:03:21 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151 #java

star

Tue Jan 09 2024 00:33:58 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151 #java

star

Tue Jan 09 2024 00:01:09 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 23:48:45 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 23:45:48 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 23:39:33 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 23:34:44 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 23:19:10 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 23:16:11 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 23:12:49 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 23:10:01 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 23:06:29 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 21:07:38 GMT+0000 (Coordinated Universal Time)

@Guaguazo

star

Mon Jan 08 2024 19:36:16 GMT+0000 (Coordinated Universal Time) https://codepen.io/nicolaspatschkowski/pen/MWwXBQv

@AsterixCode #undefined

star

Mon Jan 08 2024 19:33:39 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 19:32:41 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151 #java

star

Mon Jan 08 2024 19:32:36 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 19:32:21 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151 #java

star

Mon Jan 08 2024 19:31:25 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 19:29:56 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 19:28:33 GMT+0000 (Coordinated Universal Time) https://codepen.io/nicolaspatschkowski/pen/MWwXBQv

@AsterixCode #undefined

star

Mon Jan 08 2024 19:14:36 GMT+0000 (Coordinated Universal Time) https://codepen.io/nicolaspatschkowski/pen/xxGzpGe?editors

@AsterixCode #undefined

star

Mon Jan 08 2024 19:09:56 GMT+0000 (Coordinated Universal Time) https://codepen.io/nicolaspatschkowski/pen/xxGzpGe

@AsterixCode #undefined

star

Mon Jan 08 2024 18:59:51 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 18:58:40 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 18:57:58 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 18:57:00 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 18:56:08 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 18:55:52 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151 #java

star

Mon Jan 08 2024 18:54:56 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 18:54:11 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 18:49:16 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 18:48:01 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 18:46:45 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 18:44:36 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 18:43:45 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 18:42:55 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 18:41:52 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 18:41:08 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 18:39:49 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 18:10:50 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151 #java

star

Mon Jan 08 2024 17:48:23 GMT+0000 (Coordinated Universal Time) https://learn.365datascience.com/projects/prime-numbers-in-python/?tab

@gkapucu_ #html

star

Mon Jan 08 2024 17:48:17 GMT+0000 (Coordinated Universal Time) https://learn.365datascience.com/projects/prime-numbers-in-python/?tab

@gkapucu_ #python

Save snippets that work with our extensions

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