Posts by gabrielhof • 698 points
12 posts
-
6
votes2
answers9320
viewsQ: How to format the date of an input[date] in the format dd/mm/yyyy'?
I have a page, built with Angularjs, that possessed a input[type=date]. Basically, what I want is to take this date and format (i.e., display to the user) using the format 'dd/MM/yyyy' (for example:…
-
5
votes3
answers9511
viewsA: Ask before deleting database data
The simplest way to do this is by using Javascript, through the function confirm and the event onclick: <a href="http://google.com" onclick="return confirm('Deseja mesmo acessar o…
-
1
votes1
answer724
viewsA: Capture value from an email-like field at js
I haven’t found any part of the Angularjs documentation that talks about this, but his default behavior is indefinite the property linked to the input when it does not have a valid value. This is…
-
3
votes1
answer233
viewsA: Wrong parameter type error in mysql_fetch_assoc()
According to the PHP documentation, the function mysql_fetch_assoc hopes that the parameter passed is of type resource. But you are passing directly the return of the function mysql_query as a…
-
3
votes2
answers690
viewsA: Document.location.Reload() does not re-post equal to page refresh
To MDN documentation on the method Location.reload() is not clear about this, but this method just reload the current page using the method GET. The action of calling this method is almost the same…
-
5
votes1
answer136
viewsA: Insert Selected Objects into Array
I believe the problem is here: private int getLast(){ int last = 0; for(int i=0;i<pontuados.length;i++){ if(pontuados[i] == null) last = i; return last; } return last; } As you can see, the if…
-
0
votes1
answer252
viewsA: ng-switch + Function
Translating a part of ng-switch documentation: Be aware that the attribute values [ng-switch-when] cannot be expressions. Values are interpreted as literals to be compared. That is, when you use…
-
7
votes1
answer964
viewsA: View engine alternatives for nodejs?
In addition to Jade, I have worked with two other view Engines: ejs Basically, the ejs processes Javascript code within tags <% %> in your view. For example: <div> <h1>Você gosta…
-
1
votes2
answers9250
viewsA: How to mount a select by taking information from the database
The tag select uses the tag option to display a selectable option. Take a look at this example: <select> <option value="1">Opção 1</option> <option value="2">Opção…
-
6
votes2
answers2612
viewsA: Assign JSON values to simple variables
You can use the function json_decode. This function receives a String in JSON format and returns a object or array with the properties of JSON. Follow a very simple example: $json = '{"nome":…
-
10
votes5
answers440
viewsA: What would an Agile Development Process look like?
The Agile Manifesto values the following items: Individuals and interaction between them more than processes and tools Software in operation more than comprehensive documentation Collaboration with…
-
1
votes4
answers2802
viewsA: How to import classes from your subclasses in PHP?
You can try this using namespaces. It would be very similar to using Java Packages and Imports. namespace Projeto\Dao; class Pessoa { } It would relate to the following, in Java: package…