Posts by Johnathan Douglas • 449 points
12 posts
-
0
votes1
answer128
viewsA: Ajax Request and JS File Registration - Wordpress
Check if the variable’s url ajax_url is correct. Your data in Json is incorrect: Uncaught ReferenceError: Json is not defined the correct would be var x = { action: 'gravaDadosContato', dados:…
-
2
votes1
answer6757
viewsA: new Date() without time zone
when working with dates the best alternative is to work with momentjs but Voce could use: var d = new Date('10/08/2015 00:00:00'); d.toLocaleString() // 08/10/2015 00:00:00 d.toString(); //Thu Oct…
-
-1
votes2
answers462
viewsA: print the lines according to the array
$contato = array(); if(isset($_GET['nome'])){ $contato['nome'] = $_GET['nome']; } if(isset($_GET['email'])){ $contato['email'] =…
-
0
votes2
answers96
viewsA: Java Lang Array Error
why the matrix is 3x11? int[][] matriz = new int[3][11]; if the number of states is 11 its matrix should be 11x11 the matrix is accessing an index that does not exist example:…
-
1
votes2
answers96
viewsA: Java Lang Array Error
why the matrix is 3x11? int[][] matriz = new int[3][11]; if the amount of states is 10 its matrix should be 10x11 the matrix is accessing an index that does not exist example:…
-
0
votes1
answer80
viewsA: List as equal 3 column-Count
Voce can break your text into columns, example to break into three: $len = strlen($input); $space = strrpos($input," ",-$len/3); $col1 = substr($input,0,$space); $col2 =…
-
2
votes1
answer587
viewsA: Implementing a CRUD class
to create this CRUD structure: uses interfaces to define the methods that your classes will have implement. create an abstract class to implement the methods; create your CRUD class and extend this…
-
2
votes3
answers464
viewsA: IDE - Divergence between Ides relative to tab [to Enter]
All you have to do is use: http://editorconfig.org/ simply configure a file .editorconfig at the root of your project, install the plugin for your respective IDE and you’re done! all will have the…
-
6
votes2
answers1412
viewsA: List Tree Categories in Laravel 5.1
In case I need to list all and there may be infinite levels So to list all subcategories of a category independent of the amount of levels. You can do it this way: mysql> select * from categoria;…
-
1
votes1
answer46
viewsA: Can Union (mysql) also be used in Updates?
UNION is used to combine the result from Multiple SELECT statements into a single result set. https://dev.mysql.com/doc/refman/5.0/en/union.html Initially used only in SELECT.…
-
4
votes4
answers1630
viewsA: Validate, if already exists does not INSERT
does the search for that favorite and if it exists does not do the. $sql = "select * from favoritos where id_user=? and id_oferta=? limit 1" $stmt=$conn->prepare($sql);…
phpanswered Johnathan Douglas 449 -
3
votes2
answers4496
viewsA: Consultations between tables with Eloquent - Laravel 5
$pessoas = new Empresa->find($id)->pessoa $custoDosTrabalhosTodasAsPessoas = $pessoas->trabalho->custo->sum('montante') That doesn’t work because $pessoas is a list. the right would…