Posts by Robss70 • 1,609 points
54 posts
-
3
votes0
answers1298
viewsQ: XML digital signature with Nodejs
Good morning I’m using the xml-crypto and the pem to sign an XML. However after searching I did not find a way to solve this problem: var certificado = cert.cert.toString().replace('-----BEGIN…
-
1
votes0
answers664
viewsQ: Node Js - Node-Soap
I have a Soap client with the following nodejs code: var soap = require('soap'); var url = 'bin/NfeStatusServico2.wsdl'; soap.createClient(url, function(err, client) { client.setSecurity(new…
-
3
votes1
answer815
viewsA: NF-e query with response: "Paralyzed Service without Forecast"
The webservice Downloadnfe has been disabled as per NT 2014.002.v.1.02. The webservice you should use is: https://www1.nfe.fazenda.gov.br/NFeDistribuicaoDFe/NFeDistribuicaoDFe.asmx In this…
-
1
votes2
answers581
viewsQ: Resize Input Bootstrap in Inline Form
I have the following inline form, and would like to resize the input according to the design: Follows code: <div class="row"> <div class="col-lg-12"> <div class="panel…
-
6
votes0
answers335
viewsQ: Angularjs x Angular 2 x Angular 4
I have observed a slight controversy with these terms in the title of the question. Many people have referred to Angular 2 onwards as "Angularjs" which in my view is wrong, the correct one would be…
-
1
votes0
answers429
viewsQ: Menu Toggleable Primefaces
I have the following code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"…
-
6
votes1
answer343
viewsQ: Difference between using Sqliteconnection and Java Drivermanager
I am connecting to the Sqlite database with the following code: import org.sqlite.SQLiteConnection; public SQLiteConnection conn() throws SQLException{ String path = System.getProperty("user.dir");…
-
4
votes1
answer699
viewsQ: Why use Drivermanager for connection to bank?
I am connecting to the Sqlite database with the following code: public SQLiteConnection conn() throws SQLException{ String path = System.getProperty("user.dir"); try { return new…
-
3
votes0
answers158
viewsQ: Maxlength in Textfield
I have a Textfield in javafx, but I can’t find the Maxlength property. In C# and QT5, I have already made some applications, and it is very simple to find this property. I have found some answers,…
-
1
votes0
answers50
viewsQ: On Duplicate key Mysql - Ultimo id auto incremet
How do I return the last auto id increment in this case? insert into t1(a, b, c) select d, e, f from t2 on duplicate key update b = e, c = f; I’ve tried last_insert_id(), but it returns the last id…
-
2
votes1
answer349
viewsQ: Mysql Split by ZERO, SQL_MODE = 'TRADITIONAL'?
I’m with the SQL_MODE of MySQL as TRADITIONAL in the version is 5.7.18 and according to the documentation this way would make the MySQL operate in the same way as other banks, for example SQL…
-
1
votes1
answer242
viewsQ: Cast parameter Postgresql function DEFAULT null::int
I am trying to create a plpgsql function in Postgres that receives null parameters as default. Example: create or REPLACE function spinserir_0200( p_id_entidade integer DEFAULT null::int ,…
postgresqlasked Robss70 1,609 -
0
votes1
answer276
viewsQ: Postgresql PL/PGSQL function
I have the following function : create function sppreenchecombomunicipio(p_uf text) returns TABLE(MUNICIPIO text, COD_MUNICIPIO int) AS $$ begin return query select tb_municipio.municipio,…
-
1
votes1
answer1633
viewsQ: Add Datatable C# columns with Linq
I have a DataTable containing a column called SubTotal. I would like to add up the total value of this column. I tested some examples: object sumObject; sumObject = table.Compute("Sum(Amount)", "");…
-
1
votes0
answers30
viewsQ: Licensemanager.Usagemode C#
I have a form basis that all others inherit. I picked it from a question here from the same site. That’s the construtor: public BaseForm() { if (LicenseManager.UsageMode ==…
-
3
votes4
answers5888
viewsQ: Select with multiple Left Joins Sql Server
I took an example of people registering with the following structure: I’m trying to make a SELECT in tblPessoa with JOIN with the intention that select returns data from the table in which Id…
-
6
votes2
answers332
viewsQ: Designs of a C#Solution
I have a question about projects and solutions in visual studio. Suppose I have a solution that has three projects, being two Winforms projects (exe) and one of class libraries. It is correct that I…
-
0
votes2
answers94
viewsQ: Accessible class across C#
I would like a class that is not static to be available for the entire application. At first I thought about turning this class into static, but for obscure reasons that are beside the point, I…
-
2
votes1
answer105
viewsQ: Monitor opening of Forms C#
I need to monitor the opening of Forms within a C#application. For example, every time you open a Form within the application, the application must execute a method or trigger an event with…
-
2
votes2
answers334
viewsA: Check Consistency of a SQL Server backup in C#
I did a test here with this code and it works, it’s just an example. Change it to suit exactly what you want. It is using RESTORE VERIFYONLY that you want, the command will check the backup, if it…
-
6
votes1
answer172
viewsQ: Check string Regex C#
I have a string that can only be composed by X capital and by -. Example : X-XX-XX or else X-X-X-XX-XXX. Where each - a group would be counted and each X one digit. Example 1: the string X-XX-XX has…
-
4
votes2
answers164
viewsQ: Types of C#Methods calls
I have a question in the following case, not referring to dates, I used only as an example: Convert.ToDateTime("01/01/2016 00:00:00").ToShortDateString(); What is the origin of this method…
-
1
votes0
answers82
viewsQ: Code maintenance
I have an application that makes the deserialization of an XML file. I managed a class with from an XSD with XSD.EXE For deserialization I use the following code: static T…
-
7
votes1
answer764
viewsQ: Structure/Organization Project C#
I have a project that I am developing in layers, so far I have the following: Access to data, presentation, business and transfer objects. The doubt is as follows: Example: I have one form to…
-
2
votes1
answer1240
viewsA: How to call and display a WPF Window that is in a dll
For this to work you must do the following steps: 1º - Add the following references in the console project: PresentationFramework, WindowBase and PresentationCore. 2º - You must add the reference to…
-
10
votes2
answers513
viewsQ: Reflection C#, how does it work?
I’m doing some tests with Reflection, I made this code on the basis of trial and error, so I didn’t understand how exactly it works. This is the enum that I’m wearing: public enum TipoDoAmbiente {…
-
1
votes1
answer297
views -
1
votes2
answers1002
viewsQ: Return Enum C#
I have the following: public enum TNFeInfNFeDetImpostoICMSICMS00CST { /// <remarks/> [System.Xml.Serialization.XmlEnumAttribute("00")] item00 = 00, } How do I "take" the "00" value of the Enum…
-
3
votes2
answers379
viewsA: ERROR - Catch Xelement C#
Although you have already solved with the answer of colleague Virgilio Novic I will show another way to do this, you can create the classes referring to Nfe. It may be useful for you or someone else…
-
3
votes1
answer1111
viewsQ: Modeling database table
I am creating a database that stores an electronic invoice - "Nfe" received. Within the items of a tax note are always linked taxes. Table example tblProdNFe_Entrada with the table…
-
1
votes1
answer3398
viewsQ: Foreign Key Sql Server
I have a question about Foreign key in the following situation: Tehno table UF, with 3 columns: ID_UF (PK), Cod_uf (int) and Descuf (nvarchar(50)) I have another table called IDE, with 3 columns:…
-
0
votes1
answer59
viewsA: Select only one item amidst two listboxes
Try the following, but logically changing the names of the controls to your. private void listBox1_Click(object sender, EventArgs e) { listBox2.SelectedIndex = -1; } private void…
-
1
votes1
answer165
viewsQ: Differences between Xmlreader, Streamreader and Stringreader in desiccation
I asked the following question here at stackoverflow question link. During deserialization depending on the stream used, an error may occur in the XML namespaces, depending on the question link.…
-
1
votes1
answer933
viewsQ: XML deserialization
I have a method that makes a query to a Webservice, with the return I do a deserialization of the received XML. It turns out that if I do the desirialization in memory it gives a mistake saying:…
-
2
votes2
answers1023
viewsQ: Xml Tag base64Binary C#
I have the following xml tag (I’ll summarize for size): <docZip schema="procNFe_v3.10.xsd" NSU="000000000001868">H4sIAAAAAAAEAN1aWY+jyLJ+Pv..bla bla bla</docZip> The field type is…
-
2
votes1
answer530
viewsQ: Alternative to If/Else
I have the following code: private void maskedTextBoxEAN_Leave(object sender, EventArgs e) { if (!string.IsNullOrWhiteSpace(maskedTextBoxEAN.Text)) if…
-
2
votes1
answer331
viewsA: Format Windows Forms text
You can do the following, on the property TextAlign of TextBox you put as left. When filling in the TextBox leave your string formatted, ex: public static void Main() { string[] names = { "Adam",…
-
1
votes3
answers641
viewsA: Add zeros right Textbox C#
I found the solution, so I thought I’d better create the answer myself to help those with the same problem. Source from which I got the solution: Here and Here Code: private void…
-
2
votes3
answers641
viewsQ: Add zeros right Textbox C#
I have a TextBox which only accepts decimal numbers. But sometimes the user does the following: How to do for the event Leave of TextBox it add the two zeroes to the right, in the case of the image…
-
1
votes1
answer61
viewsQ: TFS Cloud Visual Studio 2015 Community
I have two projects in TFS, a database and an application. I am using TFS for a short time and I have doubts about the options Get Latest Version (Recursive), Check Out for Edit and Shelve Pending…
-
0
votes1
answer54
viewsA: "Textwriter sw" Formatting
There is a package in Nuget called "Docx". It does exactly what you need. Code example: var paraFormat = new Formatting(); paraFormat.FontFamily = new System.Drawing.FontFamily("Calibri");…
-
0
votes1
answer1477
views -
0
votes1
answer276
viewsA: Copy database file in use in Delphi
There is an application called Cobian Backup, in passing it is free. There is an option called shadow copy. By enabling it you can copy the file in use. Most backup apps have this option. I don’t…
-
7
votes2
answers3200
viewsQ: Code protection . NET
I have a C# application that I developed, it will be installed in several clients. The problem is that I have to protect the application code, because I performed some tests with the Ilspy…
-
3
votes1
answer258
views -
4
votes1
answer421
viewsQ: User Control C#
I have the following user control that is being used in a Form: public partial class CampoTelefone : UserControl { private void maskedTextBoxTelefone_Validating(object sender, CancelEventArgs e) {…
-
2
votes3
answers763
viewsA: I need to validate a TXT layout in C#
@Britto there are many ways to validate the txt file that Voce mentions, this one here is one of them, it’s ugly but it’s working, I delete some parts to reduce the size. The method reads the file…
-
3
votes2
answers87
viewsQ: Database objects as Stored Procedure parameters
Why when we pass database objects as parameters in a stored database they are not accepted? Ex: @COLUNA nvarchar(30), @VARIAVEL nvarchar(50) SELECT * FROM TBL_TESTE WHERE @COLUNA = @VARIAVEL The…
-
3
votes1
answer2399
viewsQ: Dynamic Sql Server Query
Gentlemen, I have the following problem: I have to set up a consultation that works with various views, for example, one of products or one of people. I’m doing some tests with this code: declare…
-
2
votes1
answer2301
viewsA: SQL Sends NULL value to a Datetime column
In your stored file "if you are using one" state the parameter thus: @DT_ENTREGA datetime = null This way when you pass the parameter Dados.Add("") the table will be null by default. Another way…