Posts by Felipe Duarte • 6,284 points
276 posts
-
6
votes2
answers10833
viewsA: What are CRON JOBS and how to use them with PHP
Cron jobs has nothing to do with your problem, setting up a cron job on the server, simply makes a script run every X time. This time validation can only be done in the client or javascript, to have…
-
0
votes3
answers60
viewsA: How to make a form centered on a figure
Feel free to study Flexbox css Tricks figure.cx-fotos-portugal{ margin: 0 auto; width: 95%; height: 50vw; display: flex; flex-direction: column; align-items: center; justify-content: center; }…
cssanswered Felipe Duarte 6,284 -
-1
votes1
answer1056
viewsA: Fill two inputs automatically, using data from an input and select searched in database
To do this use Javascript, or better yet, a javascript library called j-query, that greatly facilitates the requisitions Ajax, example... form # Jquery # <script…
-
2
votes2
answers501
viewsA: How to traverse a hierarchical tree to generate an HTML
You can walk like this let tree = { label: 'Elemento A', itens: [ { label: 'Elemento A1', itens: [ { label: 'Elemento A1a', itens: [ { label: 'Elemento A1a1' }, { label: 'Elemento A1a2' } ] }, {…
-
1
votes2
answers113
viewsA: How to codate this layout?
This can be done with a very simple shading effect: .teste1 { width: 100%; height: 100px; background-color: gray; display: flex; justify-content: center; } .teste2 { width: 100px; height: 100px;…
-
1
votes1
answer221
viewsA: Manipulating classes with jQuery / Javascript
Just assign one event to each td, link each with its th through the classes, and when you click on dom until the table to find their th that climbing in the dom is only necessary if you have more…
-
0
votes1
answer362
viewsQ: Why is working locally slower?
Always when I climb a local server with PHP or NodeJs, I come across a slowness that in a lodging does not happen The same happens when I simulate a server with Ngrok That is, this is all because of…
-
0
votes2
answers5057
viewsA: Date angle filter with mask 'dd/MM/yyyy HH:mm:ss'
Here is already a good way, too bad I’m not in a lot of time now :( angular.module('teste', []); angular.module('teste').controller('testeCtrl' , function($scope){ $scope.contatos = []; $scope.add =…
angularjsanswered Felipe Duarte 6,284 -
1
votes1
answer1044
viewsA: How to trigger Button Onclick event with jquery
If you want to manipulate the elements based on value of buttons which is kind of weird, just do this... $(document).ready(function(){ /* looping nos botões */ $('button').each(function(b) { /* pega…
-
1
votes2
answers685
viewsA: How to align the close button of the pop-up window?
Next, you take the Fixed position, because it does not behave well based on containers, all the properties you put in the image should be applied in the container, because the image should only be…
cssanswered Felipe Duarte 6,284 -
2
votes4
answers248
viewsA: Problems with Javascipt calculator
To do javascript operations it is necessary to add parseint(numero) so that javascript does not understand the addition as concatenation another thing is its show function, it should call the table…
-
29
votes2
answers3910
viewsQ: Why is it important to inform users of the cookie policy?
I’ve been browsing several websites that in their headers show messages like: This site uses cookies to improve your navigation. By browsing the site you consent to its use. It’s okay that cookies…
cookiesasked Felipe Duarte 6,284 -
1
votes2
answers280
viewsA: Right at the top when resizing page
Are you using media queries? if you are, at the time the menu turns hamburger, set the <a> that surrounds the logo image with position: absolute
htmlanswered Felipe Duarte 6,284 -
3
votes2
answers90
viewsA: Does the unit of measurement "in" change on each device?
If you give why em is a relative distance measurement unit Measures relating For sources: units em, ex, ch, rem Percentage of viewport: units vw, vh, vmin, vmax The W3C specification technically…
-
2
votes1
answer174
viewsA: Internal elements overlapping <Section>
As already said, the tag b, is intended for text formatting and must be handled by means of a container, for example... section.compartilhar{ width: 100%; max-width: 1200px; margin: auto; padding:…
cssanswered Felipe Duarte 6,284 -
0
votes2
answers44
viewsA: Delete Method Does Not Work
Next you have to refocus the entire object in ng-repeat, not the instances created for usability issues it is always good to hide the button while no contact is selected, because it makes no sense…
-
2
votes1
answer230
viewsA: Include PHP and directories?
To keep a relative path you should always go up to the root directory, and then look for the file to be included. There are several ways to do this. $_SERVER $_SERVER['DOCUMENT_ROOT'] Magic…
-
2
votes1
answer333
viewsA: css variables with values coming from the database
Just import css as php <link rel="stylesheet" href="estilo.php" type="text/css" /> In php add <?php header("Content-type: text/css"); //configura as variáveis ?> //Saida Css body {…
-
2
votes3
answers372
viewsA: How to catch a class with Jquery array?
To get these indices just play in an array... var lis = []; $('ul.benefits li').each(function(el){ lis.push($(this).text()); }) console.log(lis); <script…
-
0
votes5
answers1042
viewsA: centralize a Nav menu
You should take the list effect on ul with margin and padding 0 too ul{ margin: 0; } ul { list-style: none; display: flex; flex-direction: row; justify-content: center; margin:0; padding: 0; } a {…
-
3
votes3
answers14308
viewsA: Adjust image to <div> size
Set the size of the image, also the size of the div .profilepic { width: 150px; height: 150px; border-radius: 50%; background-image:…
-
0
votes2
answers11985
viewsA: Button in the center of the screen
Position absolute is a static property, does not serve as a parameter to center content, so on each screen your application will have a different size. Use property relativas example body{…
-
3
votes2
answers6058
viewsA: How do I clean fields with angular?
var myApp = angular.module('myApp', []); myApp.controller("testectrl", function($scope){ $scope.limpaCampos = function(dados){ delete $scope.teste; $scope.zeraCampos.$setPristine(); } }) <script…
angularjsanswered Felipe Duarte 6,284 -
4
votes2
answers1768
viewsA: How to take angular typed data and save to an object array?
If the case is to take form values the ideal method is this... var myApp = angular.module('myApp', []); myApp.controller("testectrl", function($scope){ $scope.gravar = []; $scope.adicionarDados =…
angularjsanswered Felipe Duarte 6,284 -
0
votes3
answers527
viewsA: Problem with URL in Angularjs
Have you tried the $urlRouteProvider? it seems to me that he performs a different call, basically assisted, while $routeProvider runs everything internally, follows an example that worked for me in…
angularjsanswered Felipe Duarte 6,284 -
2
votes1
answer83
viewsA: Value adjustment bar
If you’re looking for a slider like this, next to an accountant, I recommend frameworks like Angular.Js, React.Js and Vue.Js They have a large library of components based on Material Designer Slider…
-
1
votes2
answers2990
viewsA: How to align a checkbox next to a label?
Just add a div around the input and declare the li with flex display, example... body { display: flex; background-color: #f5f5f5; font-family: Arial, sans-serif; } section#principal { width: 100%; }…
-
0
votes1
answer58
viewsA: query Pdo error (Sort by Count)
Try adding an alias SELECT *, COUNT(moedas) AS money FROM usuarios WHERE banido='false' GROUP BY usuario ORDER BY money DESC LIMIT 3;
-
0
votes1
answer956
viewsQ: How to join arrays with repeated keys?
I got the following code $teste1 = array( 1 => array( 1 => 'teste1', 2 => 'teste2', 3 => 'teste3'), 2 => array(3 => 'teste4', 5 => 'teste5') ); $teste2 = array( 1 => array( 3…
-
0
votes1
answer1118
viewsA: Connection Webservice SOAP HTTPS PHP ( Santander )
This is an error of the server on which you are trying to connect, some authorization, security token or hash, may be specified in the manual, parameters such as 'soapopations' => array(…
-
1
votes1
answer129
viewsQ: Comsumir Web service in SOAP with large volume of data, TIME OUT
I need to take a lot of data from a web service in SOAP, but depending on the query the server does not hold, I have seen in some articles, that this can be solved by compression of xml or sending…
-
2
votes1
answer1683
viewsA: How to count rows from a table with PDO
Transforming the result into array and giving a Count is an alternative $sth = $dbh->prepare("SELECT name, colour FROM fruit"); $sth->execute(); $result = $sth->fetchAll(); count($result);…
-
1
votes2
answers10597
viewsA: Place image in html that is in google drive
Well if image switches, it can be some kind of google security to protect files, or if you want to use an image of the drive on your site google provides iframes, which is not ideal for images. I…
google-drive-apianswered Felipe Duarte 6,284 -
2
votes1
answer808
viewsA: How to go through all columns of a jquery table and hide if empty
You need to scroll through the table using $.each, and add a bookmark to have control of the elements that will be deleted, for example... $(document).ready(function(){ $('.ocultar').on('click',…
-
0
votes1
answer20
viewsA: Jquery is rescuing the options text along with the label text
var oi = $("label").clone().children().remove().end().text(); $("div").html(oi); <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>…
-
1
votes1
answer1202
viewsA: Centralize navbar
Just swap the 'float:left' and the 'display:block' of '.menu a' for 'display: inline-block', and 'text-align: center' in '.menu' add them to the 'media-screen' again' . function menu() { var x =…
cssanswered Felipe Duarte 6,284 -
0
votes1
answer114
viewsQ: Simulate click on a compiled template
I am facing problems when assigning a 'click' event in an external template previously compiled, follow the code... Directive angular.module('testeFuncoes').directive('fechaMenu',…
-
2
votes2
answers118
viewsA: CSS attribute does not work
Missed you to complete the structure by adding the table .item_header_no{ font-size: 1.2em; padding: 5vw; background-color: black; color: white; } <table> <tr> <td…
-
2
votes1
answer640
viewsA: How to horizontally center a responsive div with multiple objects inside
Would that be? .Rectangle { width: 200px; height: 200px; background: #4d5f8d; margin-left: 20px; padding: 10px; margin-top:10px; } .mainDiv { display: flex; align-items: center; justify-content:…
cssanswered Felipe Duarte 6,284 -
3
votes1
answer98
viewsQ: How to execute requests in order?
I make 3 requests in a row, but they are fired in processing order, not synchronously, how can I resolve this? ... //botão pressionado // primeira requisição ivUpload.setOnClickListener(new…
-
0
votes2
answers72
viewsA: How do I center the content of an element vertically?
There is no sense in heigth: 100% in a parent div, unless it is in another container with some heigth set, an alternative is the use of the vh unit that is based on the height of your window, that…
cssanswered Felipe Duarte 6,284 -
0
votes1
answer27
viewsA: Check selected category
The logic is more or less this, I have not tested the code but it is likely to work foreach($array_categoria_sugerida as $value_ass){ $resul = array_search($value_ass,…
-
0
votes2
answers280
viewsA: Jquery mask does not work within another Jquery script
As you said a simple error, you’re taking the element by the id, that is to say you’re treating a single element, to treat several classes, something else, as you’re using pure javascript to perform…
-
2
votes2
answers1019
viewsA: PDO Statement Dúvidas
Basically the bind adds an extra layer of security at the time of the query, limiting or excluding the chances of SQL injections, should be used after the prepare(); In the case of Binds with…
-
0
votes1
answer425
viewsA: Alignment with flex box
From what I understood the menu and submenu would need a container for the property Justify-content ul{ display: flex; justify-content: space-between; list-style: none; padding:0; margin:0; }…
-
2
votes1
answer1686
viewsQ: Uncaught Syntaxerror: Unexpected token Nodejs
I cannot properly link my Static/index files, follow the code directory: 'blog/createServer.js' var http = require('http'); var fs = require('fs'); var path = require('path'); var contentTypes = {…
-
2
votes1
answer1359
viewsA: Calling functions/procedure via buttons using Object-Oriented PHP
This conversation between javascript and PHP, can only be done with ajax, or at the beginning of the page with PHP above javascript, to get better I will add 2 more inputs <button…
-
2
votes2
answers1281
viewsA: How to select only one div of several equals with js?
With jquery the click method takes all the elements with a certain class, after that you send the clicked by parameter and take with this... $('.ctn').click(function(e){ alert($(this).text()); })…
-
0
votes1
answer60
viewsA: How to calculate using onblur between 3 fields
With jquery speeds up the process... $(document).ready(function(){ $('.input1').blur(function(e){ var inp1 = $(this).value; var inp2 = (inp1 * 10)/100; var inp3 = (inp1 * 20)/100;…
-
3
votes3
answers41543
viewsA: Alignment from side to side
A simple and fast alternative is to use the flex-box space-between property, for example... .container{ display: flex; flex-direction: column; } .titulo { font-size: 5vw; background-color: blue;…