This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import List, Queue, Hash from lang.data | |
| import fetch, normalize_url from http.utils | |
| import write_file from lang.io | |
| function crawl(start_url) { | |
| crawled = new List | |
| queue = new Queue | |
| visited = new Hash | |
| start_url = normalize_url(start_url) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict'; | |
| angular.module('Component', []) | |
| .factory('Component', function () { | |
| return function(bindings, template, linkFn, options) { | |
| var directive = { | |
| scope: parseBindings(bindings), | |
| template: parseTemplate(template), | |
| link: linkFn |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| angular.module("myApp") | |
| .config(function ($provide) { | |
| $provide.decorator('$q', function($delegate) { | |
| var defer = $delegate.defer; | |
| $delegate.defer = function() { | |
| var deferred = defer(); | |
| deferred.promise.set = function(object, property) { | |
| return deferred.promise.then(function(value) { | |
| object[property] = value; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| angular.module("myApp").run(function ($rootScope) { | |
| var proto = Object.getPrototypeOf($rootScope); | |
| angular.extend(proto, { | |
| $waitFor: function (expression, fn) { | |
| var un = this.$watch(expression, function (value) { | |
| if (value === undefined) return; | |
| un(); | |
| return fn(value); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| angular.module('ProductsService', []).factory('Products', ['$http', function ($http) { | |
| return { | |
| get: function () { | |
| return $http.get('/api/products'); | |
| }, | |
| create: function (data) { | |
| return $http.get('/api/products', data); | |
| }, | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //FightCode can only understand your robot | |
| //if its class is called Robot | |
| var direction = 1; | |
| var moveStep = 7; | |
| var rotateStep = 1; | |
| var initialized = false; | |
| var noScanCount = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var Robot = function(robot){ | |
| robot.turnLeft(robot.angle % 90); | |
| //robot.turnGunRight(90); | |
| robot.clone(); | |
| this.direction = 1; | |
| }; | |
| Robot.prototype.onIdle = function(ev) { | |
| var robot = ev.robot; | |
| robot.ahead(1); | |
| if (robot.parentId) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (ns ego-checker.core | |
| (:require [clj-http.client :as http] | |
| [clojure.data.csv :as csv] | |
| [clojure.java.io :as io])) | |
| (def *file-urls* "lista-urls.txt") | |
| (def *log-file-path* "error.log") | |
| (defn test-url [url] | |
| (try (let [resp (http/get url {:follow-redirects false})] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Using org.netbeans.jemmy.drivers.DefaultDriverInstaller driver installer | |
| It takes a while for the scenarios to begin executing, so please be patient... | |
| Source: button_steps.rb:1 | |
| I click the button "([^\"]*)" | |
| I click the button "([^\"]*)" no block | |
| Source: checkbox_steps.rb:1 | |
| I click the checkbox "([^\"]*)" | |
| the checkbox "([^\"]*)" should (not )*be selected |
NewerOlder