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
/* Check | |
www.cryptowaves.app | |
for Real-Time Crypto Market RSI Alerts! */ | |
[ | |
{ | |
"id": 1, | |
"name": "Bitcoin", |
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
{ | |
_id: "4c6b9456f61f000000007ba6" | |
title: [ | |
{ version: 1, value: "Hello world" }, | |
{ version: 6, value: "Foo" } | |
], | |
body: [ | |
{ version: 1, value: "Is this thing on?" }, | |
{ version: 2, value: "What should I write?" }, | |
{ version: 6, value: "This is the new body" } |
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
{ | |
$lookup: | |
{ | |
from: <collection to join>, | |
localField: <field from the input documents>, | |
foreignField: <field from the documents of the "from" collection>, | |
as: <output array field> | |
} | |
} |
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
{ | |
_id: "4c6b9456f61f000000007ba6" | |
title: "Bar", | |
body: "Is this thing on?", | |
tags: [ "test", "trivial" ], | |
comments: [ | |
{ key: 1, author: "joe", body: "Something cool" }, | |
{ key: 2, author: "xxx", body: "Spam", deleted: true }, | |
{ key: 3, author: "jim", body: "Not bad at all" } | |
], |
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
double fibbonaci(int n){ | |
double prev=0d, next=1d, result=0d; | |
for (int i = 0; i < n; i++) { | |
result=prev+next; | |
prev=next; | |
next=result; | |
} | |
return result; | |
} |
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
function fibonacci(num, memo) { | |
memo = memo || {}; | |
if (memo[num]) return memo[num]; | |
if (num <= 1) return 1; | |
return memo[num] = fibonacci(num - 1, memo) + fibonacci(num - 2, memo); | |
} |
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
16/192 = 0.08333333... | |
208/16 = 13 | |
... | |
11984/7408 = 1.61771058... | |
19392/11984 = 1.61815754... |
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
def FibonacciSearch(lys, val): | |
fibM_minus_2 = 0 | |
fibM_minus_1 = 1 | |
fibM = fibM_minus_1 + fibM_minus_2 | |
while (fibM < len(lys)): | |
fibM_minus_2 = fibM_minus_1 | |
fibM_minus_1 = fibM | |
fibM = fibM_minus_1 + fibM_minus_2 | |
index = -1; | |
while (fibM > 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
// |<-- p: F(n-2) - 1 -->| | |
// |<--- q --->| |<- r ->| | |
// +---+---+---+ | |
// | | k | | m | |
// +---+---+---+ | |
// ^ |
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
def SubFib(startNumber, endNumber): | |
for cur in F(): | |
if cur > endNumber: return | |
if cur >= startNumber: | |
yield cur | |
for i in SubFib(10, 200): | |
print i |
NewerOlder