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
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<OutputType>Exe</OutputType> | |
<TargetFramework>net8.0</TargetFramework> | |
<ImplicitUsings>enable</ImplicitUsings> | |
<Nullable>enable</Nullable> | |
</PropertyGroup> | |
<ItemGroup> |
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
--Copyright (C) 2022 DvdKhl | |
--Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), | |
--to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
--and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
--The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
--THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
--FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | |
--WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE |
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
using System; | |
using System.Collections.Immutable; | |
//.NET 5 RC1 / Visual Studio 2019 Preview (Version 16.8.0 Preview 3.1) | |
//1. Set breakpoint on Console.WriteLine | |
//2. Start debugging | |
//3. Hover ActiveModuleSet with mouse | |
namespace RecordDebugStackoverflow { | |
class Program { |
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
public class OverlapAsyncLock { | |
public class OverlapLock : IDisposable { | |
private bool isFirst; | |
private OverlapAsyncLock owner; | |
internal OverlapLock(bool isFirst, OverlapAsyncLock owner) { | |
this.isFirst = isFirst; | |
this.owner = owner; | |
} |
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 <stdlib.h> | |
#include "stm32f1xx.h" | |
void TIM2_IRQHandler() { | |
if (TIM2->SR & TIM_SR_UIF) { | |
TIM2->SR &= ~TIM_SR_UIF; | |
GPIOC->BSRR = GPIOC->ODR & GPIO_ODR_ODR13 ? GPIO_BSRR_BR13 : GPIO_BSRR_BS13; | |
} | |
} |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace ConsoleColors { | |
class Program { | |
static void Main(string[] args) { |
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 "AVD3NativeLibApi.h" | |
void* CRC32Create() { | |
uint8_t *b = (uint8_t*)malloc(4); | |
memset(b, 0xFF, 4); | |
return b; | |
} | |
void CRC32Transform(void* handle, uint8_t *b, int32_t length) { | |
uint64_t state64 = *(uint32_t*)handle; |
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
using System; | |
using System.Diagnostics; | |
using System.Security.Cryptography; | |
namespace SHA1Test { | |
class Program { | |
static void Main(string[] args) { | |
var sha = SHA1.Create(); | |
var sw = new Stopwatch(); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>JS Ed2k File Hasher</title> | |
</head> | |
<body> | |
<input type="file" id="files" name="file" /> | |
<div id="readBytesButtons"><button>Hash File</button></div> | |
<div>Read Speed: <span id="readspeed"/>mb/s</div> |
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
//Copyright (C) 2013 DvdKhl | |
//Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), | |
//to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
//and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
//The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | |
//WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE |