Categories
JavaScript Телерик

Сертификат JavaScript Developer 2016

Certificate JavaScript Developer Track
Certificate JavaScript Developer Track
Categories
JavaScript Без категория Телерик

Мултиплатформени мобилни приложения с NativeScript

Резултат от курса по Мултиплатформени мобилни приложения с NativeScript:

  • Взет с отличие!
  • Точки: 100
  • Място: 1
  • Февруари – 2016
Categories
JavaScript Телерик

End-to-end JavaScript Applications (Node.js)

Ето го и резултатът от изпита по End-to-end JavaScript Applications (Node.js):

Взет с отличие!
Изпит: 76 от 100
Точки: 55.78
Място: 70
Categories
JavaScript Телерик

Single Page приложения с JavaScript

Ето го и резултатът от изпита по Single Page приложения с JavaScript:

Взет с отличие!
Изпит: 80 от 100
Точки: 71.75
Място: 30

Categories
Телерик

C# програмиране – част II 2015

Вече и втората част е взета с отличие!

270 от 500
Взет с отличие!
Точки: 47.39
Място: 326

Categories
JavaScript Телерик

Rams and Sheeps – JavaScript Game

Source

Demo

Categories
JavaScript Телерик

JS OOP изпит – сутрешна група

Решение на задачата на сутрешната група на изпита по JavaScript OOP

// item.js
define(function() {
    'use strict';
    var Item;

    Item = (function() {
        var types = ['accessory', 'smart-phone', 'notebook', 'pc', 'tablet'];

        function Item(type, name, price) {
            if (types.indexOf(type) == -1) {
                throw "invalid item type";
            };

            if (name.length < 6 || name.length > 40) {
                throw "invalid item name";
            };

            if (price < 0.0) {
                throw "invalid item price";
            };
            this.type = type;
            this.name = name;
            this.price = price;
        }
        return Item;
    })();
    return Item;
});

// store.js 

define(function() {
    'use strict';
    var Store;
    Store = (function() {
        function Store(storeName) {
            if (storeName.length < 6 || storeName.length > 40) {
                throw "invalid store name";
            }

            this._name = storeName;
            this._items = [];
        };

        Store.prototype.addItem = function(item) {
            if (item.constructor.name !== "Item") {
                throw "invalid item type";
            }

            this._items.push(item);

            return this;
        };

        Store.prototype.getAll = function() {
            var sortedItems = compareBy(this._items, "name");

            return sortedItems;
        };

        Store.prototype.getSmartPhones = function() {
            var items = [];

            this._items.forEach(function(item) {
                if (item.type === 'smart-phone') {
                    items.push(item);
                }
            });

            var sortedItems = compareBy(items, "name");

            return sortedItems;
        };

        Store.prototype.getMobiles = function() {
            var items = [];

            this._items.forEach(function(item) {
                if (item.type === 'smart-phone' || item.type === 'tablet') {
                    items.push(item);
                }
            });

            var sortedItems = compareBy(items, "name");

            return sortedItems;
        };

        Store.prototype.getComputers = function() {
            var items = [];

            this._items.forEach(function(item) {
                if (item.type === 'pc' || item.type === 'notebook') {
                    items.push(item);
                }
            });

            var sortedItems = compareBy(items, "name");

            return sortedItems;
        };

        Store.prototype.filterItemsByType = function(type) {
            var items = [];

            this._items.forEach(function(item) {
                if (item.type === type) {
                    items.push(item);
                }
            });

            var sortedItems = compareBy(items, "name");

            return sortedItems;
        };

        Store.prototype.filterItemsByPrice = function(options) {
            var minPrice = 0;
            var maxPrice = 999999999.99;
            var items = [];

            if (options) {
                minPrice = options.min || minPrice;
                maxPrice = options.max || maxPrice;
            }

            this._items.forEach(function(item) {
                if (item.price >= minPrice && item.price <= maxPrice) {
                    items.push(item);
                }
            });
            var sortedItems = compareBy(items, "price");
            return sortedItems;
        };
        Store.prototype.countItemsByType = function() {
            var itemTypes = [];
            for (var i = 0; i < this._items.length; i++) {
                if (itemTypes[this._items[i].type]) {
                    itemTypes[this._items[i].type]++;
                } else {
                    itemTypes[this._items[i].type] = 1;
                }
            }
            return itemTypes;
        };
        Store.prototype.filterItemsByName = function(part) {
            var items = [];
            this._items.forEach(function(item) {
                if (item.name.toLowerCase().indexOf(part.toLowerCase()) >= 0) {
                    items.push(item);
                }
            });

            var sortedItems = compareBy(items, "name");

            return sortedItems;
        };

        function compareBy(data, field) {
            data.sort(function(a, b) {
                if (a[field] < b[field]) return -1;
                if (a[field] > b[field])
                    return 1;
                return 0;
            });

            return data;
        };

        return Store;
    })();

    return Store;
});
Categories
JavaScript Телерик

JavaScript UI и DOM – класиране

Изпит: JavaScript UI и DOM

Точки на изпит: 180 от 200

Резултат:

Взет с отличие!
Точки: 53.00
Място: 293

Categories
JavaScript Телерик

Изпит – JavaScript UI и DOM – Handlebars.js

Решението на най-лесната задача от изпита по JavaScript UI и DOM.

Handlesbars.js

    <script id="authors-template" type='text/x-handlebars-template'>
        {{#authors}}
        <div class="box {{#if right}}right{{/if}}">
            <div class="inner">
                <p><img alt="{{name}}" src="{{image}}" width="100" height="133"></p>
                <div>
                    <h3>{{name}}</h3>

                    {{#each titles}}
                        <p>{{{this}}}</p>
                    {{/each}}

                    <ul>
                    {{#each urls}}
                        <li><a href="{{this}}" target="_blank">{{this}}</a></li>
                    {{/each}}
                    </ul>
                </div>
            </div>
        </div>
        {{/authors}}
    </script>
Categories
JavaScript Телерик

JavaScript основи – класиране

Лошото класиране след изпита по JavaScript основи не се дължи само на липсата на проверени домашни работи, но а и на подготовката преди самия изпит! От решени 4 задачи предните два дни – толкова! 🙂

  • Взет с отличие!
  • Точки: 63.41
  • Място: 190