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
#include <iostream> | |
#include <string> | |
#include <vector> | |
struct B{ | |
int val = 78; | |
}; | |
class A{ | |
const B &b; |
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
#include <cmath> | |
#include <iostream> | |
int getNumberPart(int number, unsigned int start, unsigned int stop) | |
{ | |
return (number % static_cast<int>(std::pow(10,stop)) - number % static_cast<int>(std::pow(10,start))) / static_cast<int>(std::pow(10,start)); | |
} | |
int main() | |
{ |
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
#include <stdio.h> | |
#include <stdint.h> | |
#include <utility> | |
#include <iostream> | |
#include <cstdint> | |
template <typename T> | |
void switchBit(T &data, uint fisrt, uint second) | |
{ |
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
$time = [DateTime]::Now.AddMinutes(45) | |
$date=$time.ToString("d") | |
$hourMinute=$time.ToString("t") | |
Write-Host($date); | |
Write-Host($hourMinute); | |
schtasks /create /tn "$env:UserName\Hibernate" /tr "shutdown /h" /sc once /sd $date /st $hourMinute /f |
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
#include <iostream> | |
class A | |
{ | |
public: | |
int i = 0; | |
public: | |
A() | |
{ |
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
//https://docs.microsoft.com/fr-fr/visualstudio/debugger/finding-memory-leaks-using-the-crt-library?view=vs-2019 | |
//https://support.microsoft.com/en-us/help/151585/how-to-use-crtbreakalloc-to-debug-a-memory-allocation | |
#include <iostream> | |
//include to set flag | |
#include <stdlib.h> | |
#include <crtdbg.h> | |
//define it at compilation property level for apply at project level |
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
#include<iostream> | |
constexpr inline size_t _Hash_seq(const char *_First, size_t _Count) | |
{ // FNV-1a hash function for bytes in [_First, _First+_Count) | |
#if defined(_M_X64) || defined(_LP64) || defined(__x86_64) || defined(_WIN64) | |
static_assert(sizeof(size_t) == 8, "This code is for 64-bit size_t."); | |
const size_t _FNV_offset_basis = 14695981039346656037ULL; | |
const size_t _FNV_prime = 1099511628211ULL; |
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
#include <sstream> | |
#include <iostream> | |
#include <vector> | |
template <unsigned int i> | |
class A | |
{ | |
A<i-1> a; | |
public: | |
void show() |
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
#include <sstream> | |
#include <iostream> | |
#include <vector> | |
class CudaLog | |
{ | |
void cudaLog(std::ostream &stream) | |
{ | |
stream << std::endl << "This is the end!" << std::endl; | |
} |
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
#define _CRT_SECURE_NO_WARNINGS | |
#include <windows.h> | |
#include <stdio.h> | |
#include <iostream> | |
#pragma comment(lib, "version.lib") | |
//---------------------------------------------------------------------- | |
int GetProductVersion(const char *szFile, char *szProductVer, size_t len) |
NewerOlder