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
SELECT deqs.last_execution_time, dest.text | |
FROM sys.dm_exec_query_stats AS deqs | |
CROSS APPLY sys.dm_exec_sql_text(deqs.sql_handle) AS dest | |
WHERE dest.text LIKE N'%<table_name>%' | |
AND deqs.last_execution_time >= '2020-01-01 00:00:00.000' | |
ORDER BY deqs.last_execution_time DESC |
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
#pragma once | |
#include <QObject> | |
#include <memory> | |
template <class T> | |
class circular_buffer | |
{ | |
public: | |
explicit circular_buffer(size_t size) |
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
Set-Location -Path D:\Projects\SomeProject # Path to your sources | |
foreach ($file in Get-ChildItem) | |
{ | |
if ($file -like "*.cpp" -or $file -like "*.h") { | |
Write-Host "Processing " -ForegroundColor Red -NoNewline | |
Write-Host $file | |
Set-Content -Encoding UTF8 -Path $file -Value (Get-Content $file) | |
} | |
} | |
Write-Host "All files has been recoded" -ForegroundColor Green |
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
// LINK TO EXERCISE: https://www.hackerrank.com/challenges/2d-array/problem | |
#include <bits/stdc++.h> | |
using namespace std; | |
// Complete the hourglassSum function below. | |
int hourglassSum(vector<vector<int>> arr) { | |
if (arr.size() < 3 || arr[0].size() < 3) return 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 <iostream> | |
using namespace std; | |
class Singleton { | |
public: | |
static Singleton& instance(); | |
int increment() { return ++x; } | |
private: | |
Singleton() = default; |
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
from bs4 import BeautifulSoup | |
import requests | |
import re | |
import gi | |
gi.require_version('Notify', '0.7') | |
from gi.repository import Notify | |
Notify.init('PeopleNet Account') | |
params = {'X_Username': 'your_username', 'X_Password': 'your_password'} |
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 Printer { | |
constructor(label = "Unknown", pageSize = "A4", amountOfDye = 100, amountOfPaper = 50, powerState = "off") { | |
this.label = label; | |
this.pageSize = pageSize; | |
this.amountOfDye = amountOfDye; | |
this.amountOfPaper = amountOfPaper; | |
this.powerState = powerState; | |
} | |
addPaper(amount) { | |
this.amountOfPaper += amount; |