Posts by Bins • 3,586 points
229 posts
-
-1
votes1
answer367
viewsA: Error in map: this.state.filmes.map is not a Function. I’m not being able to access the Results information. Could you help me?
What happens is that in its state the "movies" is an array, but the return of its API is an object. As you are assigning the API response to the "movies" state, you end up getting this error from…
-
0
votes1
answer689
viewsA: Navigate between different batteries in React Native with React-navigation
createAppContainer you will use only once. Inside your Appcontainer, you can have inside a Stacknavigator, and inside it, each element can be a component (as in your example), or another Stack.…
-
1
votes1
answer355
viewsA: Is it possible to update a tab with React navigation whenever I access it?
When you open the screen for the first time, it runs the "IdidMount" to mount the screen, if you continue browsing, it will no longer run. You can change this behavior by checking if the screen has…
-
0
votes1
answer57
viewsA: Error while UPDATING Image URL in Database
The line 70 of your code is where the update is, the problem is that the url_image field is a string and you want to inform a content without quotation marks. Make the following change $query =…
-
1
votes2
answers721
viewsA: Mysql sequelize error in Docker
If I understand correctly, you will climb into Docker 2 containers, one with the bank and the other with your API using Nodejs + Express. You can link them both using Docker-Compose. Here is an…
-
0
votes1
answer102
viewsA: How to create a container component from other components
If I understood correctly, within your "Index" component you imported other components, such as "Mainstyle" and "Container". This "Container" component was the first one you reported in your post.…
-
1
votes1
answer601
viewsA: read content from a pdf using javascript client side
You can do this on the client side using this library https://mozilla.github.io/pdf.js/getting_started/ I made an example based on this tutorial…
-
1
votes1
answer39
viewsA: The component for the 'Profile' route needs to be an React type component
In your route file, there is a small spelling error in the word "screen" Profile: { scree: Profile, navigationOptions: { title: 'Perfil no Github' } } The right thing would be: Profile: { screen:…
-
0
votes1
answer518
viewsA: React-Native: Home icon does not appear after adding Stack Navigator
There are two ways to do this. The first would be to configure the "navigationOptions" of your Stack Navigator. Agui has an example: App.js file import React from 'react'; import Routes from…
-
1
votes1
answer1598
viewsA: Error doing GET search with queries
From the content of your post, it seems to me that this code is from Rocketseat’s Omnistack 10 week. The split error occurs because it is expecting to receive a string, so it will break the string…
-
3
votes1
answer128
viewsA: Map method is undefined in React
According to the comments, the "Cannot read Property 'map' of Undefined" error occurs because the "map" applies to arrays, and "devs" must be null. As one of the colleagues commented that this code…
-
0
votes1
answer34
viewsA: Organizing fields of formulary
One of the ways to do this would be to place each field in a div. Here’s an example: <div class="campo"> <label for="rua">Logradouro: </label> <input type="text" name="rua"…
-
0
votes1
answer175
viewsA: Difficulties with PHP and Mysql Dynamic Insert
What you need to do is turn the fields into arrays. For example, instead of: <input type="text" name="nome_item"> Change to <input type="text" name="nome_item[]"> This way, you can…
-
1
votes1
answer85
viewsA: How to query multiple select in only one sql line to get 7 daily result
If your "created_at" field is a date and time type field and you want to see the number of entries in the last 7 days broken by date, one of the ways to resolve it would be like this: SELECT…
-
2
votes1
answer206
viewsA: How to show number of pages in handlebars paging?
You can take a look at a library called "Handlerbars Paginate helper". To install, you do the following: npm install handlebars-paginate You register this library as a helper var Handlebars =…
-
0
votes1
answer155
viewsA: How do I set the state of the parent through inputs in the child ? in React?
From what I’ve seen of your code, you’re sending by props the functions that will alter the state of the parent component. As you put the console.log in each function, I believe the problem is that…
-
0
votes2
answers322
viewsA: Sort files from a directory with PHP
One way to do this would be to use the "scandir" function, it already returns the name of the files in alphabetical order. Here is an example <?php $caminho = "nome_da_pasta"; // Selecionar tudo…
-
3
votes2
answers612
viewsA: Mysql + Nodejs, SELECT Return Undefined
What happens is that the Node trabaha asynchronously, that is, when you execute the function "sqlQuery" it does not wait for the return, it already executes the next line. Why the return is…
-
3
votes1
answer1660
viewsA: Visual Studio code, showing directories strangely
There is a setting called "compactFolders", which is enabled by default, if you create the folders and leave them empty this will occur. To deactivate, you need to activate the Settings. This can be…
visual-studio-codeanswered Bins 3,586 -
1
votes2
answers701
viewsA: Update table of duplicate records with conditions
To resolve this, you first need to identify the repeating name records that are active. According to the table structure you entered, the following query can select the repeated ones. select nome…
-
1
votes2
answers2181
viewsA: -bash: nodemon: command not found
I did a test using the High Sierra and it worked, I’ll describe what I did I created a folder, and inside it, through the terminal, I typed: npm init To create package.json. Then I installed nodemon…
-
1
votes1
answer182
viewsA: How to insert values in the chart gauge
Here is an explanation of how to use the gauge. var target = document.getElementById('foo'); // Elemento onde o gauge deve ser criado var gauge = new Gauge(target).setOptions(opts); // Criar gauge…
-
1
votes1
answer4302
viewsA: How to perform data validation using Yup with custom locale?
I would recommend you to put in separate files the custom locale, the validation function and each schema. In your route file, you can add a middleware by calling its validation function before…
-
2
votes1
answer203
viewsA: Side Menu is not displayed in the app made in React-Native
According to your comment, the menu appears if you add a button on any screen. To make the menu appear on shutdown, you will need to edit the file Mainactivity.java, inside your project, it is in…
-
0
votes1
answer806
viewsA: Returning the result of a query to the external API with Adonisjs
I noticed that in its code the index function is being called using async, but inside it, the await is not being used. Try to make the following change in your code. const Request =…
-
2
votes2
answers246
viewsA: Query Mysql to count contracts with INNER JOIN
As quoted in the comments, to know the number of contacts, just make a distinct Count based on the contract number. Here is an example SELECT count(distinct `contrato`.`num_contrato`) as…
-
0
votes1
answer170
viewsA: CPF Jquery JS validation
From what I saw of your code, it looks like Magento’s checkout. Here is an example of how to apply the mask to the CPF /* global wcbcf_public_params */ /*jshint devel: true */ jQuery( function( $ )…
-
3
votes1
answer192
viewsA: Group by age range
To do this you need to create a "case" to group the results according to the age range you want. Here’s an example: select case when T2.idade between 0 and 19 then 'Ate 19' when T2.idade between 20…
-
0
votes1
answer49
viewsA: how to display information by params of an object array in a component in React JS
I recommend you do the following test, pass each value to your "Cardcurses" as a separate props, this way: <Card title={curse.title} descricao={curse.descricao} image={curse.image}/> Change…
-
0
votes2
answers46
viewsA: I’m not passing any data on the request but it seems that some information is coming
What happens is that your IF is checking whether a parameter named "Characteristics" and "Location" has been sent. The parameter was sent, what happens is that the content is empty. You have to…
-
0
votes1
answer662
viewsA: React Native error in React-navigation-stack on Android
By the description of the error, it was not possible to link the library "React-Native-Gesture-Handler" with your project. This library is already part of your "package-json". Do the following:…
-
1
votes1
answer381
viewsA: Configuring Eslint with adonisjs
When I studied Adonis, it was recommended to choose "None of these". Here’s a step by step how to set up Eslint for Adonisjs…
-
0
votes1
answer94
viewsA: How to average records per day in PHP MYSQLI
If you want to select the records of the last 7 days, I suppose your table has a field called "data_registration", you can count the total records and average making a query like this: SELECT…
-
1
votes1
answer544
viewsA: How to return a specific status with Adonis.js/Node
Here I have an example of an HTTP controller made with Adonis, where I return different status and messages. From the description of your error, it seems that you are not receiving "Answer" as…
-
0
votes1
answer130
viewsA: ACCESS_DENIED when consuming API Googles Maps
You need to use an API key to call the Google Maps service. To do this, you need to register. The error message that appears is as follows: Distance Matrix Service: You must use an API key to…
-
2
votes1
answer111
viewsA: How can I make my Ode application available in many languages?
One of the ways to do this would be to use a package called i18n. You can install and integrate it into your Express. It will create a folder called "locales" in your project, and inside you will…
-
1
votes2
answers125
viewsA: Mysql load the last purchase of each item
One way to solve this would be to do a query to return the last purchase ID of each product. To do this, you could do so: select MAX(id) from tb_compra as T1 INNER JOIN tb_compra_produto AS T2 ON…
-
1
votes1
answer40
viewsA: Why do the form data disappear when pulling the zip code?
From what I saw of your code, you update all the contents of the "profileNovaStartup" model when you perform the "pegStartup" function or when you search the zip code. That’s why when you search the…
-
0
votes1
answer273
viewsA: Problem picking up user information with React-Native-fbsdk
I used React-Native-fbsdk some time ago, and I did it as follows, I created a separate file with all the login logic. import { LoginManager, AccessToken, GraphRequest, GraphRequestManager, } from…
-
1
votes1
answer350
viewsA: Take Json value with Node
You need to wait for the query return data and do the password check. You can do this using async/await. Here is an example: app.post('/login', async function(req, res){ var email = req.body.email;…
-
1
votes1
answer2114
viewsA: Upload image with React Native
From what I’ve seen of your example, the image data comes from a state variable, and you can capture the image in two ways, from the image gallery or the camera. The "date" will only exist if…
react-nativeanswered Bins 3,586 -
1
votes2
answers65
viewsA: Comparison of PHP and MYSQL dates
In your UPDATE, you don’t need FROM, you can do it this way: $confere = "UPDATE clientes SET `pago` = 0 WHERE nome_fantasia = '$empresa'"; The return of mysqli_query can be false in case of error,…
-
1
votes1
answer47
viewsA: variable transport between pages, php
One of the ways to do this is by using sessions. You need to place session_start() at the beginning of each page where you will activate the session. Here’s a simple example: Home page <?php…
-
2
votes1
answer273
viewsA: Invalid parameter type when using CURL with PHP
According to the Pay.ME documentation, the request of this type would be by GET (Returning a transaction), as described in this link: https://docs.pagar.me/reference#returning-a-transaction Try to…
-
0
votes2
answers81
viewsA: Nodejs Async / Await / Promisse
As commented, promisse.all would be an alternative for you to solve this problem. Your code would look like this: async function parseCategories () { var categories = ["business", "entertainment",…
-
0
votes2
answers107
viewsA: Doubts with constant in React
From what I understand, for you to arrive at this result, you would need the following: 1 - Functions can be removed from the "render" method and inserted above it (within the Header class) 2 -…
-
0
votes1
answer1875
viewsA: React Navigation Error: Undefined is not an Object (Evaluating '_this.props.navigation')
What happens is that "navigation" is sent as "prop" to the components cited in the route file. Your "login" is not a component, it is a function. If you change your code from: export default Login =…
-
0
votes1
answer101
viewsA: Error "Warning: mysqli_real_escape_string() expects Parameter 2 "
What happens is that $_FILES['arquivo_complementar'] is an array. If you want to get the name of the uploaded file, you can make $_FILES['arquivo_complementar']['name'] Here is a link showing which…
-
0
votes1
answer27
viewsA: Problem with javascript function
The problem is the spelling of the parameter name, in the function you declared as "namevalue", but in some places of the function you used "nameValue". You have to standardize all calls to…
-
1
votes2
answers139
viewsA: am starting with React Nturn on and always give me this error cant find variable:Component
The word "Component" should be capitalized. Also, "text" should be imported from the "React-Native" library. Component names in React should always start with uppercase. Change your code to look…
syntax-erroranswered Bins 3,586