Posts by Juliana Marques • 337 points
39 posts
-
1
votes0
answers106
viewsQ: Method in p:commandButton is not called
In my view you have p:commandButton with a method that adds an item to a p:datatable. By clicking the button to call the method to add the first item, it is correctly added to the datatable, but by…
-
4
votes2
answers245
viewsQ: I can’t push in GIT repose
I have a GIT repository on an SSH server and when trying to push, the following happens: Counting objects: 16, done. Delta compression using up to 8 threads. Compressing objects: 100% (14/14), done.…
-
1
votes1
answer854
viewsA: How to clean R’s Global Environment?
With this command you clean the enviroment of the R: rm(list=ls())
-
0
votes0
answers548
viewsQ: Problem restoring backup with pg_restore in Postgresql
I cannot restore a backup using pg_restore, while trying to restore the process starts, but shortly afterwards it stops and says that it is "without memory" ~$ /usr/bin/pg_restore --host "localhost"…
-
1
votes1
answer317
viewsQ: Recaptcha does not render
I’m trying to put a recap in my view, but it doesn’t render at all and the following exception appears: Warning: JSF1090: Unresolved navigation case for the component j_idt200. View <!DOCTYPE…
-
0
votes1
answer137
viewsQ: I can’t load the image on the carousel
I have a home screen with a carousel, where each item has a title and an image, however the image does not render at all, only the title. I’m not able to identify why this is happening, since the…
react-nativeasked Juliana Marques 337 -
1
votes2
answers261
viewsA: How do P:Izard go back to a certain tab?
I was able to solve by making Binding component and using p:commandButtons for the back and next buttons instead of using the p:Wizard buttons and created methods to be executed by clicking the two…
-
0
votes2
answers790
viewsQ: I can’t redirect to another screen
I have an application in React Native with the initial route pointing to the Authloadingscreen screen that checks if the user is logged in and redirects to Login or Home, as the user is not logged…
-
0
votes2
answers261
viewsQ: How do P:Izard go back to a certain tab?
I have a p:Wizard in which, if a certain condition is true, it advances to the last tab by clicking next. But I’m not getting it back to the first tab if I click back. There’s a way to do this with…
-
3
votes1
answer84
viewsA: Set attribute of another Python class
Person should have a relationship with Cargo, which in this case is a 1,n relationship. Django uses Foreignkey for this type of relationship. class Pessoa(models.Model): nome =…
-
1
votes0
answers205
viewsQ: Direct assignment to the forward side of a Many-to-Many set is prohibited. Use morador.set() Instead
I’m building an API for a condo system, and when I try to select the residents, I get the following exception: TypeError at /apartamento/ Direct assignment to the forward side of a many-to-many set…
-
1
votes1
answer225
viewsA: How can I manipulate data from a form in Django?
You can get the form data through cleaned_data, some usage examples are: View @login_required def add_post(request): if request.method == 'POST': form = PostForm(request.POST) if form.is_valid():…
-
0
votes1
answer78
viewsA: I cannot get the correct item id as parameter
I was able to solve the problem, when I started using modal for the removal and comments, now I’m using a Javascript function to get the id and move to modal: function setPostIdDelete(postid) {…
-
0
votes1
answer78
viewsQ: I cannot get the correct item id as parameter
I have an app django of posts (posts) and comments from posts. In it I can also delete one post, however while deleting a post the application only deletes the post with higher id. The same occurs…
-
0
votes1
answer78
viewsQ: I can’t display a comment list for a post in the Django template
I have a method called get_comments in the models that returns the comments of my post, but when I display in the template, only the posts are displayed, the Comments are not. Django does not return…
-
0
votes5
answers93
viewsA: How to explain this FOR loop in Javascript?
Are you adding to x all the elements that have the class "city" (the getElementsByClassName("city") does this) and then goes through x with this is, making all the element that contains the city…
-
0
votes1
answer26
viewsQ: Attributeerror at /posts/add/ 'Postform' Object has no attribute 'cleaned_data'
I have a Postform class with an is_valid method that validates the form fields, but it is not recognizing the cleaned_data attribute, whenever I try to add a new post this happens: AttributeError at…
djangoasked Juliana Marques 337 -
0
votes1
answer705
viewsQ: Import: cannot import name 'Usuario' from 'usuarios.models
I have these models where the condo can have multiple apartments and an apartment can have multiple owners, each condo has a syndicate, a sub-index and a manager. I am adding sindico, subsindico and…
djangoasked Juliana Marques 337 -
2
votes2
answers74
viewsQ: Problem when displaying routes in Root Api
I have a file urls.py in the project with my API routes, I am importing the routes and concatenating into a variable called api_urls, to then include the variable with the routes, but when doing…
-
0
votes0
answers805
viewsQ: org.postgresql.util.Psqlexception: ERROR: Operator does not exist: bigint = bytea
I have a method that retrieves all paths from the appendices of a ledger, so the appendices can be printed. They are listed in a p:datatable within a dialog, but when opening the screen so that I…
-
0
votes1
answer112
viewsQ: Problem printing PDF with iText
I have to print out a Jasper report with attachments, which are images and other Pdfs. My approach is to pass this pdf from Jasper to iText and then merge with the attachments. For the method that…
-
2
votes2
answers286
viewsA: Help in the Python!
From what I could understand from the question, you want to print these values on the same line. In python it is possible to print on the same line using end="" to separate the values and prevent…
pythonanswered Juliana Marques 337 -
1
votes1
answer47
viewsQ: SQL query does not return expected items
I have two tables called Protocol and Analyze with a 1:n relationship, a Protocol may have several Analysis, Protocol has a composite primary key. I need to write an SQL that returns the Protocols…
-
2
votes1
answer42
viewsA: Return area of a triangle using function,
You can create a function that returns the area calculation and then you can print the function def calcularArea(base, altura): area = ((base * altura) / 2) return area def main(): base =…
python-3.xanswered Juliana Marques 337 -
0
votes1
answer45
viewsQ: Null arrives attribute in Managedbean
I have an object called Historicosituacaodocumentacaoprotocoloonline, this object has some dates, a description and another object, called Situacaodocumentacaoprotocoloonline. The dates are being…
-
0
votes2
answers154
viewsA: Value selected by selectOneMenu comes null
I managed to solve, I made some modifications in the converter and it worked @FacesConverter(value = "tipoDocumentoConverter") public class TipoDocumentoConverter implements…
-
0
votes0
answers105
viewsQ: Merge Jasperreport report with other Pdfs and images
I have a Jasperreport and need to attach to it other Pdfs and images that the user attached. I was suggested to use iText, but I still have no idea how to merge the Jasper report pdf with these…
-
0
votes2
answers154
viewsQ: Value selected by selectOneMenu comes null
I have a selectOneMenu that contains a list of document types, which I associate to the documents being attached in a p:fileUpload, however, the value selected by selectOneMenu comes null View of…
-
3
votes2
answers511
viewsA: Java IMC, helps with an error
The calculus variable is initialized within the BMI calculation method. Initialized variables within methods cannot be recognized outside them. So when you call the calculus variable in another…
-
1
votes2
answers416
viewsQ: Resize a child element according to the width of the parent element
I have an h:inputTextarea inside a p:dialog, so: I would like as I resize to p:dialog a h:inputTextarea resize as well, so that when I resize the dialog it doesn’t get as ugly as in the image, and…
-
-1
votes5
answers102
viewsA: doubt about select in css
Use padding in options In the CSS .option { padding: 10px; } In HTML <option class="option" value="" disabled selected>Clique e Selecione</option> <option class="option"…
-
3
votes1
answer93
viewsQ: Nullpointerexception when saving an object
I have a save methodRegister and in this method I save the company and its address, it saves the company first, but when saving its address occurs a Nullpointerexception Entity Address Person…
-
1
votes1
answer41
viewsA: check in settter - java method
Yes, it is possible to do this type of check in the set method public void setValor(double valor) { if(valor > 0.0) { this.valor = valor; } else { // Mensagem de erro aqui } }…
-
-1
votes3
answers223
viewsA: How to simplify a problem to get the names of the months of the year?
#include <stdio.h> int main() { int mes; printf("Numero do mes: "); scanf("%d", &mes); const char *meses[] = {"Janeiro", ...}; for(int i = 0; i < 12; i++) { if(mes == i) {…
-
0
votes1
answer137
viewsA: ireport - Error using Print When Expression
Try writing the expression like this: <printWhenExpression><![CDATA[$F{codProduto} != null]]></printWhenExpression>
-
4
votes3
answers931
viewsA: How to query with Count
From what I understand, you want to use COUNT to mount this query ((Query2 * 100) / QUERY2) and get a numerical result. Try doing so: ((SELECT COUNT(nome_casa) FROM resultado WHERE nota_final…
-
2
votes2
answers6936
viewsA: Average C using vectors
The return type of the function must be float. The cast in media = (float) soma / tam is unnecessary as the value of the operation is already a float. #include <stdio.h> float mediaVetor(float…
-
2
votes5
answers9012
viewsA: How to replace more than one character in the replace method in Python 3?
You can use a for to solve your problem texto = input("Digite um texto: ") for c in ".!?,#@&%": texto = texto.replace(c, '')
-
0
votes2
answers104
viewsA: I want to understand how the instance variable and the local variable of the parameters works
My question is, the value that will be implemented in the setName method, using the argument "this.name = name;" will it be allocated in the instance variable or will it be assigned only to the…