Posts by Don't Panic • 4,006 points
76 posts
-
4
votes2
answers318
viewsA: PHP mkdir vs chmod
The mode is modified by its current user mask (umask), that is 022 in this case You inform the initial permission at mkdir but the information of umask to obtain the royal permission : 0777 - 0022…
-
18
votes5
answers1273
viewsA: Why Nan Nan == 0?
Concept: What is Nan Nan is a property of the global object. Nan’s initial value is Not-A-Number, the same value of Number.NaN. In browsers, Nan is a read only and not configurable property. Even…
javascriptanswered Don't Panic 4,006 -
3
votes1
answer182
viewsQ: Which Ides have Hack language support?
Does anyone know of any IDE for the hack language? Is there any plugin available for Ides like Eclipse, Netbeans, etc.? I am currently creating the code in Phpstorm but it does not understand most…
-
3
votes1
answer123
viewsA: Which type of PDO::FETCH_* is the fastest?
There is a script that does a speed test: Benchmark Script. I suggest you run this benchmark on your own server, however, this is a typical result in my configuration, for single-line results:…
-
0
votes1
answer37
viewsA: Failure on the hhvm server
Solution: At the root of your project’s directory, create an empty file with the name .hhconfig. Type checker uses this file to know which directory tree to check type without needing to specify…
-
0
votes1
answer37
viewsQ: Failure on the hhvm server
I created a school project to use the language Hack. I performed the installation of the hhvm as documented sudo apt-get install hhvm I started the server hhvm -m server -p 8080 And I created a file…
-
0
votes1
answer104
viewsA: Select Feed with another Select Mysql
There are several ways you can do it. The most practical is to use the $.each jquery Taking as return the example JSON: [{"id":"1", "value":"Example 1"},{"id":"2","value":"Example 2"}]…
-
0
votes2
answers1193
viewsA: Avoid notice in PHP display_error
The mistake "siteindex" not defined happens because you are not checking whether this variable was previously declared. With this PHP does not recognize the contents of this variable. What you can…
phpanswered Don't Panic 4,006 -
1
votes3
answers2839
viewsA: What is the solution for asynchronous PHP processes?
The library pthreads is a great option for using parallel process. How to install: Before you start, you must have Thread Safety in PHP enabled. Thread Safety means that binary can work in a…
-
6
votes2
answers301
viewsA: Direct subtraction in a view query?
Using Alias in SQL. SELECT (NFValIcmsSubs - NFValFCP) as NFValIcmsSubs FROM TABELA
sqlanswered Don't Panic 4,006 -
7
votes1
answer4407
viewsQ: What is the difference between Traffic Light and Monitor?
I have a doubt in the concept of these two structures. What would be the difference between them? Which is faster? And which is easier to use? Could you give me a basic example of each?…
-
1
votes1
answer288
viewsA: How to make a change to "Cascade" using oracle
To do this automatically there is no way. You must create a database that receives the new PK and automatically update in all tables referenced. This trial shall be: Create a new parent line with…
-
2
votes1
answer44
viewsA: Montart loop with variables for PDO exclusion
Well I made the code based on your. I left it documented in the code. <?php if(isset($_POST['check'])){ //Verifica se tem algum usuário selecionado $checked = $_POST['check'];//Posicoes…
-
4
votes1
answer45
viewsA: Is there a function for arrays in Java like PHP Join()?
Using Java 8 you can do this very neatly and easily with: String.join(delimiter, elements); This works in three ways: 1) Specifying the elements directly String joined1 = String.join(",", "a", "b",…
-
1
votes1
answer653
viewsA: htaccess Mobile redirection
Follow an htaccess script for mobile redirection. RewriteEngine on RewriteBase / # Checka se esta é uma string de consulta noredirect RewriteCond %{QUERY_STRING} (^|&)m=0(&|$) # Seta o…
-
1
votes1
answer111
viewsA: Gif loading when searching
You can use the methods search to start loading, and select to finish it from the autocomplete. $("#searchFirstTransactionStateInfo_searchPartnerId").autocomplete({ search: function( event, ui ) {…
-
0
votes3
answers401
viewsA: Identify a <optgroup> with jQuery
To pick which group the selected value belongs to, you can use the function .closest() of Jquery, and you can compare via the description of label. Example: <select name="testSelect">…
-
1
votes1
answer1024
viewsA: Certificate error when sending an email
In the class.phpmailer.php file on line 275 change from: public $SMTPOptions = array(); for public $SMTPOptions = array('ssl'=> array('verify_peer'=>false, 'verify_peer_name' => false,…
-
3
votes3
answers2535
viewsA: Script para enviar email
You can use the Phpmailer to perform this task. HTML <form method="post" action="#" id="form"> <div class="field half first"> <label for="name">Nome</label> <input…
-
1
votes1
answer123
viewsQ: call . keypress(e) only if . change(e) is OK
Hello, I need some help. I have a field input[type=text] that I have triggers on it, a trigger .change and a .keypress . However, in the .change i call a field validation function and .keypress i…
jqueryasked Don't Panic 4,006 -
8
votes3
answers761
viewsQ: Abort AJAX request
I have a question. I need to cancel an AJAX request on the client side and the server side. On the client side I use the abort() var requisicao = $.ajax({ url : 'xyz.php' }); if(requisicao…
-
2
votes1
answer424
viewsA: Tag Form closes alone
Adjust your html to the correct form of the html structure. And then try using htmlspecialchars $FormUserCad = '<div class="Ctn_Form_Cad"> <form action="oi.php" method="post">…
-
1
votes3
answers50
viewsA: Apache2 error on linux
In the mysql_connect you are passing a password to connect to the bank at localhost. However the user root no password. Then just remove the password you are going through and try again.…
-
2
votes2
answers73
viewsA: PHP redirection
Check if you have the module mod_geoip2 (Geoip Extension) installed on your server. Then change your . htaccess as below: GeoIPEnable On GeoIPDBFile /path/to/GeoIP.dat # Start Redirecting countries…
-
1
votes2
answers438
viewsA: PHP global array as time table
You can use a . txt file to save your data. $nome_arquivo = 'arquivo_temp_'.time().'.txt'; $_SESSION['arquivo_temp'] = $nome_arquivo; $fp = fopen($nome_arquivo,'w+'); fwrite($fp,$dados_a_armazenar);…
-
2
votes2
answers6624
viewsA: Using PING with PHP
Try it this way: exec('ping 127.0.0.1', $saida, $retorno); if (count($saida)) { print 'A Máquina está online e os dados do PING foram gravados em $saida. :)'; } else { print 'A Máquina NÃO está…