Posts by Henrique Mendes Silveira Rodri • 367 points
51 posts
-
-3
votes1
answer40
viewsQ: Changing strings of an object in a foreach
I’m in trouble: I mount an object from an insert list: This list I put in a variable and insert inside a function with foreach, however, so that it works correctly within the function can not have…
-
0
votes1
answer623
viewsQ: select sequelize performs different query of parameters passed with datetime
This is the function that performs the query: router.get('/out_filtered', async (req, res, next) => { try { const dateStart = req.body.date_start; const dateEnd = req.body.date_end;…
-
-2
votes2
answers1047
viewsQ: compute hours with javascript
I want to calculate the time taken between two hours: var h1 = 23:14:32; var h2 = 22:55:27; var total = h1 - h2; the return I get is Nan.…
javascriptasked Henrique Mendes Silveira Rodri 367 -
0
votes1
answer1089
viewsQ: list multiple ngFor arrays
I need to list all subcategories in a table and I’m not sure how to do this. { "message": [ { "category_id": 1, "shop_id": 1, "category_name": "Bebidas", "status_cat_css": 0, "status_cat_active": 1,…
-
1
votes1
answer435
viewsQ: Ngfor inside another Ngfor Angularx
I am trying to run a loop to show the values, respectively for each user, but with ngIf nothing appears, as I put here in the example, and without ngIf are shown the two values for the two users,…
-
1
votes1
answer98
viewsQ: Iterate values of two requests in *ngFor
I am making two requests in the bank, one brings the orders grouped only for view on the front, the other brings all values, the last need to show the total of each request along with the view of…
-
1
votes1
answer280
viewsQ: Push in Bitbucket
I can’t seem to get one push in my Bitbucket project, every time the message appears below. I follow the instructions by placing the email and name, but when I give the commands again the same…
-
-1
votes1
answer639
viewsQ: Environment Sweeps Configuration - Commands Not Working - Ionic
You are showing the following error: 'Ionic' is not recognized as an internal command or external, a operable program or a batch file. But this command appears only in Cmder, at the Node.js prompt I…
-
-1
votes1
answer23
viewsQ: Toogle Select function
I have the following scenario: I have a list of addresses that comes dynamically from the bank, according to what is registered by the user. I need to enable only one address, so when a button is…
-
0
votes2
answers535
viewsQ: Identify numbers and letters typed in input fields with typescript
I want to make an alphanumeric validation being mandatory the use of uppercase letters and numbers typed in an input using typescript. I need to know when a capital letter is typed, for example nAbd…
-
0
votes2
answers295
viewsQ: Sum json object property
I have a json object and need to multiply the value vlr_produto with the function add() data={ id: 6, nome_produto: "Produto", vlr_produto: 16.98, qtd: 0 } add(data) { var mult = data.qtd++; mult *…
-
0
votes2
answers78
viewsA: How to display and hide Toogle inside ngfor correctly?
I managed to solve and I will leave the solution posted here: status:Boolean=false; myToggle(data){ if(data.status === 1){ data.status = 0; }else{ data.status = 1; } console.log(data.status) }…
-
1
votes2
answers78
viewsQ: How to display and hide Toogle inside ngfor correctly?
listNotas() { this.service.getList(this.idAluno).subscribe( data => { this.error = data.error; this.list = data.message; console.log(this.list); }, err => console.log(err) ); }…
-
0
votes2
answers3856
viewsA: How to put icon next to text?
it is always good practice to use flexbox: .mycontainer{ display: flex; margin:5px; } <div class="mycontainer"> <span> <img src="https://www.w3schools.com/html/pulpitrock.jpg"…
-
-1
votes2
answers113
viewsA: Keep menu item disabled
You can do this with css and leaving no link inside "href": .link{ cursor:auto; } <li><a class="link" href='#'>CADASTRAR</a></li>…
htmlanswered Henrique Mendes Silveira Rodri 367 -
-1
votes1
answer252
viewsQ: Calculate shipping for more than one product in Woocommerce cart
When I add only one product in the cart it shows the shipping options I have set up, but when you have more than one product you have no option for shipping and ask to check delivery form. Following…
-
-1
votes1
answer72
viewsA: A question about Google SEO
A well structured site with SEO, will be shown according to the "keyword" typed in the search field on the Google site. If the term "buy clothes" or cheap clothes is searched for, for example, the…
-
0
votes1
answer360
viewsQ: Separate Array within Object
I have an array inside an object, I would like to know how to separate the items service_name and service_value. I don’t know if there’s a way to do this in html itself... pedido{id_pedido:"17",…
-
0
votes1
answer90
viewsQ: Increment Array with filter
I need to increment the item this.order[i].nome_servicein the variable this.result only when you click the checkbox as well as decrement when unchecked. orders = [ {id_service: "1", id_empresa: "9",…
-
1
votes1
answer315
viewsQ: Calculate and Decrease Array Values
I am trying to decrement and calculate values of an array unsuccessfully. The decrementation works to a certain extent, so it decreases different values than what is clicked on the checkbox and the…
-
0
votes1
answer168
viewsQ: Change only one checkbox
How do I change only the checkbox I’m clicking? checked:boolean=false; ck() { if(this.checked === false){ this.checked=true; }else{ this.checked=false; } <ion-item> <ion-label class="title"…
-
0
votes2
answers1546
viewsQ: Picking input values from a given form
I have the following scenario: Several forms, but I need to set all inputs only of the form that is in action, which is triggered by the button. function enviaForm(id){ $(id).submit(function(){ var…
-
0
votes2
answers579
viewsA: Ajax request from multiple Forms, with javascript function
I found the mistake that I myself presented here, I will put the answer to future consultations: The input numbers are all the same, when selecting a random input and submitting the form, the same…
-
0
votes2
answers579
viewsQ: Ajax request from multiple Forms, with javascript function
I’m having trouble sending the forms correctly, I have several forms, each with its id, and a function I call on all forms: <script> function enviaForm(id){ $(id).submit(function(){ var camp1…
-
0
votes1
answer189
viewsQ: Traverse rows of a table within loops
What I intend to do is schedule times and dates on front-end according to the records of a table, but with the code I have I can only mark the first row of the table. How to go through the entire…
-
1
votes0
answers134
viewsQ: Selection after click
I am using the materialize library and want to implement the selection of a link after clicking on it in a side menu, side-ship, drop-down , I am trying to pass as parameter to the page the active…
materializeasked Henrique Mendes Silveira Rodri 367 -
0
votes3
answers116
viewsQ: Save multiple records in the bank
I’m using the following code unsuccessfully. $conn = mysqli_connect('localhost','user','pass','banco'); try { $body = file_get_contents("php://input"); $dados = json_decode($body); foreach($dados as…
-
3
votes1
answer378
viewsQ: value the angular input 2
I have an object coming from the bank that I show in the view on an ngFor. what I want is to pass this [value] to the component to save in the bank and I’m not knowing how. <form #f="ngForm">…
-
0
votes0
answers262
viewsQ: Pass array object to API and save to Database
I’m using Ionic 3 and I want to save the data of an object in the database. In the API is running the query and saving null in the database, I imagine the way I am sending the object is wrong.…
-
0
votes0
answers2043
viewsQ: Unexpected end of JSON input error
I am working with Ionic 3, picking up data through a Restfull API, using PHP and Mysqli, but returns this error: Unexpected end of JSON input. I believe the error is in the API. Follows my code: In…
-
3
votes1
answer712
viewsQ: Fade effect with CSS3
I am trying to cause an effect (unsuccessfully) to fade the image using the following code: @-webkit-keyframes fundo { 10%{ -webkit-filter: grayscale(10%); -moz-filter: grayscale(10%); -ms-filter:…
-
0
votes0
answers20
viewsQ: Request ajax with Wordpress
I am working on a custom Wordpress page. I am making a request via ajax on this custom page, which is theme directory: wp-content/themes/my-theme/my-page-custom.php The page that will process is…
-
2
votes1
answer435
viewsQ: Preloader with Materialize
I’m making a request via ajax: $(function () { $('#loader').hide(); $('#formSend').on('submit', function (e) { e.preventDefault(); $.ajax({ type: 'post', url: 'proc_pedidos.php', data:…
-
1
votes0
answers483
viewsQ: Save value to a variable
How can I save the value of a calculation done in front-end by passing to a variable in typescript, example: Typescript: valor:number=0; html: <ion-input type="number"…
-
1
votes2
answers979
viewsQ: How to add object property in Array to *ngFor
I have an array passed to a *ngFor, how do I sum the values of a property, vlr, for example. order=[ {"qtd": Number(1),"vlr":Number(3.50)}, {"qtd": Number(6),"vlr":Number(4.00)}, {"qtd":…
-
0
votes2
answers544
viewsA: Send an array of objects in an ng-click?
Try it this way: HTML: ng-click="guardaObjs(list)" "Call the function inside the loop" Controller: guardaObjs(obj){ //aqui vc manipula o array (obj) }…
-
1
votes1
answer352
viewsQ: How do I increment days to a date in Ionic 2
I don’t have much experience with Javascript dates, nor with the frameworks mentioned: For now what I managed was to display the current date on the front end using the following syntax: this.myDate…
-
0
votes1
answer508
viewsQ: Increment object property within an array
I do not know what is the best way to implement this, I am trying with switch without success... By clicking the button, I want to increment the property "Qtd"; choice=[…
-
2
votes1
answer673
viewsQ: Delete item from an Inioc 2 array
I’m having a hard time understanding how splice() works. I need to delete items from an array when I click on (x), e.g.: <ion-item *ngFor="let item of data"> <ion-grid> <ion-row>…
-
0
votes1
answer280
viewsQ: Set <option> when checking/unchecking checkbox
I need to reset a select through a checkbox. The problem is the moment I try to access option with jQuery. HTML <select id="selSub"> <option value="0" >Selecione</option>…
-
2
votes2
answers587
viewsQ: enable input button
The code I have to validate the button doesn’t work: $(document).ready(function(){ $("#sendCat").prop('disabled', true); if ($('#cat').val()!= "") { $("#sendCat").prop('disabled', false); } });…
jqueryasked Henrique Mendes Silveira Rodri 367 -
0
votes2
answers146
viewsQ: Calling database data with $http get
I am not able to call the database data with the method below: <div class="container" ng-app="appCat"> <div class="row" ng-controller="appCatCtrl"> <table class="table…
-
1
votes2
answers2249
viewsA: Should we use SVG or PNG icons for websites?
I particularly prefer SVG, because it ends up being lighter, because it is a vector, and it is also easier to work, as our friend put above, you have access directly to the image code, being able to…
-
0
votes0
answers428
viewsQ: Searchbar Ionic 2
I managed to implement the searchbar as documented by IONIC 2. The problem is I’m bringing information from a remote database and I can’t implement this database data into searchbar. It is a matter…
-
1
votes1
answer822
viewsQ: Pass html page id inside ngFor to ts page
I have a *ngFor of an array object, I want to pass the id inside the button to typescript to configure it as links in a modal. Follow the syntax I’m trying with no success: <ion-item *ngFor="let…
-
3
votes1
answer495
viewsQ: Attack svg image with css and include php
I cannot attack the properties of the SVG image with include php. Is there another method? Therefore, I need to call the bank images dynamically through include(). Here is a functional example, when…
-
0
votes1
answer392
viewsQ: Multiple selection input checkbox materialize does not work
I’m using the Materialize library, taking the database data and listing in front-end, but the multiple selection does not work: <div class="row"> <form action="#"> <span> <?…
-
1
votes1
answer378
viewsQ: jquery ui autocomplete + php does not work
I have the following codes that are not working: Maybe I should add something to them, but I don’t know how... JS: <script> $(document).ready(function(){ $('#busca').autocomplete( { source:…
-
3
votes1
answer3076
viewsQ: How to validate md5 password with database?
In the database is already encrypted with md5, when I try to log in using: email: [email protected] | senha: 123456 **ACESSO NEGADO** and email: [email protected] | senha: criptografada md5 **ACESSO…
-
1
votes1
answer716
viewsQ: Escoder . php extension through . htaccess file
I’m using the following code on a hostgator web server, but I can’t hide the extension .php. How to solve this? RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond…