This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"meta": { | |
"limit": 10, | |
"next": null, | |
"offset": 0, | |
"previous": null, | |
"total_count": 1 | |
}, | |
"drivers": [ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var dataController = (function () { | |
var data = { | |
movies: [], | |
totalMoviesLength: 0 | |
}; | |
// Movie constructor | |
function Movie(title, length, genre) { | |
this.title = title; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Movie list</title> | |
<link rel="stylesheet" href="./css/main.css"> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
/** | |
* Represents person | |
* @constructor | |
* @param {string} name - First name | |
* @param {string} surname - Last name | |
*/ | |
function Person(name, surname) { | |
this.name = name; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Movie(title, length, genre) { | |
this.title = title; | |
this.length = length; | |
this.genre = genre; | |
} | |
Movie.prototype.getInfo = function () { | |
return this.title + ", " + this.genre; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
/** | |
* Represent movie genre | |
* @constructor | |
* @param {string} genreName - The genre name | |
*/ | |
function Genre(genreName) { | |
// properties | |
this.name = genreName; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var school = { | |
name: "BIT", | |
address: "Nemanjina 4", | |
city: "Belgrade", | |
isOpen: true, | |
teachers: ["Marko", "Nenad", "Stanko"], | |
students: ["Pera", "Mika", "Zika"] | |
} | |
var speaker = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// In our example, the first function, multiplyByTwo(), | |
// accepts three parameters, loops through them, | |
// multiplies them by two, and returns an array | |
// containing the result. | |
function multiplyByTwo(a, b, c) { | |
var outputArray = []; | |
for (var i = 0; i < arguments.length; i++) { | |
var currentElement = arguments[i]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.* | |
fun main(args: Array<String>) { | |
println("Say hello to Kotlin".withUnderscore()) | |
// ----- VARIABLES ----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'com.android.application' | |
apply plugin: 'kotlin-android' | |
apply plugin: 'kotlin-android-extensions' | |
apply plugin: 'kotlin-kapt' | |
def BOOLEAN = "boolean" | |
def STRING = "String" | |
def TRUE = "true" | |
def FALSE = "false" | |
def LOG_HTTP_REQUESTS = "LOG_HTTP_REQUESTS" |