Posts by Anderson Henrique • 1,367 points
93 posts
-
0
votes1
answer104
viewsA: React JS- Internationalization of images
You can use the function injectIntl, to receive the value of intl and check which language to use to make a condition and render the image you want. Example import {injectIntl, intlShape} from…
-
0
votes1
answer40
viewsA: My asynchronous function does not return the value where it is called, but within its scope is working right. Reactjs + google maps
Basically I changed the following, the function getDescription will return the result inside a callback function passed to it. This will return in getDetail which will take the description and…
-
0
votes3
answers153
viewsA: "Javascript function calling child functions"
Simple, you just need to create a function and call the others within it. It is worth noting that you should not use var instead prefer to use let or in the case of some variables, you can use…
-
1
votes1
answer343
viewsA: How do I generate an excel file with the data obtained from a webcrawler?
From a look at the example, I first changed the global variables var for const avoid using var. After that in ws.cell(), receives the first parameter is the number of the line I placed index + 1 and…
-
0
votes1
answer47
viewsA: I cannot add the React-navigation library to my React-Native project!
Delete the folder node_modules and the package.lock.js again. With the command sudo rm -r node_modules package.lock.js After that run Yarn without using sudo. The following command $ yarn install…
-
1
votes2
answers161
viewsA: How to remove column fields from a regular expression select?
You could do using substring but since you want with regex I mounted one here, to get the values between SELECT and FROM. const texto = "SELECT nome, sobrenome FROM table"; const colunas =…
-
1
votes1
answer2051
viewsA: Difference and good practices, either global or React Native context
They’re very different things Global variable You do global.variavel indicates that you are declaring a global variable that by itself implies several problems. See Why using global variables is not…
-
0
votes1
answer101
viewsA: Save data to Firebase
There are some observations to be made... Do not use var var makes the variable stay in a global context, prefer in case use const or Let, see more in Why using global variables is not a good…
-
3
votes1
answer1436
viewsA: How do I put my scheduled website on Nodejs on the air?
There are many ways you can do this, so there’s no way I can put an answer by teaching step here. Option 1 You can also use hostgator but it needs to be a VPS package. See Nodejs at the hostgator,…
node.jsanswered Anderson Henrique 1,367 -
2
votes1
answer500
viewsA: Crud ID with javascript
You can pass the id inside the function as a parameter. Look at the click event, I passed the id as a parameter and in its function handleDel, I put receiving the _id as a parameter. import api from…
-
1
votes1
answer50
viewsA: JAVASCRIPT - Star Wars API -Promise Return
Your way of using the asynchronous request is slightly wrong try so other notes, after name, have no Results array within the return of the api see { name: 'Saleucami', rotation_period: '26',…
-
1
votes1
answer58
viewsA: SQL query does not return even having values
Your problem is in the serie_slug column, may have some space or character that is breaking, update everyone with the query and in php D is higher UPDATE tbl_temporadas SET…
sqlanswered Anderson Henrique 1,367 -
1
votes1
answer66
viewsA: Pass data between select
Follow the desired functionality, I basically changed the type button input for button, because you’re not submitting anything, so it doesn’t need to be of the type Submit, right after that I set…
-
0
votes1
answer285
viewsA: how to apply json checking in js?
There are a number of inconsistencies in your code and I will quote them in the course of the answer, let’s start with html, you are doing an action for a file json Is that right? There’s no point…
-
12
votes2
answers567
viewsA: What would CSS Injection Attacks be? Does CSS have security holes?
CSS Injection is rather an attack that can sometimes become worrisome, but it depends a lot on your application, usually applications like Wordpress in which allows the user to insert their own CSS…
-
0
votes1
answer126
viewsA: Error updating PHP script to new version (Mysqli)
Why not consider using PDO? Pdo would be one of the best options for PHP database, it is object-oriented and has several security options. At a glance: http://php.net/manual/en/class.pdo.php Now…
-
4
votes1
answer131
viewsA: What’s the difference between Window and Window
Window is the constructor, so it is seen as a function, if you type window instanceof Window Will return true, already window is the global variable that is the same as this of the global scope test…
javascriptanswered Anderson Henrique 1,367 -
0
votes1
answer23
viewsA: Error recording information in the data bank
You forgot the quotation marks at the beginning of the title in values <?php require_once('db.class.php'); $titulo = $_POST['titulo']; $texto_postagem = $_POST['descricao'];…
-
1
votes1
answer2701
viewsA: On what occasions should I use an unsigned char or a char in C?
Basically not only in char as in int, float among others, we have the Signed and unsigned types (there are others besides them), the difference is that the most significant bit that makes the change…
-
1
votes1
answer23
viewsA: Error with mysqli and Ajax data
To solve this you can use the literals template https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals added to Ecma script 2016. Staying as follows <script>…
-
0
votes3
answers655
viewsA: More than one Date Field in Ajax
Pass to formData, It is worth mentioning that in php when using formData, you need to use the same HTML Names, ie codBarras and Quant <form id="enviavenda" method="POST" action=""…
-
4
votes2
answers67
viewsA: How to compare 2 arrays to find which value is missing in one of them, using PHP
You can use the function array_diff_assoc, she does exactly what you want. $arraybd=array('1','2','3','4'); $arrayxml=array('1','2'); $diferencas = array_diff_assoc($arraybd, $arrayxml);…
-
0
votes1
answer971
viewsQ: How to pass values to another component on routes?
I have a login page, which authenticates by token and soon after, with the user and password entered are returned the user data. Soon after that I redirect the user to a component called Dashboard.…
-
2
votes1
answer907
viewsQ: Do I need a server to log in with React?
It may be a silly question but I’m very confused about React.js, I developed a Webapi in Asp.net core and it’s already working... I need to do a login system on React. Thinking about the way I would…
-
1
votes1
answer1085
viewsQ: Problem calling api in React JS
I created a webapi in ASP.NET Core, and I need to consume it using React, the web api works normally, if I use Curl or Postman among others, it works normally. The problem starts when I use React,…
-
2
votes1
answer155
viewsA: Why is my foreach duplicating my database records?
Do so, the foreach will run as many times as necessary until you reach the end of the returned array (amount of your records) so these 3 foreach are not necessary. Just remove the other 2 function…
-
0
votes1
answer131
viewsA: Foreach with the mPDF library
Just do outside the parameters by concatenating into a variable, then pass the variable in the parameter. And do not need to make $this->recipes as $this->recipe... Only speaks…
-
2
votes2
answers113
viewsA: Inner with 3 PHP/SQL tables
Your mistake is in the second equal, you put "ud" and not "du" $agora = "select * from usuario u inner join dia_usuario du on u.usuario_id = du.id_diarista inner join diarista d on d.id =…
-
0
votes1
answer43
viewsA: How to make image respect page content
Create a div to be the parent, in this case called content, and add a display: inline-block; to break to the next line. Follow an example .areaImagem{ float:left; margin-top:10px; } .areaImagem img{…
-
1
votes2
answers91
viewsA: How to access a container within another container in Jquery?
It’s very simple, use the css structure $(document).ready(function(){ $("#resultado").text($('.buttons button[aria-label="Expand"]').attr("aria-label")); //oque você quer $('.buttons…
-
1
votes1
answer94
viewsA: without quotation marks enough to pass a javascript html string
Just escape the character, this is done using the backslash " ". So it would look like this document.getElementById('table').innerHTML += '<tr…
-
2
votes2
answers406
viewsQ: Select dates that are not in the table
I need to compile a report for a client with the billing for each day of a given month. Until then beauty, the problem is that now he wants even the days that have no sale, are shown in the table…
-
0
votes0
answers359
viewsQ: How to make a custom bar on android
I haven’t started to do anything yet, so I haven’t put any code here, I need a direction of what to study to do a pub in the shape of a water tank and as it fills up, a water goes up inside the…
-
2
votes1
answer244
viewsA: How to format a Grid within Div?
Your problem is probably here, forgot to close the tag div I will comment where it should be closed, inside the container follows with the correction <div id="row1"> <c:if test…
-
1
votes1
answer38
viewsA: Compare arrays and highlight changes
I don’t know why, but if you want to take it backwards do so #array para pegar as diferenças $diferencas = array(); #for pegando o tamanho do array e diminuindo, o motivo do menos 1 é que o array…
-
0
votes2
answers76
viewsQ: How to use Firebird 2.1 > ABS in Firebird 2.0?
I have a client who already has a system that runs on Firebird 2.0 and my system runs on the newest version of Firebird, with this I had to regress the database and has some functions that 2.0 does…
-
0
votes1
answer203
viewsQ: How to customize only one post type to appear on the single.php
I am developing a job plugin for wordpress, I took as a basis the wpjobmanager is coming out all right, until I come across the following, the plugin when the user clicks to see more about the…
-
0
votes2
answers441
viewsA: How to make an image fit the size of the div by the background-image: url(') using javascript or css.
You can use the "cover" property of css, do the following, it is worth remembering that it is not very advisable to use a very large image for something small <div class="image" ></div>…
-
1
votes0
answers333
viewsQ: How to map an image to function responsive
I have a picture of a bed and I needed that when the mouse Hover happened on the pillow a popup, but I do not know a way to map this image, I would use map of html but I will not have…
-
3
votes1
answer82
viewsA: Can someone please explain some of that code to me?
In the for part he goes through with "i" each letter of the secret word in the case "brazil" so that in each turn the for it will follow the sequence "b" after "r" after "a" and so on. Example: my…
-
1
votes1
answer75
viewsA: Display only members with a status in a <select> with php Pdo
Add the index of the returned array like this <?php foreach( $result as $row ) { ?> <option value="<?php echo $row[0]['nome'];?>"><?php echo $row['nome'];?></option>…
-
1
votes1
answer478
viewsA: Display result of a Javascript function in a modal
I used that example modal.. But use whatever you think best, come on, first put an id inside the element you will insert in case I added the id "here". Explaining... innerHTML is used to add text…
-
1
votes0
answers308
viewsQ: Email does not send to hostgator addresses
I am configuring the sending of email in wordpress without plugin with native wpmail, however I can not send to an email address hostgator, when I send to gmail or other provider works perfectly,…
-
0
votes4
answers1033
viewsA: How to get PHP session id with jQuery?
Make a Document.cookie; and from a split on it, then just take the example position, output from Document.cookie "wp-Settings-1=mfold%3do%26libraryContent%3Dbrowse%26editor%3Dtinymce;…
-
-1
votes3
answers342
viewsA: Why doesn’t the while stop?
Your while loop becomes infinite because you use the comparison "OR" ||, even if it is larger than 20 it will still be different from s, then you ask, but it passes 20 and I type the s and also does…
-
0
votes1
answer499
viewsQ: Create Procedure in phpmyadmin
I am trying to create a precedent that changes between Insert and update in phpmyadmin but returns me an error in the line of if EXISTS, then I tried to create by the graphical panel and returns me…
-
1
votes1
answer680
viewsA: How to overwrite a div from another using jquery
Take the id of this div and add a z-index to it with the "css" function of jquery follows below an example $(document).ready(function(){ $('#addZindex').on('click',function(){…
-
3
votes1
answer187
viewsQ: Intercept page redirection
I have a page whose customer is selecting items, after selected I needed to check if the customer will leave the current page because I need to alert him with a message like "Do you want to save…
-
0
votes1
answer103
viewsA: do I get exited with non-zero status in that pq code?
The problem in its code is in the part where it starts from 1, the C language does not allow a vector to have a null zero position, so its first is, just as the second ignores the vector’s 0…
-
-1
votes1
answer615
viewsA: PHP - Unknown: failed to open stream
try to remove the accent from the page name... is variables.php put without accent, the use of accent in this kind of thing is a bad practice