Posts by Paulo Costa • 3,976 points
66 posts
-
31
votes3
answers97159
viewsQ: How do I delete a local and remote Git branch(branch)?
I want to delete a local branch and in my remote project on Github.
-
1
votes2
answers357
viewsQ: How to avoid SQL Injection attack in this query?
In this case, I am passing WHERE through the $Where variable. Can the system undergo SQL Injection? How to avoid it in this case? For example: select nome from usuario where $where; $where = "cod =…
-
1
votes1
answer422
viewsA: Insert hyphen ("dash" -) automatically while user type
Has a cool tutorial and works at runtime here: Just swap Mask.Insert("###.##.##-##", Cpf) for the mask you want.…
-
1
votes2
answers1477
viewsA: Panel-Collapse start closed
Just add up display: none; to the CSS: .panel-body { background: #f5f5f5; padding: 25px; display: none; }
-
7
votes2
answers538
viewsQ: Why omit the PHP closing tag?
Every good book of good practice and wiki starts with this "rule" but no one offers good reasons. What good reasons to ignore the closing tag ?> of PHP?
phpasked Paulo Costa 3,976 -
2
votes1
answer315
viewsA: SQL Server CHAR and VARCHAR
If the field is fixed(CHAR) NULL size has the same space as any other value - the field size. If field is of variable size(VARCHAR) the NULL value does not take up space. In addition to the space…
-
6
votes1
answer336
viewsQ: How does how-old.net work?
About the site how-old.net (Detection of faces in images, with return of data on the person, such as: age, sex, etc): How it works? What use is it? What techniques were used? What technologies are…
microsoftasked Paulo Costa 3,976 -
2
votes1
answer624
viewsQ: How to only validate fields that are visible?
I have a form with several fields(inputs, selects), but some are like display: block and others as display:none; as I put the validation at all when I submit the form wanted it to check only those…
-
2
votes1
answer690
viewsA: How to draw a cube using openGL?
Cubo.java package com.teste; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.FloatBuffer; import javax.microedition.khronos.opengles.GL10; public class Cubo { private…
-
2
votes2
answers1482
viewsA: How can I complete the harmonic mean?
For example: media = (3 / ((1/n1) + (1 / N2) + (1 / N3))), where 3 is the total of elements, so just you accumulate the (1/n) in each iteration of for and in the end divide by the total of elements.…
-
4
votes1
answer8886
viewsA: How to create a notification system similar to facebook
I tested the code and it’s working. Any questions just ask. index.php !DOCTYPE html> <html> <head> <title></title> <script…
-
5
votes1
answer392
viewsQ: What’s the difference between $var and $var?
What is the difference between a $var variable and $$var in PHP? How can it be used? You can cite some examples of use?
phpasked Paulo Costa 3,976 -
2
votes1
answer326
viewsQ: How to pass an Array to Angularjs?
array ( 0 => Pessoa::array ( 'nome' => 'Paulo', 'idade' => 15, ) app.controller('meuCrtl', function ($scope, $http, $timeout) { $http.get('ajax/getPessoa.php').success(function(data){…
-
0
votes1
answer105
viewsQ: Values are not in the right column in the table
<?php $listar = new FuncionarioDAO(); $resultTudo = $listar->listar(); $results = new FuncionarioDAO(); $results = $results->retornaEmpresa(); …
phpasked Paulo Costa 3,976 -
2
votes1
answer61
viewsQ: How to list a query without knowing what will be returned?
In this example I defined some attributes to be shown, but in the game I do not know which ones to show because the user is the one who will make the query. <?php while ($row =…
-
0
votes1
answer552
viewsQ: How to separate string that Soap generates?
if(!empty($_POST['submit'])) { $client = new SoapClient('http://hidroweb.ana.gov.br/fcthservices/mma.asmx?WSDL'); $function = 'Estado'; $options = array('location' =>…
phpasked Paulo Costa 3,976