Posts by Julio Henrique • 4,352 points
190 posts
-
-1
votes1
answer67
viewsQ: How to create encrypted requirements in the production environment?
I was analyzing a frontend application written in symfony (PHP), and when opening its requestes I came across the contents of this image: I found it interesting because the request name is encrypted…
-
0
votes1
answer33
viewsA: Is it possible to send JSX tags from Nodejs(backend) to Reactjs?
Yes totally possible! in the backend you can work with json and send the data like this: in Node we have a variable written with the name header: const header = "<div><p>meu…
-
-1
votes2
answers45
viewsA: Conflict in the use of Javascript functions
Its function has an inadequate space **function clear (){** displayCurrent.innerHTML = " " } must be: function clear(){ displayCurrent.innerHTML = " " }…
javascriptanswered Julio Henrique 4,352 -
3
votes4
answers727
viewsA: Check Object inside an Array using index()
Good because your function is wrong! According to the documentation The index() method returns the first index which has the element found in the array, or -1 if is not present. Do the test by…
javascriptanswered Julio Henrique 4,352 -
15
votes2
answers6959
viewsA: What is the difference between npm and npx?
npm is the Node package manager, it will install on your machine a package so that you can use in other projects without having to download again. ja the npx it will use the package without…
-
0
votes1
answer48
viewsQ: Is it possible to use native components in web programming?
I wonder if I can call the native Picker dropdown from an Ios or android phone using javascript code on the web? or a React library. for example this lib of the React-Native:…
-
0
votes3
answers61
viewsA: How to specify the files I want to add to the Stage area?
You can also use some development ide to facilitate these processes. For example in visual studio code,below Voce selects the file you want to add in Stage by clicking on + : And below Voce puts…
gitanswered Julio Henrique 4,352 -
-2
votes1
answer65
viewsQ: How does general untying work after entering a system using Social Networks?
It is common for a user to "enter" into current systems using an account already registered on another network. The most common ones I see are facebook, google and etc.. The processo is simple and…
-
1
votes2
answers403
viewsA: How to return the years array using React-select
I think you’re confused as its code assigns a value, rather than incrementing the array, it is natural that this happens notice: for (let valor of years) { const anos = [ { value: valor, label:…
-
3
votes1
answer32
viewsA: Problems with ifs in React Native
For in the javascript react is not accepted more than one tag as return. that is to say: This can be done here: { showContent ? <View> <Text style={styles.label}>INSIRA A NOVA…
-
0
votes1
answer205
viewsA: Use of For Cycle and Arrays
The first is just a syntax error: instead of pr.lenght sure would be pr.length In my example I applied some variable typing patterns. Instead of var, use let for scopes within function. function…
-
1
votes1
answer731
viewsA: How do google’s login button respect the user’s language or receive custom texts?
Easy my friend, ever thought of using css for this? .g-signin2:before{ content: ' meu texto '; color: red; } <div class="g-signin2" data-onsuccess="onSignIn">google</div> In the example…
answered Julio Henrique 4,352 -
0
votes1
answer25
viewsA: Search in mobile live element
You can use strings to "hit" the click where you want, based on references that would be the screen size. Then screen with largura X e altura Y. My mouse goes up to the string 20x 10y and click.…
-
0
votes4
answers135
viewsA: Quey Builder with IF condition in Lockable
Don’t worry Rafael, just do another Where :D. public function success_payments(){ return $this->hasMany(Payment::class)->whereStatus('3')->where('updated_at', '>=', date("Y-m-d h:i:s",…
-
0
votes1
answer48
viewsA: How can I place images in the hangman game below? I thought I’d replace the image with every wrong attempt on the javascript part
It’s quite simple, I put one div with the id="situacao" and you can insert the image of the body parts little by little, for example: with an error the image 1 would be the head, with two mistakes…
-
1
votes1
answer1834
viewsA: Move arrays using "push" and "pop"
Hello is simple the solution see: function mover (umArray, outroArray){ var pegarElemento = umArray.pop(); outroArray.push(pegarElemento); console.log("primeiro Array", umArray);…
-
0
votes1
answer239
viewsA: Xmlhttprequest - Depreciated Async False
Well, for you to make a non-synchron request is easy with the axios, take the example: create a folder and within it a file named inicio.html: <!doctype html> <html> <head>…
-
1
votes1
answer200
viewsA: how do I receive input data that will be generated within the repeat structure?
Well if I understand correctly, you would like to generate these account inputs automatically as your code is already doing, and from this you would like to get to send the data of these inputs. So…
javascriptanswered Julio Henrique 4,352 -
1
votes1
answer135
viewsA: A loading gif appears when clicking on a link to generate a PDF
There are several ways to solve this, but I will separate two options.. The first would be to appear the loading for a certain time, usually the average time it takes this portfolio construction.…
-
3
votes1
answer137
viewsQ: What is the difference between export, set and edit . bash_profile?
I currently use three ways to define environment variables on linux or Mac, because I don’t know what the difference is between 3, someone can explain to me?
-
0
votes2
answers1750
viewsQ: How to use JS object variables for colors in CSS
if I have an object JS for ex: cores = { main: "#333", institutional: "blue" } and I use styled components to build my styles css so I create him like this: styled.View` background-color:…
-
0
votes1
answer140
viewsA: How to block random characters in Javascript?
Dude I made something that can help you, the idea is you put inside the words array that are banned and then you can control what the user can not send var lista_palavras_banidas = [ "aaaaaaa",…
-
0
votes1
answer52
viewsA: Choice of modal fields by variable value in php
Good if I understand correctly it helps you... I used this link to simulate the data coming from your php link $( document ).ready(function() { $.ajax({ url:…
-
0
votes1
answer1004
viewsA: Redirect Com Jquery
Ideally you send the id to the page via query string example: www.seusite.com/detalhePost.php?id=1 On the other page you should take this id and fetch its details with another request, be ajax,…
-
0
votes1
answer36
viewsQ: ID Undefined in Auth.currentUserInfo() aws-sdk function
Hello I am using the sdk of aws, to recover the information of the logged in user I am calling the method: Auth.currentUserInfo(); But he returns the object: attributes: { sub:…
-
-1
votes1
answer76
viewsQ: How to check more than one level of an object without the code being visually ugly?
I have an object postCardImage it is filled by a return that I have in my API, the problem is that I need to test the whole object that returned to then assign it. I take the test like this:…
-
1
votes2
answers46
viewsA: Create a Div for each request result
Simple as that baby! notice how the construction is made: // Aqui eu desejo criar um laço que crie uma janela de post para cada "resultado" obtido... let element = ""; for (let index = 0; index <…
-
-1
votes1
answer110
viewsQ: What part of my zoom div is possible?
Suppose I have a div de com overflox: Hidden; and put a background image in another div, which is inside her. the image occupies the entire background of the div, but I want the image when it is…
-
1
votes1
answer79
viewsQ: Is it possible to do Functions with SASS?
I am developing my CSS classes with SASS and I realized that I use many times Media Query (@media) to create behaviors in a certain resolution. %display-none-mobile{ @media (max-width:992px){…
-
2
votes1
answer253
viewsQ: How to calculate the size of a div header to do the right space?
Hello, I have a site with a Fixed menu at the top which I put the header class, and it accompanies the scroll bar, I know that my other div with the content class needs a margin according to the…
-
8
votes2
answers1618
viewsQ: How to go through string and replace ** with <b></b>
Lately I have used some systems that have the following function, when writing a text between ** it turns this text into bold for example: Julio *Enrique* dos Santos expected result will be: Julio…
-
0
votes1
answer135
viewsQ: How to manipulate a Json Object before returning to the API
Hello I have this method in my controller: @GetMapping(value="/{id}/perfil", produces = MediaType.APPLICATION_JSON_VALUE) public String carregarPerfilUsuario(@PathVariable("id") Long id,…
-
1
votes2
answers562
viewsQ: How to catch a Parent element from a child with id?
I have the following code: <div></div> <div> <div class='minhaClasse'> <div id='text'>hhaushdus</div> <input name='profile_id' /> <div> </div> I…
-
0
votes1
answer60
viewsQ: How to use function parameter as object attribute?
Hello! In order to reuse a function I am performing the following procedure: View 1 has this obj: obj: [ {"fruta": "maça", "valor1":1}, {"fruta": "banana", "valor1":1}, {"fruta": "pera", "valor1":1}…
-
0
votes1
answer142
viewsA: Synchronize 3 Select with Loading + Jquery/ Ajax
The problem is that you set the Hide conditions at the end of the first ajax request, and are 3 Try this: function onCarregaFunVeiEqu () { $.ajax({ url: ''''''''getFun.php'''''''', type:…
-
1
votes1
answer40
viewsA: Do not send form with the Jquery animation of the search button
The problem was in the click function, it references a click on a button inside a form with the active class $(function () { // Remove Search if user Resets Form or hits Escape! $('body,…
-
0
votes2
answers109
viewsA: I want to put an Alert after sending the form to the database, with a response like "Your message has been sent."
Either you do it like @Reignomo said, or you do a return to a page passing through parameter via get a type number if(deucertonophp){ header('Location: http://www.home.php?msg=1'); }else{…
-
1
votes1
answer299
viewsA: Error: Undefined after an ajax request inside another
Yes, the second requisition she will get data undefined in that code: $("#l_linha").change(function(){ var linha = $(this).val(); var dados = $("#l_linha").serialize(); $.ajax({ type: 'POST',…
-
1
votes2
answers272
viewsA: Dynamically popular JSON with PHP/Laravel
So if this here loads a user: $users = User::select('name_first', 'name_second', 'id_user_parent')->get() you need to create an object, and popular it according to its structure. For example:…
-
1
votes2
answers1557
viewsA: Number of recursive function calls
it’s easy, you can create a variable to count it: int qtd = 0; int fibonacci(int n) { qtd += 1; printf("chamado: %d \n", qtd); if ((n == 1) || (n == 2)) return (1); return (fibonacci(n-1) +…
-
1
votes1
answer71
viewsA: Table header with Mysql query
There’s a lot wrong with the code, for example: the first is the order of the parameters, the correct is link and then db_name: $db = @mysqli_select_db($conn, "produtos") or die("Não foi possível…
-
2
votes1
answer54
viewsA: Hide/Show navbar according to scrolling
Easy buddy just put the code like this: anterior = 0; $('#view-2').scroll(function() { var topo = $(this).scrollTop(); // = 0 if (topo > 0){ if(topo < anterior){ $('.subnavbar').fadeIn();…
-
0
votes3
answers131
viewsA: Multiple query values with JPA/Sprint and Rest
You can send an array of ids per parameter, e.g.: assuming that your ROOT URL is localhost:8080/data/ in your getMapping method gets like this: @GetMapping("/{ids}") and the body of the method:…
-
1
votes1
answer163
viewsA: Show recaptcha after 3 wrong attempts
Face is very easy, you can use a global variable as in my example: tentativas = 0; //defino uma função ao clickar no botao document.getElementById("enviar").addEventListener("click", logar);…
-
0
votes1
answer64
viewsA: How to use JSON
You can resolve this problem using ajax requests, and use the jQuery javascript library. I’ll illustrate how to mount a table with this api that you showed: //este é um exemplo de ajax sendo chamado…
-
1
votes1
answer182
viewsA: Call Servlet in a popup
You can solve this problem using requests ajax, and use the javascript library jQuery. I’ll simulate your servelet in my case: //este é um exemplo de ajax sendo chamado ao clickar em um botao…
-
0
votes1
answer119
viewsA: On("Click") Javascript does not work
Just in case someone comes to this page.. the code is correct as exemplified by min below: $('.collection-item').on('click',function(){ var idA = $(".collection-item").val(); alert("funcionou");…
-
0
votes1
answer605
viewsA: Onclick to close a modal without Reload
The problem is that on this button of yours: <button type="button" class="close" data-dismiss="modal" aria-label="Close" onclick="javascript:window.location.reload()"><span…
-
1
votes1
answer37
viewsA: Guys, how do I give a "Submit" in an input generated via js?
Let me give you an example of how you can generate inputs via js and simulate a Ubmit of that form: $( document ).ready(function() { $("#enviar").click(function(){ //aqui posso pegar todos os inputs…
-
0
votes1
answer55
viewsA: Save FORM Information to the same Page
It’s easy, I’ll use algumas variáveis do js to simulate database saved data: In the example I will use JS and HTML5: $( document ).ready(function() { $("#saveCurso").click(function(){ nome =…