text:
angular.module("app", ["ngX","ngX.components"]).config(["$routeProvider", "apiEndpointProvider", function ($routeProvider, apiEndpointProvider) {
    $routeProvider.buildFromUrl({ url: "routes.json" });
    apiEndpointProvider.configure("http://localhost:54471/api");
}]).run(["$rootScope", function ($rootScope) {
    $rootScope.title = "Angular Frontend Video On Demand";
}]);
(function () {

    "use strict";

    function accountActions(apiEndpoint, fetch) {

        var self = this;

        self.register = function (options) {
            fetch.fromService({ method: "POST", url: self.baseUri + "/register", data: options.data });
        };

        self.setCurrentProfile = function (options) {
            fetch.fromService({ method: "PUT", url: self.baseUri + "/setCurrentProfile", data: options.data });
        };

        self.setDefaultProfile = function (options) {
            fetch.fromService({ method: "PUT", url: self.baseUri + "/setDefaultProfile", data: options.data });
        };

        self.baseUri = apiEndpoint.getBaseUrl("account");

        return self;
    }

    angular.module("app").service("accountActions", ["$q", "apiEndpoint", "fetch", "fire", accountActions]);

})();
angular.module("app").value("VIDEO_ACTIONS", {
    UPDATE_VIDEO_STORE_FEATURED_VIDEOS: "UPDATE_VIDEO_STORE_FEATURED_VIDEOS"
});

angular.module("app").value("PLAYLIST_ACTIONS", {

});

angular.module("app").value("ACCOUNT_ACTIONS", {

});

angular.module("app").value("COLLECTION_ACTIONS", {

});

angular.module("app").value("PROFILE_ACTIONS", {

});

angular.module("app").value("WATCH_HISTORY_ACTIONS", {

});
(function () {

    "use strict";

    function collectionActions(apiEndpoint, fetch) {

        var self = this;

        self.getAll = function (options) {
            fetch.fromService({
                method: "GET", url: self.baseUri + "/getAll",
                params: { accountId: options.accountId }
            });
        };

        self.getById = function (options) {
            fetch.fromService({
                method: "GET", url: self.baseUri + "/getById",
                params: { id: options.id }
            });
        };

        self.baseUri = apiEndpoint.getBaseUrl("collection");

        return self;
    }

    angular.module("app").service("collectionActions", ["$q", "apiEndpoint", "fetch", collectionActions]);

})();
(function () {

    "use strict";

    function conferenceActions(apiEndpoint, fetch) {

        var self = this;

        self.getAll = function (options) {
            fetch.fromService({
                method: "GET", url: self.baseUri + "/getAll"
            });
        };

        self.baseUri = apiEndpoint.getBaseUrl("conference");

        return self;
    }

    angular.module("app").service("conferenceActions", ["apiEndpoint", "fetch", conferenceActions]);

})();
(function () {

    "use strict";

    function playlistActions(apiEndpoint, fetch, PLAYLIST_ACTIONS) {

        var self = this;

        self.getPlaylist = function (options) {
            fetch.fromService({ method: "GET", url: self.baseUri + "/getPlaylist", params: { profileId: options.profileId } });
        };

        self.addToPlaylist = function (options) {
            fetch.fromService({
                method: "POST", url: self.baseUri + "/addToPlaylist",
                data: { playlistId: options.profileId, videoId: options.videoId }
            });
        };

        self.removeFromPlaylist = function (options) {
            fetch.fromService({
                method: "POST", url: self.baseUri + "/removeFromPlaylist",
                data: { playlistId: options.profileId, videoId: options.videoId }
            });
        };

        self.baseUri = apiEndpoint.getBaseUrl("playlist");

        return self;
    }

    angular.module("app").service("playlistActions", ["apiEndpoint", "fetch","PLAYLIST_ACTIONS", playlistActions]);

})();
(function () {

    "use strict";

    function profileActions(apiEndpoint, fetch) {

        var self = this;

        self.getAll = function (options) {
            fetch.fromService({
                method: "GET", url: self.baseUri + "/getAll",
                params: { accountId: options.accountId }
            });
        };

        self.baseUri = apiEndpoint.getBaseUrl("profile");

        return self;
    }

    angular.module("app").service("profileActions", ["apiEndpoint", "Actions", profileActions]);

})();
(function () {

    function securityActions(apiEndpoint, fetch, formEncode, guid) {
        var self = this;
        self.tryToLogin = function (options) {
            angular.extend(options.data, { grant_type: "password" });
            var formEncodedData = formEncode(options.data);
            var headers = { "Content-Type": "application/x-www-form-urlencoded" };
            fetch.fromService({ method: "POST", url:  self.baseUri + "/token", data: formEncodedData, headers: headers });
        };
        self.baseUri = apiEndpoint.getBaseUrl("security") + "/security";
        return self;
    }

    angular.module("app")
        .service("securityActions", ["apiEndpoint", "fetch", "formEncode", "guid", securityActions]);

})();
(function () {

    "use strict";

    function videoActions(apiEndpoint, fetch, fire, guid, VIDEO_ACTIONS) {
        var self = this;
        self.getFeatured = function (options) {
            var newGuid = guid();
            var url = self.baseUri + "/getFeatured";
            fetch.fromService({ method: "GET", url: url, guid: newGuid });
            document.addEventListener("FETCH_SUCCESS", onSuccess);
            function onSuccess(results) {
                document.removeEventListener("FETCH_SUCCESS", onSuccess);
                if (results.options.guid === newGuid) {
                    fire(document, VIDEO_ACTIONS.UPDATE_VIDEO_STORE_FEATURED_VIDEOS, { data: results.results.data, guid: newGuid });
                }
            }
            return newGuid;
        };
        self.baseUri = apiEndpoint.getBaseUrl("video") + "/video";
        return self;
    }

    angular.module("app").service("videoActions", ["apiEndpoint", "fetch", "fire","guid", "VIDEO_ACTIONS", videoActions]);

})();
(function () {

    "use strict";

    function watchHistoryActions(apiEndpoint, fetch) {

        var self = this;

        self.get = function (options) {
            fetch.fromService({ method: "GET", url: self.baseUri + "/get" });
        };

        self.baseUri = apiEndpoint.getBaseUrl("watchHistory");

        return self;
    }

    angular.module("app").service("watchHistoryActions", ["apiEndpoint", "fetch", watchHistoryActions]);

})();
(function () {

    "use strict";

    function accountManagementComponent() {
        var self = this;

        return self;
    }

    accountManagementComponent.canActivate = function () {
        return ["$q", function ($q) {

        }];
    }

    ngX.Component({
        component: accountManagementComponent,
        template: ["
", "
"].join(" ")
    });

})();
(function () {

    "use strict";

    function AppComponent() {

    }

    ngX.Component({
        selector: "app",
        component: AppComponent,
        template: [
            "
",
            "<app-header></app-header>",
            "

",
            "
"
        ].join(" ")
    });

})();

(function () {

    "use strict";

    function cardComponent() {

        var self = this;

        self.onAdd = function(options) {
            if (self.model && self.model.onAdd)
                self.model.onAdd();
        }

        self.onRemove = function (options) {
            if (self.model && self.model.onRemove)
                self.model.onRemove(options);
        }

        self.onStoreUpdate = function (options) {
            if (self.model && self.model.onStoreUpdate)
                self.model.onAdd(options);
        }

        return self;
    }

    ngX.Component({
        selector: "card",
        component: cardComponent,
        inputs:["model"],
        styles: [
            " .cardComponent { }"
        ].join(" \n "),
        template: [

        ].join(" ")
    });

})();

(function () {

    "use strict";

    function collectionComponent() {

    }

    collectionComponent.canActivate = function () {
        return ["$q", function ($q) {

        }];
    }

    ngX.Component({
        component: collectionComponent,
        template: ["
", "
"].join(" ")
    });

})();
(function () {

    "use strict";

    function collectionsComponent() {

    }

    collectionsComponent.canActivate = function () {
        return ["$q", function ($q) {

        }];
    }

    ngX.Component({
        component: collectionsComponent,
        template: ["
", "
"].join(" ")
    });

})();
(function () {

    "use strict";

    function conferenceComponent() {

    }

    conferenceComponent.canActivate = function () {
        return ["$q", function ($q) {

        }];
    }

    ngX.Component({
        component: conferenceComponent,
        template: ["
", "
"].join(" ")
    });

})();
(function () {

    "use strict";

    function HeaderComponent($rootScope, securityStore) {

        var self = this;

        self.isLoggedIn = function () {
            return (securityStore.token !== null);
        }

        self.onStoreUpdate = function () {

        }

        return self;
    }

    ngX.Component({
        selector: "app-header",
        component: HeaderComponent,
        providers: ["$rootScope","securityStore"],
        styles: [
            ".app-header { width:100%; } ",
            ".app-header a { text-decoration:none; } ",
            ".app-header { padding-top:10px; padding-left:20px; padding-right:20px; height:100px; } ",
            ".app-header h1 { font-size: 2em } ",
            ".app-header .title { position:relative; float: left; width: 500px; } ",
            ".app-header .links { position:relative; float: right; width: 400px; } ",
        ].join(" \n "),
        template: [
            "
",
            "
",
            "
Angular Frontend VOD
",
            "
",

            "
",
            "Sign In",
            "Register",
            "
",

            "
",
            "Logout",
            "
",

            "

",
            "
"
        ].join(" ")
    });

})();

(function () {

    "use strict";

    function HomeComponent(videoStore) {
        var self = this;

        self.featuredVideos = videoStore.featuredVideos;

        return self;
    }

    HomeComponent.canActivate = function () {
        return ["$q", "videoActions", "securityStore", function ($q, videoActions, securityStore) {
            var deferred = $q.defer();
            var guid = videoActions.getFeatured();
            document.addEventListener("STORE_UPDATE", resolve);
            function resolve() {
                document.removeEventListener("STORE_UPDATE", resolve);
                if (event.guid === guid)
                    deferred.resolve(true);
            }
            return deferred.promise;
        }];
    }

    ngX.Component({
        component: HomeComponent,
        route: "/",
        providers:["videoStore"],
        template: [
            "
",
            "
{{ vm.featuredVideos }}
",
            "
"
        ].join(" ")
    });

})();

(function () {

    "use strict";

    function LoginFormComponent($location,  securityActions) {
        var self = this;
        self.username = "";
        self.password = "";
        self.tryToLogin = function () {
            securityActions.tryToLogin({
                data: {
                    username: self.username,
                    password: self.password
                }
            });
        }

        return self;
    }

    ngX.Component({
        selector: "login-form",
        component: LoginFormComponent,
        providers: ["$location", "securityActions"],
        styles: [" .login-form div {  padding-bottom: 15px; } "].join(" /n "),
        template: [
            "<form class='login-form'> ",
            "
 ",
            "        <input type='text' placeholder='Username' data-ng-model='vm.username' /> ",
            "
 ",
            "
 ",
            "        <input type='password' placeholder='Password' data-ng-model='vm.password' /> ",
            "
 ",
            "
 ",
            "        <button data-ng-click='vm.tryToLogin()' >Login</button> ",
            "
 ",
            "</form> "
        ].join(" ")
    });

})();

(function () {

    "use strict";

    function loginComponent(loginRedirect) {
        var self = this;

        self.onStoreUpdate = function (options) {
            loginRedirect.redirectPreLogin();
        }

        return self;
    }

    ngX.Component({
        component: loginComponent,
        providers: ["loginRedirect"],
        template: ["
",
            "<login-form></login-form>",
            "
"
        ].join(" ")
    });

})();

(function () {

    "use strict";

    function personalizeComponent() {

    }

    personalizeComponent.canActivate = function () {
        return ["$q", function ($q) {

        }];
    }

    ngX.Component({
        component: personalizeComponent,
        template: ["
", "
"].join(" ")
    });

})();

(function () {

    "use strict";

    function playlistComponent() {

        var self = this;

        self.onInit = function () {
            return ["$q", function ($q) {

            }];
        }

        return self;

    }

    playlistComponent.canActivate = function () {
        return ["$q", function ($q) {

        }];
    }

    ngX.Component({
        component: playlistComponent,
        template: ["
", "
"].join(" ")
    });

})();
(function () {

    "use strict";

    function profileComponent() {

    }

    profileComponent.canActivate = function () {
        return ["$q", function ($q) {

        }];
    }

    ngX.Component({
        component: profileComponent,
        template: ["
", "
"].join(" ")
    });

})();

(function () {

    "use strict";

    function profilesManagementComponent() {

    }

    profilesManagementComponent.canActivate = function () {
        return ["$q", function ($q) {

        }];
    }
    ngX.Component({
        component: profilesManagementComponent,
        template: ["
", "
"].join(" ")
    });

})();

(function () {

    "use strict";

    function registrationFormComponent($location, account) {
        var self = this;

        self.username = "";

        self.firstName = "";

        self.lastName = "";

        self.password = "";

        self.tryToRegister = function () {
            securityStore.token = true;
            $location.path("/");
        }
        return self;
    }

    registrationFormComponent.canActivate = function () {
        return ["$q", function ($q) {

        }];
    }

    ngX.Component({
        selector: "registration-form",
        component: registrationFormComponent,
        providers: ["account"],
        styles: [" .registration-form div {  padding-bottom: 15px; } "].join(" /n "),
        template: [
            "<form class='login-form'> ",
            "
 ",
            "        <input type='text' placeholder='Username' data-ng-model='vm.username' /> ",
            "
 ",
            "
 ",
            "        <input type='text' placeholder='Firstname' data-ng-model='vm.username' /> ",
            "
 ",
            "
 ",
            "        <input type='text' placeholder='Lastname' data-ng-model='vm.lastname' /> ",
            "
 ",
            "
 ",
            "        <input type='password' placeholder='Password' data-ng-model='vm.password' /> ",
            "
 ",
            "
 ",
            "        <input type='password' placeholder='Repeat Password' data-ng-model='vm.password' /> ",
            "
 ",
            "
 ",
            "        <button data-ng-click='vm.tryToRegister()' >Register</button> ",
            "
 ",
            "</form> "
        ].join(" ")
    });

})();

(function () {

    "use strict";

    function registrationComponent() {

    }

    ngX.Component({
        component: registrationComponent,
        template: ["
",
            "<registration-form></registration-form>",
            "
"].join(" ")
    });

})();

(function () {

    "use strict";

    function searchComponent() {

    }

    searchComponent.canActivate = function () {
        return ["$q", function ($q) {

        }];
    }

    ngX.Component({
        component: searchComponent,
        template: ["
", "
"].join(" ")
    });

})();

(function () {

    "use strict";

    function slideComponent() {

        var self = this;

        self.onAdd = function (options) {
            if (self.model && self.model.onAdd)
                self.model.onAdd();
        }

        self.onRemove = function (options) {
            if (self.model && self.model.onRemove)
                self.model.onRemove();
        }

        self.onStoreUpdate = function (options) {
            if (self.model && self.model.onStoreUpdate)
                self.model.onAdd();
        }

        return self;
    }

    ngX.Component({
        selector: "slide",
        component: slideComponent,
        inputs: ["model"],
        styles: [
            " .slideComponent { }"
        ].join(" \n "),
        template: [

        ].join(" ")
    });

})();

(function () {

    "use strict";

    function videoPlayerComponent() {

    }

    ngX.Component({
        component: videoPlayerComponent,
        template: ["
", "
"].join(" ")
    });

})();

(function () {

    "use strict";

    function videoComponent() {

    }

    videoComponent.canActivate = function () {
        return ["$q", function ($q) {

        }];
    }

    ngX.Component({
        component: videoComponent,
        template: ["
", "
"].join(" ")
    });

})();

(function () {

    "use strict";

    function watchHistoryComponent() {

    }

    watchHistoryComponent.canActivate = function () {
        return ["$q", function ($q) {

        }];
    }

    ngX.Component({
        component: watchHistoryComponent,
        template: ["
", "
"].join(" ")
    });

})();

(function () {

    "use strict";

    function account($injector, $q, accountActions, fire) {

        var self = this;

        var profile = $injector.get("profile");

        self.createInstanceAsync = function (options) {
            var deferred = $q.defer();
            var instance = new account($q, accountActions, profile);

            if (options.data) {
                var promises = [];
                instance.firstname = options.data.firstname;
                instance.lastname = options.data.lastname;
                instance.username = options.data.username;
                for (var i = 0; i < options.data.profiles.length; i++) {
                    promises.push(profile.createInstanceAsync({ data: options.data.profiles[i] }));
                }
                $q.all(promises).then(function (profiles) {
                    instance.profiles;
                    deferred.resolve(instance);
                });
            } else {
                deferred.resolve(instance);
            }
            return deferred.promise;
        };

        self.register = function (options) {
            self.fire = fire;
            accountActions.register(options).then(function () {
                self.fire("modelUpdate", { model: self });
            });
        };

        self.setDefaultProfile = function (options) {
            self.fire = fire;
            accountActions.setDefaultProfile(options).then(function () {
                self.fire("modelUpdate", {
                    action: "update",
                    model: self
                });
            });
        };

        self.setCurrentProfile = function (options) {
            self.fire = fire;
            accountActions.setCurrentProfile(options).then(function () {
                self.fire("modelUpdate", {
                    action: "update",
                    model: self
                });
            });
        };

        self.firstname = "";
        self.lastname = "";
        self.profiles = [];
        self.id = 0;
        self.defaultProfileId = null;
        return self;

    }

    angular.module("app").service("account", ["$injector", "$q", "accountActions", "fire", account]);

})();
(function () {

    "use strict";

    function collectionItem($q, collectionActions) {

        var self = this;

        self.onAdd = function (options) {
            collectionActions.add({

            });
        }

        self.onRemove = function (options) {
            collectionActions.remove({

            });
        }

        self.onStoreUpdate = function (options) {

        }

        return self;

    }

    angular.module("app").service("collectionItem", ["$injector", "$q", "collectionActions", collectionItem]);

})();
(function () {

    "use strict";

    function collection($injector, $q, collectionActions) {

        var self = this;

        self.onStoreUpdate = function (options) {

        }

        return self;

    }

    angular.module("app").service("collection", ["$injector", "$q", "collectionActions", collection]);

})();
(function () {

    "use strict";

    function conference($injector, $q, fire, conferenceActions) {

        var self = this;

        self.createInstanceAsync = function (options) {
            var deferred = $q.defer();
            var instance = new account($q, conferenceActions);

            if (options.data) {
                var promises = [];
                instance.name = options.data.name;

                if (options.data.videos && options.data.videos.length > 0) {

                    var video = $injector.get("video");
                    var promises = [];
                    for (var i = 0; i < options.data.videos.length; i++) {
                        promises.push(video.createInstanceAsync({ data: options.data.videos[i] }));
                    }

                    $q.all(promises).then(function (videos) {
                        instance.videos = videos;
                        deferred.resolve(instance);
                    });
                }
                else {
                    deferred.resolve(instance);
                }

            } else {
                deferred.resolve(instance);
            }
            return deferred.promise;
        };

        self.name = "";

        return self;

    }

    angular.module("app").service("conference", ["$injector", "$q", "fire", "conferenceActions", conference]);

})();
(function () {

    "use strict";

    function playlistItem($injector, $q, playlistItemActions) {

        var self = this;

        self.onAdd = function (options) {
            playlistItemActions.addToPlaylist({

            });
        }

        self.onRemove = function (options) {
            playlistItemActions.removeFromPlaylist({

            });
        }

        self.onStoreUpdate = function (options) {

        }

        return self;

    }

    angular.module("app").service("playlistItem", ["$injector", "$q", "playlistItemActions", playlistItem]);

})();
(function () {

    "use strict";

    function playlist($injector, $q, playlistActions) {

        var self = this;

        self.onStoreUpdate = function (options) {

        }

        return self;

    }

    angular.module("app").service("playlist", ["$injector", "$q", "playlistActions", playlist]);

})();
(function () {

    "use strict";

    function profile($injector, $q, fire, profileActions) {

        var self = this;

        self.createInstanceAsync = function (options) {
            var deferred = $q.defer();
            var instance = new account($q, profileActions);

            if (options.data) {
                var promises = [];
                instance.firstname = options.data.firstname;
                instance.lastname = options.data.lastname;
                instance.level = options.data.level;
                deferred.resolve(instance);
            } else {
                deferred.resolve(instance);
            }
            return deferred.promise;
        };

        self.add = function (options) {
            self.fire = fire;
            profileActions.add(options).then(function () {
                self.fire("modelUpdate", {
                    action:"add",
                    model: self
                });
            });
        };

        self.update = function (options) {
            self.fire = fire;
            profileActions.update(options).then(function () {
                self.fire("modelUpdate", {
                    action: "update",
                    model: self
                });
            });
        };

        self.remove = function (options) {
            self.fire = fire;
            profileActions.remove(options).then(function () {
                self.fire("modelUpdate", {
                    action: "delete",
                    model: self
                });
            });
        };

        self.firstname = "";
        self.lastname = "";
        self.accounId = 0;
        self.id = 0;
        self.level = 1;
        self.avatarImageUrl = "";
        return self;

    }

    angular.module("app").service("profile", ["$injector", "$q", "fire", "profileActions", profile]);

})();
(function () {

    "use strict";

    function profiles($injector, $q, profileActions) {

        var self = this;

        self.onStoreUpdate = function (options) {

        }

        return self;

    }

    angular.module("app").service("profiles", ["$injector", "$q", "profileActions", profiles]);

})();
(function () {

    "use strict";

    function video($injector, $location, $q) {

        var self = this;

        self.createInstanceAsync = function(options) {
            var instance = new video($injector, $q);

            instance.playlistActions = $injector("playlistActions");
            instance.playlistStore = $injector("playlistStore");
            instance.securityStore = $injector("securityStore");
            instance.videoActions = $injector("videoActions");
            instance.watchHistoryActions = $injector("watchHistoryActions");
            instance.watchHistoryStore = $injector("watchHistoryStore");

            if (options.data) {
                instance.id = options.data.id;
            }

            return $q.when(instance);
        };

        self.onStoreUpdate = function(options) {

        };

        self.onAdd = function (options) {
            this.playlistactions.addToPlaylist({
                data: {
                    username: self.username,
                    password: self.password
                }
            });
        };

        self.onClick = function (options) {
            $location.path("/video/play/" + self.id);
        };

        self.onPlaylist = false;
        self.id = 0;

        return self;

    }

    angular.module("app").service("video", [
        "$injector",
        "$location",
        "$q",
        video]);

})();
(function () {

    "use strict";

    function watchHistoryItem($injector, $q, watchHistoryActions, watchHistoryStore) {
        var self = this;

        self.createInstanceAsync = function () {
            var instance = new watchHistoryItem($injector, $q, watchHistoryActions, watchHistoryStore);
            return $q.when(instance);
        };

        self.onStoreUpdate = function (options) {

        }

        self.onRemove = function (options) {
            watchHistoryActions.remove({

            });
        }

        return self;
    }

    angular.module("app").service("watchHistoryItem", ["$injector", "$q", "watchHistoryActions", "watchHistoryActions", watchHistoryItem]);

})();
(function () {

    "use strict";

    function watchHistory($injector, $q, watchHistoryService) {

        var self = this;

        self.onStoreUpdate = function () {

        }

        return self;

    }

    angular.module("app").service("watchHistory", ["$injector", "$q", "watchHistoryService", watchHistory]);

})();
(function () {

    "use strict";

    function accountStore(localStorageManager) {

        var self = this;

        Object.defineProperty(self, "currentAccount",
            { set: function (value) { localStorageManager.put({ name: "currenAccount",value: value }); } },
            { get: function () { return localStorageManager.get({ name: "currentAccount"}); } }
            );

        Object.defineProperty(self, "currentProfile",
            { set: function (value) { localStorageManager.put({ name: "currentProfile", value: value }); } },
            { get: function () { return localStorageManager.get({ name: "currentProfile" }); } }
            );

        Object.defineProperty(self, "currentProfiles",
            { set: function (value) { localStorageManager.put({ name: "currentProfiles", value: value }); } },
            { get: function () { return localStorageManager.get({ name: "currentProfiles" }); } }
            );

        return self;
    }

    angular.module("app").service("accountStore",["localStorageManager", accountStore]);

})();
(function () {

    "use strict";

    function playlistStore(fire, localStorageManager, PLAYLIST_ACTIONS) {

        var self = this;

        self.currentPlaylist = null;

        return self;
    }

    angular.module("app").service("playlistStore", ["fire","localStorageManager", "PLAYLIST_ACTIONS", playlistStore]);

})();
(function () {

    "use strict";

    function videoStore($rootScope, fire, localStorageManager, video, VIDEO_ACTIONS) {

        var self = this;

        Object.defineProperty(self, "currentvideo",
            { set: function (value) { localStorageManager.put({ name: "currentvideo", value: value }); } },
            { get: function () { return localStorageManager.get({ name: "currentvideo" }); } }
            );

        self.featuredVideos = null;

        self.onUpdateVideoStoreFeaturedVideos = function (event) {
            self.featuredVideos = event.data;
            fire(document,"STORE_UPDATE",{ guid: event.guid, storeName: "VIDEO_STORE" })
        }

        document.addEventListener(VIDEO_ACTIONS.UPDATE_VIDEO_STORE_FEATURED_VIDEOS, self.onUpdateVideoStoreFeaturedVideos);

        return self;
    }

    angular.module("app")
        .service("videoStore", ["$rootScope", "fire","localStorageManager","video","VIDEO_ACTIONS", videoStore])
        .run(["videoStore", function (videoStore) {

        }]);

})();
(function () {

    "use strict";

    function watchHistoryStore(localStorageManager) {

        var self = this;

        Object.defineProperty(self, "currentWatchHistory",
            { set: function (value) { localStorageManager.put({ name: "currentWatchHistory", value: value }); } },
            { get: function () { return localStorageManager.get({ name: "currentWatchHistory" }); } }
            );

        return self;
    }

    angular.module("app").service("watchHistoryStore", ["localStorageManager", watchHistoryStore]);

})();


text:
A sandbox implementation of [Bruery Platform]( http://bruery.github.io/platform).

## Documentation

Check out the documentation on the bundles [wiki page](https://github.com/bruery/bassoon/wiki).

## Support

For general support and questions, please use [Disqus](https://disqus.com/home/channel/thebruery/discussion/channel-thebruery/bug_reporting).

If you think you find a bug or you have a feature idea to propose, feel free to open a issue
**after looking** at the [contributing guide](CONTRIBUTING.md).

## License

This package is available under the [MIT license](LICENSE).

redpajama_set_name: RedPajamaGithub


text:
// Boost.Geometry - gis-projections (based on PROJ4)

// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands.

// This file was modified by Oracle on 2017, 2018, 2019.
// Modifications copyright (c) 2017-2019, Oracle and/or its affiliates.
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle.

// Use, modification and distribution is subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

// This file is converted from PROJ4, http://trac.osgeo.org/proj
// PROJ4 is originally written by Gerald Evenden (then of the USGS)
// PROJ4 is maintained by Frank Warmerdam
// PROJ4 is converted to Boost.Geometry by Barend Gehrels

// Last updated version of proj: 5.0.0

// Original copyright notice:

// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:

// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.

// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.

#ifndef BOOST_GEOMETRY_PROJECTIONS_GN_SINU_HPP
#define BOOST_GEOMETRY_PROJECTIONS_GN_SINU_HPP

#include <boost/geometry/srs/projections/impl/aasincos.hpp>
#include <boost/geometry/srs/projections/impl/base_static.hpp>
#include <boost/geometry/srs/projections/impl/base_dynamic.hpp>
#include <boost/geometry/srs/projections/impl/factory_entry.hpp>
#include <boost/geometry/srs/projections/impl/pj_mlfn.hpp>
#include <boost/geometry/srs/projections/impl/pj_param.hpp>
#include <boost/geometry/srs/projections/impl/projects.hpp>

#include <boost/geometry/util/math.hpp>

namespace boost { namespace geometry
{

namespace projections
{
    #ifndef DOXYGEN_NO_DETAIL
    namespace detail { namespace gn_sinu
    {

            static const double epsilon10 = 1e-10;
            static const int max_iter = 8;
            static const double loop_tol = 1e-7;

            template <typename T>
            struct par_gn_sinu_e
            {
                detail::en<T> en;
            };

            template <typename T>
            struct par_gn_sinu_s
            {
                T m, n, C_x, C_y;
            };

            /* Ellipsoidal Sinusoidal only */

            template <typename T, typename Parameters>
            struct base_gn_sinu_ellipsoid
            {
                par_gn_sinu_e<T> m_proj_parm;

                // FORWARD(e_forward)  ellipsoid
                // Project coordinates from geographic (lon, lat) to cartesian (x, y)
                inline void fwd(Parameters const& par, T const& lp_lon, T const& lp_lat, T& xy_x, T& xy_y) const
                {
                    T s, c;

                    xy_y = pj_mlfn(lp_lat, s = sin(lp_lat), c = cos(lp_lat), this->m_proj_parm.en);
                    xy_x = lp_lon * c / sqrt(1. - par.es * s * s);
                }

                // INVERSE(e_inverse)  ellipsoid
                // Project coordinates from cartesian (x, y) to geographic (lon, lat)
                inline void inv(Parameters const& par, T const& xy_x, T const& xy_y, T& lp_lon, T& lp_lat) const
                {
                    static const T half_pi = detail::half_pi<T>();

                    T s;

                    if ((s = fabs(lp_lat = pj_inv_mlfn(xy_y, par.es, this->m_proj_parm.en))) < half_pi) {
                        s = sin(lp_lat);
                        lp_lon = xy_x * sqrt(1. - par.es * s * s) / cos(lp_lat);
                    } else if ((s - epsilon10) < half_pi)
                        lp_lon = 0.;
                    else
                        BOOST_THROW_EXCEPTION( projection_exception(error_tolerance_condition) );
                }
                /* General spherical sinusoidals */

                static inline std::string get_name()
                {
                    return "gn_sinu_ellipsoid";
                }

            };

            template <typename T, typename Parameters>
            struct base_gn_sinu_spheroid
            {
                par_gn_sinu_s<T> m_proj_parm;

                // FORWARD(s_forward)  sphere
                // Project coordinates from geographic (lon, lat) to cartesian (x, y)
                inline void fwd(Parameters const& , T const& lp_lon, T lp_lat, T& xy_x, T& xy_y) const
                {
                    if (this->m_proj_parm.m == 0.0)
                        lp_lat = this->m_proj_parm.n != 1. ? aasin(this->m_proj_parm.n * sin(lp_lat)): lp_lat;
                    else {
                        T k, V;
                        int i;

                        k = this->m_proj_parm.n * sin(lp_lat);
                        for (i = max_iter; i ; --i) {
                            lp_lat -= V = (this->m_proj_parm.m * lp_lat + sin(lp_lat) - k) /
                                (this->m_proj_parm.m + cos(lp_lat));
                            if (fabs(V) < loop_tol)
                                break;
                        }
                        if (!i) {
                            BOOST_THROW_EXCEPTION( projection_exception(error_tolerance_condition) );
                        }
                    }
                    xy_x = this->m_proj_parm.C_x * lp_lon * (this->m_proj_parm.m + cos(lp_lat));
                    xy_y = this->m_proj_parm.C_y * lp_lat;
                }

                // INVERSE(s_inverse)  sphere
                // Project coordinates from cartesian (x, y) to geographic (lon, lat)
                inline void inv(Parameters const& , T const& xy_x, T xy_y, T& lp_lon, T& lp_lat) const
                {
                    xy_y /= this->m_proj_parm.C_y;
                    lp_lat = (this->m_proj_parm.m != 0.0) ? aasin((this->m_proj_parm.m * xy_y + sin(xy_y)) / this->m_proj_parm.n) :
                        ( this->m_proj_parm.n != 1. ? aasin(sin(xy_y) / this->m_proj_parm.n) : xy_y );
                    lp_lon = xy_x / (this->m_proj_parm.C_x * (this->m_proj_parm.m + cos(xy_y)));
                }

                static inline std::string get_name()
                {
                    return "gn_sinu_spheroid";
                }

            };

            template <typename Parameters, typename T>
            inline void setup(Parameters& par, par_gn_sinu_s<T>& proj_parm)
            {
                par.es = 0;

                proj_parm.C_x = (proj_parm.C_y = sqrt((proj_parm.m + 1.) / proj_parm.n))/(proj_parm.m + 1.);
            }

            // General Sinusoidal Series
            template <typename Params, typename Parameters, typename T>
            inline void setup_gn_sinu(Params const& params, Parameters& par, par_gn_sinu_s<T>& proj_parm)
            {
                if (pj_param_f<srs::spar::n>(params, "n", srs::dpar::n, proj_parm.n)
                 && pj_param_f<srs::spar::m>(params, "m", srs::dpar::m, proj_parm.m)) {
                    if (proj_parm.n <= 0 || proj_parm.m < 0)
                        BOOST_THROW_EXCEPTION( projection_exception(error_invalid_m_or_n) );
                } else
                    BOOST_THROW_EXCEPTION( projection_exception(error_invalid_m_or_n) );

                setup(par, proj_parm);
            }

            // Sinusoidal (Sanson-Flamsteed)
            template <typename Parameters, typename T>
            inline void setup_sinu(Parameters const& par, par_gn_sinu_e<T>& proj_parm)
            {
                proj_parm.en = pj_enfn<T>(par.es);
            }

            // Sinusoidal (Sanson-Flamsteed)
            template <typename Parameters, typename T>
            inline void setup_sinu(Parameters& par, par_gn_sinu_s<T>& proj_parm)
            {
                proj_parm.n = 1.;
                proj_parm.m = 0.;
                setup(par, proj_parm);
            }

            // Eckert VI
            template <typename Parameters, typename T>
            inline void setup_eck6(Parameters& par, par_gn_sinu_s<T>& proj_parm)
            {
                proj_parm.m = 1.;
                proj_parm.n = 2.570796326794896619231321691;
                setup(par, proj_parm);
            }

            // McBryde-Thomas Flat-Polar Sinusoidal
            template <typename Parameters, typename T>
            inline void setup_mbtfps(Parameters& par, par_gn_sinu_s<T>& proj_parm)
            {
                proj_parm.m = 0.5;
                proj_parm.n = 1.785398163397448309615660845;
                setup(par, proj_parm);
            }

    }} // namespace detail::gn_sinu
    #endif // doxygen

    /*!
        \brief General Sinusoidal Series projection
        \ingroup projections
        \tparam Geographic latlong point type
        \tparam Cartesian xy point type
        \tparam Parameters parameter type
        \par Projection characteristics
         - Pseudocylindrical
         - Spheroid
        \par Projection parameters
         - m (real)
         - n (real)
        \par Example
        \image html ex_gn_sinu.gif
    */
    template <typename T, typename Parameters>
    struct gn_sinu_spheroid : public detail::gn_sinu::base_gn_sinu_spheroid<T, Parameters>
    {
        template <typename Params>
        inline gn_sinu_spheroid(Params const& params, Parameters & par)
        {
            detail::gn_sinu::setup_gn_sinu(params, par, this->m_proj_parm);
        }
    };

    /*!
        \brief Sinusoidal (Sanson-Flamsteed) projection
        \ingroup projections
        \tparam Geographic latlong point type
        \tparam Cartesian xy point type
        \tparam Parameters parameter type
        \par Projection characteristics
         - Pseudocylindrical
         - Spheroid
         - Ellipsoid
        \par Example
        \image html ex_sinu.gif
    */
    template <typename T, typename Parameters>
    struct sinu_ellipsoid : public detail::gn_sinu::base_gn_sinu_ellipsoid<T, Parameters>
    {
        template <typename Params>
        inline sinu_ellipsoid(Params const& , Parameters & par)
        {
            detail::gn_sinu::setup_sinu(par, this->m_proj_parm);
        }
    };

    /*!
        \brief Sinusoidal (Sanson-Flamsteed) projection
        \ingroup projections
        \tparam Geographic latlong point type
        \tparam Cartesian xy point type
        \tparam Parameters parameter type
        \par Projection characteristics
         - Pseudocylindrical
         - Spheroid
         - Ellipsoid
        \par Example
        \image html ex_sinu.gif
    */
    template <typename T, typename Parameters>
    struct sinu_spheroid : public detail::gn_sinu::base_gn_sinu_spheroid<T, Parameters>
    {
        template <typename Params>
        inline sinu_spheroid(Params const& , Parameters & par)
        {
            detail::gn_sinu::setup_sinu(par, this->m_proj_parm);
        }
    };

    /*!
        \brief Eckert VI projection
        \ingroup projections
        \tparam Geographic latlong point type
        \tparam Cartesian xy point type
        \tparam Parameters parameter type
        \par Projection characteristics
         - Pseudocylindrical
         - Spheroid
        \par Example
        \image html ex_eck6.gif
    */
    template <typename T, typename Parameters>
    struct eck6_spheroid : public detail::gn_sinu::base_gn_sinu_spheroid<T, Parameters>
    {
        template <typename Params>
        inline eck6_spheroid(Params const& , Parameters & par)
        {
            detail::gn_sinu::setup_eck6(par, this->m_proj_parm);
        }
    };

    /*!
        \brief McBryde-Thomas Flat-Polar Sinusoidal projection
        \ingroup projections
        \tparam Geographic latlong point type
        \tparam Cartesian xy point type
        \tparam Parameters parameter type
        \par Projection characteristics
         - Pseudocylindrical
         - Spheroid
        \par Example
        \image html ex_mbtfps.gif
    */
    template <typename T, typename Parameters>
    struct mbtfps_spheroid : public detail::gn_sinu::base_gn_sinu_spheroid<T, Parameters>
    {
        template <typename Params>
        inline mbtfps_spheroid(Params const& , Parameters & par)
        {
            detail::gn_sinu::setup_mbtfps(par, this->m_proj_parm);
        }
    };

    #ifndef DOXYGEN_NO_DETAIL
    namespace detail
    {

        // Static projection
        BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION_FI(srs::spar::proj_gn_sinu, gn_sinu_spheroid)
        BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION_FI2(srs::spar::proj_sinu, sinu_spheroid, sinu_ellipsoid)
        BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION_FI(srs::spar::proj_eck6, eck6_spheroid)
        BOOST_GEOMETRY_PROJECTIONS_DETAIL_STATIC_PROJECTION_FI(srs::spar::proj_mbtfps, mbtfps_spheroid)

        // Factory entry(s)
        BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(gn_sinu_entry, gn_sinu_spheroid)
        BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI2(sinu_entry, sinu_spheroid, sinu_ellipsoid)
        BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(eck6_entry, eck6_spheroid)
        BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_ENTRY_FI(mbtfps_entry, mbtfps_spheroid)

        BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_BEGIN(gn_sinu_init)
        {
            BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(gn_sinu, gn_sinu_entry);
            BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(sinu, sinu_entry);
            BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(eck6, eck6_entry);
            BOOST_GEOMETRY_PROJECTIONS_DETAIL_FACTORY_INIT_ENTRY(mbtfps, mbtfps_entry);
        }

    } // namespace detail
    #endif // doxygen

} // namespace projections

}} // namespace boost::geometry

#endif // BOOST_GEOMETRY_PROJECTIONS_GN_SINU_HPP


text:
class ImportDump < Vagrant.plugin(2, :command)
  def self.synopsis
    "imports an XML file into MediaWiki"
  end

  def execute
    if ['-h', '--help'].include? @argv.first
      @env.ui.info "Usage: vagrant import-dump dumpfile.xml [-h]"
      return 0
    end
    opts = { extra_args: @argv.unshift('import-mediawiki-dump') }
    with_target_vms(nil, :single_target => true) do |vm|
      vm.action :ssh, ssh_opts: opts
    end
  end
end


text:
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.

package org.jetbrains.kotlin.idea.refactoring;

import com.intellij.testFramework.TestDataPath;
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.TestMetadata;
import org.jetbrains.kotlin.test.TestRoot;
import org.junit.runner.RunWith;

/*
 * This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}.
 * DO NOT MODIFY MANUALLY.
 */
@SuppressWarnings("all")
@TestRoot("idea/tests")
@TestDataPath("$CONTENT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@TestMetadata("testData/refactoring/nameSuggestionProvider")
public class NameSuggestionProviderTestGenerated extends AbstractNameSuggestionProviderTest {
    private void runTest(String testDataFilePath) throws Exception {
        KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
    }

    @TestMetadata("localVarAsCallArgument.kt")
    public void testLocalVarAsCallArgument() throws Exception {
        runTest("testData/refactoring/nameSuggestionProvider/localVarAsCallArgument.kt");
    }
}


text:
<!DOCTYPE html>

<title>How do I send messages to the Email Archive?</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta content="sakai.mailbox" name="description">
<meta content="listserv, site listserv" name="search">
<link href="/library/skin/tool_base.css" media="screen" rel="stylesheet" type="text/css" charset="utf-8">
<link href="/library/skin/morpheus-default/tool.css" media="screen" rel="stylesheet" type="text/css" charset="utf-8">
<link href="/library/skin/morpheus-default/help.css" media="screen" rel="stylesheet" type="text/css" charset="utf-8">
<link href="/library/js/jquery/featherlight/0.4.0/featherlight.min.css" media="screen" rel="stylesheet" type="text/css" charset="utf-8">

How do I send messages to the Email Archive?

Note: You cannot use Email Archive to send mail to particular individuals. To send messages to individual participants or a group, use either the Messages tool (for internal course mail) or the Email tool (for external institutional mail).

Go to Email Archive.

Select the Email Archive tool from the Tool Menu in your site.

Locate email address for sending messages to the archive.

Above the site address, you'll see a message telling you if you are authorized to send email. If this site is set up to accept mail only from site participants, you will also see the address from which you are authorized to send email; use this account to send messages to the site address.

On the Email Archive screen, under "Email sent to the following addresses will be archived and sent to participants", you'll see the site email address. Send email to your site's Email Archive address from your email account, just as you would to any other email address.

If you are not authorized to send mail, you will see the following message instead.


text:
package net.openhft.chronicle.bytes.internal;

import net.openhft.chronicle.core.io.IORuntimeException;
import org.jetbrains.annotations.NotNull;

import java.io.File;
import java.io.IOException;

public final class CanonicalPathUtil {

    private CanonicalPathUtil() {}

    /**
     * Returns an internalized String that can be used to synchronize on across classloaders
     *
     * @param file to use
     * @return internalized String
     */
    public static String of(@NotNull final File file) {
        try {
            return file.getCanonicalPath().intern();
        } catch (IOException ioe) {
            throw new IORuntimeException("Unable to obtain the canonical path for " + file.getAbsolutePath(), ioe);
        }
    }
}


text:
namespace crypto {
namespace tink {

class Ed25519VerifyKeyManager
    : public KeyTypeManager<google::crypto::tink::Ed25519PublicKey, void,
                            List<PublicKeyVerify>> {
 public:
  class PublicKeyVerifyFactory : public PrimitiveFactory<PublicKeyVerify> {
    crypto::tink::util::StatusOr<std::unique_ptr<PublicKeyVerify>> Create(
        const google::crypto::tink::Ed25519PublicKey& ecdsa_public_key)
        const override;
  };

  Ed25519VerifyKeyManager()
      : KeyTypeManager(absl::make_unique<PublicKeyVerifyFactory>()) {}

  uint32_t get_version() const override { return 0; }

  google::crypto::tink::KeyData::KeyMaterialType key_material_type()
      const override {
    return google::crypto::tink::KeyData::ASYMMETRIC_PUBLIC;
  }

  const std::string& get_key_type() const override { return key_type_; }

  crypto::tink::util::Status ValidateKey(
      const google::crypto::tink::Ed25519PublicKey& key) const override;

 private:
  const std::string key_type_ =
      absl::StrCat(kTypeGoogleapisCom,
                   google::crypto::tink::Ed25519PublicKey().GetTypeName());
};

}  // namespace tink
}  // namespace crypto

#endif  // TINK_SIGNATURE_ED25519_VERIFY_KEY_MANAGER_H_


text:
namespace base {
class UnguessableToken;
}  // namespace base

namespace media {
class AudioManager;
class AudioParameters;
}  // namespace media

namespace audio {
class OutputStream final : public media::mojom::AudioOutputStream,
                           public OutputController::EventHandler {
 public:
  using DeleteCallback = base::OnceCallback<void(OutputStream*)>;
  using CreatedCallback =
      base::OnceCallback<void(media::mojom::ReadWriteAudioDataPipePtr)>;
  using ManagedDeviceOutputStreamCreateCallback =
      OutputController::ManagedDeviceOutputStreamCreateCallback;

  OutputStream(
      CreatedCallback created_callback,
      DeleteCallback delete_callback,
      ManagedDeviceOutputStreamCreateCallback
          managed_device_output_stream_create_callback,
      mojo::PendingReceiver<media::mojom::AudioOutputStream> stream_receiver,
      mojo::PendingAssociatedRemote<media::mojom::AudioOutputStreamObserver>
          observer,
      mojo::PendingRemote<media::mojom::AudioLog> log,
      media::AudioManager* audio_manager,
      const std::string& output_device_id,
      const media::AudioParameters& params,
      LoopbackCoordinator* coordinator,
      const base::UnguessableToken& loopback_group_id);

  OutputStream(const OutputStream&) = delete;
  OutputStream& operator=(const OutputStream&) = delete;

  ~OutputStream() final;

  // media::mojom::AudioOutputStream implementation.
  void Play() final;
  void Pause() final;
  void Flush() final;
  void SetVolume(double volume) final;

  // OutputController::EventHandler implementation.
  void OnControllerPlaying() final;
  void OnControllerPaused() final;
  void OnControllerError() final;
  void OnLog(base::StringPiece message) final;

 private:
  void CreateAudioPipe(CreatedCallback created_callback);
  void OnError();
  void CallDeleter();
  void PollAudioLevel();
  bool IsAudible();

  // Internal helper method for sending logs related  to this class to clients
  // registered to receive these logs. Prepends each log with "audio::OS" to
  // point out its origin. Compare with OutputController::EventHandler::OnLog()
  // which only will be called by the |controller_| object. These logs are
  // prepended with "AOC::" where AOC corresponds to AudioOutputController.
  void SendLogMessage(const char* format, ...) PRINTF_FORMAT(2, 3);

  SEQUENCE_CHECKER(owning_sequence_);

  base::CancelableSyncSocket foreign_socket_;
  DeleteCallback delete_callback_;
  mojo::Receiver<AudioOutputStream> receiver_;
  mojo::AssociatedRemote<media::mojom::AudioOutputStreamObserver> observer_;
  const mojo::SharedRemote<media::mojom::AudioLog> log_;
  const raw_ptr<LoopbackCoordinator> coordinator_;

  SyncReader reader_;
  OutputController controller_;
  // A token indicating membership in a group of output controllers/streams.
  const base::UnguessableToken loopback_group_id_;

  // This flag ensures that we only send OnStreamStateChanged notifications
  // and (de)register with the stream monitor when the state actually changes.
  bool playing_ = false;

  // Calls PollAudioLevel() at regular intervals while |playing_| is true.
  base::RepeatingTimer poll_timer_;
  bool is_audible_ = false;

  base::WeakPtrFactory<OutputStream> weak_factory_{this};
};

}  // namespace audio

#endif  // SERVICES_AUDIO_OUTPUT_STREAM_H_


text:
=pod

=head1 NAME

B<tokenize_asoft> - convert ASCII into tokenized Applesoft

B<asoft_detoken> - convert tokenized Applesoft into ASCII

B<integer_detoken> - convert tokenized Apple Integer BASIC to ASCII

B<dos33_text2ascii> - convert Apple II text files to UNIX

=head1 SYNOPSIS

B<command> < input > output

=head1 DESCRIPTION

These programs act as filters, reading from standard input and writing
to standard output. None of them take any arguments or options.

B<tokenize_asoft> acts like the Applesoft interpreter, in that it does
no syntax checking while tokenizing (in Applesoft, syntax checking is
done at runtime only). Each line requires a line number (no direct mode
statements). The output file can be written to an Apple disk image with
B<dos33>. Remember that BASIC programs use filetype A.

B<asoft_detoken> and B<integer_detoken> act like the LIST commands
from Applesoft and Apple Integer BASIC, respectively. They expect
well-formed tokenized code, and may segfault or enter an infinite loop
if fed invalid input. The output of these commands is a UNIX (not Apple II)
text file.

B<dos33_text2ascii> converts Apple II text files into standard UNIX
text. The conversion is very simple: \r is converted to \n, and the
high bit of each character is cleared. A side effect of this is that,
if the input is already 7-bit ASCII with UNIX line endings, it will be
passed through unmodified.

There is no tokenize_integer command. There's also no dos33_ascii2text,
but 7-bit ASCII UNIX text files can be converted with B<tr(1)>, something
like:

tr '\n\040-\177' '\215\240-\377'

=head1 SEE ALSO

=over

=item dos33fsprogs(1)

=item a2tools(1)

=back

=head1 WEBSITE

http://www.deater.net/weave/vmwprod/apple/

=head1 AUTHORS

B<dos33fstools> written by Vince Weaver <vince _at_ deater.net>.

This manual page written by B. Watson for the SlackBuilds.org project,
but it may be used by anyone.


text:
"""
Based on:
  http://www.technobabble.dk/2008/apr/02/xml-rpc-dispatching-through-django-test-client/

With the addition of the following to make it work:
  self._use_datetime = False
"""

# We import the testlib FIRST, as the test db settings
# need to be set before we import anything else.
from clearinghouse.tests import testlib

import cStringIO
import xmlrpclib

from django.test.client import Client

class TestTransport(xmlrpclib.Transport):
  """Handles connections to XML-RPC server through Django test client."""

  def __init__(self, *args, **kwargs):
    self.client = Client()

  def request(self, host, handler, request_body, verbose=0):
    self.verbose = verbose
    self._use_datetime = False
    response = self.client.post(handler,
                                request_body,
                                content_type="text/xml")
    res = cStringIO.StringIO(response.content)
    res.seek(0)
    return self.parse_response(res)


text:
/* HTML5 Boilerplate  */

article, aside, details, figcaption, figure, footer, header, hgroup, nav, section { display: block; }
audio, canvas, video { display: inline-block; *display: inline; *zoom: 1; }
audio:not([controls]) { display: none; }
[hidden] { display: none; }

html { font-size: 100%; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
html, button, input, select, textarea { font-family: sans-serif; color: #222; }
body { margin: 0; font-size: 1em; line-height: 1.4; }

::-moz-selection { background: #fe57a1; color: #fff; text-shadow: none; }
::selection { background: #fe57a1; color: #fff; text-shadow: none; }

a { color: #00e; }
a:visited { color: #551a8b; }
a:hover { color: #06e; }
a:focus { outline: thin dotted; }
a:hover, a:active { outline: 0; }
abbr[title] { border-bottom: 1px dotted; }
b, strong { font-weight: bold; }
blockquote { margin: 1em 40px; }
dfn { font-style: italic; }
hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0; }
ins { background: #ff9; color: #000; text-decoration: none; }
mark { background: #ff0; color: #000; font-style: italic; font-weight: bold; }
pre, code, kbd, samp { font-family: monospace, serif; _font-family: 'courier new', monospace; font-size: 1em; }
pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; }

q { quotes: none; }
q:before, q:after { content: ""; content: none; }
small { font-size: 85%; }
sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; }
sup { top: -0.5em; }
sub { bottom: -0.25em; }

ul, ol { margin: 1em 0; padding: 0 0 0 40px; }
dd { margin: 0 0 0 40px; }
nav ul, nav ol { list-style: none; list-style-image: none; margin: 0; padding: 0; }

img { border: 0; -ms-interpolation-mode: bicubic; vertical-align: middle; }
svg:not(:root) { overflow: hidden; }
figure { margin: 0; }

form { margin: 0; }
fieldset { border: 0; margin: 0; padding: 0; }

label { cursor: pointer; }
legend { border: 0; *margin-left: -7px; padding: 0; white-space: normal; }
button, input, select, textarea { font-size: 100%; margin: 0; vertical-align: baseline; *vertical-align: middle; }
button, input { line-height: normal; }
button, input[type="button"], input[type="reset"], input[type="submit"] { cursor: pointer; -webkit-appearance: button; *overflow: visible; }
button[disabled], input[disabled] { cursor: default; }
input[type="checkbox"], input[type="radio"] { box-sizing: border-box; padding: 0; *width: 13px; *height: 13px; }
input[type="search"] { -webkit-appearance: textfield; -moz-box-sizing: content-box; -webkit-box-sizing: content-box; box-sizing: content-box; }
input[type="search"]::-webkit-search-decoration, input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; }
textarea { overflow: auto; vertical-align: top; resize: vertical; }
input:valid, textarea:valid {  }
input:invalid, textarea:invalid { background-color: #f0dddd; }

table { border-collapse: collapse; border-spacing: 0; }
td { vertical-align: top; }

.chromeframe { margin: 0.2em 0; background: #ccc; color: black; padding: 0.2em 0; }

/* apply a natural box layout model to all elements */
* { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; }

html, body, #main { height: 100%; }
body { color: #eee; font-size: 12px; overflow: hidden;
background: #211c1c; /* Old browsers */
background: -moz-radial-gradient(center, ellipse cover,  #423636 1%, #211c1c 69%); /* FF3.6+ */
background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(1%,#423636), color-stop(69%,#211c1c)); /* Chrome,Safari4+ */
background: -webkit-radial-gradient(center, ellipse cover,  #423636 1%,#211c1c 69%); /* Chrome10+,Safari5.1+ */
background: -o-radial-gradient(center, ellipse cover,  #423636 1%,#211c1c 69%); /* Opera 12+ */
background: -ms-radial-gradient(center, ellipse cover,  #423636 1%,#211c1c 69%); /* IE10+ */
background: radial-gradient(ellipse at center,  #423636 1%,#211c1c 69%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#423636', endColorstr='#211c1c',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
}

h1 { font-size: 100%; }
a,
a:hover,
a:visited { color: #fff; text-decoration: none; }

ol, ul { list-style: none; margin: 0; padding: 0; }
.clearfix li { float: left; }

#header, #footer, #searchlist {
  background: #222;
  background: rgba(0,0,0,0.7);
  width: 100%;
  text-align: center;
  position: absolute;
  z-index: 1000;
}
#footer { bottom: 0; font-size: 12px; }

#searchlist {
  z-index: 1500;
  text-align:left;
  background: #222;
  display:none;
}

#searchlist .title {
  text-align:center;
  padding: 0.5em;
  font-size: 1.2em;
}

#searchlist .closebutton {
  background: #CCC;
}

#searchlist .listbox {
  background: #FFF;
  overflow-x:hidden;
  overflow-y: auto;
}

#searchlist ul {
    width: 100%;
}

#searchlist li {
    background: #FFF;
    border-top: 1px solid #333;
    width:100%;
    font-size:1.5em;
    color: #222;
}

#searchlist li a {
    display: block;
    color: #222;
    width:100%;
    padding:0.5em;
    cursor:pointer;
}

.closebutton {
    background-color: #33FF00;
    -moz-border-radius: 15px;
    -webkit-border-radius: 15px;
    padding: 5px;
    float: right;
    margin-right:0.4em;
    color: #222;
    cursor:pointer;
}

.search_title {
    font-size: 1.2em;
}

.search_artist {
    font-size: 1.0em;
}

#main { position: relative; background: url('bg.png') 50% 50%; }

#controls { position: absolute; bottom: 36px; width: 168px; margin-left: -84px; left: 50% }
#controls a { display: block; width: 48px; height: 48px; background: url('sprite.png') no-repeat; font-size: 0; margin: 4px; }

#previous { background-position: -664px -8px !important; }
#previous:hover { background-position: -664px -64px !important; }
#controls.off #previous:hover,
#controls.off #previous { background-position: -664px -120px !important; }

#playpause { background-position: -552px -8px !important }
#playpause:hover { background-position: -552px -64px !important }
#playpause.pause { background-position: -608px -8px !important }
#playpause.pause:hover { background-position: -608px -64px !important }
#controls.off #playpause:hover,
#controls.off #playpause { background-position: -552px -120px !important; }
#controls.off #playpause.pause:hover,
#controls.off #playpause.pause { background-position: -608px -120px !important; }

#next { background-position: -720px -8px !important; }
#next:hover { background-position: -720px -64px !important }
#controls.off #next:hover,
#controls.off #next { background-position: -720px -120px !important; }

#playlist { position: absolute; bottom: 100px; width: 100%; padding: 0; margin: 0; }
#playlist .now_playing { background: #222; background: rgba(0,0,0,0.7); padding: 2px 4px; }
#playlist li,
#playlist li div { width: 100%; margin: 0 auto; text-align: center; }
.track_cover { height: 50%; max-height: 300px; max-width: 300px; margin-bottom: 1em; }

#footer .get_reign { display: inline-block; padding-left: 20px; margin: 8px 0; background: url('sprite.png') no-repeat -776px -8px; }

#search_song { margin-bottom: 10px; }

@media only screen and (min-width: 35em) {
  body { font-size: 150%; }

  #controls { bottom: 50px; width: 432px; margin-left: -216px; left: 50% }
  #controls a { width: 128px; height: 128px; margin: 8px; }

  #previous { background-position: -280px -8px !important; }
  #previous:hover { background-position: -280px -144px !important; }
  #controls.off #previous:hover,
  #controls.off #previous { background-position: -280px -280px !important; }

  #playpause { background-position: -8px -8px !important }
  #playpause:hover { background-position: -8px -144px !important }
  #playpause.pause { background-position: -144px -8px !important }
  #playpause.pause:hover { background-position: -144px -144px !important }
  #controls.off #playpause:hover,
  #controls.off #playpause { background-position: -8px -280px !important; }
  #controls.off #playpause.pause:hover,
  #controls.off #playpause.pause { background-position: -144px -280px !important }

  #next { background-position: -416px -8px !important; }
  #next:hover { background-position: -416px -144px !important; }
  #controls.off #next:hover,
  #controls.off #next { background-position: -416px -280px !important; }

  #playlist { bottom: 220px; }
  #playlist .now_playing { padding: 8px 16px; }

  #search_song { margin-bottom: 20px; }
}

.ir { display: block; border: 0; text-indent: -999em; overflow: hidden; background-color: transparent; background-repeat: no-repeat; text-align: left; direction: ltr; *line-height: 0; }
.ir br { display: none; }
.hidden { display: none !important; visibility: hidden; }
.visuallyhidden { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }
.visuallyhidden.focusable:active, .visuallyhidden.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; }
.invisible { visibility: hidden; }
.clearfix:before, .clearfix:after { content: ""; display: table; }
.clearfix:after { clear: both; }
.clearfix { *zoom: 1; }

@media print {
  * { background: transparent !important; color: black !important; box-shadow:none !important; text-shadow: none !important; filter:none !important; -ms-filter: none !important; }
  a, a:visited { text-decoration: underline; }
  a[href]:after { content: " (" attr(href) ")"; }
  abbr[title]:after { content: " (" attr(title) ")"; }
  .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; }
  pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
  thead { display: table-header-group; }
  tr, img { page-break-inside: avoid; }
  img { max-width: 100% !important; }
  @page { margin: 0.5cm; }
  p, h2, h3 { orphans: 3; widows: 3; }
  h2, h3 { page-break-after: avoid; }
}


text:
<?php

/**
 * Module
 */

namespace Mail;

use Mail\Form\Factory\MailFilterFactory;
use Mail\Form\Factory\MailFormFactory;
use Mail\Form\MailFilter;
use Mail\Form\MailForm;
use Zend\ModuleManager\Feature\ServiceProviderInterface;

class Module implements ServiceProviderInterface{

    public function getConfig() {
        return include __DIR__ . '/../config/module.config.php';
    }

    /**
     * Expected to return \Zend\ServiceManager\Config object or array to
     * seed such an object.
     *
     * @return array|\Zend\ServiceManager\Config
     */
    public function getServiceConfig()
    {
        return [
            'factories'=>
                [
                    MailForm::class=>MailFormFactory::class,
                    MailFilter::class=>MailFilterFactory::class
                ]
        ];
    }
}


text:
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Field, reduxForm } from 'redux-form';
import * as actions from '../actions';
import axios from 'axios';
import { Icon, Button,Dropdown } from 'semantic-ui-react';

import { RingLoader } from 'react-spinners';

const ROOT_URL = 'https://i7san-api.herokuapp.com';

// validation function, tests each field on change
const validate = values => {
  const errors = {};
  if (!values.activity) {
    errors.activity = 'Please select an activity';
  }
  if (!values.hours) {
    errors.hours = 'Please the number of hours you volunteered';
  }
  if (values.hours <= 0) {
    errors.hours = 'You must enter an amount of hours greater than 0';
  }
  if (!values.description) {
    errors.description = 'Please enter a short description of your volunteering activity';
  }

  return errors;
};

// renders each text field
const renderField = ({ input, label, type, placeholder, textarea, meta: { touched, error, warning } }) =>

    {textarea ? <textarea {...input} placeholder={placeholder} /> : <input {...input} type={type} />}
    {touched &&
      (error &&

          {' '}{error}
        )}

;

// renders select element
const renderSelectField = ({ input, type, meta: { touched, error }, children }) =>

    <select {...input}>
      {children}
    </select>
    {touched &&
      error &&

        {' '}{error}
      }

;

// File Input from https://github.com/erikras/redux-form/issues/1989
const adaptFileEventToValue = delegate => e => delegate(e.target.files[0]);

const FileInput = ({ input: { value: omitValue, onChange, onBlur, ...inputProps }, meta: omitMeta, ...props }) =>
  <input
    onChange={adaptFileEventToValue(onChange)}
    onBlur={adaptFileEventToValue(onBlur)}
    type="file"
    {...inputProps}
    {...props}
  />;

// Form component
class VolunteerForm extends Component {
  constructor(props) {
    super(props);

    this.state = {
      activities: []
    };

    this.handleFormSubmit = this.handleFormSubmit.bind(this);
  }

  // get initial activities from server and update component's state
  componentWillMount() {

    axios.get(`${ROOT_URL}/activities`).then(response => {
      this.setState({ activities: response.data });
    });
  }

  handleFormSubmit(fields) {
    const totalPoints =
      this.state.activities.find(activity => activity.shortUrl === fields.activity).points * fields.hours;
    this.props.recordVolunteerActivity({ ...fields }, totalPoints, this.props.history);
  }

  renderOptions(category) {

    if(category)
    {

      const chosenActivity = this.state.activities.filter(activity =>
activity.category.name==category
    );

   let optionsList = chosenActivity.map(activity =>
      <option key={activity.shortUrl} value={activity.shortUrl}>
        {activity.name} - {activity.points} Points For Every Hour Volunteered
      </option>
    );

        // add blank first option, acts as placeholder text for select field component
    optionsList.unshift(
      <option key="title" value="" selected>
        Choose A Volunteer Activity
      </option>
    );
     return optionsList;

    }

    else
    {
  let optionsList = this.state.activities.map(activity =>
      <option key={activity.shortUrl} value={activity.shortUrl}>
        {activity.name} - {activity.points} Points For Every Hour Volunteered
      </option>
 );

     // add blank first option, acts as placeholder text for select field component
    optionsList.unshift(
      <option key="title" value="" selected>
        Choose A Volunteer Activity
      </option>
    );
     return optionsList;
    }

  }

  render() {

    if (!this.state.activities || Object.keys(this.state.activities).length === 0) {
      return <RingLoader color={'#123abc'} />;
    }
    const { handleSubmit } = this.props;
     const {name} = this.props.category;

    console.log("My category is",name);
    return (

 Choose the Available
{name}
 Volunteering Activities!

        <form onSubmit={handleSubmit(this.handleFormSubmit)}>
          {/* form body */}

            <Field placeholder="Volunteer Activity" name="activity" component={renderSelectField} required>
              {this.renderOptions(name)}
            </Field>

How many hours did you volunteer?

            <Field placeholder="Number of Hours" name="hours" type="number" component={renderField} />

Tell us about your volunteering experience!

            <Field placeholder="Short Description" name="description" textarea={true} component={renderField} />

Upload a picture / video of your volunteering (optional)

          {/* File upload field: sends file object to action creator */}
          {/* TODO: add validation for attached file */}
          <Field component={FileInput} name="file" />

          <Button animated color='green' size='large' type='submit'>
      <Button.Content visible>RECORD YOUR VOLUNTEERING!</Button.Content>
      <Button.Content hidden>
        <Icon name='like outline' />
      </Button.Content>
    </Button>
        </form>

    );
  }
}

const mapStateToProps = state => {
  return { category: state.category };
};

export default connect(mapStateToProps, actions)(
  reduxForm({
    form: 'volunteer',
    validate,
    enableReinitialize: true
  })(VolunteerForm)
);


text:
'use strict';
var slice = Array.prototype.slice;

// Phantom js polyfill
if (!Function.prototype.bind) {
  Function.prototype.bind = function(context) {
    var func = this;
    var args = slice.call(arguments, 1);

    function bound() {
      var invokedAsConstructor = func.prototype && (this instanceof func);
      return func.apply(
        !invokedAsConstructor && context || this,
        args.concat(slice.call(arguments))
      );
    }
    bound.prototype = func.prototype;
    return bound;
  };
}

var chai = require('chai')

chai.use(require('chai-as-promised'))
chai.use(require('sinon-chai'))

chai.should();

var testsContext = require.context("./test", true);

testsContext.keys().forEach(testsContext);


text:
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Syn. Fung. (Oslo) 7: 421 (1993)

#### Original name
Spongiporus luteocaesius A. David, 1980

### Remarks
null


text:
import sys

from colorama import init as color_init

import emailprotectionslib.dmarc as dmarclib
import emailprotectionslib.spf as spflib
import logging

from libs.PrettyOutput import output_good, output_bad, \
    output_info, output_error, output_indifferent

logging.basicConfig(level=logging.INFO)

def check_spf_redirect_mechanisms(spf_record):
    redirect_domain = spf_record.get_redirect_domain()

    if redirect_domain is not None:
        output_info("Processing an SPF redirect domain: %s" % redirect_domain)

        return is_spf_record_strong(redirect_domain)

    else:
        return False

def check_spf_include_mechanisms(spf_record):
    include_domain_list = spf_record.get_include_domains()

    for include_domain in include_domain_list:
        output_info("Processing an SPF include domain: %s" % include_domain)

        strong_all_string = is_spf_record_strong(include_domain)

        if strong_all_string:
            return True

    return False

def is_spf_redirect_record_strong(spf_record):
    output_info("Checking SPF redirect domian: %(domain)s" % {"domain": spf_record.get_redirect_domain})
    redirect_strong = spf_record._is_redirect_mechanism_strong()
    if redirect_strong:
        output_bad("Redirect mechanism is strong.")
    else:
        output_indifferent("Redirect mechanism is not strong.")

    return redirect_strong

def are_spf_include_mechanisms_strong(spf_record):
    output_info("Checking SPF include mechanisms")
    include_strong = spf_record._are_include_mechanisms_strong()
    if include_strong:
        output_bad("Include mechanisms include a strong record")
    else:
        output_indifferent("Include mechanisms are not strong")

    return include_strong

def check_spf_include_redirect(spf_record):
    other_records_strong = False
    if spf_record.get_redirect_domain() is not None:
        other_records_strong = is_spf_redirect_record_strong(spf_record)

    if not other_records_strong:
        other_records_strong = are_spf_include_mechanisms_strong(spf_record)

    return other_records_strong

def check_spf_all_string(spf_record):
    strong_spf_all_string = True
    if spf_record.all_string is not None:
        if spf_record.all_string == "~all" or spf_record.all_string == "-all":
            output_indifferent("SPF record contains an All item: " + spf_record.all_string)
        else:
            output_good("SPF record All item is too weak: " + spf_record.all_string)
            strong_spf_all_string = False
    else:
        output_good("SPF record has no All string")
        strong_spf_all_string = False

    if not strong_spf_all_string:
        strong_spf_all_string = check_spf_include_redirect(spf_record)

    return strong_spf_all_string

def is_spf_record_strong(domain):
    strong_spf_record = True
    spf_record = spflib.SpfRecord.from_domain(domain)
    if spf_record is not None and spf_record.record is not None:
        output_info("Found SPF record:")
        output_info(str(spf_record.record))

        strong_all_string = check_spf_all_string(spf_record)
        if strong_all_string is False:

            redirect_strength = check_spf_redirect_mechanisms(spf_record)
            include_strength = check_spf_include_mechanisms(spf_record)

            strong_spf_record = False

            if redirect_strength is True:
                strong_spf_record = True

            if include_strength is True:
                strong_spf_record = True
    else:
        output_good(domain + " has no SPF record!")
        strong_spf_record = False

    return strong_spf_record

def get_dmarc_record(domain):
    dmarc = dmarclib.DmarcRecord.from_domain(domain)
    if dmarc is not None and dmarc.record is not None:
        output_info("Found DMARC record:")
        output_info(str(dmarc.record))
    return dmarc

def get_dmarc_org_record(base_record):
    org_record = base_record.get_org_record()
    if org_record is not None:
        output_info("Found DMARC Organizational record:")
        output_info(str(org_record.record))
    return org_record

def check_dmarc_extras(dmarc_record):
    if dmarc_record.pct is not None and dmarc_record.pct != str(100):
            output_indifferent("DMARC pct is set to " + dmarc_record.pct + "% - might be possible")

    if dmarc_record.rua is not None:
        output_indifferent("Aggregate reports will be sent: " + dmarc_record.rua)

    if dmarc_record.ruf is not None:
        output_indifferent("Forensics reports will be sent: " + dmarc_record.ruf)

def check_dmarc_policy(dmarc_record):
    policy_strength = False
    if dmarc_record.policy is not None:
        if dmarc_record.policy == "reject" or dmarc_record.policy == "quarantine":
            policy_strength = True
            output_bad("DMARC policy set to " + dmarc_record.policy)
        else:
            output_good("DMARC policy set to " + dmarc_record.policy)
    else:
        output_good("DMARC record has no Policy")

    return policy_strength

def check_dmarc_org_policy(base_record):
    policy_strong = False

    try:
        org_record = base_record.get_org_record()
        if org_record is not None and org_record.record is not None:
            output_info("Found organizational DMARC record:")
            output_info(str(org_record.record))

            if org_record.subdomain_policy is not None:
                if org_record.subdomain_policy == "none":
                    output_good("Organizational subdomain policy set to %(sp)s" % {"sp": org_record.subdomain_policy})
                elif org_record.subdomain_policy == "quarantine" or org_record.subdomain_policy == "reject":
                    output_bad("Organizational subdomain policy explicitly set to %(sp)s" % {"sp": org_record.subdomain_policy})
                    policy_strong = True
            else:
                output_info("No explicit organizational subdomain policy. Defaulting to organizational policy")
                policy_strong = check_dmarc_policy(org_record)
        else:
            output_good("No organizational DMARC record")

    except dmarclib.OrgDomainException:
        output_good("No organizational DMARC record")

    except Exception as e:
        logging.exception(e)

    return policy_strong

def is_dmarc_record_strong(domain):
    dmarc_record_strong = False

    dmarc = get_dmarc_record(domain)

    if dmarc is not None and dmarc.record is not None:
        dmarc_record_strong = check_dmarc_policy(dmarc)

        check_dmarc_extras(dmarc)
    elif dmarc.get_org_domain() is not None:
        output_info("No DMARC record found. Looking for organizational record")
        dmarc_record_strong = check_dmarc_org_policy(dmarc)
    else:
        output_good(domain + " has no DMARC record!")

    return dmarc_record_strong

if __name__ == "__main__":
    color_init()
    spoofable = False

    try:
        domain = sys.argv[1]

        spf_record_strength = is_spf_record_strong(domain)

        dmarc_record_strength = is_dmarc_record_strong(domain)
        if dmarc_record_strength is False:
            spoofable = True
        else:
            spoofable = False

        if spoofable:
            output_good("Spoofing possible for " + domain + "!")
        else:
            output_bad("Spoofing not possible for " + domain)

    except IndexError:
        output_error("Usage: " + sys.argv[0] + " [DOMAIN]")


text:
// Generated by CoffeeScript 1.6.3
/*
  EasyWebWorker v0.2.1
  Rames Aliyev -2013

  -> easywebworker.com
*/

var EasyWebWorker, _ExecuteStructure, _WorkerFallback, _WorkerSideController, _WorkerSideFallback,
  __hasProp = {}.hasOwnProperty,
  __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
  __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };

_ExecuteStructure = (function() {
  function _ExecuteStructure() {}

  _ExecuteStructure.prototype.execute = function(args) {
    var arg, _i, _len, _results;
    _results = [];
    for (_i = 0, _len = args.length; _i < _len; _i++) {
      arg = args[_i];
      _results.push(arg);
    }
    return _results;
  };

  _ExecuteStructure.prototype.listen = function(event) {
    var args, context, depth, func, funcName, nestedFunc, order, _i, _len;
    args = event.data;
    funcName = args[0];
    args = args.slice(1);
    args.unshift(event);
    if (funcName.indexOf(".") !== -1) {
      nestedFunc = funcName.split(".");
      if (nestedFunc[0] === "window" && event.caller === "WebWorker") {
        funcName = window;
        nestedFunc = nestedFunc.slice(1);
      } else {
        funcName = this.context;
      }
      depth = nestedFunc.length;
      for (order = _i = 0, _len = nestedFunc.length; _i < _len; order = ++_i) {
        func = nestedFunc[order];
        funcName = funcName[func];
        if (order === depth - 2) {
          context = funcName;
        }
      }
      return funcName.apply(context, args);
    } else {
      return this.context[funcName].apply(this.context, args);
    }
  };

  return _ExecuteStructure;

})();

EasyWebWorker = (function(_super) {
  __extends(EasyWebWorker, _super);

  function EasyWebWorker(fileUrl, callerContext, startupData) {
    var joiner, queryString,
      _this = this;
    this.fileUrl = fileUrl;
    this.callerContext = callerContext;
    this.context = this.callerContext;
    if (startupData != null) {
      joiner = this.fileUrl.indexOf("?") !== -1 ? "&" : "?";
      queryString = startupData !== null ? JSON.stringify(startupData) : null;
      this.fileUrl += joiner + queryString;
    }
    this.worker = new Worker(this.fileUrl, this);
    this.worker.onmessage = function() {
      return _this.listen.apply(_this, arguments);
    };
    this.worker.onerror = function(event) {
      return _this.error.call(_this, event, event.filename, event.lineno, event.message);
    };
  }

  EasyWebWorker.prototype.listen = function(event) {
    event.caller = "WebWorker";
    return EasyWebWorker.__super__.listen.call(this, event);
  };

  EasyWebWorker.prototype.execute = function() {
    return this.worker.postMessage(EasyWebWorker.__super__.execute.call(this, arguments));
  };

  EasyWebWorker.prototype.error = function() {
    if (this.onerror instanceof Function) {
      return this.onerror.apply(this.callerContext, arguments);
    }
  };

  EasyWebWorker.prototype.terminate = function() {
    return this.worker.terminate();
  };

  EasyWebWorker.prototype.close = function() {
    return this.worker.terminate();
  };

  return EasyWebWorker;

})(_ExecuteStructure);

_WorkerSideController = (function(_super) {
  __extends(_WorkerSideController, _super);

  function _WorkerSideController(self) {
    var locationHref, splitBy, startupData,
      _this = this;
    this.self = self;
    this.context = this.self;
    locationHref = this.self.location.href;
    if (locationHref.indexOf("&") !== -1) {
      splitBy = "&";
    } else if (locationHref.indexOf("?") !== -1) {
      splitBy = "?";
    } else {
      splitBy = false;
    }
    if (splitBy !== false) {
      startupData = locationHref.split(splitBy);
      startupData = startupData[startupData.length - 1];
    }
    if (startupData !== null && startupData !== void 0) {
      this.self.startupData = JSON.parse(decodeURIComponent(startupData));
    } else {
      this.self.startupData = null;
    }
    this.self.onmessage = function() {
      return _this.listen.apply(_this, arguments);
    };
  }

  _WorkerSideController.prototype.listen = function(event) {
    event.caller = "WebBrowser";
    return _WorkerSideController.__super__.listen.call(this, event);
  };

  _WorkerSideController.prototype.execute = function() {
    return this.self.postMessage(_WorkerSideController.__super__.execute.call(this, arguments));
  };

  _WorkerSideController.prototype.log = function() {
    return this.self.execute("window.console.log", arguments);
  };

  return _WorkerSideController;

})(_ExecuteStructure);

_WorkerSideFallback = (function(_super) {
  __extends(_WorkerSideFallback, _super);

  function _WorkerSideFallback() {
    _WorkerSideFallback.__super__.constructor.call(this, {
      location: {
        href: easyWebWorkerInstance.fileUrl
      }
    });
    this.startupData = this.self.startupData;
  }

  _WorkerSideFallback.prototype.terminate = function() {
    return easyWebWorkerInstance.worker.terminate();
  };

  _WorkerSideFallback.prototype.log = function() {
    return console.log.apply(console, arguments);
  };

  _WorkerSideFallback.prototype.execute = function() {
    var arg;
    return easyWebWorkerInstance.listen.call(easyWebWorkerInstance, {
      worker_fallback: true,
      data: (function() {
        var _i, _len, _results;
        _results = [];
        for (_i = 0, _len = arguments.length; _i < _len; _i++) {
          arg = arguments[_i];
          _results.push(arg);
        }
        return _results;
      }).apply(this, arguments)
    });
  };

  return _WorkerSideFallback;

})(_WorkerSideController);

_WorkerFallback = (function() {
  var importscripts_regexp;

  importscripts_regexp = /importScripts\(["'](.*?)["']\)[;,]/gi;

  function _WorkerFallback(file, easyWebWorkerInstance, files, quene, depth, worker) {
    this.easyWebWorkerInstance = easyWebWorkerInstance;
    this.files = files != null ? files : {};
    this.quene = quene != null ? quene : [];
    this.depth = depth != null ? depth : 0;
    this.worker = worker != null ? worker : null;
    this.terminate = __bind(this.terminate, this);
    this._initializeScript = __bind(this._initializeScript, this);
    this._loadFile(file, true);
  }

  _WorkerFallback.prototype._loadFile = function(file, is_main) {
    var XHR, content, error, fileLoaded,
      _this = this;
    if (is_main == null) {
      is_main = false;
    }
    content = null;
    if (!is_main) {
      this.files[file].content = null;
    }
    XHR = new XMLHttpRequest() || new ActiveXObject("Msxml2.XMLHTTP") || new ActiveXObject("Microsoft.XMLHTTP");
    XHR.onreadystatechange = function() {
      if (XHR.readyState === 4 && (XHR.status === 200 || window.location.href.indexOf("http") === -1)) {
        return fileLoaded();
      }
    };
    fileLoaded = function() {
      content = XHR.responseText;
      if (is_main) {
        _this.files['main'] = {
          content: content,
          depth: 0
        };
      } else {
        _this.files[file].content = content;
      }
      return _this._importScripts(content);
    };
    try {
      XHR.open('GET', file, true);
      return XHR.send(null);
    } catch (_error) {
      error = _error;
      if (typeof XDomainRequest !== "undefined") {
        XHR = new XDomainRequest();
        XHR.onerror = XHR.onprogress = function() {};
        XHR.onload = fileLoaded;
        XHR.open('GET', file, true);
        return XHR.send(null);
      }
    }
  };

  _WorkerFallback.prototype._importScripts = function(content) {
    var all_loaded, data, filename, matched, matches, _i, _len, _ref, _ref1, _ref2,
      _this = this;
    matches = content.match(importscripts_regexp);
    if (matches != null) {
      this.depth++;
      for (_i = 0, _len = matches.length; _i < _len; _i++) {
        matched = matches[_i];
        this.files[matched.replace(importscripts_regexp, ";$1;")] = {
          content: void 0,
          depth: this.depth
        };
      }
    }
    _ref = this.files;
    for (filename in _ref) {
      data = _ref[filename];
      if (data.content === void 0 && filename !== "main") {
        this._loadFile(filename);
      }
    }
    all_loaded = true;
    _ref1 = this.files;
    for (filename in _ref1) {
      data = _ref1[filename];
      if (data.content === void 0 || data.content === null) {
        all_loaded = false;
      }
    }
    if (all_loaded) {
      while (this.depth--) {
        _ref2 = this.files;
        for (filename in _ref2) {
          data = _ref2[filename];
          if (data.depth === this.depth) {
            this.files[filename].content = this.files[filename].content.replace(importscripts_regexp, function(to_replace, filename, pos, content) {
              return _this.files[filename].content;
            });
          }
        }
      }
      return this._initializeScript(this.files.main.content);
    }
  };

  _WorkerFallback.prototype._initializeScript = function(script) {
    var command, _i, _len, _ref, _results,
      _this = this;
    (function() {
      var easyWebWorkerInstance, self;
      easyWebWorkerInstance = _this.easyWebWorkerInstance;
      eval(script);
      self = new _WorkerSideFallback();
      return _this.worker = function(command) {
        var args, event, funcContext, funcName;
        event = {
          caller: "WebBrowser",
          command: command
        };
        funcName = command[0];
        args = command.slice(1);
        args.unshift(event);
        if (funcName.indexOf(".") !== -1) {
          funcContext = funcName.split(".");
          funcContext.pop();
          funcContext = funcContext.join(".");
          funcContext = eval(funcContext);
        } else {
          funcContext = eval(funcName);
        }
        return eval(funcName).apply(funcContext, args);
      };
    })();
    _ref = this.quene;
    _results = [];
    for (_i = 0, _len = _ref.length; _i < _len; _i++) {
      command = _ref[_i];
      _results.push(this.worker(command));
    }
    return _results;
  };

  _WorkerFallback.prototype.postMessage = function(command) {
    if (this.worker != null) {
      return this.worker(command);
    } else {
      return this.quene.push(command);
    }
  };

  _WorkerFallback.prototype.terminate = function() {
    return this.worker = function() {
      return null;
    };
  };

  return _WorkerFallback;

})();

if (this.document !== void 0 && !window.Worker) {
  window.Worker = _WorkerFallback;
}

if (this.document === void 0) {
  self.caller = new _WorkerSideController(self);
  self.execute = self.caller.execute;
  self.log = self.caller.log;
}

/*
//@ sourceMappingURL=easy-web-worker.map
*/


text:
@interface UIImage (FromColor)

+ (UIImage *)tjs_imageWithColor:(UIColor *)color;

+ (UIImage *)tjs_imageWithColor:(UIColor *)color
                       size:(CGSize)size;

+ (UIImage *)tjs_imageWithColor:(UIColor *)color
                           size:(CGSize)size
                   cornerRadius:(CGFloat)cornerRadius;

@end


text:
/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.facebook.presto.sql.gen;

import com.facebook.presto.bytecode.BytecodeBlock;
import com.facebook.presto.bytecode.BytecodeNode;
import com.facebook.presto.bytecode.Variable;
import com.facebook.presto.bytecode.control.IfStatement;
import com.facebook.presto.spi.relation.RowExpression;
import com.facebook.presto.spi.type.Type;
import com.google.common.collect.Lists;

import java.util.ArrayList;
import java.util.List;
import java.util.Optional;

import static com.facebook.presto.bytecode.expression.BytecodeExpressions.constantFalse;
import static com.facebook.presto.bytecode.expression.BytecodeExpressions.constantTrue;
import static com.facebook.presto.sql.gen.SpecialFormBytecodeGenerator.generateWrite;

public class CoalesceCodeGenerator
        implements SpecialFormBytecodeGenerator
{
    @Override
    public BytecodeNode generateExpression(BytecodeGeneratorContext generatorContext, Type returnType, List<RowExpression> arguments, Optional<Variable> outputBlockVariable)
    {
        List<BytecodeNode> operands = new ArrayList<>();
        for (RowExpression expression : arguments) {
            operands.add(generatorContext.generate(expression, Optional.empty()));
        }

        Variable wasNull = generatorContext.wasNull();
        BytecodeNode nullValue = new BytecodeBlock()
                .append(wasNull.set(constantTrue()))
                .pushJavaDefault(returnType.getJavaType());

        // reverse list because current if statement builder doesn't support if/else so we need to build the if statements bottom up
        for (BytecodeNode operand : Lists.reverse(operands)) {
            IfStatement ifStatement = new IfStatement();

            ifStatement.condition()
                    .append(operand)
                    .append(wasNull);

            // if value was null, pop the null value, clear the null flag, and process the next operand
            ifStatement.ifTrue()
                    .pop(returnType.getJavaType())
                    .append(wasNull.set(constantFalse()))
                    .append(nullValue);

            nullValue = ifStatement;
        }

        BytecodeBlock block = new BytecodeBlock()
                .append(nullValue);
        outputBlockVariable.ifPresent(output -> block.append(generateWrite(generatorContext, returnType, output)));
        return block;
    }
}


text: Polymer behavior to provide a connection to a socket.io endpoint


text: Azul's Zulu JDK on Alpine Linux