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
// Example usage | |
const data = { a: 1, b: { c: 2, d: [1, 2, 3] } }; | |
const data2 = JSON.parse(JSON.stringify(data)); | |
const proxy = createProxy(data, (diff) => { | |
applyDiff(data2, diff); | |
console.log(data2, diff); | |
}); | |
proxy.a = 2; |
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 std::cell::RefCell; | |
use crate::gc::{collect, Gc, GcCtx, Trace}; | |
#[derive(Clone)] | |
struct Node { | |
id: usize, | |
next: RefCell<Option<Gc<Node>>>, | |
} |
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
C++ 12 hrs 55 mins ████████████████████░ 95.6% | |
Java 27 mins ▋░░░░░░░░░░░░░░░░░░░░ 3.3% | |
ObjectiveC 4 mins ░░░░░░░░░░░░░░░░░░░░░ 0.6% | |
C 1 min ░░░░░░░░░░░░░░░░░░░░░ 0.2% | |
Brainfuck 1 min ░░░░░░░░░░░░░░░░░░░░░ 0.2% |
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
/** | |
* @class field | |
* Number that is in modular Mod | |
* | |
* @tparam Mod should be prime number | |
*/ | |
template<long long Mod> | |
class field { |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
/** | |
* @class rbtree | |
* | |
* @details Red Black Tree Implementation | |
* | |
* @author Jaeyong Sung | |
* | |
* @date April 29, 2018 | |
*/ |
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
#include <bits/stdc++.h> | |
using namespace std; | |
int func(int a, int b) { | |
// binary function | |
// ex) return gcd(a, b); | |
// ex) return a * b; | |
// ex) return a ^ b; | |
// BUT! associated law has to be held |
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
#include <bits/stdc++.h> | |
using namespace std; | |
// identity element of binary function | |
int e = 0; | |
int func(int a, int b) { | |
// binary function | |
// ex) return gcd(a, b); |
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
#include <bits/stdc++.h> | |
using namespace std; | |
int func(int a, int b) { | |
// binary function | |
// ex) return gcd(a, b); | |
// ex) return a * b; | |
// ex) return a ^ b; | |
// BUT! associated law has to be held |
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
#include <bits/stdc++.h> | |
using namespace std; | |
int func(int a, int b) { | |
// binary function | |
// ex) return gcd(a, b); | |
// ex) return a * b; | |
// ex) return a ^ b; | |
// BUT! associated law has to be held |