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
// In TS, interfaces are "open" and can be extended | |
interface Date { | |
/** | |
* Give a more precise return type to the method `toISOString()`: | |
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString | |
*/ | |
toISOString(): TDateISO; | |
} | |
type TYear = `${number}${number}${number}${number}`; |
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 <algorithm> | |
#include <string> | |
#include <vector> | |
using namespace std; | |
const int K = 26; | |
struct Vertex { |
⚠️ ⚠️ This Gist Has Been Moved to This Repo ⚠️ ⚠️
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
// smart_ptr_deleters.cpp | |
// shows how to use custom deleters with unique_ptr and shared_ptr | |
// Bartlomiej Filipek, April 2016, bfilipek.com | |
#include <iostream> | |
#include <memory> | |
#include <functional> | |
#include <cassert> | |
// This class cannot be changed, might come from 3rd party library |