Posts by Matheus Ribeiro • 143 points
32 posts
-
-1
votes1
answer871
viewsQ: How to use the "parent" component function in the React child
I have a component Menu import React, { Component } from "react"; import "./Menu.css"; import { connect } from "react-redux"; import Sidebar from "react-sidebar"; import SidebarContent from…
reactasked Matheus Ribeiro 143 -
0
votes3
answers100
viewsA: Error doing an INSERT in Postgresql database
Although the other answers are valid methods, for some reason I could not in the proposed ways, to solve this problem I used the following method: Use a EntityManagerFactory and a EntityManager :…
-
0
votes1
answer130
viewsQ: How to do a Query ignoring the side spaces of the Column content?
Good morning, everyone! Using the Query: @Repository public interface SessaoRepository extends AbstractRepository<Sessao, Long> { @Query(value = "SELECT p FROM Sessao p WHERE p.dc_secao…
-
0
votes3
answers100
viewsQ: Error doing an INSERT in Postgresql database
When making an insertion in the Postgree bank I have as a response a very strange error: 2019-11-22 17:06:30.310 ERROR 15212 --- [nio-8080-exec-2] o.h.engine.jdbc.spi.SqlExceptionHelper : Nenhum…
-
0
votes1
answer341
viewsQ: How to fix the position of a header independent of the screen size?
Basically I’m building a burger menu and the same has this blue bar as shown on the screen below: But the more I press this screen, the smaller the size of this bar, which ends up hiding the button:…
-
0
votes0
answers87
viewsQ: Git Push / Git clone does not work even after setting an SSH key correctly
Even if you correctly set an RSA-type SSH key, as described in: GIT LAB SSH, I did several tests and added a file config: Host gitlab.com Hostname gitlab.com IdentityFile ~/.ssh/gitlab I got it in…
-
1
votes1
answer719
viewsQ: How to style a Mat-Gymnator?
I created a mat-paginator-intl to modify the text of mat-paginator as follows: import { MatPaginatorIntl } from '@angular/material'; export class MatPaginatorIntlCustom extends MatPaginatorIntl {…
-
0
votes1
answer317
viewsA: *ngIf does not function as expected, Angular
I had to use it this way: <div *ngIf="view._source.favoriteView === 'false'"> <button (click)="setAsFavorite(view._id)" matTooltip="Favoritar" mat-icon-button >…
angularanswered Matheus Ribeiro 143 -
-1
votes1
answer317
viewsQ: *ngIf does not function as expected, Angular
I basically have this *ngIf <label>{{view._source.favoriteView }}</label> <!--Não é favorito--> <div *ngIf="view._source.favoriteView"> <button…
angularasked Matheus Ribeiro 143 -
0
votes1
answer252
viewsQ: Is there any way to force an option of a <mat-option> by a service?
I basically have a mat-option, and would like to select an option from it directly by parameters, with a service, for example. This is the option: <mat-select…
-
0
votes1
answer510
viewsQ: How to give "Trigger" in an Option of a Mat-select that is already selected?
I basically have this mat-select: <mat-select [formControl]="form.get('emptyTitle')" placeholder="Nenhum Índice Selecionado" (selectionChange)="onSelect($event)"> <mat-option…
-
0
votes1
answer68
viewsA: JAVA FUNCTION SCRIPT CPF VALIDATION
If you want to format the valid CPF, you can take advantage of this function you created, and simply do something like: Function to rewrite the value in the desired format: function format(value,…
javascriptanswered Matheus Ribeiro 143 -
0
votes0
answers76
viewsQ: Doubts on the applied use of async/await with Angular
Good morning, Even reading about the concepts and uses of async and of await I’m still having problems with their actual application. Basically in my ngOnInit call for a function: ngOnInit() {…
-
1
votes0
answers152
viewsQ: How to "walk" within two arrays at once with *ngFor?
I basically have two arrays, and I would like to save their value at the same time *ngFor, I did just like to test something this way: <div formArrayName="alternativeFields" *ngFor="let field of…
angularasked Matheus Ribeiro 143 -
1
votes0
answers218
viewsQ: How to make a POST with an Httpentity in the correct format?
Good morning, I’m performing a POST for a API using the HttpEntity of Spring, but I’m not sure if the POST that I’m performing is being done in the right way, and I’m having mistakes in creating a…
-
1
votes2
answers152
viewsA: How to reset or reset the app variables?
//Quando clicado o botão acontece um evento public void processar(View view) { boolean ok = true; float nota1 = 0; float nota2 = 0; float media = 0; boolean numValido =…
-
0
votes1
answer101
viewsQ: REST API works locally, but does not work on TOM CAT
I am uploading a Rest API locally and making requests normally with POSTMAN in this API, but when I upload this same API to Tomcat, it simply misses 404 and I don’t have access to any of the API…
-
0
votes2
answers47
viewsA: How to pick up a word that contains a specific character?
I don’t quite understand what you want, but it would be something like? Split in the word: var word = "Tiffany 3 Seats Sofa in Velvet 2.12m Aquila" var palavraSplittada = palavra.split(" "); Then…
-
0
votes0
answers49
viewsQ: How to retrieve information from one httpOptions in another Angular component?
I basically have a component user-login-component and in it I have the following function:: userLogin() { this.restApi.auth(this.userDetails).subscribe(dados => { var headers_object = new…
-
0
votes1
answer901
viewsA: How to update data when changing Angular component
After many attempts, I managed to solve using the following 'macete': timer(1000).subscribe(x => { this.router.navigateByUrl('/Refresh', { skipLocationChange: true }).then(() =>…
-
0
votes0
answers36
viewsQ: How to Index an array as separate fields in Elasticsearch
I tried to index as follows: body: { name: form.value.name, title: form.value.title, description: form.value.description, published: new Date().toLocaleString(), stash: { "title":…
elasticsearchasked Matheus Ribeiro 143 -
0
votes1
answer901
viewsQ: How to update data when changing Angular component
Basically my data is updated, but when I go to another component that shows this data, they are still outdated. I have to go to another component and come back again to update them. I tried to use…
-
0
votes1
answer21
viewsA: Error updating angular Elasticsearch index
I managed to solve this problem by putting inside the body the tag doc: this.es.update({ index: 'contentman', type: 'sites', id: _id, body: { doc:{ name: form.value.name, description:…
-
0
votes1
answer21
viewsQ: Error updating angular Elasticsearch index
I basically have the following function: this.es.update({ index: 'contentman', type: 'sites', id: "_id", body: { name: form.value.name, description: form.value.description, url: form.value.url,…
-
0
votes6
answers674
viewsA: Angular 6: Selected does not work with [(ngModel)] and (ngSubmit)="onsubmit()
<form (ngSubmit)="onSubmit()"> <div class="form-group"> <label for="nome">Nome</label> <!-- <input type="text" class="form-control" name="name" id="nome"…
-
1
votes2
answers119
viewsQ: ngOnInit does not save value of the variable returned by a function
I have the following function: getCampos(id: String) { console.log('id em getCampos:', id); this.es.getDocument(EditSiteComponent.INDEX, EditSiteComponent.TYPE, id).then( response => {…
angularasked Matheus Ribeiro 143 -
2
votes1
answer2359
viewsQ: How to pass and receive a parameter between angular components
I was passing the parameter Id using Routes: const routes: Routes = [ { path: '', redirectTo: 'sites', pathMatch: 'full' }, { path: 'addSite', component: AddSiteComponent }, { path: 'sites',…
angularasked Matheus Ribeiro 143 -
0
votes0
answers65
viewsQ: How to iterate variable at angular every time a certain condition is met?
<div *ngFor="let elemento of team.elementos" class="{{elemento.colunas}}"> <div *ngIf="(elemento.dataPublicacao < hoje) && (elemento.dataValidade > hoje)">…
-
1
votes0
answers514
viewsQ: Material angular does not function even if declared
Basically all the themes are declared and no error is pointed out, but everything that is within the tags related to the angular material, is simply not rendered, the rest, which is not within these…
-
1
votes2
answers126
viewsQ: Is it wrong to create checkboxes with the same name?
Create several checkbox with the same name can be considered wrong? Since the value is what defines the dado of checkbox. Or should I really have names different? <tr>…
htmlasked Matheus Ribeiro 143 -
0
votes1
answer91
viewsQ: How to start two equal services in Tomcat, but with different Final Ames
Basically I have a service running on Tomcat, I would like to upload a copy of it with another final name in Tomcat. The problem is that there is some limiter that is not the end that prevents me…
-
0
votes1
answer146
viewsQ: How to keep Mainactivity "feeding" map Activity?
I have this code and at the moment I need to pass a latitude and longitude to receive on the map and show the current position the user is in, the problem is that when passing to the Intent of the…