Skip to content

Instantly share code, notes, and snippets.

View samuelsherrer's full-sized avatar

Samuel Sherrer samuelsherrer

  • Tech Manager - Acerto
  • Belo Horizonte
View GitHub Profile
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
namespace MyBenchmarks
{
public class MemoriaBenchmarkDemo
{
private readonly List<Boleto> Boletos;
public MemoriaBenchmarkDemo()
public static class ServiceBusMessageExtensions
{
public const string RetryCountIdentifier = "RetryAttempt";
public static bool ShouldRetry(this Message message, int maxRetryCount)
{
int resubmitCount = message.GetRetryAttempt();
return resubmitCount < maxRetryCount;
}
[
{
"data": "07/02/1995",
"demanda": 22,
"capacidade": 30,
"atendimentop": 22,
"atendimentor": 25,
"desvio": 1
},
{
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location path="." inheritInChildApplications="false">
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet" arguments=".\seuapp.dll" stdoutLogEnabled="false" stdoutLogFile=".\LogFiles\stdout" requestTimeout="00:20:00" />
</system.webServer>
</location>
using(System.IO.Stream st = ReportDocumentComponent.ExportToStream(ExportFormatType.PortableDocFormat))
{
// criar um Leitor de Binários para receber o stream
using(System.IO.BinaryReader br = new System.IO.BinaryReader(st))
{
// cria um vetor de bytes do tamanho do stream
byte[] vet = new byte[st.Length];
// Carrega o vetor de bytes
for (int x = 0; x < (st.Length); ++x)
System.IO.Stream st = ReportDocumentComponent.ExportToStream(ExportFormatType.PortableDocFormat);
// criar um Leitor de Binários para receber o stream
System.IO.BinaryReader br = new System.IO.BinaryReader(st);
// cria um vetor de bytes do tamanho do stream
byte[] vet = new byte[st.Length];
// Carrega o vetor de bytes
for (int x = 0; x < (st.Length); ++x)
class Program
{
static void Main(string[] args)
{
var a = new InstanceResponse("");
}
public class Response<T> where T : class
{
public bool Result;
this._listSubscriptions.add(this.subscribeService.getComments().subscribe(
result => {
this.comentarios = result;
this.isLoading = false;
}
));
if(this._simpleSubscription != undefined) this._simpleSubscription.unsubscribe();
//Nossa subscription
this._simpleSubscription = this.subscribeService.getComments().subscribe(
result => {
this.comentarios = result;
this.isLoading = false;
}
);