Posts by João Paulo Vieira da Silva • 1,933 points
27 posts
-
0
votes2
answers340
viewsA: Add an "active" class in the link according to the page accessed?
After several attempts I finally managed to make the links work. The big problem in reality was that I wasn’t able to change the state of the variable uri, due to the fact of the primitive types in…
-
3
votes2
answers340
viewsQ: Add an "active" class in the link according to the page accessed?
I’m putting together a theme for Wordpress, and need to add a class active in anchors, the operation is as follows: I recover the URI of the current page and compare with the text/value contained…
-
3
votes4
answers9024
viewsQ: How to make the 'focusout' event an input?
I want to make an input appear when I click on label, when I click out of the input, ie take the focus of such, I would like it to disappear. HTML: <form action="/" class="search">…
-
1
votes1
answer89
viewsQ: Problem in the execution of the task with Gulp & SASS?
I am creating a task that compiles, renames and simplifies files .scss for .css. My file structure is like this: assets/ |__ css/ |__ sass/ | |__ uma-pasta/ | | |__ alguns.scss | | |__ arquivos.scss…
-
54
votes5
answers7178
viewsQ: What is the advantage of using recursive functions?
Recently discovered the famous (or not so famous) Recursive Functions and I found the concept very interesting. However, during my reading I had some doubts regarding the use of such. What is the…
-
1
votes1
answer144
viewsA: Questions about website hosting
First let’s discuss what band is? To explain in a clear way, I will use for example the Prepaid plans of cellular. Let’s say that at the beginning of the month you were credited R$20,00, during this…
-
2
votes1
answer1566
viewsA: Transforming grids into Carousel (slider)
Have you taken a look at Owl Carousel it is fully responsive and easy to deploy with Bootstrap. HTML: <div class="container"> <div class="owl-carousel"…
-
1
votes2
answers694
viewsA: Sidebar via Controller - Laravel 5.1 + Adminlte 2
The solution I found was to work via GET, passing the parameters admin and another user. Creating a Route The first thing I did was create a route to the template, that receives a parameter GET…
-
1
votes1
answer965
viewsQ: Condition to add and remove attributes from an element?
I have a map and I need every time I hover over the state pointer. I’m controlling it by the attribute hidden tag image. HTML: <svg version="1.1" id="svg-map" xmlns="http://www.w3.org/2000/svg"…
javascriptasked João Paulo Vieira da Silva 1,933 -
3
votes3
answers155
viewsQ: Why is 'getattribute()' not a function?
I’m trying to access the attribute xlink:href of a <a> within an SVG. But when I try to access this attribute, Console Log returns that getAttribute() is not a function. THE HTML: <svg…
javascriptasked João Paulo Vieira da Silva 1,933 -
0
votes2
answers93
viewsQ: Can anyone explain this logic to me in Wordpress?
Good saw this logic in Wordpress theme developed by a colleague, and there was the following logic: <?php $i = 0; $post_type = new WP_Query( 'post_type=cpt' ); if ( $post_type->have_posts() )…
-
0
votes1
answer35
viewsQ: Undefined $class_name in autoloader using spl_autoloader_register() with WAMP?
I’m trying to implement an autoloader for classes in my project, but I can’t make that code work... It returns the $class_name variable as Undefined. function autoload_classes( $class_name ) { if (…
-
6
votes3
answers954
viewsQ: Vertical slider navigation including highlight thumbnails
There is a slider here on this website that has a vertical navigation that is located on the right side, which includes the thumbnails of the previous slides and also of the following slides. I’d…
-
0
votes1
answer145
viewsQ: Syncing the Desktop and Mobile Database?
Well I will start working on a LARGE project, which will be MULTIPLATFORM, both for Desktop and Mobile, and we are discussing a way, to work with the DATA BASE in both applications. The interactions…
-
8
votes2
answers129
viewsQ: What is the difference between $var = Function() and Function var()?
I’d like to know, what’s the difference between: <?php $var = function() { return 5; } $var(); and... <?php function var() { return 5; } var(); What would be the difference between them? When…
phpasked João Paulo Vieira da Silva 1,933 -
4
votes3
answers161
viewsQ: What is the difference between these 2 PHP codes?
I am studying PHP and came across the following question: what would be the difference between the following codes: <?php class ClasseTeste { protected $db_host = 'localhost'; protected $db_user…
-
2
votes1
answer121
viewsQ: Create an ALIAS for a . /configure File?
I cloned the Github repository, and to execute the command I always need to type, . /directory name/vv I imagine that this "file" is of the Linux CONFIGURE type, correct? I wonder how I create an…
-
10
votes2
answers11707
viewsQ: How, when and where to use PHP’s magic methods? Get and Set? What’s the difference? Should I use them in every class I create?
I’m starting in POO and would like to know when, where and how I should use the magical methods GET and SET and if possible cite their differences in practice. Should I use them in all the classes I…
-
0
votes1
answer178
viewsQ: Take the values of a table and use to create a new database
Well I have the following problem: I’m switching from server to agency, and I came across the following problem: it had only 1 database and within this database there were several tables with client…
-
2
votes1
answer656
viewsQ: How to access an array within a method in a class?
I would like to know how to access an array through a method. I’d like to know that you think my code is right what I’m trying to do? class RegisterPostType { public $name; public $singleName;…
phpasked João Paulo Vieira da Silva 1,933 -
8
votes2
answers2531
viewsQ: What is the logical "XOR" operator in PHP? When do you use it? What does it do?
I wonder what that operator is XOR? When to use it? And what does it do in PHP?
phpasked João Paulo Vieira da Silva 1,933 -
16
votes2
answers1760
viewsQ: What is the difference between "!=" and "<>" in PHP? What to use?
What’s the difference between != and <>? Which one should I wear?
-
37
votes4
answers37758
viewsQ: What is the difference between "&&" and "||" and "and" and "or" in PHP? What to use?
I have that question, what’s the difference between && and || and between and and or? Which one should I use?
-
13
votes3
answers4364
viewsQ: What are decimal, hexadecimal, and octal notation numbers?
What are decimal (base 10), hexadecimal (base 16) and octal (base 8) notation numbers? In the book the code is like this: <?php // numero decimal $a = 1234; // numero octal (equivalente a 83 em…
-
0
votes1
answer149
viewsQ: Why am I not able to do the INSERT in the database?
<?php class Connection { private $nome; private $data_nascimento; private $genero; private $rg; private $cpf; private $email; private $telefone_fixo; private $telefone_celular; private $cidade;…
-
1
votes2
answers208
viewsA: How to change the style of superior brothers?
Try to make the following code: figure#start2:hover #start { -webkit-transform: rotate(80deg); /* Compatibilidade com o Google Chrome e Safari */ -khtml-transform: rotate(80deg); /* Compatibilidade…
-
1
votes2
answers1254
viewsQ: Side menu with fixed width and content 100%
I’m working on a project, which my side menu has 300px and mine content has 100% relative to my menu. I apply the following style: header { position: fixed; top: 0; left: 0; width: 300px; height:…