Posts by veroneseComS • 2,752 points
368 posts
-
2
votes2
answers695
viewsQ: How to apply a *ngFor to an array of objects in Angular where the name varies?
I have the following array called dadosRelatorio that I need to iterate in my template, that array I get through a request from my backend. [{"id": 1, "name": "a", "class":[{ "Inglês":[{ "id": 1,…
-
-2
votes1
answer57
viewsQ: After a create, update an array with data from a get or increment the Response in the array?
Assuming I have a table showing data from an array, when entering a new element in the database via a request POST, how best to update the data on screen? I’m always in doubt between making a GET…
-
1
votes3
answers453
viewsQ: How to perform currency multiplication in the Brazilian format in js?
I currently have the following monetary format: 2.222,57 But when I give a console.log() I see that it’s like a string: console.log(this.produtos[i].price) console.log(typeof…
javascriptasked veroneseComS 2,752 -
2
votes2
answers1700
viewsQ: How to prevent the user from returning to the login screen after logging into the flutter?
I have the following login widget that after the request is successfully made, it adds on the navigation stack to the home screen and removes the login screen. If I try to get back from home screen…
-
0
votes1
answer2743
viewsQ: Flutter: type 'Future<Dynamic>' is not a subtype of type widget
I’m trying to run a check through the token: If there is a token, display the page Home and, if not, displays the page Login. I tried this way: main.Dart: class MyApp extends StatelessWidget { //…
-
0
votes1
answer86
viewsQ: How do I getter my request in flutter?
I have a function that performs login and I need to save the token on storage: login() async { setState(() { isLoading = true; }); final response = await http.post('https://xxx.net/api/login', body:…
-
10
votes3
answers603
viewsQ: Why is it allowed to delete elements from an array defined as const?
Assuming I have set an array to const: const array = [1,2,3] Why is it possible for one of these elements to be removed? This would not be a way to reassign the array? It’s possible I’ll make one:…
-
0
votes1
answer281
viewsA: Validation of regex with Indicative (adonisJs)
If anyone needs it, I can use rules as array and using the rule(): const { validate, rule } = use('Validator') doc: [rule("regex",…
-
0
votes1
answer281
viewsQ: Validation of regex with Indicative (adonisJs)
I am trying to validate a CPF with regex using the Adonis Database. I tried that way: const { validations } = use('indicative/validator') const { validate } = use('Validator') const rules = (values)…
-
0
votes1
answer222
viewsA: Property of my object is returning Undefined
Apparently it is some insertion problem in the serialized object that Adonis returns from my query, I was able to solve by converting my language array to a simple javascript object:…
-
-1
votes1
answer222
viewsQ: Property of my object is returning Undefined
I have the following function: async geraQuiz(idEstudante) { let idioma = new Array() let livrosUnidadesGerarQuiz = new Array() const idsClassesEstudante = await…
-
0
votes3
answers2267
viewsQ: How to draw objects from an array?
I have in the variable optionsPergunta an object array and need to draw the position of the objects in this array: "options": [ { "id": 6, "book_unit_question_id": 2, "description": "get",…
-
0
votes2
answers85
viewsA: How to select records that do not have relationships in a table in Node/Adonis?
If anyone needs anything like that, I got it this way: // Retorna as classes que um estudante pode se vincular async getClassesDisponiveisEstudante({ request }){ const…
-
0
votes2
answers85
viewsQ: How to select records that do not have relationships in a table in Node/Adonis?
I have three tables: students ------------ id INT name VARCHAR class ----------- id INT description VARCHAR student_classes -------- id INT student_id (FOREIGN KEY of students.id) class_id (FOREIGN…
-
0
votes0
answers29
viewsQ: How to use overlay in a dialog inside a window in Kendo UI?
I currently use the Kendo Ui Angular I am currently trying to use inside a window a component that calls a dialog, but my dialog is not applying the overlay opacity effect, currently having this…
-
0
votes1
answer513
viewsA: Nodejs/Adonis Application Deploy on Heroku: Receiving 503 Status: Unvailable Service
If someone goes through something like this, I was able to resolve by removing the file . env, I thought the parameter ENV_SILENT=true it was sufficient, but it is necessary to remove the file .…
-
1
votes1
answer513
viewsQ: Nodejs/Adonis Application Deploy on Heroku: Receiving 503 Status: Unvailable Service
I’m trying to deploy an API-only application using Heroku, but I deploy it and when I try to get a route I get: Status: 503 Service Unvailable. Man Procfile: release: ENV_SILENT=true node ace…
-
-1
votes1
answer330
viewsQ: How to filter relationships in Donis?
I pass this query: const filter = request.input('filter') const queryBookQuestions = BookUnitQuestion .query() .with('book_unit') .with('user') .with('book', (builder) => { builder.where('id',…
-
1
votes0
answers66
viewsQ: I can’t get a relationship going Lucido on Adonis
I have the following schema: Book: class BookSchema extends Schema { up () { this.create('books', (table) => { table.increments() table.string('description') table.timestamps() }) } Bookunit:…
-
1
votes1
answer377
viewsA: Middleware that saves a user_id after a request to Adonis.js/Node.js
With the help of @Virgilio Novic I managed to reach the expected result through the following implementation: I created this middleware: class Auditoria { async handle ({ request, auth, }, next) {…
-
0
votes1
answer377
viewsQ: Middleware that saves a user_id after a request to Adonis.js/Node.js
I own the following table job: job -------------- id INTEGER PK, name VARCHAR, user_id INTEGER FK I need to save in the column user_id the id of the user who created that record. I tried to create…
-
0
votes1
answer88
viewsA: How to find a word in this query params?
For those who need it, I managed to solve it this way: async index({request}) { const { page, pageSize } = request.get(); const queryUsers = User .query() .with('user') let filter =…
-
-1
votes1
answer88
viewsQ: How to find a word in this query params?
I’m doing a query that performs where based on the string filter received in query params. My filter query params has this format: filter: (status~contains~false~and~username~contains~'admin') I…
-
1
votes1
answer206
viewsA: Add Where’s in query if you receive filter parameter in Adonis/Node
If anyone needs it, I got it done that way: async index({request}) { const { page, pageSize } = request.get(); const queryUsers = User .query() .with('user') if(request.input('username'))…
-
0
votes1
answer206
viewsQ: Add Where’s in query if you receive filter parameter in Adonis/Node
Currently I have this query that returns all users: async index({request}) { const page = request.input('page') const pageSize = request.input('pageSize') const users = await User .query()…
-
0
votes1
answer544
viewsQ: How to return a specific status with Adonis.js/Node
I am trying to return a specific status and a message in my api, I tried this way: return response.status(409).json({message: 'User already registered'}) But I’m getting: Response is not defined I…
-
2
votes1
answer89
viewsQ: User Creation Api Is Returning Status 204 In Content
I’m developing an api that I get the id the user of the request through the token, I store in my user object and I register this user. The problem is that it is not returning anything, even if I put…
-
1
votes0
answers128
viewsQ: How to return token in user registration in Adonis?
I am creating a user registration api and would like to return beyond the registered user, the jwt token. These are currently my duties: initializeCreate( {request} ){ const data =…
-
0
votes1
answer175
viewsQ: How to transform a string into a float through the angular template?
I’m using the component agm-map and I need to move on to the properties [latitude] and [longitude] coordinates. I am receiving these values in string, but need to convert into numeric. I tried…
-
1
votes1
answer86
viewsQ: How to concatenate a data + string when passing component property?
I’m using a component of kendoUi that I need to pass on the property [title] my variable local.LocalNome and local.LocalDataCadastro, but I need to apply the date pipe to my date variable. I tried…
angularasked veroneseComS 2,752 -
0
votes1
answer28
viewsQ: Disabled error ao utilizar junto com formcontrolName: The 'value' should be a Valid Javascript Date
I need a datepicker disabled, he owns a formControlName because its value is changed according to the requests: <kendo-datepicker disabled…
-
1
votes1
answer40
viewsQ: Function that returns the client name using the . filter method
In my template I have an interpolation that performs a call to function getNomeCliente, passing the ClienteId as a parameter: <ng-template kendoGridCellTemplate let-dataItem> <div…
-
2
votes1
answer50
viewsA: Action when finalizing the request at the angle
I got it from the operator finalize of rxjs: import { finalize } from 'rxjs/operators'; At the end my job was like this: onSubmit() { this.submitted = true; // stop here if form is invalid if…
angularanswered veroneseComS 2,752 -
0
votes1
answer50
viewsQ: Action when finalizing the request at the angle
I have a loading that is activated at the beginning of my request and I need to stop it at the end of the request. I tried something like: onSubmit() { this.submitted = true; if…
angularasked veroneseComS 2,752 -
0
votes2
answers1604
viewsA: Conversion of a data type scan into a data type datetime resulted in a value outside the yyyy-mm-dd range
As my sql was in English, it was necessary to run this command: set dateformat ymd After that the consultation worked.
-
1
votes2
answers1604
viewsQ: Conversion of a data type scan into a data type datetime resulted in a value outside the yyyy-mm-dd range
I have a column called produtodata which has the following datetime format: 1753-01-01 00:00:00.000 I need to filter the records that are between the date '2019-06-26 00:00:00.000' until today. I…
-
0
votes1
answer52
viewsQ: Javascript mask is breaking if I type the date quickly
I am trying to make a javascript data mask to use in the dd/mm/yyyy format React for a custom date selection component. If I press the keys slowly, the mask correctly applies the format, but if I…
-
0
votes1
answer25
viewsQ: Component is not being rendered
In my app.jsx file I have the import of the component "activities": import React from 'react' import { Container } from 'semantic-ui-react' import atividades from '../atividades/atividades' export…
-
2
votes1
answer126
viewsQ: How to render my button again in React Native?
I have this button that should have a background-color depending on the state: <TouchableOpacity onPress={this._onPressButtonMassa}> <View style={[styles.button, this.props.hipertrofia ===…
react-nativeasked veroneseComS 2,752 -
0
votes1
answer246
viewsQ: How to style an imported component using Styled Components
I’m using this component to use a mask input in my application, but I would like it to have the same style as my Input in my Styled-Components: const Input = styled.TextInput` paddingHorizontal:…
-
0
votes1
answer627
viewsQ: Can’t find variable: Styled Styledcomponents React Native
Following this tutorial Was installed through Yarn the Styled-Components: yarn add axios prop-types react-navigation styled-components So in my Styles.js file I defined a class: const Container =…
-
0
votes1
answer23
viewsQ: How to perform a template function on the <Kendo-tabstrip-tab> component
I have a component in which a part of this component has that part: <kendo-tabstrip-tab [title]="'Categoria'" [disabled]="ReferenciaMktId == '00000000-0000-0000-0000-000000000000'"…
-
0
votes1
answer64
viewsQ: The 'value' should be a Valid Javascript Date instance. When using the Kendo ui’s date Picker
I’m trying to store a date in the bank through the component date Picker do Kendo ui it sends to my bank in this format: 2019-07-23T00:00:00 When I seek it from the bank and assign the value of the…
-
0
votes1
answer144
viewsQ: Error trying to export a constant in React
I have created this: const funcionarioReducer = (state = [], action) => { switch(action.type) { case 'ADD_FUNCIONARIO': return state.concat([action.data]); default: return state; } } export…
-
1
votes1
answer58
viewsQ: GET golang syntax error with optional parameters
I am trying to filter my records based on a "Name parameter" I did this Handler Function: func GetFuncionaries(w http.ResponseWriter, r *http.Request) { var f model.Funcionary var t util.App var d…
golangasked veroneseComS 2,752 -
2
votes1
answer273
viewsQ: Do a get with optional parameters in Golang
I need to do an api where query using optional query string parameters. I tried something like: func (app *App) getFunctionarys(w http.ResponseWriter, r *http.Request) { v := r.URL.Query() Id :=…
golangasked veroneseComS 2,752 -
0
votes4
answers993
viewsA: How to pass/receive data to components via routing
I decided as follows: In my app-routing.module: { path: 'xxx', loadChildren:'./pages/xxx/xxx-xxx/xxx-xxx.module#xxxModule', data: { title: 'Título que vou passar' } } In my component: public…
-
0
votes4
answers993
viewsQ: How to pass/receive data to components via routing
In my app-routing-module I will reuse the same component for four different routes, but I need to know a way to differentiate these components. Currently my app-routing passes a title property on…
-
0
votes2
answers82
viewsQ: Infinite loop in Precedure
I have a table Categoria with CategoriaId of Primary key and CategoriaPaiId Foreign key with self relationship in CategoriaId. I need to create a procedure listing the category tree. Assuming I have…
-
2
votes2
answers106
viewsQ: How to replace the value of a string from a certain character?
I have a variable called nameImage. It is named after a photo. Ex: photo.png I need to remove everything after png, getting just the "photo". I tried to:…