This file contains hidden or 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 Stack(){ | |
this.dataStore = []; | |
this.top =0; | |
this.push = push; | |
this.pop = pop; | |
this.peek = peek; | |
this.length = length; | |
this.clear = clear; | |
} |
This file contains hidden or 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 Queue(){ | |
this.dataStore = []; | |
this.enqueue = enqueue; | |
this.dequeue = dequeue; | |
this.front = front; | |
this.back = back; | |
this.toString = toString; | |
this.empty = empty; | |
} |
This file contains hidden or 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
// Constructor function that sets the values of two properties. | |
function Node(element){ | |
this.element = element; | |
this.next=null; | |
} | |
// Defination for the LList constructor function | |
function LList(){ | |
this.head = new Node("head"); | |
this.find = find; |
This file contains hidden or 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
define(['app'], function (app) { | |
app.service('authInterceptorService', function ($q, $location, $localStorage) { | |
var authInterceptorServiceFactory = {}; | |
var _request = function (config) { | |
config.headers = config.headers || {}; | |
var authData = $localStorage.authorizationData; | |
if (authData) { | |
config.headers.Authorization = 'Bearer ' + authData.token; | |
} | |
return config; |
This file contains hidden or 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 xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title></title> | |
<style> | |
table tr td{ | |
padding:10px; | |
border:1px solid #808080; | |
} | |
</style> |
This file contains hidden or 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
{{k2}} |
This file contains hidden or 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
define(['app'], function (app) { | |
app.controller("homeCtrl", function ($scope, $localStorage) { | |
$scope.k2 = "i am home"; | |
}); | |
}) |
This file contains hidden or 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
<input type="text" placeholder="Username" data-ng-model="loginData.userName" required autofocus> | |
<input type="password" placeholder="Password" data-ng-model="loginData.password" required> | |
<button type="button" data-ng-click="login()">Login</button> |
This file contains hidden or 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
define(['app'], function (app) { | |
app.controller("loginCtrl", function ($scope, $http, $localStorage, $state, cnst) { | |
$scope.loginData = { | |
userName: "", | |
password: "" | |
} | |
$scope.message = ""; | |
$scope.login = function () { | |
delete $localStorage.authorizationData; | |
var data = "grant_type=password&username=" + $scope.loginData.userName + "&password=" + $scope.loginData.password; |
This file contains hidden or 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
{{orders}} |