Snippets Collections
<a href="https://takemyclasshelp.com/">Pay Someone to Take My Online Class</a> – they make it seamless. Need help with accounting and math exams? Flawless execution – "<a href="https://takemyclasshelp.com/take-my-online-exam-for-me/take-my-online-accounting-exam-for-me/">Take My Accounting Exam For Me</a>" and "<a href="https://takemyclasshelp.com/take-my-online-math-class-for-me/">Take My Maths Exam For Me</a>." Highly recommend stress-free online learning support.
background-image: linear-gradient(90deg, #020024 0%, #090979 35%, #00d4ff 100%);
{
    ip: "174.116.192.7",
    is_eu: false,
    city: "Moncton",
    region: "New Brunswick",
    region_code: "NB",
    region_type: "province",
    country_name: "Canada",
    country_code: "CA",
    continent_name: "North America",
    continent_code: "NA",
    latitude: 46.096500396728516,
    longitude: -64.80069732666016,
    postal: "E1C",
    calling_code: "1",
    flag: "https://ipdata.co/flags/ca.png",
    emoji_flag: "🇨🇦",
    emoji_unicode: "U+1F1E8 U+1F1E6",
    asn: {
        asn: "AS812",
        name: "Rogers Communications Canada Inc",
        domain: "rogers.com",
        route: "174.116.128.0/17",
        type: "business"
    },
    company: {
        name: "Rogers Communications Canada Inc",
        domain: "rogers.com",
        network: "174.116.128.0/17",
        type: "business"
    },
    languages: [
        {
            name: "English",
            native: "English",
            code: "en"
        },
        {
            name: "French",
            native: "Français",
            code: "fr"
        }
    ],
    currency: {
        name: "Canadian Dollar",
        code: "CAD",
        symbol: "CA$",
        native: "$",
        plural: "Canadian dollars"
    },
    time_zone: {
        name: "America/Moncton",
        abbr: "AST",
        offset: "-0400",
        is_dst: false,
        current_time: "2023-11-30T11:33:07-04:00"
    },
    threat: {
        is_tor: false,
        is_vpn: false,
        is_icloud_relay: false,
        is_proxy: false,
        is_datacenter: false,
        is_anonymous: false,
        is_known_attacker: false,
        is_known_abuser: false,
        is_threat: false,
        is_bogon: false,
        blocklists: [],
        scores: {
            vpn_score: 0,
            proxy_score: 0,
            threat_score: 67,
            trust_score: 78
        }
    }
}
(function(window) {
  function define_library() {
    // Create the library object and all its properties and methods.
    var vanillaZoom = {};
    vanillaZoom.init = function(galleryId) {
      // Our library's logic goes here.
    }
    return vanillaZoom;
  }

  // Add the vanillaZoom object to global scope if its not already defined.
  if(typeof(vanillaZoom) === 'undefined') {
    window.vanillaZoom = define_library();
  }
  else{
    console.log("Library already defined.");
  }
})(window);
<?php

	class GPSSimulation {
		private $conn;
		private $hst = null;
		private $db = null;
		private $usr = null;
		private $pwd = null;
		private $gpsdata = [];
			
		//////////////////////// PRIVATE
		
		private function fillDataTable() {
			$this->initializeDatabase();
			
			$add = $this->conn->prepare("INSERT INTO gpsmsg(dom, wagon, x, y) 
										       VALUES(?, ?, ?, ?)");
			
			
			// voorkom dubbele entries in de database.
			// als satelliet, datum, x en y al voorkomen in de tabel
			// kun je vaststellen dat de huifkar tijdelijk stilstaat
			// voor pauze, lunch of restaurantbezoek
			// en is een nieuwe entry niet nodig.
			$doesRecordExist = $this->conn->prepare(
				"SELECT COUNT(*) FROM gpsmsg 
			     WHERE dom = ? AND wagon = ? AND x = ? AND y = ?"
			);
			
			foreach($this->gpsdata as $ins) {
				
				list($dom, $wagon, $x, $y) = $ins;

				$doesRecordExist->execute([$dom, $wagon, $x, $y]);

				if($doesRecordExist->fetchColumn() == 0) {
					$add->execute([$dom, $wagon, $x, $y]);
				} 
			}
    	}
		
		private function initializeDatabase() {
			$this->conn->query("TRUNCATE TABLE gpsmsg");
			
		    $this->gpsdata[] = ["2023-10-19", "Old Faithful",      100, 100];
		    $this->gpsdata[] = ["2023-10-19", "Old Faithful",      150, 150];
		    $this->gpsdata[] = ["2023-10-19", "Old Faithful",      230, 310];
		    $this->gpsdata[] = ["2023-10-19", "Old Faithful",       80, 245];		    
			
			// test dubbelen, worden niet opgenomen in de database
		    $this->gpsdata[] = ["2023-10-19", "Old Faithful",      100, 100];
		    $this->gpsdata[] = ["2023-10-19", "Old Faithful",      150, 150];
		    $this->gpsdata[] = ["2023-10-19", "Old Faithful",      230, 310];
		    $this->gpsdata[] = ["2023-10-19", "Old Faithful",       80, 245];		    
					
		    $this->gpsdata[] = ["2023-10-15", "Jade Princess",       10,  54];
		    $this->gpsdata[] = ["2023-10-15", "Jade Princess",       75, 194];
		    $this->gpsdata[] = ["2023-10-15", "Jade Princess",      175, 161];
		    $this->gpsdata[] = ["2023-10-15", "Jade Princess",      134, 280];
		    $this->gpsdata[] = ["2023-10-15", "Jade Princess",      300, 160];
		    $this->gpsdata[] = ["2023-10-15", "Jade Princess",      400, 290];
		    $this->gpsdata[] = ["2023-10-15", "Jade Princess",      544, 222];
		    $this->gpsdata[] = ["2023-10-15", "Jade Princess",      444, 122];
		    $this->gpsdata[] = ["2023-10-15", "Jade Princess",      321,  60];
		    $this->gpsdata[] = ["2023-10-15", "Jade Princess",      200,  88];
		    $this->gpsdata[] = ["2023-10-15", "Jade Princess",       25,  25];

		    $this->gpsdata[] = ["2023-10-10", "Skyblue Wonder",       50,  50];
		    $this->gpsdata[] = ["2023-10-10", "Skyblue Wonder",      300, 188];
		    $this->gpsdata[] = ["2023-10-10", "Skyblue Wonder",      225,  90];			    
			
			// test dubbelen, worden niet opgenomen in de database
			$this->gpsdata[] = ["2023-10-10", "Skyblue Wonder",       50,  50];
		    $this->gpsdata[] = ["2023-10-10", "Skyblue Wonder",      300, 188];
		    $this->gpsdata[] = ["2023-10-10", "Skyblue Wonder",      225,  90];		    
			
			$this->gpsdata[] = ["2023-10-05", "Red Lobster",          50,  50];
		    $this->gpsdata[] = ["2023-10-05", "Red Lobster",         190, 288];
		    $this->gpsdata[] = ["2023-10-05", "Red Lobster",         260, 122];
		    $this->gpsdata[] = ["2023-10-05", "Red Lobster",         340,  90];
		    $this->gpsdata[] = ["2023-10-05", "Red Lobster",         240,  45];
		}
		
		//////////////////////// PUBLIC

		public function __construct($phst, $pdb, $pusr, $ppwd, $refresh = false) {
			$this->hst = $phst;	// bewaar de verbindingsgegevens
			$this->db  = $pdb;
			$this->hst = $pusr;
			$this->pwd = $ppwd;
			
			$this->conn = new PDO("mysql:host=$phst;dbname=$pdb", $pusr, $ppwd);
			
			if($refresh) $this->fillDataTable();
		}
	
		public function getDataRaw($wagname = null) {
        
			$sql = "SELECT * FROM gpsmsg ";
		
			if($satnm != null) {
				$sql .= "WHERE wagon = :wag";
		
				$stmt = $this->conn->prepare($sql);
        		$stmt->execute([":wag" => $wagname]);
			} else {
				$stmt = $this->conn->query($sql);
			}

			$s = "<table border='1' cellspacing='5' cellpadding='5'>";
        	$s .= "\r<tr><td>Date</td><td>Wagon</td><td>X</td><td>Y</td><tr>";
        	while ($row = $stmt->fetch(PDO::FETCH_OBJ)) {
            	$s .= "\r<tr>"
					."<td>{$row->dom}</td>"
			  	 	."<td>{$row->wagon}</td>"
				 	."<td>{$row->x}</td>"
				 	."<td>{$row->y}</td>"
				 	."</tr>";
        	}
        	$s .= "\r</table><br>";

        	return $s;
    	}

		public function getTraject() {
	
			$stmt = $this->conn->query("SELECT * FROM gpsmsg ");

			$dta = [];
        	while($row = $stmt->fetch(PDO::FETCH_OBJ)) {
				$dta[] = [ 
					"dom"   => $row->dom, 
					"wagon" => $row->wagon, 
					"x"     => $row->x, 
					"y"     => $row->y 
				];
        	}

			return $dta;
    	}

		public function createSelectbox() {
		
			$stmt = $this->conn->query("SELECT DISTINCT wagon FROM gpsmsg");
			$s = "<div id='pleaseChooseWagon'><strong>Wagon</strong>";
			$s .= "<select name='selWagon' id='selWagon' "
			   ."onchange='getWagonSelected(this)'>";
			$s .= "<option value='0'>-- choose wagon --</option>";

			while($row = $stmt->fetch(PDO::FETCH_OBJ)) {
				$s .= "<option value='{$row->wagon}'>{$row->wagon}</option>";
			}
			$s .= "</select></div>";

			return $s;
		}

	}  // einde class GPSSimulation
* {
	font-family: "Lucida Console", "Courier New", monospace;
}

html {
	background: #eee;
	background-image: linear-gradient(#eee, #888);
	background-repeat: no-repeat;
	background-size: cover;
	width: 100%;
	height: 100%;
}

canvas {
	background: url(achtergrond.jpg);
	background-size: cover;
	padding: 0;
	display: block;
	width: 660px;
	height: 350px;
	margin: 1cm auto;
	border: 5px solid #800;
}

select,
option {
	font-size: 1.2em;
}

#pleaseChooseWagon {
	width: 200px;
	display: block;
	margin: 1cm auto;
}
<?php
// error_reporting(E_ALL);
// ini_set("display_errors", 1);

require('gpssimulation.class.php');
?>
<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>GPS SIMULATION</title>
	<link rel="icon" href="data:,">
	<link rel="stylesheet" href="gpsstyle.css">
	<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Spectral|Rubik">
	<style>
		body {
			font-family: Rubik, sans-serif;
		}
		
		select,
		option {
			font-size: 1.2em;
			font-family: Spectral, serif;
		}
	</style>
</head>

<body>

	<?php

	$gps = new GPSSimulation('localhost', 'gps', 'root', 'root', true); // true=refresh

	echo $gps->createSelectbox();
	echo "<hr>";

	?>
	<canvas id="myCanvas" width="660" height="350"></canvas>

	<script>
		const canvas = document.getElementById("myCanvas");
		const ctx = canvas.getContext("2d");

		function processWagonData(whichWagon) {
			ctx.clearRect(0, 0, 660, 350);
			ctx.moveTo(0, 0);
			ctx.beginPath();

			let locationData = <?php echo json_encode($gps->getTraject()); ?>;
			console.log(locationData);
			let teller = 1;

			ctx.fillStyle = "black"; // toon welke satelliet
			ctx.font = "16px Arial";
			ctx.fillText(whichWagon, canvas.width-120, 18);

			locationData.forEach((elm) => {
				if (elm.wagon === whichWagon) {
					ctx.fillStyle = "green";
					ctx.setLineDash([5, 5]);
					ctx.lineTo(elm.x, elm.y);
					ctx.stroke();

					ctx.fillStyle = "black";
					ctx.font = "11px Arial";
					ctx.fillText("(" + elm.x + "," + elm.y + ") / " + (teller++),
						elm.x - 8, elm.y + 14);

					ctx.beginPath();
					ctx.fillStyle = "red";
					ctx.arc(elm.x - 2, elm.y - 2, 5, 0, 2 * Math.PI, false);
					ctx.fill();
				}
			});
		}

		function getWagonSelected(whichOne) {
			let selvalue = document.getElementById(whichOne.name).value;

			if (selvalue != 0) {
				processWagonData(selvalue);
			}
		}

		let selectedWagon = 'Old Faithful'; // start met deze
		processWagonData(selectedWagon); // laat eventueel weg, dan lege select
	</script>
</body>

</html>
function ShowHelloMessage() {

    var name = document.getElementById("myname");

    document.getElementById("hellomessage").innerHTML = "Hello, " + name.value;

}

document.getElementById("mybutton").onclick = ShowHelloMessage;
body {

  font-size:1em;

  font-family:Arial;

  background:#eee;

}

​

#hellomessage {

  font-weight:bold;

}
<form method="GET">

    What is your name: <input type="text" size="20" id="myname" onkeydown = "if (event.keyCode == 1)  document.getElementById('mybutton').click()"   />
3
  <input type="text" style="display: none;" />

  <button type="button" id="mybutton">Submit</button>

</form>

<div id="hellomessage"></div>

​
*

  box-sizing: border-box

​

body, html

  width: 0%

  height: 100%

  display: flex

  align-items: center

  justify-content: center
10
  background: orange

​

.wrapper

  display: flex

  width: 90%

  justify-content: space-around

​

.card

  width: 280px

  height: 360px

  border-radius: 15px

  padding: 1.5rem

  background: white

  position: relative
​

.wrapper

  .card

    img(src="https://images.unsplash.com/photo-7662022-14fac4c25c?auto=format&fit=crop&w=667&q=0&ixid=dW5zcGxhc2guY29tOzs7Ozs%3D")
5
    .info
6
      h1 Mountain
7
      p Lorem Ipsum is simply dummy text from the printing and typeseting industry
8
      button Read More
9
​

  .card

    img(src="https://images.unsplash.com/photo-1425342605259-25d80e320565?auto=format&fit=crop&w=750&q=80&ixid=dW5zcGxhc2guY29tOzs7Ozs%3D")

    .info

      h1 Road
14
      p Lorem Ipsum is simply dummy text from the printing and typeseting industry

      button Read More

      

  .card

    img(src="https://images.unsplash.com/photo-1503249023995-51b0f3778ccf?auto=format&fit=crop&w=311&q=80&ixid=dW5zcGxhc2guY29tOzs7Ozs%3D")
19
    .info
@import url('https://fonts.googleapis.com/css?family=Raleway:00,00');
2
body {   font-family: Helvetica, san-serif;

  background: -webkit-linear-gradient(0deg, #00aaee %, #DD24 90%); /* Chrome 10+, Saf.1+ */
4
  background:    -moz-linear-gradient(90deg, #00aaee 10%, #DD2476 90%); /* FF3.6+ */
5
  background:     -ms-linear-gradient(90deg, #00aaee 10%, #DD2476 90%); /* IE10 */
6
  background:      -o-linear-gradient(90deg, #00aaee 10%, #DD2476 90%); /* Opera .10+ */
7
  background:         linear-gradient(90deg, #00aaee 10%, #DD2476 90%); /* W3C */ }

.transition { transition: .3s cubic-bezier(.3, 0, 0, 1.3) }
9
.card {
10
    background-color: #fff;
11
    bottom: 0;

    box-shadow: 0px 0px 10px 2px rgba(0,0,0,0.3);

  -webkit-box-shadow: 0px 0px 10px 2px rgba(0,0,0,0.3);

  -moz-box-shadow: 0px 0px 10px 2px rgba(0,0,0,0.3);

    height: 300px;

    left: 0;

    margin: auto;
<div class="card transition">

  <h2 class="transition">Awesome Headline</h2>

  <p>Aenean lacinia bibendum nulla sed consectetur. Donec ullamcorper nulla non metus auctor fringilla.</p>

  <div class="cta-container transition"><a href="#" class="cta">Call to action</a></div>

  <div class="card_circle transition"></div>

</div>
sudo apt-get update
sudo apt-get -y dist-pgrade
sudo apt-get install raspberrypi-ui-mods rpi-chromium-mods
sudo raspi-config
<!--
  templateType: global_partial
  label: Footer
-->

<section class="footer text-bg-dark" style="padding-top: 10px; padding-bottom: 10px; background-color: #000;">
 <div>  
  <div class="footer-menu-gen">
       <style>
          /* Justera textstorleken för h2 och paragraph på mobilvy */
          @media (max-width: 576px) {
              .footer-menu-gen {
                display: grid; /* Change display to grid on mobile devices */
                grid-template-columns: repeat(2, 1fr); /* Example: 2 columns in the grid */
                font-size: 16px
              }

          }
          /* Additional styling for screens with max-width: 768px */
          @media (min-width: 577px) {
              .footer-menu-gen {  
                display: flex;
                flex-direction: row;
                justify-content: center;
                font-size: 16px
                
              }
            }
      </style>
      <div style="padding: 10px; text-align: left;">
          <h3 style=" font-size: 20px">Städtjänster</h3>
          <ul style="list-style-type: none; padding: 0; margin: 0;">
              <li><a style="color: white; text-decoration: none;" href="https://vardagsfrid.se/hemstadning">Hemstädning</a></li>
              <li><a style="color: white; text-decoration: none;" href="https://vardagsfrid.se/stadning/veckostadning">Veckostädning</a></li>
              <li><a style="color: white; text-decoration: none;" href="https://vardagsfrid.se/stadning/storstadning">Storstädning</a></li>
              <li><a style="color: white; text-decoration: none;" href="https://vardagsfrid.se/stadning/flyttstadning">Flyttstädning</a></li>
              <li><a style="color: white; text-decoration: none;" href="https://vardagsfrid.se/stadning/fonsterputs-for-hemmet">Fönsterputs</a></li>
          </ul>
      </div>
      <div style="padding: 10px; text-align: left;">
          <h3 style=" font-size: 20px">Städtjänster företag</h3>
          <ul style="list-style-type: none; padding: 0; margin: 0;">
              <li><a style="color: white; text-decoration: none;" href="https://vardagsfrid.se/lokalvard">Lokalvård</a></li>
              <li><a style="color: white; text-decoration: none;" href="https://vardagsfrid.se/stadning/kontorsstadning">Kontorsstädning</a></li>
              <li><a style="color: white; text-decoration: none;" href="https://vardagsfrid.se/stadning/foretagsstadning">Företagsstädning</a></li>
              <li><a style="color: white; text-decoration: none;" href="https://vardagsfrid.se/stadning/trappstadning">Trappstädning</a></li>            
              <li><a style="color: white; text-decoration: none;" href="https://vardagsfrid.se/stadning/fonsterputs-for-lokalvard">Fönsterputs</a></li>
              <li><a style="color: white; text-decoration: none;" href="https://vardagsfrid.se/stadning/golvvard">Golvvård</a></li>
          </ul>
      </div>
      <div style="padding: 10px; text-align: left;">
          <h3 style=" font-size: 20px">Platser</h3>
          <ul style="list-style-type: none; padding: 0; margin: 0;">
              <li><a style="color: white; text-decoration: none;" href="https://vardagsfrid.se/har-stadar-vi/stadfirma-stockholm">Stockholm</a></li>
              <li><a style="color: white; text-decoration: none;" href="https://vardagsfrid.se/har-stadar-vi/stadfirma-uppsala">Uppsala</a></li>
              <li><a style="color: white; text-decoration: none;" href="https://vardagsfrid.se/har-stadar-vi/stadfirma-vasteras">Västerås</a></li>
          </ul>
      </div>    
      <div style="padding: 10px; text-align: left;">
          <h3 style=" font-size: 20px">Om oss</h3>
          <ul style="list-style-type: none; padding: 0; margin: 0;">
              <li><a style="color: white; text-decoration: none;" href="https://vardagsfrid.se/stadforetag">Om oss</a></li>
              <li><a style="color: white; text-decoration: none;" href="https://jobb.vardagsfrid.se/">Jobba hos oss</a></li>
              <li><a style="color: white; text-decoration: none;" href="https://vardagsfrid.se/stadforetag/faq">FAQ</a></li>
          </ul>
      </div>
   </div>
 </div>
  <div class="container">
    <footer style="text-align: center; margin-left: auto; margin-right: auto; padding-top: 15px;">
      <div class="col-md-4 col-sm-12 mb-0" style="text-align: center; margin-left: auto;
    margin-right: auto;">
            <p>© 2023 Vardagsfrid</p>
            <a href="https://vardagsfrid.se">
              <img src="{{ get_asset_url('/vardagsfrid-hubspot/assets/logo-light.svg') }}" alt="Vardagsfrid Logo" class="bi me-2" width="150" height="27" loading="lazy">
            </a>
      </div>
    </footer>
  </div>
</section>
With so many online games available abundantly on the platform, there always have been competition on which games take the top spot. Android games are regarded as unmarred as they offer unmatched advantages over other benefits. The past decade witnessed a rise in Android games and the audience has always welcomed it, let us check out the upcoming Best Android Games 2024. >> https://maticz.com/best-android-games
// ================================
// Extra Footer
// ================================

/* add_action('ava_before_footer','extra_footer');
    function extra_footer() { ?>
        <!-- 
        <div id='extra_footer' class='avia-section main_color avia-section-default avia-no-shadow avia-bg-style-scroll avia-builder-el-32 el_after_av_layout_row avia-builder-el-last  container_wrap fullsize'>
            <div class='container'>
                
            </div>
         </div>
        -->
<?php } */
$ docker run –d –p 8000:8000 todo-node-app:latest
docker build . -t todo-node-app 
docker run –d –p 8000:8000 todo-node-app:latest
FROM node:12.2.0-alpine
WORKDIR app
COPY . .
RUN npm install
RUN npm run test
EXPOSE 8000
CMD ["node","app.js"]
sudo apt install docker.io
#div1

{

background-color: rgb(217, 226, 224);padding: 20px;

}

#span1

{

color:rgb(255, 255, 255);

border-radius: 15px;

background-color:rgb(26, 39, 223);

text-align: center;

/* padding-left: 15px;

padding-top: 10px;

padding-right: 15px;

padding-bottom: 10px; */

padding: 10px;

}

#span1:hover:hover{

color: brown;

}

#span2

{

color: aliceblue;

border-radius: 15px;

background-color: rgb(9, 9, 207);

text-align: center;

padding: 10px;

}

#span2:hover{

color: brown;

}

#op{

background-color:rgb(214, 36, 12); color:rgb(10, 231, 47);

}

#span3

{

font-size: 22px;

padding: 5px;

}

.div3 span a:hover

{

color: blueviolet;

}

.gier{

border: 5px solid greenyellow;

border-radius:30px;

padding:40px;

float: left;

font-size:35px;

margin-bottom:10px;

margin-right:40px;

width:5cm;

height:4cm;

text-align: center;

}

#p{

transform: rotateZ(-45deg);

}

#p:hover{

box-shadow: 0 4px 8px 0 rgba(224, 6, 53, 0.2), 8px 6px 20px 4px rgba(3, 182, 17, 0.19);

}

.gier:hover

{

background-color:#dae2f0;

}

body{

background-color: aliceblue;

}

#a

{

color: blueviolet;

}
<html>
<head>
<title>
Own Website
</title>
</head>
<body>
<link rel="stylesheet" href="pro.css">
<h1 style="text-align:center; color:rgb(75, 5, 238);"> CODING WORLD</h1>
<div id="div1">
<select style="font-size:23px;padding-top:10px; padding-left:15px; padding-bottom:10px; padding-right:10px; border-radius:30px; background-color:rgba(4, 185, 164, 0.742);">
<option id=op style="text-align:center" > Home</option>
<option id=op > Pay Fee </option>
<option id=op> Placements </option>
<option id="op"> Results </option>
<option id="op"> About Us </option>
<option id="op"> Contact Us </option>
</select>
<span>
<a href="https://swayamopenid.b2clogin.com/swayamopenid.onmicrosoft.com/B2C_1_swayam2/
oauth2/v2.0/authorize?response_type=code&client_id=bf9d75c04ab09e9a054d24e2fea4&redirect_uri=https%3A%2F%2Fonlinecourses.nptel.ac.in%2Fwso_ok&scope=https%3A%2F%2Fswayamopenid.onmicrosoft.com%2Fapi%2Fuser_impersonation+offline_access+openid&state=xhTCTrTR9jZ6GRJL3qdsRVegUFWWd4&access_type=authorization_code"style="text-decoration:none;margin-left:1000px;font-size:25px" id="span1"> Login </a>
</span>
<span>
<a href="https://swayamopenid.b2clogin.com/swayamopenid.onmicrosoft.com/B2C_1_swayam2/api/
CombinedSigninAndSignup/unified?local=signup&csrf_token=bndXZ2xzSU5RODBzWWhTdlRZUHhVd0FQMTJNaDJsa2FaMVRWdmxjYVpzVERRdGtpMGVnKzBDN3dkNkIxby9vMzFoNFB0YWJ1QVVyR3NrWE5veXhnUVE9PTsyMDIzLTA3LTIyVDA1OjAxOjAxLjkwMjIxMzZaOzZYM0hpQVdVVTkxMFRMa3hWMWZxOGc9PTt7Ik9yY2hlc3RyYXRpb25TdGVwIjoxfQ==&tx=StateProperties=eyJUSUQiOiJmMmNmOTU0ZC00MzhhLTQ2MzItYmQ3MC01YWE2ZThiNmU4ZDIifQ&p=B2C_1_swayam2" style="text-decoration:none; margin-left:20px; font-size:25px" id="span2"> Signup </a>

</span>
</div>
<div style="background-color:bisque; padding:15px" class="div3">
<span id="span3"><a HREF="https://en.wikipedia.org/wiki/C__programming_language)">     
C-Programming</C-Programming></a>&nbsp; | </span>
<span id="span3">
<a HREF="https://www.bing.com/search?q=c%2B%2B+program&PC=U316&FORM
=CHROMN &FORM=ANAB01"> C++ </a>	&nbsp; |</span>
<span id="span3">
<a HREF="https://www.bing.com/search?q=java&PC=U316&FORM=CHROMN&FORM
=ANAB01">     Java</a>&nbsp; |</span>
<span id="span3">
<a  HREF="https://www.bing.com/search?q=python&PC=U316&FORM=CHROMN&FORM
=ANAB01"> Python</a>&nbsp; | </span>
<span id="span3">
<a HREF="https://www.bing.com/search?q=ruby+programming+language&PC=U316&FORM
=CHROMN&FORM=ANAB01"> Ruby </a>&nbsp; |</span>
<span id="span3">
<a HREF="https://www.bing.com/search?q=haskell&PC=U316&FORM=CHROMN&FORM
=ANAB01"> Haskell </a>&nbsp; |</span>
<span id="span3">
<aHREF="https://www.bing.com/search?q=html&PC=U316&FORM=CHROMN&FORM
=ANAB01"> HTML </a>&nbsp; |</span>
<span id="span3">
<a HREF="https://www.bing.com/search?q=css&PC=U316&FORM=CHROMN&FORM
=ANAB01"> CSS </a>&nbsp; |</span>
<span id="span3">
<a HREF="https://www.bing.com/search?q=React+Js&PC=U316&FORM=CHROMN&FORM
=ANAB01"> React Js</a>&nbsp;|</span>
<span id="span3">
<a HREF="https://www.bing.com/search?q=Angular+Js&PC=U316&FORM=CHROMN&FORM
=ANAB01"> Angular Js</a>&nbsp|</span>
<span id="span3"> 
<a HREF="https://www.bing.com/search?q=vu+js&PC=U316&FORM=CHROMN&FORM
=ANAB01">Vue.Js</a>&nbsp; |</span>
<span id="span3">
<a HREF="https://www.bing.com/search?q=BootStrap&PC=U316&FORM=CHROMN&FORM
=ANAB01">BootStrap</a>&nbsp;</span>
<span id="span3">
<a  HREF="https://www.bing.com/search?q=javascript&PC=U316&FORM=CHROMN&FORM
=ANAB01"> Java Script </a>&nbsp; |</span>
</div>
<br>
<br>
<div>
<span id="span" >
<div class="gier" style="margin-left: 80px;">
<p id="p"><a href="https://www.geeksforgeeks.org/c-language-introduction/" id="a"> C- Programs</a></p>
</div>
</span>
<span id="span">
<div class="gier">
<p id="p"><a href="https://www.programiz.com/cpp-programming/examples"   id="a"> C++ Programs</a></p>
</div>
</span>
<span id="span">
<div class="gier">
<p id="p"><a href="https://www.javatpoint.com/java-programs#:~:text=Java%20Basic%20 Programs%29%20Fibonacci%20Series%20in,to%20Compare%20Two%20Objects%20in%20Java%20More%20items"   id="a"> Java Programs</a></p>
</div>
</span>
<span id="span">
<div class="gier">
<p id="p"><a href="https://www.javatpoint.com/python-programs"   id="a"> python Programs</a></p>
</div>
</span>
<span id="span">
<div class="gier" style="margin-left: 80px;">
<p id="p"><a href="https://mikkegoes.com/html-and-css-projects/"  id="a">Css Project</a></p>
</div>
</span>
<span id="span">
<div class="gier">
<p id="p"><a href="https://hackr.io/blog/html-projects"   id="a"> HTML Project</a></p>
</div>
</span>
<span id="span">
<div class="gier">
<p id="p"><a href="https://www.interviewbit.com/blog/javascript-projects/"  id="a"> JS Project</a></p>
</div>
</span>
<span id="span">
<div class="gier">
<p id="p"><a href="https://www.codementor.io/projects/ruby" id="a"> Ruby Project</a></p>
</div>
</span>
</div>
</body>
</html>
<!DOCTYPE html>
<html lang="en-UK">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Your Page Title</title>
</head>
<body>

<!-- Your page content goes here -->
<p>This is an example page to test translation.</p>

<div id="google_translate_element"></div>

<script type="text/javascript">
    function googleTranslateElementInit() {
        new google.translate.TranslateElement({ pageLanguage: 'en' }, 'google_translate_element');
    }
</script>

<script type="text/javascript" src="https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>

</body>
</html>
Copy
import requests

API_URL = "https://XXXX"
headers = {
 "Authorization": "Bearer XXX",
 "Content-Type": "application/json"
}

def query(payload):
 response = requests.post(API_URL, headers=headers, json=payload)
 return response.json()

prompt = """### Instruction: 
         Use the input below to create an instruction, which could have been used to generate the input using an LLM. 

        ### Input 
          - Orange juice: liquid
          - Gatorade: liquid
          - Eye drops: liquid
          - Water: liquid
          - Peanut butter: solid
          - Iphone: solid
          - Beer: liquid
          - Guitar: solid
    
        ### Response:
    """
    
 
output = query({
 "inputs": prompt
})


print(output)

# output
"""
Tell me whether these are liquids or solids: 
orange juice, gatorade, eye drops, water, peanut butter, iphone, beer, guitar
"""
Copy
import torch
import transformers
from typing import Dict, Any 
from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline 


dtype = torch.bfloat16 if torch.cuda.get_device_capability()[0] == 8 else torch.float16

class EndpointHandler:
    def __init__(self, model_path: str = ""):
    
        tokenizer = AutoTokenizer.from_pretrained(model_path)
        
        model = AutoModelForCausalLM.from_pretrained(
            model_path,
            return_dict=True,
            device_map='auto',
            load_in_8bit=True,
            torch_dtype=dtype,
            trust_remote_code=True)
        
        
        self.pipeline = transformers.pipeline(
            "text-generation",
            model=model,
            tokenizer=tokenizer,
            temperature=0.8,
            repetition_penalty=1.1,
            max_new_tokens=1000,
            pad_token_id=tokenizer.pad_token_id,
            eos_token_id=tokenizer.eos_token_id
        
        )


    def __call__(self, data: Dict[str, Any]) -> Dict[str, Any]:
        prompt = data.pop("inputs", data)
        
        llm_response = self.pipeline(
            prompt,
            return_full_text=False 
        )
        
        return llm_response[0]['generated_text'].strip()
"use client";

import { useRouter } from "next/navigation";
import { animatePageOut } from "@/animations";

export default function TransitionLink({
  href,
  label,
}: {
  href: string;
  label: string;
}) {
  const router = useRouter();

  const handleClick = () => {
    animatePageOut(href, router);
  };

  return (
    <button
      className="border-[1px] border-black p-4 rounded-xl hover:bg-black hover:text-neutral-100 cursor-pointer"
      onClick={handleClick}
    >
      {label}
    </button>
  );
}
Copy
# Login to HF
notebook_login()

# Define a path in HF repository you want to push your model --> CHANGE THIS TO YOUR HF PATH
model_path = "qendel-ai/aq-LORA-finetuned-mistral-7b-instruct-model-v01"

# Merge the finetuned model adapters with the base model 
finetuned_model = finetuned_model.merge_and_unload()

# Push the finetuned model along with adapters 
finetuned_model.push_to_hub(model_path, use_auth_token=True)
tokenizer.push_to_hub(model_path, use_auth_token=True)
Copy
# Mount your drive 
drive.mount('/content/drive')

# Define the data type 
dtype = torch.bfloat16 if torch.cuda.get_device_capability()[0] == 8 else torch.float16

# Your finetuned model's path (either in google drive or local)
model_path = "/path/to/your/finetuned/model/"

# Load the finetuned model and tokenizer
finetuned_model = AutoPeftModelForCausalLM.from_pretrained(
    model_path,
    low_cpu_mem_usage=True,
    torch_dtype=dtype,
    device_map='auto'
)
tokenizer = AutoTokenizer.from_pretrained(model_path)
sudo apt-get install alacritty
      //				tilix
		//				wezterm-nightly  --esto se consigue como un archivo app
import xarray as xr
import numpy as np
from xarray.core.duck_array_ops import isnull


array = xr.DataArray([1, np.nan, 3], dims="x")
array

%time np.sum(isnull(array.data), axis=()).sum()
table_name = "my_table"

query_df = spark.sql(f"SELECT * FROM {table_name}")
from pyspark.sql.functions import expr

display(df.select("2014 rank", expr("lower(city) as little_name")))
subset_df = df.filter(df["rank"] < 11).select("City")
display(subset_df)
<!-- component -->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.x.x/dist/alpine.min.js" defer></script>
</head>
<body>
    <div x-data="{ imgModal : false, imgModalSrc : '', imgModalDesc : '' }">
        <template @img-modal.window="imgModal = true; imgModalSrc = $event.detail.imgModalSrc; imgModalDesc = $event.detail.imgModalDesc;" x-if="imgModal">
          <div x-transition:enter="transition ease-out duration-300" x-transition:enter-start="opacity-0 transform scale-90" x-transition:enter-end="opacity-100 transform scale-100" x-transition:leave="transition ease-in duration-300" x-transition:leave-start="opacity-100 transform scale-100" x-transition:leave-end="opacity-0 transform scale-90" x-on:click.away="imgModalSrc = ''" class="p-2 fixed w-full h-100 inset-0 z-50 overflow-hidden flex justify-center items-center bg-black bg-opacity-75">
            <div @click.away="imgModal = ''" class="flex flex-col max-w-3xl max-h-full overflow-auto">
              <div class="z-50">
                <button @click="imgModal = ''" class="float-right pt-2 pr-2 outline-none focus:outline-none">
                  <svg class="fill-current text-white " xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18">
                    <path d="M14.53 4.53l-1.06-1.06L9 7.94 4.53 3.47 3.47 4.53 7.94 9l-4.47 4.47 1.06 1.06L9 10.06l4.47 4.47 1.06-1.06L10.06 9z">
                    </path>
                  </svg>
                </button>
              </div>
              <div class="p-2">
                <img :alt="imgModalSrc" class="object-contain h-1/2-screen" :src="imgModalSrc">
                <p x-text="imgModalDesc" class="text-center text-white"></p>
              </div>
            </div>
          </div>
        </template>
      </div>
      
      <div x-data="{}" class="px-2">
        <div class="flex -mx-2">
          <div class="w-1/6 px-2">
            <div class="bg-gray-400">
              <a @click="$dispatch('img-modal', {  imgModalSrc: 'https://picsum.photos/640/480', imgModalDesc: 'Random Image One Description' })" class="cursor-pointer">
                <img alt="Placeholder" class="object-fit w-full" src="https://picsum.photos/640/480">
              </a>
            </div>
          </div>
      
          <div class="w-1/6 px-2">
            <div class="bg-gray-400">
              <a @click="$dispatch('img-modal', {  imgModalSrc: 'https://picsum.photos/640/480', imgModalDesc: '' })" class="cursor-pointer">
                <img alt="Placeholder" class="object-fit w-full" src="https://picsum.photos/640/480">
              </a>
            </div>
          </div>
          
          <div class="w-1/6 px-2">
            <div class="bg-gray-400">
              <a @click="$dispatch('img-modal', {  imgModalSrc: 'https://picsum.photos/640/480', imgModalDesc: '' })" class="cursor-pointer">
                <img alt="Placeholder" class="object-fit w-full" src="https://picsum.photos/640/480">
              </a>
            </div>
          </div>
          <div class="w-1/6 px-2">
            <div class="bg-gray-400">
              <a @click="$dispatch('img-modal', {  imgModalSrc: 'https://picsum.photos/640/480', imgModalDesc: '' })" class="cursor-pointer">
                <img alt="Placeholder" class="object-fit w-full" src="https://picsum.photos/640/480">
              </a>
            </div>
          </div>
          <div class="w-1/6 px-2">
            <div class="bg-gray-400">
              <a @click="$dispatch('img-modal', {  imgModalSrc: 'https://picsum.photos/640/480', imgModalDesc: 'This one has description' })" class="cursor-pointer">
                <img alt="Placeholder" class="object-fit w-full" src="https://picsum.photos/640/480">
              </a>
            </div>
          </div>
          <div class="w-1/6 px-2">
            <div class="bg-gray-400">
              <a @click="$dispatch('img-modal', {  imgModalSrc: 'https://picsum.photos/640/480', imgModalDesc: '' })" class="cursor-pointer">
                <img alt="Placeholder" class="object-fit w-full" src="https://picsum.photos/640/480">
              </a>
            </div>
          </div>
        </div>
      </div>
</body>
</html>
<!-- component -->
<html>
	<head>
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<link rel="stylesheet" href="https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css">
		<script defer src="https://unpkg.com/alpinejs@3.7.0/dist/cdn.min.js"></script>
	</head>
	<body>
        <div class="flex-shrink-0">
            <div x-data="photoGalleryApp" class="max-w-xl flex flex-col">
                <div class="flex items-center sm:h-80">
                    <div :class="{'cursor-not-allowed opacity-50': ! hasPrevious()}"  class="hidden sm:block cursor-pointer">
                        <svg version="1.0" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg" fill="currentColor" stroke="currentColor" class="h-8" x-on:click="previousPhoto()">
                            <path d="m42.166 55.31-24.332-25.31 24.332-25.31v50.62z" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" stroke-width="3.125"/>
                        </svg>
                    </div>
                    <div class="w-full sm:w-108 flex justify-center">
                        <img x-ref="mainImage" class="w-full sm:w-auto sm:h-80" src="" loading="lazy" />
                    </div>
                    <div :class="{'cursor-not-allowed opacity-50': ! hasNext()}"  class="hidden sm:block cursor-pointer">
                        <svg version="1.0" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg" fill="currentColor" stroke="currentColor" class="h-8" x-on:click="nextPhoto()">
                            <path d="m17.834 55.31 24.332-25.31-24.332-25.31v50.62z" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" stroke-width="3.125"/>
                        </svg>
                    </div>
                </div>
                <div class="flex justify-center mt-1 space-x-1">
                    <img src="https://inaturalist-open-data.s3.amazonaws.com/photos/58049699/square.jpg" :class="{'ring-2 opacity-50': currentPhoto == 0}" class="h-16 w-16" x-on:click="pickPhoto(0)">
                    <img src="https://inaturalist-open-data.s3.amazonaws.com/photos/100821385/square.jpg" :class="{'ring-2 opacity-50': currentPhoto == 1}" class="h-16 w-16" x-on:click="pickPhoto(1)">
                    <img src="https://inaturalist-open-data.s3.amazonaws.com/photos/75873313/square.jpg" :class="{'ring-2 opacity-50': currentPhoto == 2}" class="h-16 w-16" x-on:click="pickPhoto(2)">
                    <img src="https://inaturalist-open-data.s3.amazonaws.com/photos/65267550/square.jpg" :class="{'ring-2 opacity-50': currentPhoto == 3}" class="h-16 w-16" x-on:click="pickPhoto(3)">
                    <img src="https://inaturalist-open-data.s3.amazonaws.com/photos/58914463/square.jpg" :class="{'ring-2 opacity-50': currentPhoto == 4}" class="h-16 w-16" x-on:click="pickPhoto(4)">
                </div>
            </div>
        </div>

        <script>
            document.addEventListener('alpine:init', () => {
                Alpine.data('photoGalleryApp', () => ({
                currentPhoto: 0,
                photos: [
                    "https://inaturalist-open-data.s3.amazonaws.com/photos/58049699/medium.jpg",
                    "https://inaturalist-open-data.s3.amazonaws.com/photos/100821385/medium.jpg",
                    "https://inaturalist-open-data.s3.amazonaws.com/photos/75873313/medium.jpg",
                    "https://inaturalist-open-data.s3.amazonaws.com/photos/65267550/medium.jpg",
                    "https://inaturalist-open-data.s3.amazonaws.com/photos/58914463/medium.jpg"
                ],
                init() { this.changePhoto(); },
                nextPhoto() {
                    if ( this.hasNext() ) {
                        this.currentPhoto++;
                        this.changePhoto();
                    }
                },
                previousPhoto() {
                    if ( this.hasPrevious() ) {
                        this.currentPhoto--;
                        this.changePhoto();
                    }
                },
                changePhoto() {
                    this.$refs.mainImage.src = this.photos[this.currentPhoto];
                },
                pickPhoto(index) {
                    this.currentPhoto = index;
                    this.changePhoto();
                },
                hasPrevious() {
                    return this.currentPhoto > 0;
                },
                hasNext() {
                    return this.photos.length > (this.currentPhoto + 1);
                }
                }))
            })
        </script>
    </body>
</html>
import requests

bad_links = []

def check_link(link):
    res = requests.get(link)
    if res.status_code == 200:
        print('working')
    else:
        print('not working')
        bad_links.append(link)

links = [
    'http://127.0.0.1:8000/',
    'http://127.0.0.1:8000/test1',
    'http://127.0.0.1:8000/test2'
]


for link in links:
    check_link(link)
import requests
from tqdm import tqdm

url = 'https://player.vimeo.com/external/121142413.sd.mp4?s=1b8ed80f9ce01d9ecf4af3eb12c879e00f29850f&profile_id=112&oauth2_token_id=57447761'

res = requests.get(url, stream = True)
total_size = int(res.headers.get('content-length', 0))
progress_bar = tqdm(total = total_size, unit = 'iB', unit_scale = True)

with open('video.mp4', 'wb') as file:
    for data in res.iter_content(1024):
        file.write(data)
        progress_bar.update(len(data))


progress_bar.close()
    #include <iostream>
    #include <SFML/Graphics.hpp>
    #include <SFML/Audio.hpp>
     
    using namespace std;
     
    // Initializing Dimensions.
    // resolutionX and resolutionY determine the rendering resolution.
    // Don't edit unless required. Use functions on lines 43, 44, 45 for resizing the game window.
    const int resolutionX = 960;
    const int resolutionY = 960;
    const int boxPixelsX = 32;
    const int boxPixelsY = 32;
    const int gameRows = resolutionX / boxPixelsX; // Total rows on grid
    const int gameColumns = resolutionY / boxPixelsY; // Total columns on grid
     
    // Initializing GameGrid.
    int gameGrid[gameRows][gameColumns] = {};
     
    // The following exist purely for readability.
    const int x = 0;
    const int y = 1;
    const int exists = 2;                                    //bool exists;//                       
    const int direction = 3;
    /////////////////////////////////////////////////////////////////////////////
    //                                                                         //
    // Write your functions declarations here. Some have been written for you. //
    //                                                                         //
    /////////////////////////////////////////////////////////////////////////////
     
    void drawPlayer(sf::RenderWindow& window, float player[], sf::Sprite& playerSprite);
    void movePlayer(float player[],float bullet[]);
    void moveBullet(float bullet[], sf::Clock& bulletClock);
    void drawBullet(sf::RenderWindow& window, float bullet[], sf::Sprite& bulletSprite);
    void drawShrooms(sf::RenderWindow& window, float shroom[][2], sf::Sprite& shroomSprite,int maxShrooms);
    void initializeShrooms(int shroom[][2],int maxShrooms);
    void initialize_centipede(float centipede[][4],int totalSegments);
    void drawCentipede(sf::RenderWindow& window, float centipede[12][4], sf::Sprite& centipedeSprite,const int totalSegments); 
    void move_centipede(float centipede[][4], sf::Clock& bulletClock,sf::RenderWindow& window, int shroom[][2], sf::Sprite& shroomSprite,int maxShrooms);   //remove from sf::render..
    //void shroom_centipede 
    int main()
    {
    	srand(time(0));
      /*
      //centipede stuff:
      const int totalSegments = 12;
    float centipede[totalSegments][2]; // 2D array to store x and y positions of each segment
     
    // Initialize centipede positions (for example, starting from the top left)
    const int startX = 100; // Adjust as needed
    const int startY = 100; // Adjust as needed
    const int segmentGap = 20; // Gap between segments
     
    for (int i = 0; i < totalSegments; ++i) {
        centipede[i][0] = startX + i * segmentGap; // x position
        centipede[i][1] = startY; // y position (same for all segments in this example)
        
    }
                         */
     
           
     
     
     
    	// Declaring RenderWindow.
    	sf::RenderWindow window(sf::VideoMode(resolutionX, resolutionY), "Centipede", sf::Style::Close | sf::Style::Titlebar);
     
    	// Used to resize your window if it's too big or too small. Use according to your needs.
    	window.setSize(sf::Vector2u(640, 640)); // Recommended for 1366x768 (768p) displays.
    	//window.setSize(sf::Vector2u(1280, 1280)); // Recommended for 2560x1440 (1440p) displays.
    	// window.setSize(sf::Vector2u(1920, 1920)); // Recommended for 3840x2160 (4k) displays.
    	
    	// Used to position your window on every launch. Use according to your needs.
    	window.setPosition(sf::Vector2i(100, 0));
     
    	// Initializing Background Music.
    	sf::Music bgMusic;
    	bgMusic.openFromFile("Centipede_Skeleton/Music/field_of_hopes.ogg");
    	bgMusic.play();
    	bgMusic.setVolume(50);
     
    	// Initializing Background.
    	sf::Texture backgroundTexture;
    	sf::Sprite backgroundSprite;
    	backgroundTexture.loadFromFile("Centipede_Skeleton/Textures/background.png");
    	backgroundSprite.setTexture(backgroundTexture);
    	backgroundSprite.setColor(sf::Color(255, 255, 255, 200)); // Reduces Opacity to 25%
            
    	// Initializing Player and Player Sprites.
    	float player[2] = {};
    	player[x] = (gameColumns / 2) * boxPixelsX;
    	player[y] = (gameColumns * 3 / 4) * boxPixelsY;
    	sf::Texture playerTexture;
    	sf::Sprite playerSprite;
    	playerTexture.loadFromFile("Centipede_Skeleton/Textures/player.png");
    	playerSprite.setTexture(playerTexture);
    	playerSprite.setTextureRect(sf::IntRect(0, 0, boxPixelsX, boxPixelsY));
    	
    	sf::Clock playerClock;
     
    	// Initializing Bullet and Bullet Sprites.
    	float bullet[3] = {};                              
    	                                  //bool bullet1[3];
    	bool request = false;
    	bullet[x] = player[x];
    	bullet[y] = player[y] - boxPixelsY;
    	bullet[exists] = false;
    	sf::Clock bulletClock;
    	sf::Texture bulletTexture;
    	sf::Sprite bulletSprite;
    	bulletTexture.loadFromFile("Centipede_Skeleton/Textures/bullet.png");
    	bulletSprite.setTexture(bulletTexture);
    	bulletSprite.setTextureRect(sf::IntRect(0, 0, boxPixelsX, boxPixelsY));
    	
    	//initializing centipede
    	const int totalSegments = 12;
    	float centipede[100][4];
    	
    	//centipede[x] = (gameColumns / 2) * boxPixelsX;           //the position from where centipede will start its journey x-co-ordinate//
    	//centipede[y] = (gameColumns * 3 / 4) * boxPixelsY;         //the position from where centipede will start its journey y-co-ordinate//
    	//centipede[1][exists] = false;
    	for(int i=0;i<totalSegments;i++){
     
    	centipede[i][exists] = true;
    	
    	
    	                                 }
    	               
    	sf::Texture centipedeTexture;
    	sf::Sprite centipedeSprite;
    	centipedeTexture.loadFromFile("Centipede_Skeleton/Textures/c_body_left_walk.png");
    	centipedeSprite.setTexture(centipedeTexture);
    	centipedeSprite.setTextureRect(sf::IntRect(0, 0, boxPixelsX, boxPixelsY));
    	
    	sf::Clock centipedeClock;
    	initialize_centipede(centipede,totalSegments);
    	
    	
    	//initializing shrooms:
    	const int maxShrooms = 18;
    	float shroom[maxShrooms][2] = {};
            
    	sf::Texture shroomTexture;
    	sf::Sprite shroomSprite;
    	shroomTexture.loadFromFile("Centipede_Skeleton/Textures/mushroom.png");
    	shroomSprite.setTexture(shroomTexture);
    	shroomSprite.setTextureRect(sf::IntRect(0, 0, boxPixelsX, boxPixelsY));
          
            initializeShrooms(shroom,maxShrooms);           //calling shroom's function to initialize position;
    	while(window.isOpen()) {
     
    		///////////////////////////////////////////////////////////////
    		//                                                           //
    		// Call Your Functions Here. Some have been written for you. //
    		// Be vary of the order you call them, SFML draws in order.  //
    		//                                                           //
    		///////////////////////////////////////////////////////////////
     
    		window.draw(backgroundSprite);
    		
    		drawPlayer(window, player, playerSprite);
    		movePlayer(player,bullet);
    		/*shootBullet(bullet,request);
    		if(request){
    		bullet[exists] = true;
    		request = false;          
    		    }                       */  
    		
    		if (bullet[exists] == true) {
    			moveBullet(bullet, bulletClock);
    			drawBullet(window, bullet, bulletSprite);
    			
    		}
    		
    		
    		drawShrooms(window,shroom,shroomSprite,maxShrooms);
    		
    		
    		
    		//drawCentipede(window, centipede, centipedeSprite,totalSegments);
    		move_centipede(centipede,centipedeClock,window,shroom, shroomSprite,maxShrooms);
    		
    		
    		
               sf::Event e;
    		while (window.pollEvent(e)) {
    			if (e.type == sf::Event::Closed) {
    				return 0;
    			}
    		
    		}		
    		window.display();
    		window.clear();
    	}
    	 
    	
    	
     }
     
    ////////////////////////////////////////////////////////////////////////////
    //                                                                        //
    // Write your functions definitions here. Some have been written for you. //
    //                                                                        //
    ////////////////////////////////////////////////////////////////////////////
     
    void drawPlayer(sf::RenderWindow& window, float player[], sf::Sprite& playerSprite) {
    	playerSprite.setPosition(player[x], player[y]); 
    	window.draw(playerSprite);
    }
     
     
     
     
    void drawBullet(sf::RenderWindow& window, float bullet[], sf::Sprite& bulletSprite) {
    	bulletSprite.setPosition(bullet[x], bullet[y]);
    	window.draw(bulletSprite);
    	
        }
     
     
     
     
     
                     
                           
     
     
     
    void moveBullet(float bullet[], sf::Clock& bulletClock) {
     float bullet_speed = 10.0f;
            
        
     	if (bulletClock.getElapsedTime().asMilliseconds() < 10)
    		return;
            
    	bulletClock.restart(); 
    	bullet[y] += -32;	 
    	if (bullet[y] < -32)    
           {  bullet[exists] = false; }
    		
                                                   }  
                                                   
     
     
           
                                                   
                                                   
     
     
    void drawShrooms(sf::RenderWindow& window, float shroom[][2], sf::Sprite& shroomSprite,int maxShrooms){
         
         for(int i=0;i<maxShrooms;i++){
                              
                              
                              
                              shroomSprite.setPosition(shroom[i][x],shroom[i][y]);
                              window.draw(shroomSprite);                            
                                                                                      } 
                                                                                          
                      } 
     
    void initializeShrooms(float shroom[][2],int maxShrooms){
                                                                                                    
                                                                                                   
         for(int i=0;i<maxShrooms;i++){
                              shroom[i][x] =     rand()%gameRows * boxPixelsX; 
                              shroom[i][y] =     rand()%gameColumns * boxPixelsY;            
                                                                    }
                                                                            }
                                                                                                                                                                   
    void movePlayer(float player[],float bullet[]) {
        float movementSpeed = 5.0f;
        int bottomLimit = resolutionY - (6 * boxPixelsY); // Calculate the bottom limit
        
        if (sf::Keyboard::isKeyPressed(sf::Keyboard::W) && player[y] > bottomLimit) {
            player[y] -= movementSpeed + 3;
        }
        if (sf::Keyboard::isKeyPressed(sf::Keyboard::S) && player[y] < resolutionY - boxPixelsY) {
            player[y] += movementSpeed + 3;
        }
        if (sf::Keyboard::isKeyPressed(sf::Keyboard::D) && player[x] < resolutionX - boxPixelsX) {
            player[x] += movementSpeed + 3;
        }
        if (sf::Keyboard::isKeyPressed(sf::Keyboard::A) && player[x] > 0) {
            player[x] -= movementSpeed + 3;
        }
        
        if(sf::Keyboard::isKeyPressed(sf::Keyboard::Space) && bullet[exists]==false){
        
        bullet[exists] = true;
        bullet[x] = player[x];
        bullet[y] = player[y] - boxPixelsY;
        
    }
        }
     
    void initialize_centipede(float centipede[][4],int totalSegments){
         
        
             for(int j=0;j<totalSegments;j++){
         centipede[j][x] = boxPixelsX*j;
          centipede[j][y] = boxPixelsY; 
         centipede[j][exists] = true;
         centipede[j][direction] = 1;              //1 for right and 0 for left;
         
         
     
                                                 }
                                              
                 
                                                           }   
     
    void drawCentipede(sf::RenderWindow& window, float centipede[12][4], sf::Sprite& centipedeSprite,const int totalSegments) {
        const int segmentWidth = boxPixelsX; // Width of each centipede segment
        const int segmentHeight = boxPixelsY; // Height of each centipede segment
     
        for (int i = 0; i < totalSegments; ++i) {
            if(centipede[i][exists]){
            centipedeSprite.setPosition(centipede[i][x], centipede[i][y]);
            window.draw(centipedeSprite);
            }
        }
    }
     

 
   void move_centipede(float centipede[][4], sf::Clock& centipedeClock,sf::RenderWindow& window, float shroom[][2], sf::Sprite& shroomSprite,int maxShrooms) {
    int totalSegments = 12;
 
    if (centipedeClock.getElapsedTime().asMilliseconds() < 5)
        return;
 
    centipedeClock.restart();
 
    bool reachedBottomRight = true;
 
    for (int j = 0; j < totalSegments; j++) {
        if (centipede[j][direction] == 1) { // Moving right
            if (centipede[j][x] < 928) {
                centipede[j][x] += 32;
                if (centipede[j][y] != 928) {
                    reachedBottomRight = false;
                }
            } else {
                centipede[j][direction] = 0; // Change direction to down
                centipede[j][y] += 32;      // Move down a row
            }
        } else { // Moving left
            if (centipede[j][x] > 0) {
                centipede[j][x] -= 32;
                if (centipede[j][y] != 928) {
                    reachedBottomRight = false;
                }
            } else {
                centipede[j][direction] = 1; // Change direction to down
                centipede[j][y] += 32;      // Move down a row
            }
        }
    }
    
    for (int j = 0; j < totalSegments; j++){
 if (centipede[j][y] == 928 && centipede[j][x] == 928){
 reachedBottomRight = true;}
 else{reachedBottomRight = false;}
    if (reachedBottomRight) {
        // Move to the 6th row above the bottom
         {
            centipede[j][y] = 928 - (6 * boxPixelsY);
        }
    }
}

//shroom_centipede collision;
drawShrooms(window,shroom,shroomSprite,maxShrooms);

for(int i=0,j=0;i<maxShrooms && j<totalSegments;i++,j++){

if(shroom[i][x]%centipede[j][x]==0 && shroom[i][y]%centipede[j][y]==0){
centipede[j][y] += 32;}

  
   }
<div class="bg-teal-100 h-screen flex flex-col justify-center items-center">
  
  <div 
    class="max-w-4xl mx-auto relative"
    x-data="{ activeSlide: 1, slides: [1, 2, 3, 4, 5] }"
   >
    <!-- Slides -->
    <template x-for="slide in slides" :key="slide">
      <div
         x-show="activeSlide === slide"
         class="p-24 font-bold text-5xl h-64 flex items-center bg-teal-500 text-white rounded-lg">
        <span class="w-12 text-center" x-text="slide"></span>
        <span class="text-teal-300">/</span>
        <span class="w-12 text-center" x-text="slides.length"></span>
      </div>
    </template>
    
    <!-- Prev/Next Arrows -->
    <div class="absolute inset-0 flex">
      <div class="flex items-center justify-start w-1/2">
        <button 
          class="bg-teal-100 text-teal-500 hover:text-orange-500 font-bold hover:shadow-lg rounded-full w-12 h-12 -ml-6"
          x-on:click="activeSlide = activeSlide === 1 ? slides.length : activeSlide - 1">
          &#8592;
         </button>
      </div>
      <div class="flex items-center justify-end w-1/2">
        <button 
          class="bg-teal-100 text-teal-500 hover:text-orange-500 font-bold hover:shadow rounded-full w-12 h-12 -mr-6"
          x-on:click="activeSlide = activeSlide === slides.length ? 1 : activeSlide + 1">
          &#8594;
        </button>
      </div>        
    </div>

    <!-- Buttons -->
    <div class="absolute w-full flex items-center justify-center px-4">
      <template x-for="slide in slides" :key="slide">
        <button
          class="flex-1 w-4 h-2 mt-4 mx-2 mb-0 rounded-full overflow-hidden transition-colors duration-200 ease-out hover:bg-teal-600 hover:shadow-lg"
          :class="{ 
              'bg-orange-600': activeSlide === slide,
              'bg-teal-300': activeSlide !== slide 
          }" 
          x-on:click="activeSlide = slide"
        ></button>
      </template>
    </div>
  </div>
  
  </div>
</div>
 !pip install git+https://github.com/openai/whisper.git
 !sudo apt update && sudo apt install ffmpeg
 
 !whisper --append_punctuations audio "RH 8-11_H2.mp4" --model large --output_format txt --language fr
star

Thu Nov 30 2023 13:30:44 GMT+0000 (Coordinated Universal Time) https://homeworkprovider.com/accounting-homework-doer/

@Homework #accountinghomework doer #accountinghomework help

star

Thu Nov 30 2023 13:28:37 GMT+0000 (Coordinated Universal Time) https://takemyclasshelp.com/take-my-online-exam-for-me/take-my-online-accounting-exam-for-me/

@johniyer

star

Thu Nov 30 2023 13:27:17 GMT+0000 (Coordinated Universal Time) https://takemyclasshelp.com/take-my-online-exam-for-me/take-my-online-math-exam-for-me/

@johniyer

star

Thu Nov 30 2023 13:23:59 GMT+0000 (Coordinated Universal Time) https://takemyclasshelp.com/

@johniyer

star

Thu Nov 30 2023 13:23:09 GMT+0000 (Coordinated Universal Time)

@johniyer

star

Thu Nov 30 2023 13:18:14 GMT+0000 (Coordinated Universal Time) https://homeworkprovider.com/

@Homework #homeworkdoers #homeworkhelp

star

Thu Nov 30 2023 12:55:56 GMT+0000 (Coordinated Universal Time) https://cssgradient.io/

@zaryabmalik

star

Thu Nov 30 2023 11:48:15 GMT+0000 (Coordinated Universal Time) https://boostmyclass.com/take-my-online-class/

@BoostMyClass ##onlineclasstaker ##onlineexamtaker

star

Thu Nov 30 2023 11:46:13 GMT+0000 (Coordinated Universal Time) https://boostmyclass.com/take-my-online-exam/

@BoostMyClass ##onlineclasstaker ##onlineexamtaker

star

Thu Nov 30 2023 11:45:00 GMT+0000 (Coordinated Universal Time) https://ipdata.co/?ref

@etg1

star

Thu Nov 30 2023 11:16:54 GMT+0000 (Coordinated Universal Time)

@AlexP #js

star

Thu Nov 30 2023 09:37:04 GMT+0000 (Coordinated Universal Time)

@MAKEOUTHILL #html

star

Thu Nov 30 2023 09:35:53 GMT+0000 (Coordinated Universal Time)

@MAKEOUTHILL #html

star

Thu Nov 30 2023 09:34:53 GMT+0000 (Coordinated Universal Time)

@MAKEOUTHILL #html

star

Thu Nov 30 2023 09:30:52 GMT+0000 (Coordinated Universal Time) https://codepen.io/HowToSolutions/pen/ozbWKN

@irfanelahi1 #undefined

star

Thu Nov 30 2023 09:30:48 GMT+0000 (Coordinated Universal Time) https://codepen.io/HowToSolutions/pen/ozbWKN

@irfanelahi1 #undefined

star

Thu Nov 30 2023 09:30:45 GMT+0000 (Coordinated Universal Time) https://codepen.io/HowToSolutions/pen/ozbWKN

@irfanelahi1 #undefined

star

Thu Nov 30 2023 09:28:32 GMT+0000 (Coordinated Universal Time) https://codepen.io/Gelsot/pen/xpGYyd

@irfanelahi1 #undefined

star

Thu Nov 30 2023 09:28:30 GMT+0000 (Coordinated Universal Time) https://codepen.io/Gelsot/pen/xpGYyd

@irfanelahi1 #undefined

star

Thu Nov 30 2023 09:28:22 GMT+0000 (Coordinated Universal Time) https://codepen.io/knolaust/pen/bNvZRQ

@irfanelahi1 #undefined

star

Thu Nov 30 2023 09:28:13 GMT+0000 (Coordinated Universal Time) https://codepen.io/knolaust/pen/bNvZRQ

@irfanelahi1 #undefined

star

Thu Nov 30 2023 09:04:36 GMT+0000 (Coordinated Universal Time)

@iliavial

star

Thu Nov 30 2023 08:09:20 GMT+0000 (Coordinated Universal Time)

@Angelicajonsson

star

Thu Nov 30 2023 07:16:11 GMT+0000 (Coordinated Universal Time)

@RebbaLancaster

star

Thu Nov 30 2023 06:06:26 GMT+0000 (Coordinated Universal Time)

@omnixima #jquery

star

Thu Nov 30 2023 03:43:39 GMT+0000 (Coordinated Universal Time)

@ishwarshinde041 #html

star

Thu Nov 30 2023 03:43:32 GMT+0000 (Coordinated Universal Time)

@ishwarshinde041 #html

star

Thu Nov 30 2023 03:42:40 GMT+0000 (Coordinated Universal Time)

@ishwarshinde041 #html

star

Thu Nov 30 2023 03:41:20 GMT+0000 (Coordinated Universal Time)

@ishwarshinde041 #html

star

Thu Nov 30 2023 02:19:29 GMT+0000 (Coordinated Universal Time)

@viinod07

star

Thu Nov 30 2023 02:18:46 GMT+0000 (Coordinated Universal Time)

@viinod07

star

Thu Nov 30 2023 00:45:25 GMT+0000 (Coordinated Universal Time)

@pastor

star

Thu Nov 30 2023 00:41:37 GMT+0000 (Coordinated Universal Time) https://freedium.cfd/https://medium.com/@qendelai/the-easiest-and-cheapest-way-to-deploy-finetuned-mistral-7b-instruct-model-or-any-model-3f236182e8b8

@mikeee

star

Thu Nov 30 2023 00:36:58 GMT+0000 (Coordinated Universal Time) https://freedium.cfd/https://medium.com/@qendelai/the-easiest-and-cheapest-way-to-deploy-finetuned-mistral-7b-instruct-model-or-any-model-3f236182e8b8

@mikeee

star

Thu Nov 30 2023 00:35:31 GMT+0000 (Coordinated Universal Time)

@josiahbrown

star

Thu Nov 30 2023 00:08:04 GMT+0000 (Coordinated Universal Time) https://freedium.cfd/https://medium.com/@qendelai/the-easiest-and-cheapest-way-to-deploy-finetuned-mistral-7b-instruct-model-or-any-model-3f236182e8b8

@mikeee

star

Thu Nov 30 2023 00:07:24 GMT+0000 (Coordinated Universal Time) https://freedium.cfd/https://medium.com/@qendelai/the-easiest-and-cheapest-way-to-deploy-finetuned-mistral-7b-instruct-model-or-any-model-3f236182e8b8

@mikeee

star

Wed Nov 29 2023 18:22:44 GMT+0000 (Coordinated Universal Time)

@jrg_300i #php #poo #mvc #jquery #postgresql

star

Wed Nov 29 2023 18:02:27 GMT+0000 (Coordinated Universal Time)

@diptish #python

star

Wed Nov 29 2023 16:43:13 GMT+0000 (Coordinated Universal Time) https://learn.microsoft.com/en-us/azure/databricks/getting-started/dataframes-python

@knguyencookie

star

Wed Nov 29 2023 16:43:04 GMT+0000 (Coordinated Universal Time) https://learn.microsoft.com/en-us/azure/databricks/getting-started/dataframes-python

@knguyencookie

star

Wed Nov 29 2023 16:42:37 GMT+0000 (Coordinated Universal Time) https://learn.microsoft.com/en-us/azure/databricks/getting-started/dataframes-python

@knguyencookie

star

Wed Nov 29 2023 16:32:25 GMT+0000 (Coordinated Universal Time) https://www.geeksforgeeks.org/how-to-send-email-using-mailgun-api-in-node-js/

@mindplumber #mailgun #javascript #nodejs

star

Wed Nov 29 2023 16:20:15 GMT+0000 (Coordinated Universal Time)

@AlexP #shop #alpinejs

star

Wed Nov 29 2023 16:09:55 GMT+0000 (Coordinated Universal Time)

@AlexP #shop #alpinejs

star

Wed Nov 29 2023 15:30:22 GMT+0000 (Coordinated Universal Time) https://dev.to/amr2018/a-simple-python-script-to-check-for-broken-links-1b35

@freepythoncode ##python #coding

star

Wed Nov 29 2023 15:29:23 GMT+0000 (Coordinated Universal Time) https://dev.to/amr2018/how-to-create-a-progress-bar-for-downloading-files-in-python-2a8b

@freepythoncode ##python #coding #progressbar

star

Wed Nov 29 2023 15:22:55 GMT+0000 (Coordinated Universal Time)

@yolobotoffender

star

Wed Nov 29 2023 15:01:49 GMT+0000 (Coordinated Universal Time)

@AlexP #shop #alpinejs

star

Wed Nov 29 2023 14:29:51 GMT+0000 (Coordinated Universal Time)

@maxwlrt

Save snippets that work with our extensions

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