Posts by Bins • 3,586 points
229 posts
-
1
votes1
answer512
viewsA: Routes with undefined parameters
From what I understand, you can be redirected and these parameters that you sent to the POST route (which you load with this.props.item) are not empty. If this is right, the problem is that your…
-
0
votes1
answer13
viewsA: React Native init generates the app.js without render()
In the examples you find by searching the internet usually the component extends the Components class, so there is render. Example: class Welcome extends React.Component { render() { return…
react-nativeanswered Bins 3,586 -
1
votes1
answer40
viewsA: Data display problem with INNER JOIN
If your phone chart has a "type" field, to record whether the phone is commercial, residential or mobile, and there is only one type of phone per customer, you could do this using subselects. Here…
-
0
votes1
answer1187
viewsA: Switch between Tabnavigator and Stacknavigator in React Native
To solve this problem, you can put your Stacknavigator inside the Tabnavigator. Here is an example: import React from "react"; import { createBottomTabNavigator, createStackNavigator } from…
-
0
votes1
answer38
viewsA: How to solve the problem , the value of the variable I receive from the HTML Input gives me the Nan value
In its "Inicircontage" function, there is a problem when picking the input value, because the field name is different from the form ID. Change the function to look like this: function…
-
3
votes1
answer893
viewsA: Js Node / Routes / Controllers
For security of access to your API, one of the most common alternatives is to use token. The token would be a code generated by your application in the login process. This code should be returned in…
-
2
votes5
answers583
viewsA: How to sort json in php
Here’s an example of how to do this: <?php $resultados ='[ { "unidade": "124", "bloco": "Bloco B" }, { "unidade": "21", "bloco": "Bloco A" }, { "unidade": "94", "bloco": "Bloco A" }, { "unidade":…
-
2
votes1
answer54
viewsA: TOP 5 PLAYERS
To do this you need to sum the transaction_amount of the period you want, group the results by user and sort by descending order of value. Here is an example of how to do this, the query sums the…
-
0
votes2
answers98
viewsA: Select does not let you select the option
Here is an example of Select that I use: class Teste extends Component { state = { assunto: "", }; alterar = e => { this.setState({ [e.target.name]: e.target.value }); }; render() { const {…
-
1
votes3
answers61
viewsA: Query SQL Doubt - Query using two tables
If I understood your problem correctly, you would need to make two queries to get this result. The first query would be to assemble the list of companies+parents with purchases and sales. It would…
-
1
votes1
answer377
viewsA: How to catch login error? React Nactivate
What should be occurring is that when you enter the wrong email or password, the return does not have the information you expect. By your code, you expect to receive auth, token and msg of the login…
react-nativeanswered Bins 3,586 -
0
votes2
answers58
viewsA: Validate any input at the same time
Another option would be to use a Jquery plugin to accept only numbers and insert dots and dash. Here’s an example: https://igorescobar.github.io/jQuery-Mask-Plugin/ After downloading the plugin and…
javascriptanswered Bins 3,586 -
0
votes1
answer66
viewsA: Registration is not being recorded in the bank
From what I’ve seen of your code, you post the form data to the same page. Although the page calls your class "User", you are not opening the connection to the bank and calling the function…
-
0
votes1
answer28
viewsA: Undefined payload value React semantic ui
From what I saw of your code, when the "Onchange" event of your "Select" occurs it executes the Reset. The problem is that it does not send the value. One way to solve this would be to create a…
-
4
votes1
answer778
viewsA: how to create an React Native app in windows and test on Iphone
Unfortunately that would not be possible. One of the alternatives, as you yourself mentioned, would be to rent a Mac. One of the websites that allows to do this would be the following.…
-
2
votes1
answer163
viewsA: Sound of a typewriter!
Here’s an example that might help you: <html> <head> <title>Maquina de Escrever</title> <script src="https://code.jquery.com/jquery-3.4.1.min.js"…
-
3
votes1
answer627
viewsA: Can’t find variable: Styled Styledcomponents React Native
By error message, it seems that failed to import Styled Components into your style file. Here is an example of: import styled from "styled-components/native"; export const Container = styled.View`…
-
0
votes1
answer321
viewsA: React-Native-camera error classpath
I ran a test using Windows 10 with Genymotion emulator. I made a git clone, and installed the npm install packages I followed a part of the explanation of this link (reply of 01/04)…
-
1
votes1
answer61
viewsA: error while trying to log in
The connection is being closed inside the "config" file, so the login file cannot run the query. Remove the line "mysqli_close($con);", your config file will look like this: <?php $servername =…
-
1
votes1
answer387
viewsA: How to make a POST request with Javascript form
Here is an example: // Exemplo de requisição POST var ajax = new XMLHttpRequest(); var email = document.getElementById("txtEmail").value; //Input texto com id "txtEmail" // Seta tipo de requisição:…
javascriptanswered Bins 3,586 -
1
votes1
answer489
viewsA: React Native build does not update settings
I had a similar problem. I use Windows and testo using the Genymotion emulator. It started to give a problem where the changes I made worked correctly in the emulator, but when generating an APK…
react-nativeanswered Bins 3,586 -
2
votes2
answers1387
viewsA: Error running React project Enable "A problem occurred Configuring project ':app'" on Linux Manjaro
To solve this problem of "SDK Location not found" there are two options. One of them would be to create a local.properties file inside the "Android" folder that is at the root of your project, and…
-
0
votes1
answer804
viewsA: View nodejs data in front-end using express without using front-end framework
One way to pass Node data to your frontend would be to use EJS. EJS uses HTML files with the EJS extension, and within them, you can send or receive data from your routes defined in your…
-
0
votes1
answer362
viewsA: Shortcut/Autocomplete in SQL Server Management Studio (SSMS)
You can create an XML template with the code you want to automate, and import the snippet through the "Tools" menu - "Code snippet manager..." Here is an example template, the query goes inside the…
-
0
votes1
answer29
viewsA: Date filter using month
The LIKE operator applies to text type fields. Since your field is date, and you want to filter only one month, try doing it as follows: $sql = "SELECT…
-
1
votes1
answer1241
viewsA: Dynamic Form : Create and remove inputs
One of the ways to do this would be, as you yourself mentioned, to use javascript to create the form. To save, you can use PHP, for that, when creating the form, would be created an array of fields.…
-
2
votes2
answers790
viewsA: I can’t redirect to another screen
According to its code, the "getToken" function (from the Authservice file) reads the token. You used async/await in this function, but in your "Auth Loading Screen" file you did not use "await" to…
-
0
votes1
answer439
viewsA: Create generic modal in React Native
What I would recommend you do is the following: 1 - Remove the modal from the "renderItem". Leave it at the end of the Flatlist. It will be updated according to the item from the selected list. 2 -…
-
0
votes3
answers1112
viewsA: how to create search system using filter
Here is an example of how to mount a conditional query according to the fields sent: <?php $where = array(); $nome = ""; $idade = ""; $email = ""; if(isset($_GET['nome'])) { if(($_GET['nome']…
-
1
votes2
answers1750
viewsA: How to use JS object variables for colors in CSS
Here’s an example of how to do this The archive with the colors: export default { white: "#fff", lighter: "#eee", light: "#ddd", regular: "#999", dark: "#666", darker: "#333", black: "#000",…
-
0
votes3
answers5865
viewsA: How to pass a function to another component through props?
When passing the function as props to another component, try to do this way: <TodoForm pushToItems={this.pushToItems.bind(this)}></TodoForm>
-
2
votes1
answer1765
viewsA: How to change the state of the parent component by the child component?
From what I saw of your code, the "modalVisible" is a property of the state of the parent component. One way to change it from the child component would be to pass the "showModal" function of the…
-
2
votes1
answer79
viewsA: JS to manipulate dates
With the Date object you can get the day of the week according to the date, and with this information, you can display a custom message. Here is an example: <!DOCTYPE html> <html…
javascriptanswered Bins 3,586 -
0
votes1
answer28
viewsA: Protect Mysql table against drop
You can use the REVOKE command to do this. An example: REVOKE DROP ON minha_tabela FROM nome_do_usuario; The username would be the user used by Wordpress to connect in the database. Here is more…
-
0
votes2
answers94
viewsA: Input text value does not change when triggered by the button
Change your function as follows: function somarMais1Add<?=$idIngredientAdicional?>() { var n1 =…
-
0
votes2
answers299
viewsA: How to use a variable to delete with like? SQL Server
Try to do so: DELETE FROM LJ_ETL_REPOSITORIO WHERE ID_ETL_TIPO='171' AND FILTRO LIKE '%' + @NOME_FILIAL + '%'
-
2
votes1
answer186
viewsA: Required in checkbox
Using Javascript you can validate the checkbox. Here is an example: <!doctype html> <head> <title>Validar checkbox</title> </head> <body> <form>…
-
1
votes1
answer24
viewsA: Create a remote reset via the command line
You can do this using the Github API The first step would be to create an access token. To do this, you can follow the instructions on this page:…
-
0
votes1
answer32
viewsA: How to consume the images link through Ajax?
Try to do it this way: <script src="https://code.jquery.com/jquery-3.4.1.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>…
-
0
votes1
answer329
viewsA: Error importing data from an Excel spreadsheet to mysql directly on the server
Assuming you have a CSV file with the following structure: ID;MES1;MES2;MES3 106186;0;0;0 123609;0;0;0 And a table called "my table" with the following structure: CREATE TABLE `minha_tabela` ( `ID`…
-
3
votes2
answers412
viewsA: How to use BETWEEN and LIKE together in a Query?
You can filter by logging with the initial date equal to or greater than the informed one and with the final date less or equal to that selected by the user. The consultation would be as follows:…
-
-1
votes4
answers1357
viewsA: associate a checkbox to a script function
Here’s an example of how to do this: <script type="text/javascript"> function ShowHideDiv(chkPassport) { var dvPassport = document.getElementById("dvPassport"); dvPassport.style.display =…
-
2
votes1
answer17
viewsA: Error in my page echo code
From what I saw of your code, the problem is after mounting the table header. Try to do as follows: <?php $campo="%".$_POST['campo']."%"; $sql=$conn->prepare("SELECT Id, De, Assunto, Conteudo,…
-
1
votes2
answers209
viewsA: bind( ) in Javascript / React - Doubt
You could do in render, but, as render is always called when some upgrade occurs, for performance reasons, the ideal is to do in the constructor. You could also use an Arrow Function, but would…
-
1
votes2
answers78
viewsA: SQL + PHP Query: Take only data from the current year from January to Today?
There are several ways to resolve this issue, the simplest would be the one suggested in the comment SELECT * from minha_tabela WHERE year(campo_data) = YEAR(now) Other ways of doing: SELECT * FROM…
-
1
votes1
answer989
viewsA: data storage with Async Storage
From what I’ve seen, you’re running the function that fetches Asyncstorage data within the Home component render. Try to recover the value when loading the component and then pass the data to a…
-
0
votes3
answers83
viewsA: Add value to my contact for each multiples of 200 without having to create individual variables
Here’s an example of how to do this: <script> function Conversor(valNum) { var kwh = valNum; var gre; if (kwh % 200 == 0) { gre= 4; } else { gre= 2; } var b2 = valNum; var add; if (b2 % 200 ==…
-
1
votes2
answers3478
viewsA: How do I clean Input after saving the data?
Every time you change an input value, your state is updated, as the state is linked with the input, what you need to do after saving is delete the state values, this should update your screen…
react-nativeanswered Bins 3,586 -
3
votes3
answers464
viewsA: Deleting files on Github after push
In the terminal, inside the folder of your project, you can do the following: git init git rm --cached NOME_DO_ARQUIVO git commit -m "Apagar arquivo" git push origin master…
-
1
votes1
answer237
viewsA: How to handle errors in sequelize create
One way to do this would be to change the create to stay this way: Livros.create({ BK_TITLE: data.title, BK_GENRE: data.genre, BK_AUTOR: data.author, BK_OBS: data.obs }).then(function(item){…