Posts by Luiz Lanza • 600 points
42 posts
-
0
votes2
answers153
viewsA: C# convert dynamic string to xml with TAG
Using the reference of the answers 30166183 and 29426107, I adapted and managed to generate XML dynamically, converting the attributes to TAG. Code: Main XmlDocument document = new XmlDocument();…
-
0
votes2
answers153
viewsQ: C# convert dynamic string to xml with TAG
I would like to know how to convert a string with XML inline to an XML with tags, I am using Xmldocument, I have the following code: var MihaString="<MeuXML Info01="teste 0121245"…
-
1
votes1
answer109
viewsQ: C# Function convert string to xml
I wonder how to convert a string with XML inline for a XML with tags, I’m using the XmlDocument, I have the following code: var MihaString="<MeuXML Info01="teste 0121245" Info02="2020-01-14"…
-
1
votes0
answers90
viewsQ: Doubt about CI/CD to build and release Docker containers?
I am building a Docker container release pipeline in Gitlab and Azure Devops. But I came across the following situation: Step do build: docker build -f ./caminho_docker_file -t nome_minha_imagem .…
-
-1
votes2
answers7869
viewsA: Indentation of code C
Use Notpad++ using Textfx > Textfx Edit> Reindent C++ code. Or use Sublime Text. http://substanciando.blogspot.com.br/2014/02/indentacao-no-sublime-text.html…
-
-1
votes1
answer514
viewsA: Close modal JSF
I added the onclick="deleteConfirmationModal.hide()" on the button YES
-
0
votes1
answer514
viewsQ: Close modal JSF
I need to do mine deleteConfirmationModal close. It only works by clicking on NAY. I need to make him perform the action of YES and close the modal. <p:commandLink title="#{label.REMOVE}"…
-
1
votes1
answer99
viewsQ: Distinc Criteria Hibernate java
I have the following context: class Entidade1 private Long id; private int commentId; private int userId; class Entidade2 private Long id; private String descricao; - I have the following criteria…
-
3
votes2
answers161
viewsQ: Use Contains in an integer C# field with lambda or LINQ
I have the following expression: query = query.Where(x => x.MeuCampoInteiro.ToString().Contains(filter)); But an exception is occurring: System.NotSupportedException: 'The expression…
-
3
votes1
answer70
viewsQ: Check if multiple columns contain a value?
Query: query = query.Where(t => t.campo1.Contains(filter) || t.campo2.Contains(filter) || ......); I wonder if there is any way that I do not need to keep informing all fields of the table, do…
-
0
votes1
answer182
viewsQ: Change Primarykey Entityframework
How to change a Primary key using Entityframework? I have a table with simple PK and need to change this PK by Entityframework.
-
0
votes1
answer36
viewsQ: What class is similar to Aescryptoserviceprovider in . NET Core?
I am migrating an application to . net core and need to use the AesCryptoServiceProvider, that worked perfectly in other versions of . NET Framework. But when using on . NET Core Visual Studio warns…
-
4
votes1
answer3970
viewsQ: How to calculate a person’s age in Oracle SQL?
I need a sql command that returns the age of the person. I have the birth date of the person in the database, I need to calculate his age by SQL.
-
-1
votes2
answers343
viewsA: java.lang.Noclassdeffounderror
If you’re not using Maven, add the Hibernate-core and Hibernate-entitymanager jar of the same version to your project. https://mvnrepository.com/artifact/org.hibernate/hibernate-entitymanager…
-
0
votes2
answers343
viewsA: java.lang.Noclassdeffounderror
If you are using Hibernate-core & Hibernate-entitymanager in your pom.xml, they should have the same version. <dependency> <groupId>org.hibernate</groupId>…
-
-2
votes1
answer114
viewsQ: What are the reasons for migrating an application to a newer technology
I wonder what you think about that? What are the benefits? Thank you.
-
9
votes2
answers967
viewsQ: How to test private methods in C#?
How to test private methods using Microsoft.VisualStudio.Testtools.Unittesting and Moq My test class is like this: [TestClass] public class ClasseDeTeste { private MinhaClasseComMetodosPrivados…
-
2
votes1
answer183
viewsQ: Run program in certain folder in IIS
I would like to know how to run an exe or jar program in a certain IIS folder, through the code c# . net core. It would have to be a synchronous call, that is when c# performs the call from the jar…
-
-1
votes5
answers16830
viewsA: How do I list all tables with their respective databases?
A solution to show which database is the searched table: SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME LIKE '%attach' That might help you too: SELECT * FROM sysobjects sobjects WHERE…
-
1
votes1
answer928
viewsA: Write the average of the numbers typed, if they are even. Finish reading when user type zero(0)
A possible solution to your problem: Scanner x = new Scanner(System.in); System.out.println("Digite um número: "); int numero = x.nextInt(); int somatorio = numero; int qnt = 1; while (numero != 0)…
-
0
votes1
answer59
viewsA: The app crashes every time I click the calculate button
This error has been found: java.lang.Numberformatexception: Invalid int: "" at java.lang.Integer.invalidInt(Integer.java:138) In that part: int resultadoImc =…
-
0
votes1
answer101
viewsA: Inserting duplicate record in PHP while
In your select you add GROUP BY IDTABELA Then you won’t bring back duplicate records. Example: "SELECT *, compras.id_usuario AS id_user_compra, compras.id AS id_compra FROM compras LEFT JOIN…
phpanswered Luiz Lanza 600 -
0
votes1
answer4277
viewsA: Know region of the city from the zip code
Create a table with the information: Rondônia RO NORTE Acre AC NORTE Amazonas AM NORTE Roraima RR NORTE Pará PA NORTE Amapá AP NORTE Tocantins TO NORTE Maranhão MA NORDESTE Piauí PI NORDESTE Ceará…
-
1
votes1
answer30
viewsA: Doubt with operator
The line : para k de 4 ate 7 Is similar to between 4 and 7 That is, the number has that is within a certain range of values. that would be 4, 5, 6 e 7 In the case of a for(k=4; k<=7; ....…
loopanswered Luiz Lanza 600 -
1
votes3
answers606
viewsA: Find the element with the highest number
That way it will work public void eleitoPresidente() { Candidato maiorCand = null; int maior = 0; for (Candidato e : candidato) { if (e.votos > maior) { maiorCand = e; } } if (maiorCand != null)…
-
0
votes1
answer56
viewsA: Indentation with problems in Studio
Windows: Ctrl + Alt + L Linux: Ctrl + Shift + Alt + L Mac: Option + Command + L…
-
0
votes4
answers1413
viewsA: Know what day falls next Monday
Dry form that works in more programming languages. // 1 SEGUNDA // 2 TERCA // 3 QUARTA // 4 QUINTA // 5 SEXTA // 6 SABADO // 7 DOMINGO $diaDaSemana = 3; // ALTERE PELO DIA DA SEMANA DA DATA $xx = (1…
-
3
votes2
answers567
viewsA: Compare current date with saved in database and return validation
Converts the dataLimite field to the Datetime type DateTime dt = Convert.ToDateTime(dataStringDoBanco); DateTime dataAtual = DataAtual(); if(dataAtual > dt) { // O tempo de testes expirou }…
c#answered Luiz Lanza 600 -
1
votes4
answers2106
viewsA: Value treatment null c#
Using if ternary public string CarregaProdutosDermaClube(string codigoproduto) { //consulta os dados return string.IsNullOrEmpty(new BuscaProdutosDermaClubeDAL().…
-
3
votes2
answers136
viewsA: Window in visual studio when debugging method
I use the AUTOS of visual studio to check all objects modified during debug. Links to help you: https://msdn.microsoft.com/pt-br/library/bhawk8xd.aspx…
-
1
votes2
answers557
viewsA: I need to send a POST request with 4 parameters (login, password, city, XML) in java
I recommend using Apache Httpclient. It’s faster and easier to implement. PostMethod post = new PostMethod("http://www.seusite.com/"); NameValuePair[] data = { new NameValuePair("login", "sss"), new…
-
0
votes2
answers522
viewsA: Bulk change to MYSQL
My suggestion update without Where UPDATE ptv_osrs_properties SET show_address = '1'
-
3
votes2
answers6493
viewsA: Wait for BAT command to run to continue
To perform synchronous execution in a bat file I used the CALL resource Ex: ECHO "Mensagem 1" copy xxx yyy ECHO "Mensagem 2" call outro.bat param1 > log ECHO "Mensagem 3" copy zzz ooo…
-
2
votes3
answers746
viewsA: Toast with specific duration
This cannot be done. To show for a shorter time than Toast.LENGTH_SHORT, you must cancel it after the desired time. Something like: final Toast toast = Toast.makeText(getApplicationContext(), "This…
-
0
votes3
answers741
viewsA: Compare data from two tables
SELECT * FROM bairro left join logradouro on (bairro.id = logradouro.idBairro) and (logradouro.logradouro like '%Av Brasil%')
-
1
votes2
answers6493
viewsQ: Wait for BAT command to run to continue
I need to run a bat file with the following content: ECHO "Mensagem 1" copy xxx yyy ECHO "Mensagem 2" outro.bat param1 ECHO "Mensagem 3" copy zzz ooo However when it runs the other.bat my script…
-
0
votes1
answer724
viewsQ: Generate an APK per command line?
How do I generate an APK, android studio project via command line? I wonder if you have how to call a file . bat and it export the apk in a folder.
-
1
votes1
answer81
viewsA: List null android
To prevent it from returning null, check that the list has not been instantiated. public static List<OpcaoPedido> getListaOpcionais() { if(listaOpcionais == null){ return new…
-
0
votes1
answer722
viewsQ: Javascript in JSF page - Primeface
HTML code - JAVASCRIPT It reads a txt file from the computer and puts its value in an html input <input type="file" id="files" name="files[]" multiple /> <input type="text" required…
-
0
votes2
answers187
viewsA: Java PDF Report Error
Remove from this if (destFile.exists()) desktop.open(destFile);
javaanswered Luiz Lanza 600 -
0
votes1
answer357
viewsQ: How to call a Service through another app?
I have two apps, the app 1 has several CRUD, the app 2 has several services and notifications. When trying to start Service by App 1, this is happening: java.lang.Securityexception: Not allowed to…
-
2
votes1
answer689
viewsQ: What to do so the service is not finished by Android?
I have a service that runs in the background to pick up the location and go recording in a text. The service is started together with android through Broadcastreceiver. Works perfectly, but after…