Skip to content

Instantly share code, notes, and snippets.

View vlazar-'s full-sized avatar

Viktor Lazar vlazar-

View GitHub Profile
@vlazar-
vlazar- / newton.pde
Last active June 27, 2022 17:23
ITEO IOT 1
int nX = 0;
int nY = 0;
float aY = 0;
int aX = 15;
float aV = 0;
float aA = 0.05;
int p = 0;
boolean pCount = true;
long t = 0;
@vlazar-
vlazar- / kalkulator.html
Last active January 10, 2023 19:38
Js vjezbe 1
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Kalkulator</title>
</head>
<body>
<input id="display" type="text"></input>
@vlazar-
vlazar- / bmp180.cpp
Created January 16, 2023 19:03
BMP180 Funkcije
double ocitajTlak() {
char status;
/*
* definiramo varijable:
* temp - temperatura zraka
* Tlak - tlak zraka
* tlak0 - tlak na povrsini mora
* nadVisina - nadmorska visina
*/
double temp, Tlak, tlak0, nadVisina;
@vlazar-
vlazar- / rjesenje1.html
Created January 24, 2023 11:48
JavaScript - prijestupna godina
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Prijestupna Godina</title>
</head>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Fizz Buzz</title>
</head>
<body>
<p id="rjesenje"></p>
@vlazar-
vlazar- / js-sladoled.html
Created January 24, 2023 16:14
Slucajni element iz polja
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sladoled</title>
</head>
@vlazar-
vlazar- / simon.js
Last active February 7, 2023 19:49
let boje = ["red", "blue", "green", "yellow"];
let uzorakIgre = [];
let uzorakIgrac = [];
let igraAktivna = false;
let nivo = 0;
$(document).keypress(function(){
if(!igraAktivna){ //isto kao igraAktivna == false
@vlazar-
vlazar- / bootstrap-5-primjer.html
Created February 19, 2023 20:24
Bootstrap 5 primjer
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap demo</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
</head>
<body>
<header>
@vlazar-
vlazar- / helpers.txt
Created May 8, 2024 16:18
MicroStudio Game Helpers
// takes an angle in degrees and returns a vector in the form of a list [x, y]
// the elements [x, y] of this direction vector can then be multiplied by a
// certain speed (in pixels per frame) to move an entity on the screen
angleToVector = function(angle)
return [cosd(angle), sind(angle)]
end
// discover the name of the sprite portion at an (x, y) position in the world
// NOTE: the draw width/height is not the width of the map, but how width/high