Posts by Guilherme Nascimento • 98,651 points
2,383 posts
-
3
votes1
answer56
viewsA: Script to preview not working
The reader.readAsDataURL this inside onload and as onload is never executed the reader.readAsDataURL (practically a paradox!? ), or thing is that the this[0] wrong, Event (onchange) only returns the…
-
1
votes2
answers301
viewsA: Consultation in bank with accentuation in the table
Use the inverted accent: SELECT * FROM Campanhas ORDER BY `Código` ASC I personally find it a bad idea to use accents in column names, this will always have a chance to cause some problem at the…
-
4
votes1
answer607
viewsA: Bootstrap code does not work
Open the console and you will see the clear error of the problem: Uncaught Error: Bootstrap’s Javascript requires jQuery Bootstrap Apis use jQuery if you do not add jquery "before" it won’t work…
-
6
votes2
answers322
viewsA: What is the HTTP verb I use for logout?
I would say that an interesting method for use would be the DELETE (based on an API I know from IBM), because when you do the authentication you create an Access Token and when you will disconnect…
-
2
votes1
answer444
viewsA: Error 404 in a php file
The addresses are incorrect: header("Location:index.php login=1"); ... header("Location:index.php login=2"); ... header("Location:index.php login=3"); ... header("Location:index.php login=4");…
-
1
votes1
answer168
viewsA: How to make google search find my site
The problem is not in the Google Webmasters nor in the Google Analytics, when testing a service that accesses other websites: http://www.webconfs.com/http-header-check.php with its URL got the…
-
0
votes3
answers1138
viewsA: Take a PHP variable using AJAX
I believe that all this is just one confusion on your part. If request.php is a file and your jQuery and scripts are on another page, because if they were all in the same file, the return of the…
-
1
votes1
answer384
viewsA: How to return the sum of values of a limit column in Mysqli
The AS has to go in the sum (weight) and not in the "origin" of from, see that by its own image the column name came as sum (weight) instead of subt: The AS used after the FROM would be to name the…
-
2
votes1
answer629
viewsA: Python 2.7: Program does not run
I have exactly Python 2.7 installed on my machine, the dots and comma did not affect the functioning, the only mistake I ever made was: No module named gtts This is because I didn’t have the module…
pythonanswered Guilherme Nascimento 98,651 -
3
votes1
answer1550
viewsA: Error 405 Method Not Allowed
There is no way to deduce the problem, this is the server you are trying to access that is emitting a lock, for example when a server responds with: 405 Method Not Allowed He means he doesn’t allow…
-
2
votes1
answer833
viewsA: Using browser cache does not work
The resources that present the problem are external: http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js (60 minutos) https://pagead2.googlesyndication.com/pagead/osd.js?137237720 (60…
-
1
votes1
answer535
viewsA: Favicon . ico vs hosting
First I will indicate you a service, however the reason for the answer is to explain something about the favicons which may be useful to you. "Hosting" (Host) favicons Researching I found this…
-
4
votes1
answer150
viewsA: How to decode this json in php?
Suffice remove the option CURLOPT_HEADER that returns the headers: curl_setopt($ch, CURLOPT_HEADER, 1); Or set 0 curl_setopt($ch, CURLOPT_HEADER, 0); And then take the answer and use the…
-
2
votes3
answers1716
viewsA: Embed Mute Youtube Video
There are 2 problems in your code: First you’re adding the <iframe> manually and who has to add this is the API There’s a script error, there’s one left } in the end: var tag =…
youtubeanswered Guilherme Nascimento 98,651 -
3
votes1
answer931
viewsA: SMTP Error: The following Recipients failed from Hotmail to enterprise
Many lodgings block "make up" the sender, this to prevent SPAMMERS make use of this practice, so there will be no way to connect to a specific SMTP and change the to:, the server will "deny" By the…
-
6
votes1
answer14830
viewsA: Error 503 Backend fetch failed
Let’s get started, the Varnish is a "accelerator", it’s a page caching system, it’s a reverse proxy, that is the requests go through it and the copies are stored in memory. Generally this error…
-
0
votes4
answers1576
viewsA: Pass value to another page
To pick up the PHP page you can use it like this (since the name= mute): <?php //Verifica os valores que foram enviados if (!empty($_POST['basic']) { $plano = 'basico'; } else if…
phpanswered Guilherme Nascimento 98,651 -
0
votes2
answers160
viewsA: php array converted to json does not maintain order in mysql
It doesn’t matter the order that is recorded, at the time of decoding (when it does the SELECT and then uses json_decode) is likely that order be lost again, no need to worry about the "rescue"…
-
1
votes1
answer321
viewsA: PHP within css is possible?
There is no way to perform a function you can catch the return of function: function funcaoDeExemplo() { return 'algo aqui.jpg'; } function my_f(){ echo '<style type="text/css"> h1…
wordpressanswered Guilherme Nascimento 98,651 -
4
votes1
answer753
viewsA: Multiple requests with $.ajax, synchronously
Synchronous Ajax (Sjax) is being discontinued by browsers (not by jQuery, this is "consequence") and will probably be removed, what you need is to learn to use callback, Promise is optional. In…
-
3
votes3
answers106
viewsA: Is there any way to interpret (parser) from a string Connection to an object?
One suggestion is to use Regex with and add the results in a dictionary, regex would look like this: ([^\\s].*?)=([^;]+?)(;|$) ^ ^ ^ ^ | | | | | | | | | | | +---- Verifica se é o final da string | |…
-
1
votes2
answers1589
viewsA: How to apply the change in placeholder color only in some text-box
Use class=, thus: input{ display:block; margin-bottom:5px; width:200px; } .especifico::-webkit-input-placeholder { /* WebKit, Blink, Edge */ color: red; } .especifico:-moz-placeholder { /* Mozilla…
cssanswered Guilherme Nascimento 98,651 -
1
votes3
answers2731
viewsA: Problems with Pip install to install Virtualenvwrapper on Windows
Like I said, there’s no point in people kicking answers, this error is generic, can be anything and usually is no problem with the package (unless the package does not exist), this is not solved by…
-
1
votes2
answers332
viewsA: Document.getElementById does not work on Firefox and Edge
Generally id="" and name="" should be equal, some behaviors (at least in the old ones) caused problems, still yes recommend putting within a window.onload or inside something like DOMContentloaded,…
javascriptanswered Guilherme Nascimento 98,651 -
1
votes2
answers324
viewsA: Laravel 5.4: Error creating table - Unexpected '(', expecting Identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$'
This feels wrong: $table->foreign('id_convenio')->references('id')->('convenios')->onDelete('cascade');…
-
9
votes2
answers532
viewsQ: What is the first programming language or technology used for dynamic pages?
I searched a lot on the subject, I read about the front-end story, like the beginning of the Javascript® (Mozilla/Netscape), but I was really curious about the back-end and I really can’t find…
httpasked Guilherme Nascimento 98,651 -
3
votes1
answer785
viewsA: Consult bank on another server
If the mysql server does not have an "input" firewall it can access normally with mysqli or PDO, just point to the IP of the "mysql server" or its host address (if). Example with mysqli: <?php…
-
0
votes2
answers63
viewsA: Help with PHP in data capture.
Can use regex with preg_match_all and read line by line, the regex should look like this (more or less, can adjust): \s+(\d{1,3})\s[^\n]+\n ^ ^ ^ ^ ^ | | | | | | | | | | | | | | +--- Procura a…
-
5
votes1
answer527
viewsA: Are all HTTP methods/verbs accepted by APACHE and NGINX?
They are, even by the IIS, except that your HTTP server is outdated (be an older version), depending on the type of server you use it will issue an HTTP error by chance invent a method that does not…
-
4
votes2
answers1423
viewsA: How to force download local information in the browser?
For reasons of compatibility, Internet Explorer use the navigator.msSaveBlob, another important point is to note that some browsers do not support the download attribute in some situations, such as…
-
6
votes4
answers629
viewsA: How to make a Popup that only records information on the cookie or anything and displays only once on the website homepage
In the back end you can use session_start(); and define a variable, something like: accept php. <?php session_start(); $_SESSION['aceito'] = 1; If it’s Codeigniter 3:…
-
7
votes1
answer2799
viewsA: Special characters () appear in front of the XML tag
The characters  indicate that the document was saved with "UTF-8 with GOOD", when you were supposed to save "UNWELL". How to resolve in the application Note: in the examples I used…
-
3
votes2
answers124
viewsA: How to get Mysql password for connection using getenv()
There’s no point in using putenv, If you’re gonna do this, you might as well throw it all in one array or object, something like: config.php the return is recognized in the include <?php return…
phpanswered Guilherme Nascimento 98,651 -
3
votes1
answer1040
viewsA: PHP Error Parse error: syntax error, Unexpected ';', expecting ')' when making an array foreach
This syntax is totally wrong: foreach($_POST['valor'] as $cod=>$val; $_POST['linha'] as $linha){ As the doc syntax is only this: foreach (array_expression as $key => $value) statement You…
-
1
votes1
answer2106
viewsA: How to make Python program run in 32 and 64 bits
If you create the 32bit executable for Windows it will run on windows32bit and windows64bit. If compiling for Windows 64bits will only run on 64bits If it is on Linux then you have to create an…
-
1
votes2
answers70
viewsA: Post var javascript in PHP
The $.ajax jQuery needs to have Success or done functions set for it to be triggered: $(document).ready(function(){ $.getJSON("//freegeoip.net/json/", function(data) { var country =…
-
2
votes1
answer535
viewsA: How to read yaml with php
Installing readers of Yml If your server allows you to install something you can install/compile the http://pyyaml.org/wiki/LibYAML, download http://pyyaml.org/download/libyaml/yaml-0.1.7.tar.gz and…
-
1
votes3
answers139
viewsA: Get the last "word" of a PATH with different URL formats
I couldn’t find a simple way to do it, especially with variations of input URL types, what I got was this: function returnLastWord($var){ //Remove o protocolo $var =…
phpanswered Guilherme Nascimento 98,651 -
1
votes2
answers1582
viewsA: I need to connect to an SSH FTP server in PHP
First you have to be sure what you want to access SSH or SFTP, are relatively different things, does not work with ftp_connect, use https://secure.php.net/manual/en/function.ssh2-sftp.php if it is…
-
2
votes1
answer89
viewsA: Numeric values in php session variable
In session you can pass almost everything, ie you can add: session_start(); $_SESSION['int'] = 1; $_SESSION['float'] = 0.1; $_SESSION['string'] = 'str'; $_SESSION['object'] = new FooBar; Of course…
phpanswered Guilherme Nascimento 98,651 -
1
votes1
answer517
viewsA: Geolocation does not work Google Chrome
As the log informs: [Deprecation] getCurrentPosition() and watchPosition() no longer work on insecure Origins. To use this Feature, you should consider switching your application to a Secure origin,…
javascriptanswered Guilherme Nascimento 98,651 -
5
votes3
answers247
viewsA: Concatenation or data sequencing: which performs best?
This is micro-optimization, does not affect at all times, there are things we do in our codes beyond this, like create huge classes or include classes and functions without need that these yes may…
-
2
votes8
answers955
viewsA: split/regex only on the first vertical bar "|"
You may also wish to do so using .shift to pick up the first item and .join to "restore" the remnant as string again: var str = "João|||23anos|"; //Divide a string var results = str.split('|');…
-
3
votes4
answers1252
viewsA: What are ASAX extensions for?
What is the purpose of this asax extension? I believe it’s only used for the archive Global.asax and this file as stated in this reply from Soen is intended to write a code that "responds" to the…
-
1
votes1
answer227
viewsA: I am not finding the error syntax error, Unexpected end of file in the browser point at line 88
In your case it looks like the places you used <? instead of <?php, this because the short_tag must be inactive, out here missing the apostrophes/quotes in $_COOKIE[usuario] and…
phpanswered Guilherme Nascimento 98,651 -
2
votes1
answer375
viewsA: PHP Fatal error: Call to Undefined Function phperror_reporting()
Apparently PHP is not recognizing the line break and is merging <?php error_reporting in: <?phperror_reporting I recommend that you delete the line break and try to add it again, also check…
phpanswered Guilherme Nascimento 98,651 -
2
votes1
answer34
viewsA: SSL identification by Google
For Google, as well as other search engines to detect the change, it is necessary to use the Permanent redirection, which in this case is the 301 code for HTTP, it is possible to apply it via…
-
4
votes3
answers7189
viewsA: "import" header and footer on all pages
It is possible to do yes with Ajax, even without jQuery, After all importing a relatively large lib just to do something simple seems a bit of an exaggeration, unless you already use jQuery for…
-
3
votes1
answer361
viewsA: How to give include a php file without conflicting with the css of the two files?
Your Login has an entire HTML, including DOCTYPE, include directly in index.php will not work, see that you added include inside <body>, ie after included the result will be "catastrophic" for…
-
13
votes3
answers25286
viewsA: Change image color with CSS
There are 3 ways (or 4~5): CSS filters CSS has the property filter supported by all modern browsers, see kennel, however Edge does not support the value with url() and Opera mini and Internet…
cssanswered Guilherme Nascimento 98,651