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
| /* | |
| Example of solving the MillionGazillion Web Crawler problem: | |
| A web crawler is storing visited urls in an array, but memory is running low on the computer, due to the array size growing too large. | |
| A solution is to compress the urls by replacing common portions with single character replacements and by breaking up the domain | |
| and path of urls, to store paths on the same domain, without repeating the domain portion of the url. If a web site has 1,000 pages, | |
| only 1 domain entry will be added to the array, and 1,000 paths will be added under it, saving the space from repeating the entire url. | |
| This test shows a savings of 74% memory usage. | |
| */ | |
| var visited1 = {}; |
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
| This question was found at https://www.careercup.com/question?id=5750868554022912 | |
| Suppose a row of parking lot with n spots, one of them is empty and n-1 spots are occupied with cars. | |
| Only one operation is allowed: move one car from its position to the empty spot. | |
| Given a initial order of cars and a final order, output steps needed to convert initial order to final oder with that operation. | |
| Solution | |
| ======== | |
| This type of planning problem can be solved using the AI planning algorithm STRIPS. |
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 alexa = require('alexa-app'); | |
| var app = new alexa.app('myapp'); | |
| app.intent('showCard', { | |
| 'slots': {}, | |
| 'utterances': [ 'show card' ] | |
| }, | |
| function(req, res) { | |
| // Show home card in Alexa app. |
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
| { | |
| "name": "alexa-app-server", | |
| "version": "2.2.4", | |
| "description": "A web server module for Alexa (Amazon Echo) skills ..", | |
| "main": "index.js", | |
| "author": "Author Name", | |
| "dependencies": { | |
| "alexa-app": "^2.1.0", | |
| "bluebird": "^2.9.34", | |
| "body-parser": "~1.0.1", |
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
| # | |
| # [2016-12-22] Challenge #296 [Intermediate] Intersecting Area Of Overlapping Rectangles | |
| # You need to find the area that two rectangles overlap. The section you need to output the area of would be the blue lined section here: http://i.imgur.com/brZjYe5.png If the two rectangles do not overlap, the resultant area should be NA. | |
| # https://www.reddit.com/r/dailyprogrammer/comments/5jpt8v/20161222_challenge_296_intermediate_intersecting/ | |
| # Demo at http://www.r-fiddle.org/#/fiddle?id=VL0FGiNT&version=3 | |
| # | |
| # by Kory Becker | |
| # http://primaryobjects.com | |
| # |
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
| https://paypal.com/us/cgi-bin/webscr?cmd=_account |
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
| # | |
| # [2016-12-12] Challenge #295 [Easy] Letter by letter | |
| # hange the a sentence to another sentence, letter by letter. The sentences will always have the same length. | |
| # https://www.reddit.com/r/dailyprogrammer/comments/5hy8sm/20161212_challenge_295_easy_letter_by_letter/ | |
| # Demo at http://www.r-fiddle.org/#/fiddle?id=gdBm15yC | |
| # | |
| # by Kory Becker | |
| # http://primaryobjects.com | |
| # |
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 appServer = require('./index'); | |
| appServer.start({ port: process.env.PORT || 3000, debug: true }); |
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
| document.querySelector("iframe[name=\'view_frame\']").contentDocument.querySelector("iframe[name=\'iframe_model\']").contentDocument.querySelector("input[type=submit]") |