Posts by Pedro Morais • 452 points
27 posts
-
0
votes2
answers52
viewsA: SQL/LINQ vs. Data to feed
It probably does not return the zeroed values because you are trying to pull courses that do not exist (because the Count is reset) use RIGHT JOIN and will probably work. SELECT…
-
1
votes1
answer40
viewsA: If error inside the modal in php
Try to use keys on if and foreach as follows: if ($resultado2 > ""){ foreach ($resultado2 as $grupo2) { echo '<tr>'; echo '<td>'.($grupo2->id_valormedicaofauna).'</td>'; echo…
phpanswered Pedro Morais 452 -
4
votes1
answer754
viewsA: Remove file extension, not to be seen by user
In my . htaccess I use this snippet of code to remove . php RewriteCond %{REQUEST_FILENAME}.php -f RewriteRule !.*\.php$ %{REQUEST_FILENAME}.php [QSA,L] Explanation %{REQUEST_FILENAME} - will check…
-
-2
votes1
answer462
viewsQ: How to cache c# . NET information for multiple users?
I have a list of objects, and I would like each user who accesses a page, to add their objects to the cache. And that this cache was worth to the next person who accessed the same url. Example, I…
-
1
votes1
answer625
viewsQ: Specific css file for each wordpress page
I’m making some custom pages in a wordpress template and would like to put a css stylesheet in each one right in the header. Is there any way to do that? I tried to get the title of the page and I…
-
0
votes1
answer261
viewsQ: Callback from reCaptcha when user misses
Is there any google reCaptcha function that is enabled when user misses options ?
-
0
votes1
answer68
viewsQ: Zend 2 "getServiceLocator" was not found
Every time I need to call the Doctrine ORM I find the error A plugin by the name "getServiceLocator" was not found in the plugin manager Zend Mvc Controller Pluginmanager How do I fix it ?…
-
0
votes2
answers76
viewsA: How to reload page if user has returned to browser history
I found the answer to the question. When the "window.performance.navigation.type" object is equal to 2, it means that the user came from a later page by the browser history. if (window.performance…
-
0
votes2
answers76
viewsQ: How to reload page if user has returned to browser history
I have a problem, that when the user clicks the back button in the browser menu, it goes to the previous page, but it does not reload and keeps the old content. How can I recharge it when this event…
-
0
votes2
answers64
viewsQ: How to page via querystring without reloading?
I list the products via a querystring as in the example: "{meusite? pg=1}" I saw that on the site of the American and Walmart they make a pagination similar to mine, but without reloading the rest…
-
2
votes1
answer81
viewsQ: How to change . htaccess Wordpress via FTP
I need to make changes in the . htacces of my wordpress, but I think the file I found is not the correct one. Someone knows where the . htaccess which alter the wordpress pages ?
-
1
votes1
answer752
viewsA: Sub-menu effect with jquery
Dude, the problem was the selector you used. When using ". sidenav_menu ul", you are calling all ul belonging to the sidenav class. Then use the function "slideToggle" (open and close with sliding…
-
10
votes5
answers3128
viewsQ: What is CDN and how do I enable it in my Javascript files?
On a performance verification site I received the message "Use CDN for all Static Assets" for my Javascript files. What are CDN and how to implement them?
-
-1
votes3
answers1005
viewsA: Foreach by reference or by value?
If you really need the key($key) you use the second option, because sometimes I need to change the value of the variable, for example: $ar = ['a'=>'x','b'=>'y']; foreach($ar as $key =>…
-
0
votes3
answers276
viewsA: I cannot close div using IDE jquery
jQuery(function(){ jQuery('.showSingle').on('click',function(){ jQuery('.targetDiv').hide(); jQuery('#div'+$(this).attr('target')).fadeIn(500); }); …
-
0
votes2
answers77
viewsA: Variable returning Undefined
//Se quando vir undefined não é pra alterar o dado você faz assim: if(isset($city)&&$city!=null){ if ($stmtSaveAddress->execute()) { echo 'trueaddress'; }else{ …
phpanswered Pedro Morais 452 -
-4
votes2
answers833
viewsA: Change the quality of online video?
When you watch a video on Youtube, you are downloading a file, so the quality identifies the file you are downloading, so for each quality, there is a different file. That’s why sometimes when the…
-
1
votes2
answers1429
viewsA: Problems with mysqli_result as array
$query = ObtemDocumentos($rg); while($dados = mysqli_fetch_array($query)){ $idTipo = dados["idTipo"]; } //se eu ajudei por favor vote na resposta
-
0
votes1
answer97
viewsA: Scrollbar in ng-view does not work
Go to your ng-view’s Parent and arrow a width according to the size you need and then put the overflow:scroll property;
-
1
votes2
answers438
viewsA: PHP global array as time table
It will weigh and is in danger even of overthrowing your server (I already made this mistake). Create a cookie with the data and use the cookie when you need it, or record it in a database. Session…
-
0
votes4
answers424
viewsA: Request with ajax
You’re running your server at the limit, so it consumes a lot of memory. Try to make the upload script not last long and don’t use Sleep. Queue up emails to be sent, take your script, take out the…
-
0
votes2
answers203
viewsA: jQuery - Select option and return values
$(function(){ $(document).on("change", function() { if(($("#men_cod").val())==''){ $("#sms_mensagem").attr("disabled",false); $("#sms_mensagem").val(''); } else { …
jqueryanswered Pedro Morais 452 -
0
votes1
answer93
viewsA: Display value of an object item using Javascript
$.getJSON("/produto", { id: id, cor: idSelected }, function (data) { $.each(data, function (i, lista) { alert("Tamanho: " + lista["id"]+ " / Estoque: " + lista["qtdeEstoque"]; …
-
2
votes2
answers240
viewsA: Custom Return in WEB API
Usually the API returns a lot of stuff, and many of them we don’t use. You can plug up your parameter API or you can simply return everything. I see no problem in returning unnecessary data, unless…
-
2
votes1
answer294
viewsA: How to validate a wmsAuthSign hash in php?
base64_decode($urlsignature); $dados = explode($urlsignature,"&"); $validar = []; foreach($dados as $k=>$v){ //converte a url em array $temp = explode($v,"="); $key…
-
6
votes5
answers4473
viewsA: In the ORDER BY of a SELECT change a comma for a period
If the price is commas, the field is probably not numerical. Ideally you would change the data type of the price field. But if you need it fast, try select cast(REPLACE(preco, ',', '.') as float ) p…
-
0
votes1
answer121
viewsQ: How to pass variables from C# MVC 4 to SASS SCSS?
I need to change my CSS files dynamically by pulling some data ,like colors, from the database. I chose to use SASS in the application, but I can import an application variable in MVC 4 to my SCSS…