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 Microsoft.AspNetCore.Authentication; | |
using Microsoft.AspNetCore.Authorization; | |
using Microsoft.AspNetCore.Http; | |
using Microsoft.AspNetCore.Mvc; | |
using System.Net.WebSockets; | |
namespace WebAPI.Controllers | |
{ | |
[Route("/ws")] | |
[ApiController] |
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
//1) Add projects: Captura.Base, Captura.Bass, Captura.SharpAvi, Screna from this repository: | |
https://github.com/MathewSachin v8.0.0 | |
//2) Copy bass.dll & bassmix.dll from x64 folder: | |
//http://www.un4seen.com/files/bassmix24.zip | |
//http://www.un4seen.com/files/bass24.zip | |
recordTask = new Task((cancelationToken) => | |
{ |
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
private string AppName = "MyApp"; | |
public void StartRecording() | |
{ | |
StopRecording(); | |
WinProcess.OnGetAllWindowsResult += WinProcess_OnGetAllWindowsResult; | |
WinProcess.GetAllWindows(); //user32 EnumWindows | |
} | |
private void WinProcess_OnGetAllWindowsResult() |
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
private void WriteWavHeader(MemoryStream stream, bool isFloatingPoint, ushort channelCount, ushort bitDepth, int sampleRate, int totalSampleCount) | |
{ | |
stream.Position = 0; | |
// RIFF header. | |
// Chunk ID. | |
stream.Write(Encoding.ASCII.GetBytes("RIFF"), 0, 4); | |
// Chunk size. | |
stream.Write(BitConverter.GetBytes(((bitDepth / 8) * totalSampleCount) + 36), 0, 4); |
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
var contrast = 30; //[-255;+255] | |
float factor = (259f * (contrast + 255f)) / (255f * (259f - contrast)); | |
Color.r = (byte)Math.Clamp(factor * (Color.r - 128) + 128, 0, 255); | |
Color.g = (byte)Math.Clamp(factor * (Color.g - 128) + 128, 0, 255); | |
Color.b = (byte)Math.Clamp(factor * (Color.b - 128) + 128, 0, 255); |
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
# | |
# Sample configuration file for the Samba suite for Debian GNU/Linux. | |
# | |
# | |
# This is the main Samba configuration file. You should read the | |
# smb.conf(5) manual page in order to understand the options listed | |
# here. Samba has a huge number of configurable options most of which | |
# are not shown in this example | |
# | |
# Some options that are often worth tuning have been included as |
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
/* USER CODE BEGIN Header */ | |
/** | |
****************************************************************************** | |
* @file : main.c | |
* @brief : Main program body | |
****************************************************************************** | |
* @attention | |
* | |
* Copyright (c) 2023 STMicroelectronics. | |
* All rights reserved. |
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
let svgEl = drawdiv.children[1]; | |
//Если черный квадрат, то убрать прозрачность на none | |
svg2pdf(svgEl, pdf, { | |
xOffset: this.pdfPageDefaultOffsetX, | |
yOffset: pdfOffsetY, | |
scale: divToPdfRatio | |
}); | |
let prevFontSize = pdf.internal.getFontSize(); |
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
var ofn = new NativeMethods.OpenFileName(); | |
ofn.lStructSize = Marshal.SizeOf(ofn); | |
if (Filter != null) | |
ofn.lpstrFilter = Filter.Replace('|', '\0') + "\0\0"; | |
var maxFilePathLength = 250; | |
var maxFilesForMultiselect = 100; | |
ofn.nMaxFile = 1 * maxFilePathLength; | |
if (AllowMultiSelect) | |
{ | |
ofn.Flags |= ( |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<location path="ForDownload" allowOverride="false" inheritInChildApplications="false"> | |
<system.webServer> | |
<security> | |
<authorization> | |
<!-- Allow all users access to the Public folder --> | |
<remove users="*" roles="" verbs="" /> | |
<add accessType="Allow" users="*" roles="" /> | |
</authorization> |
NewerOlder