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
struct foo { | |
std::string type; | |
std::string value; | |
void process(const std::string&, const std::string&); | |
}; |
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
struct foo { | |
template <typename T> | |
foo(T p_object) { | |
p_object.process("hello"); | |
} | |
}; | |
struct bar { | |
void process(const std::string& p_value) { std::cout << p_value << "\n"; } | |
}; |
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
7 | |
helloworld | |
5.25 |
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
6 | |
Add int 5 | |
Add string hello | |
Add float 3.5 | |
Process int 2 | |
Process string world | |
Process float 1.5 |
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 <iostream> | |
#include <memory> | |
#include <vector> | |
class object_ { | |
private: | |
struct concept_ { | |
virtual void process(const std::string& p_value) = 0; | |
virtual void out(std::ostream& p_ostream) const = 0; |
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 <algorithm> | |
#include <functional> | |
#include <iostream> | |
#include <memory> | |
#include <string> | |
#include <vector> | |
// Problem: Stock Price Alert System | |
// | |
// Description: |
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
namespace deduce_type { | |
namespace use_decltype { | |
struct result { | |
int value; | |
result() : value{1} {} | |
explicit result(int p_value) : value{p_value} {} |
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 <iostream> | |
#include <string> | |
namespace curiously_recurring_template_pattern { | |
namespace a { | |
template <class T> | |
class base { | |
public: |
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
const { useState } = React; | |
// Which patterns do we use? | |
// React children can be utilized as a function, experiment with it | |
function F(props) { | |
console.log(props.children); | |
console.log(props.children(0)); | |
console.log(props.children(0, 1)); | |
console.log(props.children([])); | |
return props.children(); |
NewerOlder