Posts by Rafael Augusto • 4,027 points
242 posts
-
0
votes3
answers853
viewsA: Nodejs Forever Not for
You can clear the logs after giving forever stop "id" execute the forever cleanlogs. He’ll never show up
-
0
votes2
answers120
viewsA: Dealing with Javascript objects
This you can do in many ways, an alternative would be like this. const array = ['itau', 'bradesco', 'santander', 'banco do brasil'] array.map(banco => { let querySelector =…
-
0
votes0
answers182
viewsQ: Log out in new ASP Classic tab
It is possible to close the session of ASP when opening a new tab? I am trying to end the login session of ASP when the user opens another tab and tries to access the system, the idea is that the…
-
2
votes1
answer1036
viewsQ: How Workflow Works with Pull Request
I’m willing to work with Pull Request in Git, but I don’t understand how it works, I know when I contribute to a project, I have to do Fork, Branch, Commit and Pull Request, and then the owner of…
-
2
votes1
answer505
viewsQ: Component Autocomplete Vuejs
I want to create a component of autocomplete, then I have the following code. <Input v-model="form.autocomplete.input" @on-keyup="autocomplete" /> <ul> <li @click="selected(item,…
-
0
votes1
answer107
viewsQ: Mysql Process Error
I’m trying to create a procedure but I’m getting errors, after a few attempts, I managed to solve some problems, but I’m not getting more. When trying to create me generates error > ERROR 1064…
-
0
votes1
answer199
viewsQ: React Native image shadow box
I’m having a hard time putting one shadow in the picture, I tried to put in the View and in the Image but it didn’t work. <View style={styles.ContainerImageProfile}> <Image…
-
1
votes2
answers191
viewsA: Calculate the total of each row in the table
You can simplify by doing so... let preco = [] let qtd = [] let total = [] function calc(indice, self){ let valorUnitario = document.getElementsByClassName('valor_unitario')[indice] let quantidade =…
-
3
votes2
answers641
viewsA: List and sum selected items
There are n ways to do what you want, follow an example of one of them, I don’t know if it’s the best way for your case, but I believe it will give you a basis on how to accomplish exactly what you…
-
0
votes1
answer428
viewsQ: Start Vue Project from existing template
It is possible to start a project Vue from an existing template? I want to create a template with all the necessary dependencies and initial settings (as well as pages and etc), so that always, when…
-
-1
votes2
answers439
viewsQ: Auto Updater Electron
I’m using Electron + VueJS, and would like to know how to implement the auto updater, I did a little research, but I didn’t get anything, to be honest, I didn’t understand how it works, where it…
-
1
votes1
answer601
viewsQ: Update Vuejs son Component method
I’m trying to update a method of a child Component, but so far I have no solution, my question is the following. Within the Header.vue, I show the hours outstanding <span>…
-
0
votes1
answer8393
viewsQ: Possible Unhandled Promise Rejection Error
I’m having a problem calling one API, and this problem only happens in a certain situation, an example: // Situação que funciona perfeitamente const response = await…
-
2
votes2
answers66
viewsA: How to generate HTML at a specific point in the page?
$('#um').append('<p>Segundo do Primeiro</p>'); $('body').prepend('<p>No inicio do Body</p>') $('body').append('<p>No final do Body</p>') #um{ background: silver;…
-
1
votes1
answer40
viewsA: Go to "home" page
You can do so with jQuery var body = $("html, body"); $('button').click(function(){ body.stop().animate({scrollTop:0}, 500, 'swing', function() { }); }) p{ margin-top: 500px; } <script…
-
0
votes1
answer222
viewsQ: Error Login Facebook React Native
I’m having trouble doing login in the react-native, I followed all the corresponding steps, and at the time of logar presents the following error cannot read property 'logInWithReadPermissions' of…
-
1
votes1
answer334
viewsQ: Why use Stylesheet.create?
Why use the StyleSheet.create? When starting a new project (react-native init test, the project comes with the style as follows. const styles = StyleSheet.create({ container: { }, welcome: {…
-
0
votes2
answers76
viewsA: Data processing
One way to do it is by using the innerHTML (I can’t say it’s the best way). But it would be so let json = [ {title: 'Jobs'}, {title: 'Mark'}, {title: 'Bill'} ] let x =…
javascriptanswered Rafael Augusto 4,027 -
0
votes1
answer139
viewsA: Unexpected token node error
I managed to solve my problem as follows const express = require('express'); const router = express.Router(); const http = require('https') const config = { workspace:…
-
0
votes1
answer139
viewsQ: Unexpected token node error
I’m having trouble using http to make a call on a API. "{\"error\":\"Unexpected token d\",\"code\":400}" const express = require('express'); const router = express.Router(); const http =…
-
0
votes1
answer107
viewsQ: Width Percentage Flexbox
I’m having trouble defining items using Flexbox. What I need to do is leave mine item in 90%, I’m currently doing so, but it doesn’t work. <View> <ScrollView horizontal> <View…
-
0
votes1
answer261
viewsQ: Tabbar React Native
I’m having trouble positioning a component of tabbar what I’m doing. Home js. import React, {Component} from 'react' import {View, Text, ScrollView} from 'react-native' import Header from…
-
1
votes1
answer526
viewsQ: Pass input parameter to function
I ran into a problem, to pass the value of my input to my function without using v-model. I know it works that way <Input @click="func" /> func(val){ alert(val) } But then I can’t pass another…
-
1
votes0
answers104
viewsQ: Complex dialogues with Watson
I started to develop a chatbot using the watson, found surprising and simple to deploy. However I was left with some doubts of how to do and if it is possible (I saw in some chatbot). An example is,…
-
0
votes1
answer1784
viewsQ: How to give a "Refresh" on the page in Vue
I’m having a hard time and I haven’t found anything about it. I have the following scenario. On the page HOME I call a API by clicking a button, and then I call the page SCHEDULING passing the…
-
1
votes1
answer586
viewsQ: Create component to be used via npm
I started working a lot with vue and I started to use it in all projects in the company where I work. And with that, I ended up creating some componentes, in general autocomplete, I know there are…
-
0
votes0
answers106
viewsQ: Error loading fonts in Vue build (Webpack)
I’m doing the build of my project, and the whole system is loading, minus the sources of iview, in the way dev everything works perfectly, but when generating the build the sources get some square…
-
1
votes2
answers782
viewsA: Modify a button through an input
You can use attr for this, just pass the attr that wants in the radio and make the exchange using jquery, remembering that there are n ways to do this, I gave just one example, just you adapt the…
-
0
votes1
answer183
viewsA: JSON communication between domains with Cordova
For you to communicate with a server, you must already have your structured back end, after that, just make the request. An Example, using jQuery and PHP back. $.ajax({ type: 'POST', url:…
-
2
votes2
answers27
viewsA: Copying an image from one div to another - Jscript Methods
You can do so with JS let img = document.querySelectorAll('img') for(let i = 0; i < img.length; i++){ img[i].onclick = function(){ let attrImage = this.getAttribute('src')…
-
0
votes2
answers1048
viewsA: Copy value from Textarea to Other Automatically
You can do so using jquery $('#one').on('keyup', function(){ var valor = $(this).val() $('#two').val(valor) }) <script…
-
1
votes1
answer206
viewsA: Delete stock directly from Jquery button
For this you will need to make a requisition http to an archive php that contains the query that will exluir. Who really excluir is the php, the ajax will be responsible only for sending the request…
jqueryanswered Rafael Augusto 4,027 -
1
votes2
answers648
viewsA: Two events in function - jQuery
If I understand what you want, just create a função, so you can run it on page loading and on click, change or any other form you wish to perform. function funcao(name){ alert('Meu nome é: ' + name)…
-
0
votes2
answers1699
viewsA: Image appear while hovering over text
Has N ways to do this, you can use only CSS, or you can use JS. A simple example to do using jQuery is: $('ul li span').on('mouseover', function(){ $(this).next().show() }) $('ul li…
-
1
votes4
answers410
viewsA: JS countdown - How to insert a "zero" in front of numbers smaller than 9?
Just check if the number is equal or less than 9, and insert the 0 in front. let numeros = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] for(let i = 0; i < numeros.length; i++){ if(numeros[i] <= 9){…
-
1
votes2
answers22
viewsA: Simple problem with CSS alignment
You don’t use position: absolute; along with float, just do it like this. .ant{ float: left; width: 80px; height: auto; margin-top: 60px; } .logo{ margin-left: 60px; margin-top: 40px; float: left; }…
cssanswered Rafael Augusto 4,027 -
4
votes2
answers376
viewsA: Is it possible to concatenate a jQuery selector with a variable?
You just forgot the aspas simples before and after the + if (indice_da_aba == -1){ window.alert('não existe ABAS AINDA'); }else{ $('a[href="#tab_0'+indice_da_aba+'"]').tab('show'); }…
-
2
votes1
answer540
viewsA: How to leave the header from a fixed menu
You can use the load of jQuery to load pages html into the class conteudo. Ex: $(document).on('click', 'a.click', function(){ $('.conteudo').html('') $('.conteudo').load('suaPagina.html') })…
-
4
votes1
answer50
viewsA: Simple CSS alignment problem
Just use the float: left; #conteudo{ background-color: #F5F5F6; position: absolute; width: 80%; top: 20%; right: 10%; } .bloco{ display: inline; } .bloco img{ height: 212px; padding-top: 20px;…
-
0
votes3
answers32
viewsA: Is it possible to modify what the user will enter in a form?
You can do this in real time with JS and already receive modified in PHP A simple example, with each character typed, it puts a 5 in front, then you can do it the way you prefer. let campo =…
-
1
votes2
answers655
viewsA: How to assemble dynamic menu?
One way to do this would be like this (I can’t say it’s the best way). let json = [ { title: "Função Teste", funcName: "teste()" }, { title: "Função Exibir nome", funcName: "exibirNome()" }, {…
-
1
votes1
answer23
viewsA: Load a page after filling a textfield using jQuery
If I understand correctly, you can use localStorage to store the name typed in the previous page, e.g.: <div class="container"> <input type="text" id="nameJogador" placeholder="Nome do…
jqueryanswered Rafael Augusto 4,027 -
4
votes5
answers1054
viewsA: How to make each input stay on a separate line?
Is that how you want it? you can use the display: block, or even the float: left; (depending on the situation), but in general only needs the first option. An element with value block is called a…
-
2
votes1
answer113
viewsA: Fixed menu in refresh (F5)
You can store your scroll in sessionStorage and validate from there, follows an example of how it would work. if(sessionStorage.scroll){ $('.menu').show() } $(document).ready(function(){ var div =…
-
1
votes0
answers320
viewsQ: Update value of Vuejs page
I ended up bumping into a problem I’m having trouble solving. When creating a page detalhes, I call her using this.$router.push({name: 'Detalhes'}) And step one parameter this.$router.push({name:…
-
2
votes2
answers31
viewsA: How to create a help Function
$('#input').on('dblclick', function(){ $('#help').show() }) #help{ display: none; } a.tooltips { position: relative; display: inline; } a.tooltips span { position: absolute; width:140px; color:…
-
0
votes1
answer437
viewsA: Move an added file in the input file to a folder and pick up the path(url)
If I can understand well what you want, just check if the dir exists, done you create or do not create a directory, and will have at the end the complete path. $diretorio = date('m-Y') . '/';…
phpanswered Rafael Augusto 4,027 -
1
votes2
answers1035
viewsA: How to insert value in mysql with PHP and Ajax
This is quite simple to do, let’s assume that your code to insert is in a unique file, called inserir.php. $db->setQuery("INSERT INTO #__ingredientes (id, ingrediente, ordering, published) VALUES…
-
1
votes2
answers56
viewsA: Element update with Jquery with return from another script
I don’t know if I understand you very well, but if I did, your email code is in another file, right? (That’s what I understood with the action do form). If it’s really that, it’s simple, let’s…
-
1
votes2
answers706
viewsA: How to make Ionic Cordova notification?
You can use the Onesignal, it is very simple to use, besides the documentation being very complete. Follow a simple example. constructor(platform: Platform, statusBar: StatusBar, splashScreen:…