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
import { OnDestroy } from '@angular/core';
import { Subscription } from 'rxjs/Subscription';
export class SeuComponente implements OnDestroy {
private _simpleSubscription: Subscription = new Subscription();
}
//Nossa subscription
this._simpleSubscription = this.subscribeService.getComments().subscribe(
result => {
this.comentarios = result;
this.isLoading = false;
}
);
if(this._simpleSubscription != undefined) this._simpleSubscription.unsubscribe();
this._listSubscriptions.add(this.subscribeService.getComments().subscribe(
result => {
this.comentarios = result;
this.isLoading = false;
}
));
class Program
{
static void Main(string[] args)
{
var a = new InstanceResponse("");
}
public class Response<T> where T : class
{
public bool Result;
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)
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)
<?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>
[
{
"data": "07/02/1995",
"demanda": 22,
"capacidade": 30,
"atendimentop": 22,
"atendimentor": 25,
"desvio": 1
},
{