Posts by Pedro Gaspar • 3,289 points
96 posts
-
3
votes1
answer821
viewsA: References Visual Studio Code
This feature is called Codelens. To disable it in the Visual Studio Code access the menu File > Preferences > Settings > "editor.codeLens": false That answer was copied from here: How do I…
-
1
votes3
answers843
viewsA: Soap Request 403 Forbidden
Communication with eSocial services should be done through the communication protocol HTTPS, using the encryption protocol TLS, and, citing the eSocial Developer’s Manual, on page 19: The physical…
-
2
votes1
answer160
viewsA: Error signing xml passing PIN automatically
In function LerDispositivo() change the line: csp.Flags = CspProviderFlags.NoPrompt | CspProviderFlags.UseDefaultKeyContainer; for: csp.Flags = CspProviderFlags.NoPrompt |…
-
0
votes1
answer347
viewsA: eSocialBX: Error 402 - "Invalid request"
In addition to the tip I gave in the comments, for you to remove the attributes xmlns:xsi and xmlns:xsd tag eSocial, before signing (see item 3 of this reply: /a/348662/86952), I also noticed that…
-
2
votes2
answers733
viewsA: Social submission problems: Invalid event subscription
I analyzed your code and the Xmls and everything seems to be right, but then I realized that the problem seems to be on this line here: $doc->save($array['xml-assinado'], LIBXML_NOEMPTYTAG |…
-
2
votes1
answer262
viewsA: Reinf - Event Consultation 2099 -closing
This is what you have already guessed in the question itself and that have answered more or less in the comments: The address of the service I used in that answer was out of date (already updated…
-
2
votes2
answers577
viewsA: EFD-Reinf: What can be done to avoid certificate failure?
You have already identified part of the problem: The SERPRO certificate is not recognized as a reliable certificate. See that even accessing the service address by the browser you will be notified…
-
1
votes1
answer87
viewsA: Error: Undefined object reference for an object instance of an Object.System.Formatexception
Note that the message indicates that the error occurred in the event buttonExcluir_Click(), in the call to method System.Int32.Parse(String s). Looking at your code, it seems to me that line is…
-
0
votes1
answer862
viewsA: How to sign NF-e XML in ASP.NET Core using NF-e 4.00 signature standards?
It seems that failed to inform the algorithm (SHA1) that should be used for the signature, with the following line: signedXml.SignedInfo.SignatureMethod =…
-
1
votes1
answer968
viewsA: Return Batch Events Reinf - The structure of the XML file is in disagreement with the XSD schema
The error description gives the clue: The structure of the XML file is in disagreement with the XSD scheme. The 'http://www.reinf.esocial.gov.br/schemas/evtInfoContribuinte/v1_04_00:classTrib'…
-
2
votes1
answer521
viewsA: eSocialBX: Invalid signature error
I don’t know exactly what was the cause of the error but I can visualize some problems that may or may not be the cause of this error, I will list them. 1. Element namespace eSocial in XML The root…
-
1
votes1
answer326
viewsA: How to consult Reinf-2099 - Inquiryreceipt event2099
You’re trying to use the following SOAPAction: "http://sped.fazenda.gov.br/ConsultasReinf/ConsultaReciboEvento2099" But, if you access the service’s WSDL on:…
-
1
votes1
answer131
viewsA: PEC inclusion of Caixa Economia
The mistake is saying that the SOAPAction that you used is not being found at this service. I took a look at the service’s WSDL, at:…
c#answered Pedro Gaspar 3,289 -
1
votes2
answers386
viewsA: eSocial: Invalid Subscription . NET Framework
I guess the problem must be how you are getting the private key of the certificate, to sign XML. See that you’re taking the properties ProviderType and ProviderName of the object…
-
1
votes1
answer246
viewsA: EFD-Reinf XML Signature - "Badly formed Reference Element."
I believe the problem lies in this line of the function Assinar: reference.Id = _reinf.evtInfoContri.id; Apparently you didn’t put the code where you carry the value of this field…
-
1
votes1
answer233
viewsA: C# - EFD Reinf v1_04_00 - return - nrProtEntr - return treatment
The field nrProtEntr is returned only when sending the R-2099 closing event (see here how to consult the return of this event), in the case of other events the field you must pick up is the…
-
1
votes1
answer517
viewsA: EFD-Reinf: Signature Error - A Xmldocument Context is Required for Enveloped Transformations
You made some mistakes in this routine: You’re just applying the transformation EnvelopedSignature but is not applying to C14N; You’re not reporting on the properties SignatureMethod and…
-
1
votes1
answer337
viewsA: C# - EFD Reinf v1_04_00 - How to instantiate and fill in all Events properties?
Answering the questions: 1: I managed the class correctly by XSD.EXE? Yes, that’s right. Each group of information needs to be a new class. And in case the group may occur more than once, you will…
-
2
votes1
answer807
viewsA: XSD.EXE Generate classes in C# - EFD Reinf v1_04_00
You could download the file xmldsig-core-schema.xsd (you can achieve it, for example by downloading the eSocial Communication Package v1.5, in the briefcase \XSD\Eventos\RetornoEvento) and execute…
-
6
votes1
answer968
viewsA: Invalidcastexception: Unable to cast Object of type 'System.Security.Cryptography.Rsacng'
On Windows there are two generations of encryption Apis: The old generation (link), which includes Cryptographic Service Providers (CSP), which is the technology used by the class…
-
7
votes1
answer1362
viewsQ: When and why to use data dictionaries?
I had already read this answer (below) and today I read it again, and on both occasions the highlighted passage caught my attention: DRY is to avoid redundancies, right? - Stack Overflow That’s why…
software-engineeringasked Pedro Gaspar 3,289 -
5
votes1
answer928
viewsA: How to save an XLSX (Excel) file instead of CSV?
You can do this using the Excel interoperability library (Microsoft.Office.Interop.Excel.dll), but for this Excel will have to be installed on the computer that will run its application. To use this…
-
3
votes1
answer462
viewsA: Schema modularization using Adonisjs and Graphql
I did a search and it seems that this error occurs in the package TypeScript between versions 2.4 and 2.7 (currently in version 3.2.1), when "members of a class are transformed with decorators", see…
-
1
votes1
answer164
viewsA: Select with two fields like Fks from the same table
You can do two joins to the same table of teams, using aliases different, linking a Join to the identification field of team 1 and the other to the identification field of team 2, in the table of…
-
1
votes1
answer648
viewsA: EFD-Reinf - Invalid batch version. Version 1.04.00 must be used
XML by default is case sensitive (case-sensitive), and you called the root element of the lot as <REINF>, but the XSD scheme says that the name should be <Reinf>. Change this and see if…
-
1
votes1
answer474
viewsA: Error when converting XML to Object using Xstream
It seems to me there are three problems: Most of your tags use attributes, but you’re not indicating it anywhere; You didn’t call the method XStream.processAnnotations() to indicate that the XStream…
-
0
votes1
answer147
viewsA: Firebase getDisplayName() returns empty
After a search I discovered that this was a bug in some versions of Firebase, see here. He was introduced in the version 9.8.0, then if you use the version 9.6.1 it does not occur. I do not know if…
-
12
votes1
answer294
viewsQ: Mandatory language incorporating functional elements
Yesterday I was reading an answer about the differences between the paradigms functional and imperative, and I came across this statement: Functional Programming and Object-Oriented Programming.…
-
7
votes1
answer4254
viewsA: C, C++, C#? Why should a beginner start learning?
Maybe this question is closed, because it is "mainly based on opinions", but I believe it is possible to answer it objectively. C, C++, C#? Why a beginner should start learning? For sure C# is the…
-
4
votes2
answers404
viewsA: Query with Datetime Sql and C#
If you want to consult date and time, can not make a cast for the guy date because this type has no time information, only date. I imagine your field Consulta.dataConsulta is defined with the type…
-
3
votes1
answer3984
viewsA: Timezone do Brasil para Datetimeoffset C#
I found in the documentation the method TimeZoneInfo.GetSystemTimeZones(), that: Timezoneinfo.Getsystemtimezones Method Returns a classified collection of all time zones for which information is…
-
5
votes1
answer443
viewsA: Readonly does not work
The element <select> (as in the case of its #cbempresa) does not have the attribute readonly, see here: <select> HTML Element - Attributes And the attribute readonly does not receive a…
-
1
votes3
answers680
viewsA: Help with Sqlquery in context Entity Framework
The SQL Server query works because there you are delimiting the values of the date field between simple quotes ('): WHERE ate.dt_atendimento >= '2018-08-20' AND ate.dt_atendimento <=…
-
2
votes1
answer524
viewsA: How to consume EFD-Reinf Webservice in C#? (Sending Events)
The main code to access the EFD-Reinf Webservice is this: using System.Net; using System.ServiceModel; using System.Security.Cryptography.X509Certificates; using System.Xml.Linq; public void…
-
1
votes1
answer551
viewsA: Quaternions in Unity3d
I don’t understand about it, but I find it interesting, so I did some research and I’ll put what I found here, with the sources. From the Unity3d documentation: Unity - Scripting API: Quaternion…
-
1
votes1
answer52
viewsA: How to make this class usable?
When you create a class in Python you have the option to create 3 types of methods: Instance methods, class methods and static methods. Let’s get to the differences between them. Instance methods…
-
1
votes1
answer385
viewsA: Swap the first and last element of an array by creating a new array
In Java, when you assign an array to another array, as in this line: int [] New_Numbers = Numbers; You’re not creating a copy of the array, you’re just passing the same reference to another…
-
2
votes1
answer79
viewsA: Add items within an array
Just by making a correction, what you actually created is a list and not an array, the syntax to create an array would be something like array([1, 2, 3]), see here a quick explanation of the…
pythonanswered Pedro Gaspar 3,289 -
2
votes1
answer197
viewsA: Draw using nested loop and increment
Analyzing the drawing: It’s 10 lines and 19 columns. With each new line, the left asterisk advances a house, the right asterisk moves back a house, and where there is no asterisk there is an…
javascriptanswered Pedro Gaspar 3,289 -
2
votes2
answers359
viewsA: Keyword "new" in C#
Before understanding the operator’s concept new it is necessary to understand well what is a variable. Then it is necessary to understand the basic concept of structures and classes. In general…
-
2
votes1
answer181
viewsA: Malloc Function Error: sysmalloc: Assertion failed in C
The error is on the line where you allocate memory to the node, within the function setNode(): Node* new = (Node *) malloc(sizeof(Node*)); When you use Node* is the same as saying you’re using "a…
-
1
votes2
answers408
viewsA: Insert <li> and <a> via Javascript
You can do it this way: function insereLi(texto) { // Localiza o elemento <ul> através do seu id, usando getElementById(). var minhaLista = document.getElementById('minhaListaDesordenada'); //…
javascriptanswered Pedro Gaspar 3,289 -
2
votes1
answer159
viewsA: JPQL JPA - Create a list grouped by date with the sum and profit of all items sold that day
After talking to the author through the comments, I realized that the problem occurred because when making a query with full Join (Retrieving Records from Multiple Tables | Mysql SQL Syntax and Use…
-
9
votes3
answers680
viewsA: How do I read the output of a loop-based process? [C#]
Instead of using the object StreamReader returned by property Process.StandardOutput (documentation), to capture synchronously the output of the process you fired, you could use the event…
-
4
votes1
answer41
viewsA: Return amount of dependents per employee
The way you’re doing the query, the function COUNT() will count all returned records. However, you want to count dependents for each employee, so you need to group the results with the clause GROUP…
-
1
votes1
answer188
viewsA: Error "A graph element named '0' already exists under 'Seriescollection'"
I was able to identify that you are using the control Chart from the Windows Forms library (documentation), and saw that the method SeriesCollection.Add() that you’re using gets a String with the…
c#answered Pedro Gaspar 3,289 -
3
votes1
answer69
viewsA: List Sorting in Java
There is an overload of the method Collections.sort() which takes as the second parameter an object Comparator (documentation), and the class itself Collections has another method that returns just…
javaanswered Pedro Gaspar 3,289 -
1
votes1
answer161
viewsA: How to access custom attributes of a property using VB.NET
It is not possible to use the extension method as directly as you tried, because the method applies only to types PropertyInfo, and the property HelloWorld is the type String, so it is first…
-
0
votes2
answers107
viewsA: Problem with C#Threadstatic
According to the Microsoft Docs, the attribute ThreadStatic "indicates that the value of a static field will be unique to each thread". And from what I read in this article from a blog of Microsoft…
-
0
votes2
answers297
viewsA: Question about a C++ function that functions as a destructor?
Briefly: The destructor is the opposite of the constructor. While a constructor function of a given class is called at the moment an instance of that class is created (object), the destructor…