Git Product home page Git Product logo

kubikaugustyn.github.io's Introduction



hey there 👋

👨‍💻 About Me:

I'm Jakub Augustýn, a software developer from the Czech Republic.

  • 🔭 I'm into web development, web security, hardware hacking.
  • 🌱 Learning at high school.
  • 📫How to reach me: Discord E-Mail

🛠️ Languages and Tools:

Python  React  Material UI  Redux   CSS  HTML  JavaScript  Firebase  Vue.js  NodeJS    Java  C++  Google Chrome 
...and more

IDEs I use:

🔥 My Stats :

GitHub Streak

Top Langs

kubikaugustyn.github.io's People

Contributors

kubikaugustyn avatar raugustyn avatar

Watchers

 avatar

kubikaugustyn.github.io's Issues

Test

Dlouhý JavaScript:

//prvni menu
var menu1 = new CSkryvaneMenu("Menu1", 100)

menu1.NovaPolozka (
    "Knihy",
    "location.href='http://www.vltava.cz'",
    "Velký výběr knih");

menu1.NovaPolozka (
    "Články",
    "location.href='http://programovanie.pc.sk'",
    "články o programování");

menu1.Cara(); //--------------------------------

menu1.NovaPolozka (
    "1",
    "location.href='http://www.javafile.com'",
    "Velký výběr skriptů");

menu1.x=100;

//menu1.y=100;

//druhe menu

var  loutky = new CSkryvaneMenu("Loutky", 150);

Loutky.NovaPolozka (
    "Spejbl",
    "SluzbaSpejbl()",
    "Info Spejbl");

Loutka.NovaPolozka (
    "Hurvínek",
    "alert('Služba Hurvínek')",
    "Info Hurvínek");

loutky.Cara(); //-----------------------------

Loutky.NovaPolozka (
    "Hamo",
    "alert('Služba Hamo')",
    "Info Hamo");

loutky.classMenu = "menu2";

loutky.classPolozka = "polozka2";

loutky.classApolozka = "Apolozka2";

//priklad funkce volame z menu

function SluzbaSpejbl() {
    alert("Hlasi se sluzba Spejbl");
}

function CPolozkaMenu(Text, Sluzba, Info) {
    //konstruktor
    this.Text = Text;
    this.Sluzba = Sluzba;
    this.Info = Info;
}

function CSkryvaneMenu(Meno, Sirka) {
    //argumenty
    this.Meno = Meno;
    this.Sirka = Sirka;
    //nastavitelné vlastnosti
    //souřadnice .. pokud nesjsou defin. myš
    this.x = null;
    this.y = null;
    //třídy prvků menu
    this.classMenu = "Menu";
    this.classPolozka = "Polozka";
    this.classApolozka = "Apolozka";

    this.Polozky = new  Array();

    this.divMenu = null;
    this.divX = null;

    this.NovaPolozka = NovaPolozka;
    this.Cara = Cara;
    this.Zobraz = Zobraz;
    this.Skryj = Skryj;
    this.DejPolozku = DejPolozku;
    this.Nad = Nad;
    this.Mimo = Mimo;
    this.Klepnuti = Klepnuti;

    //definice metod
    function NovaPolozka(Text, Sluzba, Info) {
        this.Polozky.push(new CPolozkaMenu(Text, Sluzba, Info));
    }

    function Cara() {
        this.Polozky.push(null)
    }

    function Zobraz(x, y) {
        var Menu = document.createElement('div');
        var Atr = document.createAttribute("class");
        Atr.value = this.classMenu;
        Menu.setAttributeNode(Atr);
        var sTxt = "";
        sTxt+= '<div id="' + this.Meno + '_X" ';
        sTxt+= 'onclick="' + this.Meno + '.Klepnuti();';
        sTxt+= 'onmouseover="' + this.Meno + '.Nad()'
    }
}

Cykly v JavaScriptu

Cykly v JavaScriptu slouží k opakování něčeho. Například když chci na stránku umístit dvacet divů, můžu využít cyklus.

function addDivs(parentId, count) {
   var divsHTML = ""
   for (var col=0; col<count; col++) {
         divsHTML += "<div>" + col + "</div>"
   }
   document.getElementById(parentId).innerHTML = divsHTML 
}

@kubikaugustyn oky???

<!DOCTYPE html>
<html>
<head>
<script>
function addDivs(parentId, count) {
   var divsHTML = document.getElementById(parentId).innerHTML
   for (var col=0; col<count; col++) {
          divsHTML += "<div>Sloupec:" + col + "</div>"
   }
   document.getElementById(parentId).innerHTML = divsHTML 
}
</script>
</head>
<body>
The content of the body element is displayed in your browser.
<p id="divs"></p>
<button onClick="addDivs('divs', 6)">Add Divs</button>
</body>

</html>

Načtení dat json z url

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
function a() {
   return fetch('http://localhost:3000/Data/Linka958_Mercator.geojson')
   .then((response) => response.json())
   .then((responseGeojson) => {
       console.log(responseGeojson)
     return [responseGeojson.type];
   })
   .catch((error) => {
     console.error("My error:", error);
   });
}
</script>

<button onclick="a()">ahoj</button>
</body>
</html>

Python kontrola cisla

def isNumber(v):
    """

    :param v:
    :return:

    >>> isNumber(3.5)
    True

    >>> isNumber(365)
    True

    >>> isNumber("Ahoj")
    False

    """
    return isinstance(v, (int, float))

Kopie textu do clipboardu

viz demo

function copyToClip(str) {
  function listener(e) {
    e.clipboardData.setData("text/html", str);
    e.clipboardData.setData("text/plain", str);
    e.preventDefault();
  }
  document.addEventListener("copy", listener);
  document.execCommand("copy");
  document.removeEventListener("copy", listener);
};

Download data to file

function downloadData (serverURL, fileName) {
    fetch(serverURL)
        .then(response => {
            response.blob().then(blob => {
                let url = window.URL.createObjectURL(blob);
                let a = document.createElement('a');
                a.href = url;
                a.download = fileName;
                a.click();
            });
    });
}

Testy

Zkouška

HTML:

<!DOCTYPE html>
<html>
<body>
Toto jsou moje youtube videa:<br><br>
Závody Sušice 2019:
<iframe width="420" height="345" src="https://www.youtube.com/embed/5TkdSp2V_04">
</iframe>
<br><br>
Reproduktor:
<iframe width="420" height="345" src="https://www.youtube.com/embed/KldsWj3w2r8">
</iframe>
<br><br>
Jak otevřít trezor z Lega:
<iframe width="420" height="345" src="https://www.youtube.com/embed/ZoZ5LUe5s4Q">
</iframe>
</body>
</html>

JavaScript:

var a = 5
var b = 7
var c = a + b
console.log(c)

CSS:

body {
    background-color: blue;
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.