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
anubhavujjawal@Anubhavs-MacBook-Air ~/Desktop/work/topcoder/mockup-server master yarn run test | |
yarn run v1.16.0 | |
$ NODE_ENV=test nyc mocha src/tests/**/*.js --exit | |
JSON Server is running on port 3000 | |
Generators Tests | |
getUsers | |
✓ should return array of Users having length and password as passed in argument. | |
getApplicationIds |
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
======================================================================= test session starts ======================================================================== | |
platform darwin -- Python 3.7.0, pytest-3.3.0, py-1.8.0, pluggy-0.6.0 | |
rootdir: /Users/anubhavujjawal/Desktop/Misc/MongoDB/M220P-mongoDB-for-python-devs/mflix-python, inifile: | |
plugins: flask-0.10.0 | |
collected 43 items | |
tests/test_db_connection.py FFFF [100%] | |
============================================================================= FAILURES ============================================================================= |
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 Regexp; | |
proc isFullString(in obj):bool { | |
var obj2 = obj:string; | |
var myRegexp = compile("a+"); | |
writeln(obj2.match(myRegexp)); | |
return true; | |
} | |
writeln(isFullString("abcdef"), isFullString("aaa"), isFullString("a"), isFullString("")); |
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 Regexp; | |
proc isFullString(in obj): bool { | |
var obj2 = obj:string; | |
var myRegexp = compile("a+"); | |
writeln(obj2.match(myRegexp)); | |
} | |
writeln(isFullString("abcdef"), isFullString("aaa"), isFullString("a"), isFullString("")); |
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
proc lcsDPTable(str1: string, str2: string) { | |
// writeln(str1, " ", str2); | |
var dpTable: [1..str1.size+1, 1..str2.size+1] int, i, j: int; | |
const n = str1.size; | |
const m = str2.size; | |
var lcs: string; | |
for i in 1..n { | |
for j in 1..m { | |
if str1[i] == str2[j] { | |
dpTable[i+1, j+1] = dpTable[i, j] + 1; |