Finding number of strongly connected components in graph.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
127.0.0.1:8529@nimpee> c = db._collection("eLink"); /* use actual collection name here */ | |
[ArangoCollection 1262901971, "eLink" (type edge, status loaded)] | |
127.0.0.1:8529@nimpee> db._explain('FOR r IN @@collection FILTER r._from == "vDevice/1740442563" RETURN r', { '@collection': c.name() }); | |
Query String (69 chars, cacheable: true): | |
FOR r IN @@collection FILTER r._from == "vDevice/1740442563" RETURN r | |
Execution plan: | |
Id NodeType Est. Comment | |
1 SingletonNode 1 * ROOT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const findFirstOccurrence = (string, searchElements, fromIndex = 0) => { | |
let min = string.length; | |
for (let i = 0; i < searchElements.length; i += 1) { | |
const occ = string.indexOf(searchElements[i], fromIndex); | |
if (occ !== -1 && occ < min) { | |
min = occ; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# default starting url | |
seed = "http://opera.com/" | |
# workers number | |
workers = 20 | |
# max number of discovered URL, None if no limit | |
limit = 10000 | |
# user-agent name and logging name |