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
using System; | |
using System.Text; | |
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Running; | |
var summary = BenchmarkRunner.Run<StringBenchmark>(); | |
[MemoryDiagnoser] | |
public class StringBenchmark | |
{ |
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
using System; | |
using System.Text; | |
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Running; | |
var summary = BenchmarkRunner.Run<StringBenchmark>(); | |
[MemoryDiagnoser] | |
public class StringBenchmark | |
{ |
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
using System; | |
using System.Text; | |
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Running; | |
var summary = BenchmarkRunner.Run<StringBenchmark>(); | |
public class StringBenchmark | |
{ | |
private const string testVariable = "test"; |
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
public class HowFastItIsToExecuteServiceProvider | |
{ | |
const int N = 100; | |
Type[] types = new Type[N]; | |
IServiceCollection serviceCollection = new ServiceCollection(); | |
public HowFastItIsToExecuteServiceProvider() | |
{ | |
var tb = GetTypeBuilder(); | |
for (int i = 0; i < N; ++i) |
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
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Running; | |
using System; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace _13 | |
{ | |
public class AggregateExceptions | |
{ |
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
Dim objResult | |
Set objShell = WScript.CreateObject("Wscript.Shell") | |
do While True | |
objResult = objShell.sendkeys("{NUMLOCK}{NUMLOCK}") | |
Wscript.Sleep(150000) | |
Loop |
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
import os, time, sys | |
from win10toast import ToastNotifier | |
toast = ToastNotifier() | |
def str_join(*args): | |
return ''.join(map(str, args)) | |
def warnAboutOldFiles(path, days): | |
path = "C:\\Users\\damian_laczak\\Downloads" |
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
public abstract class NinjectableJob : IJob | |
{ | |
protected IKernel kernel; | |
public void Execute() | |
{ | |
using(kernel = new StandardKernel()) | |
{ | |
NinjectSingletonCommon.RegisterTypes(kernel); | |
execute(); |
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 <conio.h> | |
const int PRZELOT_COUNT = 4; | |
#define LINE_BREAK std::cout << "---------------------------------------------------" << std::endl; | |
//napisz progrma w ktorej zadeklarujesz tablice struktua, struktura o nazwie przelot zawiera | |
// nastepujace elementy : trasa(dokad), | |
//cena | |
//dlugosc trasy | |
//czas- w godzinach | |
//linia |
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
std::vector<std::string>* loadFile( std::string filename ) | |
{ | |
std::ifstream fileStream; | |
fileStream.open( filename.c_str() ); | |
std::vector<std::string> *strings = new std::vector<std::string>(); | |
int i = 0; | |
while(!fileStream.eof()) | |
{ | |
strings->push_back(std::string()); | |
fileStream >> (*strings)[i++]; |
NewerOlder