Posts by Pena Pintada • 4,678 points
123 posts
-
0
votes1
answer162
viewsQ: How to log in with firebase and consume data from a local Rest api made with Node?
I have a React-Native application that consumes the data of an api made with Node and Mongo. And a simple application, is a CRUD of a "user" entity. However I have route protection using JWT in the…
-
1
votes1
answer2105
viewsQ: How to convert the response to an Axios request with React-Native?
I have this class that works perfectly: import React, {Component} from 'react'; import Icon from 'react-native-vector-icons/FontAwesome'; import AsyncStorage from…
-
2
votes1
answer436
viewsA: React Native 100% memory
At first you could use the app expo to test your code directly on your android device, and encode on Windows without using Android Studio. For those who are starting the expo is a good solution,…
react-nativeanswered Pena Pintada 4,678 -
-1
votes1
answer625
viewsQ: How to install java 8 on Ubuntu 19.04?
First of all, I know it seems a rather silly question, but I am a Windows "user", I have the dual boot on my machine.I really admire Unix, and I intend to migrate to it for good. I was using Ubuntu…
-
2
votes1
answer35
viewsQ: How to configure the progressiBar property in the plugin toastr?
I’m wearing this plugin to show messages , but I’m not able to do it. <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>toastr examples</title>…
-
2
votes0
answers168
viewsQ: Problems to download the angular cli through the terminal due to the internet provider?
I have a problem (I am currently using windows 10) that I can not solve. When I’m using the Internet here in my house and give the command npm install -g @angular/[email protected] the terminal locks and…
-
8
votes3
answers644
viewsQ: How to create a "Main" in an application that consumes a REST service that has all the entities in the system?
I am with the following web application created initially for and web using Spring Boot, Spring Security and Thymeleaf (authentication and authorization). I did a REST job and separated the…
-
1
votes1
answer949
viewsA: Questions to upload application to Tomcat
After your application is finished and generated the file . War you should follow these steps: In my case I installed toncat in the directory: C: apache-Tomcat-9 You should put the file . War inside…
tomcatanswered Pena Pintada 4,678 -
1
votes0
answers82
viewsQ: Is there any problem in persisting an image in postgres and it is of type bytea?
I have an application that was using spring framework version 4 (application that generated a .War full of settings...), it worked plausibly. However, I decided to upgrade to version 5 (using spring…
-
1
votes1
answer923
viewsA: How to make a query by passing parameters with spring boot and redis using Jparepository?
In the template class add the annotation @Indexed package org.springframework.data.redis.core.index.Indexed; @Data @RedisHash("customer") public class Customer { @Id private String id; @NotNull…
-
1
votes1
answer923
viewsQ: How to make a query by passing parameters with spring boot and redis using Jparepository?
I have the model: @Data @RedisHash("customer") public class Customer { @Id private String id; @NotNull private String firstName; ... I have the following interface: @EnableRedisRepositories public…
-
0
votes1
answer232
viewsQ: What does the addViewControllers method of the Webmvcconfigurer Spring boot class do?
I am using Thymeleaf on the front end of the application and have the following configuration class, with the addViewControllers method in question : @Configuration public class WebConfig implements…
-
1
votes1
answer1926
viewsQ: How to create a Primary Key Constraint named in Postgres?
I am proceeding this way to create a table without primary key initially. Then I add a field id serial type and try to create the Constraint to the Primary Key (PK): create table macaco( nome…
-
2
votes1
answer764
viewsQ: How to create a prefix for the url using spring boot
I learned to use the spring doing all the configuration in java classes and now I’m migrating to the spring boot 2.0.2. I would like to know how to create a prefix in the URL that has the name of…
-
2
votes1
answer163
viewsQ: How to configure the Auditor using Spring Boot 2.0.2
Here’s a class I used with spring framework version 4.3.4.RELEASE (I still didn’t use spring boot) and that worked: import org.springframework.data.domain.AuditorAware; import…
-
2
votes0
answers70
viewsQ: How to change the @Generatedvalue used by Spring through Spring’s Abstractpersistable class?
I’d like to use the @GeneratedValue(strategy = GenerationType.SEQUENCE, ... ... when extending the class AbstractPersistable, but I don’t know if that’s possible. From what I saw in the…
-
0
votes1
answer117
viewsQ: How to convert a Jsonarray to a Strings array?
String mensao = "[\"brega_falcao\",\"SamiPietikainen\",\"TecRahul\",\"gpantuza\",\"mkyong\",\"mkyong\",\"YouTube\"]"; Mensao is the Jsonarray I want to convert. I tried that but it didn’t work:…
-
0
votes1
answer103
viewsQ: Problems adding Jsonobject to Jsonarray
import javax.json.Json; import javax.json.JsonArray; import javax.json.JsonObject; import javax.json.JsonValue; // código JsonObject object = Json.createObjectBuilder().build(); JsonArray array =…
-
1
votes1
answer1231
viewsQ: How to create this view in postgres?
CREATE VIEW grafico AS SELECT AVG(realizacao) , AVG(estima), AVG(fisiologica),AVG(seguranca),AVG(social) FROM necessidade; I am trying to create a view that brings the average of five columns of the…
-
0
votes1
answer244
viewsQ: What is the problem with this java class that consumes a Rest service?
I have a Servlet : import br.edu.ifpb.pos.model.Art; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.DeserializationFeature; import…
-
1
votes1
answer196
viewsQ: Console shows javascript log very fast and not time view output
This is my code is a simple form: <!DOCTYPE html> <html> <head> <title>Formulário</title> <meta charset="utf-8" /> </head> <body> <form…
-
4
votes1
answer1077
viewsQ: How to read a list of serialized objects saved in a java file?
I wanted to work with serialization in java files and I read this tutorial about how to write the object in the file and this one on the how to read the file object Then I created the following…
-
2
votes1
answer137
viewsQ: Problems with improper access to urls in the application with Spring Security
I have a page, which uses Thymeleaf to update a user’s profile and on this page there are two buttons that allow you to update the profile and the other button allows you to remove the profile of…
-
1
votes2
answers403
viewsQ: Problems with javascript and google maps API
I’m trying to calculate the distance between these two points but I’m not getting it! I’d like to find out what the problem is. On the console, gives error a 404: distancia.html:14 Uncaught…
-
2
votes1
answer543
viewsQ: Problems with image localization in the Spring Framework
I’m using Spring and Thymeleaf: I have an image in the directory: Resources/image/Telescope.png When I open the page posts.html (home),located at the address below, the image is displayed.…
-
1
votes1
answer289
viewsQ: How to enumerate the position of a bit within a byte?
Where to start placing an ordinal numbering on a given byte, I start counting the most significant (the left )or the least significant (the right)? For example for the decimal number 128 having the…
-
6
votes1
answer712
viewsQ: What is the concept of integers signed in a programming language?
I would like to clarify the meaning of the term "whole signed". I’m researching protocols, to build one in Java, and sometimes I find the term. I don’t know what it’s about. I’ve always heard of…
-
1
votes1
answer609
viewsQ: Working with Hexadecimal in Java
I saw an example of code on the Java documentation site on bit that can be checked here. This class belongs to the example cited in link above: class BitDemo { public static void main(String[] args)…
-
2
votes2
answers1598
viewsQ: How do Postgres create a file to populate a bank?
I have a database in POSTGRESQL populated , I wanted to know if there is a command SQL that returns an aqruivo that had the following command for all existing tables: INSERT INTO aluno(id , nome,…
-
0
votes1
answer599
viewsQ: How do I make a method in the Spring controller that does the same as this method of a Servlet?
This code returns a json for an html page that uses an ajax resource to load a Chart from the Google API I’d like to do the same but using a Spring controller! public void doGet(HttpServletRequest…
-
1
votes0
answers240
viewsQ: Using Spring MVC to upload a Google Hard Drive
I have a jsp page with the following code that uses google Charts and shows the Graphics on the jsp page. When I use a Servlet as a controller it works perfectly. <%@page contentType="text/html"…
-
1
votes1
answer1509
viewsA: JSP Eclipse Project - Linking CSS style page
From what I read in your comment Voce says that the only property that works is " Border: 4px" . So that means you’re calling the stylesheet correctly!!! The problem is probably the style or the…
-
0
votes1
answer156
viewsA: Problems with web.xml file
How you used the version comtrole and up to a certain point of your apication everything was in working perfectly. Because something happened and this message started to appear and you went back to…
-
0
votes1
answer156
viewsQ: Problems with web.xml file
Warning: selected war files include a WEB-INF/web.xml which will be ignored (webxml attribute is missing from war task, or ignoreWebxml attribute is specified as 'true') I am using Netbeans to work…
-
0
votes1
answer84
viewsQ: How to write this xml bean using java?
<bean id="templateEngine" class="org.thymeleaf.spring4.SpringTemplateEngine"> ... <property name="additionalDialects"> <set> <!-- Note the package would change to…
-
0
votes1
answer521
viewsA: How to Import CSV File to Mysql? Error 1295
Many mysql graphics clients have very simple to use import dialogs(windows) for this kind of thing. What I use for is work Heidisql. It provides a graphical interface to build the LOAD DATA command;…
-
2
votes1
answer95
viewsA: How to position these elements in a List
List : <!DOCTYPE html> <html> <head> <meta charset="UTF-8"/> <meta name="viewport" content="width=device-width, initial-scale=1" /> <title>Blog</title>…
-
0
votes0
answers667
viewsQ: Problems to pass two parameters in the url using Thymeleaf
I have next step on my controller: @RequestMapping(value = "/", method = RequestMethod.GET) public ModelAndView home(ModelMap model) { Page<Postagem> page = postagemService.findByPagination(0,…
-
1
votes1
answer107
viewsQ: How to summarize a long text using Thymeleaf?
I have an object with two attributes, one is id and the other is strring type attribute called text type "TEXT" (postgres database) which is used to store the text of a customer post. When the app…
-
0
votes1
answer919
viewsQ: Problems with url using Thymeleaf
I have a page that shows all blog posts. This page has a posting object that in turn has the attribute that is a list of categories. This list of categories is shown on the page in the form links to…
-
1
votes1
answer178
viewsQ: How to override a height assigned to a div?
I’m using bootstrap and this is my css: .painel-altura{ height: 540px; } @media (min-width: 630px) { } I would like to cancel this height and leave it the size before 540px. I’m trying to use @media…
-
0
votes1
answer103
viewsQ: How to adjust email text to the box?
The image was obtained with the browser resized to the dimensions 390 X 650 approximately. I would like to know how to do the text "[email protected]" that is inside a h4 fits the…
-
1
votes0
answers528
viewsQ: How to export a postgres table with column names to csv format with jdbc?
This is my code, which unfortunately does not export column names: package net.viralpatel.java; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import…
-
1
votes2
answers941
viewsA: How to save the Maven dependencies inside the project folder?
Leave your pom.xml similar to the code below, it will create within the target folder of the Maven project a directory called "Example" (which could have any other name like lib), containing all the…
-
0
votes2
answers941
viewsQ: How to save the Maven dependencies inside the project folder?
I want to save all the dependencies of the Maven project inside the folder of my project! What should I put in the pom.xml file? Is there a plugin for this? I would like a pom.xml template that…
-
3
votes1
answer567
viewsQ: What is the difference between RMI and JRMP?
I only know the MRI... JRMP is just a different way of calling the RMI or is another protocol? If JRMP is another protocol, what is the difference with the RMI?
-
3
votes1
answer67
viewsQ: How to write this java program using javascript and Node?
public class Principal { private static int x = 0; private static int y = 0; public static void sum() { x = y + 1; y = x + 1; } public static void main(String[] args) { for (int i = 1; i <= 10;…
-
14
votes2
answers3382
viewsQ: What are the states of a thread?
I have been researching some places on the Internet but I did not find consistency in the definitions given on the subject of thread in Java. What are the possible states of a thread and what are…
-
1
votes2
answers418
viewsQ: How to clear neo4j properties after deleted all data?
I was doing some tests with the neo4j and suddenly I saw myself before many us and then I decided to clean everything, so I could start working with an application. So I executed the following…
-
1
votes1
answer318
viewsQ: How to form a JSF with a field that can have as many values as needed?
Taking into account the following entity class: import java.io.Serializable; import java.util.List; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import…