Posts by wryel • 2,143 points
57 posts
-
7
votes3
answers77
viewsA: Is there a bash iterator equivalent to the python enumerate?
You can do it like this: pessoas=(Walter Jesse Skyler Gus) for indice in "${!pessoas[@]}" do echo "$indice = ${pessoas[$indice]}" done Exit: 0 = Walter 1 = Jesse 2 = Skyler 3 = Gus Explanations [@]:…
-
2
votes1
answer155
viewsA: How to force typescript to interpret a parameter as a namespace instead of a class when they have the same name - gRPC
You need to correctly type your userid variable. When you do {} to instantiate an object, it will be of type Object. Do: let userId: UserId = new UserId().setId(1); // Tipado como UserId…
-
0
votes2
answers69
viewsA: javax.net.ssl.Sslhandshakeexception only on Glassfis 4
In order for the VM that your Java process/server/application runs to connect with ANY https host, the certificate from that host needs to be present in the Keystore of the same. As you mentioned…
-
1
votes1
answer207
viewsA: Infinite recursion in a bidirectional Manytomany model in Hibernate
You are having infinite recursion because Jackson is not knowing where to stop serializing your object, without seeing all the stacktrace, I suspect it is at the time he is writing the…
-
0
votes1
answer213
viewsA: Spring data Jpa Lanca @Autowired error and null pointer error
To initially resolve your Nullpointerexception, you need to inject a Service reference using the annotation @Autowired spring. @Autowired private Servicos fazer; To understand what…
-
4
votes2
answers2025
viewsA: What is the maximum and minimum value for z-index?
If you browse the latest version of the specification and for na property list and arrive at the z-index property, there has the last definition of the same: Name: z-index Value: auto | < integer…
-
1
votes1
answer323
viewsA: Status e-mail - nodemailer
First of all, it is important for you to know that it is impossible to find out if a user has opened a sent email because the SMTP protocol does not provide a way for us to identify this action.…
-
5
votes1
answer3078
viewsA: How to make a regex that accepts 8 or 9 digits with 2-digit DDD?
Following exactly the rule of the post, follow the step by step: \( = Character (otherwise we would have a group \d = any digit {2} = repetition \) = Character ), otherwise we would have a group…
-
1
votes1
answer57
viewsA: How to check if an ionicModal is open?
According to the documentation, every time you make a call $ionicModal.fromTemplate(...) $ionicModal.fromTemplateUrl(...) will receive a new Promise of ionicModal. The method you are looking for is…
-
0
votes2
answers58
viewsA: Scope of a service
In javascript, when we want to reference the object itself (this) at any depth, we use a local variable to store the reference to this. Ex: var self = this; getting:…
-
1
votes1
answer114
viewsA: What are the reasons for migrating an application to a newer technology
This type of question is Offtopic for the site, but follows view below. As you said yourself, the biggest problem is not technology (JSF) but how components and business classes were programmed.…
-
2
votes3
answers3142
viewsA: Select Sum in table with PHP/Mysql
Fiddle: http://sqlfiddle.com/#! 9/c75434/1 Data creation CREATE TABLE registro ( `id` INT NOT NULL PRIMARY KEY AUTO_INCREMENT, `data` date, `hora` time, `quantidade` int ); INSERT INTO registro…
-
3
votes1
answer430
viewsA: Method being called several times in the change event of a p:ajax
Probably the attribute event Event="change" is being fired on the keyUp keyboard, as Ctrl + v are two keys, so there will be 2 events. Test use the delay attribute of p:ajax <p:ajax delay="1000"…
-
1
votes1
answer81
viewsA: Public Type (VB) for Java
The most "next" to VB type will be java classes (which is the same thing as classes in VB). Something still close to Type would be you create a class with public attributes, but still you would have…
-
0
votes1
answer1325
viewsA: Error in Spring Project Execution
Move the class Gestaofestaapplication.java that’s in the package br.pro.fagnerlima.festa for br.pro.fagnerlima. Probably Springboot is only looking at the classes that are in the class package…
-
3
votes2
answers384
viewsA: Code Review at compilation time
I will put as an answer because it did not fit in the comment. Usually in java use Jenkins + Sonarqube (known as Sonar) for code evaluation in general. A quick google search on Jenkins + Delphi can…
-
2
votes5
answers737
viewsA: How to save data from a changed grid?
The solution I’m going to propose is not based on your language (php) but on your problem. From your printscreen, I understood that 1 Request has N Itempedidodeproduct (which contains the product…
-
2
votes1
answer584
viewsA: How to treat error 404 and 500 in vRaptor?
If you are talking about the error-page of the Servlets specification, up to version 2.5, within the web-app tag (the main tag of the web.xml file that sits within WEB-INF) there is the possibility…
-
3
votes1
answer1357
viewsA: Problem placing multiple data from a list in a report
Taking a closer look, I identified 3 possible entities: Guide, Benefit, Procedure. Where 1 guide has 1 beneficiary and 1 beneficiary may contain N procedures. Looking closely at the jrxml ... This…
-
3
votes1
answer333
viewsA: Doubt validation of Cpf before inserting in the bank
Since you don’t have a business layer and access the DAO directly, you should put the validation inside the DAO, which finding some problem, release an exception. Placing inside the DAO, anywhere…
-
2
votes1
answer48
viewsA: Error trying to run JSF application
If you are in Jboss, you cannot pack any jar related to JSF with your application because it is already available inside the Jboss itself (See this link available resources within a JEE 6…
-
3
votes3
answers2583
viewsA: SQL of tables with multiple relationships
Diagram What I understand about your problem: It would be correct to say then that 1 user may have 1 or N films 1 film may have 1 or N generous it is possible to read backwards also 1 gender may be…
-
3
votes1
answer145
viewsA: How does the Java compiler work?
In Java 1.4, there was no resource for Generics. This feature was implemented from Java 1.5 (officially called Java 5). Although you’re not noticing, the compiler is doing it this way: Install an…
-
1
votes2
answers1347
viewsA: Find out how many days passed from one date to another
Solution from Java 1.4 focused on your problem: String dataUm = "20/10/1990"; String dataDois = "23/05/2005"; SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd/MM/yyyy"); // dd/MM/yyyy é…
-
4
votes1
answer329
viewsA: Database structure for comment system
Being as basic as possible. Requirements See for your own requirement: You have 1 post (which consequently has a primary key, I will call id_post). Which briefly has the attributes id, text of the…
-
7
votes4
answers342
viewsA: What is the function of the " | " operator within the catch?
This is a Feature that was introduced from Java 7. You can use it to remove possible duplicate catch snippets. Ex: catch (IOException ex) { logger.log(ex); throw ex; } catch (SQLException ex) {…
-
4
votes1
answer441
viewsA: Can I use the DAO and Repository project standards together?
That’s an interesting question and I think it recurs in Stack. I will use as java language I have more domain, but this rule applies to any language since we are talking about Software Design. DAO…
-
1
votes2
answers1019
viewsA: How to avoid HTML Injection and XSS on . JSP pages?
JSP’s The simplest way is to use the tag out of JSTL Core library. Example: <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <c:out value="${suaVariavel}" /> would be the…
-
2
votes2
answers205
viewsA: From . NET to Java, what technologies or frameworks do you use?
Authentication & Authorization You can use JAAS which has its own specification, however, its configurations usually change from supplier (implementer) to supplier. If you want to leave the…
-
4
votes4
answers7856
viewsA: Calculate Total Hours by identifying Equal Time Intervals
The thing already starts strange by date and time being in separate columns and be of the varchar type(? )(I’m guessing yes). I grouped according to what I understood, which was to take the smallest…
-
5
votes1
answer290
viewsA: Is it possible to create domains with accents?
Records in Brazil and some international already allow special characters. See this news from Registro.br of 2005: The domain registration service will accept, from 09/05, characters allowed in the…
-
1
votes1
answer94
viewsA: How to exit the controller before reaching the end with Vraptor 3?
If a method returns void, you can terminate its execution using the word Return; @Path("/metogo) public void Metodo(Teste teste) { //... if (aconteceAlgo) {…
-
0
votes1
answer335
viewsA: Slide item to increment Textview
I do not know if this type of question is valid here in the OS, since it is about component "research", and no doubt programming rs. But anyway, follows response taken from the OS in English: This…
-
0
votes2
answers4028
viewsA: Class.getResource() can only recover files in internal folders to which the class is located?
When you do: getClass().getResource() it will consider the class package (relative path from the class). When you do: getClass().getClassLoader().getResource() it will consider the Classloader root…
-
2
votes4
answers688
viewsA: Superclass can become subclass?
Problem I think you are thinking wrong (you should write to us your request and not what you have already thought). I will try to focus on the description of your problem. Going by parts, you said…
-
1
votes1
answer106
viewsA: Multiple foreach inserts in MVC
Your current business requirement In a customer register, I can insert several observations Note that from the description of the text, it says I can insert several comments. As this process is…
-
4
votes1
answer2723
viewsA: How to change the font color of a Jtextarea?
Jtextarea inherits from Jcomponent, that automatically wins setForeground, therefore, you can do for example: jTextArea.setForeground(Color.RED); jTextArea.setForeground(new java.awt.Color(r, g,…
-
2
votes2
answers2395
viewsA: Add <option> to <select> with jQuery via $.post’s callback
Assuming your return structure as: usuarios = [ {"id" : 1, "login": "joao"}, {"id" : 2, "login": "maria"} ]; According to the documentation itself (the secret is here, in each function):…
-
4
votes8
answers12405
viewsA: How to switch between true and false checked input?
use $("input[id="+idcheck+"]").prop('checked', false);
-
4
votes1
answer64
viewsA: How to make these SQL requests?
There is not much secret about how it should be done, the business rule of your screen is usually: IF code is informed, the other fields should be ignored, then, SELECT * FROM tabela WHERE codigo =…
-
1
votes1
answer945
viewsA: How to call information in an html from a page . jsp
It’s not necessarily your answer, but most html-based mobile applications within the application interact with business rules through services in REST. It is nothing new this concept and yet you…
-
1
votes1
answer254
viewsA: How to do a random search using JPQL script in JPA2
I will respond as if you were working mysql. The problem is that RANDOM is not covered by the JPA specification. My suggestion is that you do a Native query +/- like this: SELECT id FROM tabela…
-
1
votes1
answer436
viewsA: How to redirect form to a verification code?
Captcha (by Wikipedia) CAPTCHA is an acronym for the expression "Completely Automated Public Turing test to Tell Computers and Humans Apart" (a fully automated public Turing test for differentiation…
-
0
votes1
answer40
viewsA: ./install_bam.sh and i get an error stating "cannot execute Binary file
Try: chmod +x install_bam.sh Syntax of the chmod command: chmod [-Fv] [-R [-H | -L | -P]] mode file ... chmod [-Fv] [-R [-H | -L | -P]] [-a | +a | =a] ACE file ... chmod [-fhv] [-R [-H | -L | -P]]…
-
7
votes4
answers930
viewsA: Behavior of different ways of comparison in Java
By default, any class that does not declare extension of another class, under the cloths, it will extend java.lang.Object. In your Person object, since you have not overwritten the equals method…
-
2
votes1
answer1383
viewsA: What tools (Apis, libraries, frameworks) are needed to create graphs and reports?
Some graphics/report Apis for android: Androidplot Android Graphview Achartengine Chartdroid Google Charts (HTML 5) API for writing PDF inside android: Android PDF Writer iText (for commercial…
-
4
votes1
answer1006
viewsA: How to complement this sql query?
Solution SELECT a.nomealuno, AVG(m.media), SUM(IF(m.resultado=1, d.creditos, 0)) FROM aluno a LEFT JOIN matricula m ON a.codaluno = m.codaluno LEFT JOIN turma t ON m.codturma = t.codturma LEFT JOIN…
-
1
votes2
answers1366
viewsA: Page footer iReport only on the first page
You are probably putting the expression in the wrong place, see the image below: In the "Report Inspector" palette (left side), select the "Page Footer" tab. Your expression should be in this "Page…
-
5
votes1
answer3381
viewsA: Create report with nested lists
I’m guessing you already have basic knowledge in iReport. You didn’t put your object models, so I’m going to imagine one as per your description (In fact, you should use the same objects from your…
-
3
votes2
answers148
viewsA: How to insert the ID in the database since it is the first field of the table?
You need to explicitly state the name of the columns you will be doing INSERT if you want to omit a field, e.g.: INSERT INTO visitados (nomecoluna, outronomecoluna, maisumnomecoluna ...) VALUES…