vue-axios

Kod za čitanje json-a pomoću axios i vue.js, ovdje treba paziti da na server strani bude omogućeno Access-Control-Allow-Origin pošto se get odvija na client strani


<!DOCTYPE html>
<html>

<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>

<body>

    <h2>Axios</h2>

    <div id="app">
        <div>{{status}}</div>
        <hr>
        <div></div>
        <table>
            <tr v-for="x in j">
                <td>{{ x.Name }}</td>
                <td>{{ x.Country }}</td>
            </tr>
        </table>
    </div>

    <script>
        myObject = new Vue({
            el: '#app',
            data: {
                status: '',
                j: null
            },
            created: function () {
                this.loaddata()
            },
            computed: {

            },
            methods: {
                loaddata() {
                    this.status = "loading...";

                    axios.get('https://ron-swanson-quotes.herokuapp.com/v2/quotes')
                        .then(response => {
                            this.status = response.data[0]
                        })
                        .catch(error => {
                            console.log(error);
                        })

                    //table data
                    //https://www.w3schools.com/angular/customers.php
                    axios.get('https://www.w3schools.com/angular/customers.php')
                        .then(response => {
                            this.j = response.data.records;
                        })
                        .catch(error => {
                            console.log(error);
                        })

                }

            }
        });
    </script>

</body>

</html>

fractal tree

The drawTree function is called recursively to draw smaller branches, which in turn spawn even smaller branches, creating the fractal pattern.

Formatiranje broja

Formatiranje ispisa broja u javascript-u za različite kulture

Rust

Rust je programski jezik koji pruža brojne prednosti za programere koji žele pisati siguran i performantan softver.

Izrada web stranice

kako napraviti web stranicu, ovo je korak-po-korak proces

Kvantno računalstvo

Za razliku od klasičnih računala, koja koriste binarne znamenke (bitove) za predstavljanje informacija, kvantna računala koriste kvantne bitove ili qubitove

GraphQL

GraphQL je jezik upita za API-je koji je nastao kao alternativa tradicionalnim REST API-jima.