Posts by Guilherme Nascimento • 98,651 points
2,383 posts
-
1
votes2
answers383
viewsA: http redirect to https via . htaccess - Godaddy
First remove the <IfModule mod_rewrite.c> and the </IfModule> and see if error 500 occurs, if it occurs it is because your server does not support the module, then solicte to the support…
htaccessanswered Guilherme Nascimento 98,651 -
2
votes2
answers228
viewsA: How to run a callback when a CSS animation is closed?
The event to be used is the transitionend, the let square = document.querySelector("#square"); square.addEventListener('transitionend', function (event) { console.log("Terminou:",…
-
0
votes1
answer210
viewsA: Set site links - Google Search
Unable to change the order of sitelinks, it fits according to the user’s needs, usually by directing the most searched or most searched links previously by the user, which can vary greatly as the…
-
9
votes2
answers108
viewsA: What does the syntax "14px/1" mean in font size declaration?
This is a kind of shortcut to apply the line-height, which is often important for the source chosen depending on the type of source, so do this: .test { font: 14px/1 Arial; } <div…
css3answered Guilherme Nascimento 98,651 -
6
votes2
answers5911
viewsA: What is rel="Preload"?
Of documentation The value of preload in the attribute rel= of the element <link> allows you to write declarative search requests on your <head>, specifying features that your pages will…
-
3
votes1
answer4899
viewsA: Phpmailer Could not connect to SMTP host
Gate 25 is not a secure port, not even used in TLS: $mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted $mail->Port = 25; // TCP port to connect to And as per this link…
-
1
votes2
answers893
viewsA: Friendly URL does not work with https
In his regex you did so: ^news/([a-zA-Z0-9_-]+)$ But in your URL there is a bar at the end https://www.dominio.com.br/news/alguma-noticia-lala/ The regex should be like this…
phpanswered Guilherme Nascimento 98,651 -
4
votes2
answers821
viewsA: Sessions of different systems on the same server
First let me explain the main, the sessions are global, if they are on the same server and domain then they can be accessed by different applications. However it is possible to limit the folders…
-
0
votes1
answer544
viewsA: Kivy does not run error in text editor
According to the answer https://stackoverflow.com/a/21787954/1518921 still need to install the SDL TTF library, to install you can download the pygame that already contains it using the PIP command:…
-
0
votes1
answer1286
viewsA: Error installing "PHP Extension mcrypt must be Loaded..."
The module mcrypt was already obsolete since PHP 5.5 (at least several of its functions) and was removed once and for all in PHP7.2, according to the link http://php.net/manual/en/intro.mcrypt.php:…
-
4
votes1
answer229
viewsA: What does this mean: ". append('<scr'+'ipt .. "?
This is used when the script is placed directly inside the HTML. For example, doing this: <script> $("body").append("<script src='url_do_script.js'></script>"); </script> The…
javascriptanswered Guilherme Nascimento 98,651 -
5
votes1
answer4711
viewsA: How to use cookies in javascript
How did I respond in Save cookie and read its value when accessing the website to check if expired You must use document.cookie to create cookies as needed and the script must run on a server (like…
-
2
votes1
answer162
viewsA: PHP 7.1 How to disable unused BD resources?
It is not necessary to remove the commands, just disable the add-ons you will not use, I made a brief explanation about this at: Remove extensions that I don’t use would impact PHP page execution…
phpanswered Guilherme Nascimento 98,651 -
4
votes2
answers77
viewsA: Help for Regular Expression construction
The regular expression would be: \bTeam\(\\+\'([\s\S]+?)\\+\'\) The ([\s\S]+?) is who generates group 1 and gets the result only from within the Team(\\'...'\\), already the \b at the beginning is a…
regexanswered Guilherme Nascimento 98,651 -
18
votes3
answers2102
viewsA: What is the difference between function and array assignment?
Both are not equivalent, array_push adds an item, and the $meu_array[0] = 50; would edit an existing item or create an index at zero. The equivalent of array_push is the [] without the index, so:…
-
1
votes1
answer1115
viewsA: Error in setting Javascript property
Use DOMContentLoaded, to check when the document is loaded, like this: document.addEventListener("DOMContentLoaded", function () { var textarea = document.getElementById('example');…
javascriptanswered Guilherme Nascimento 98,651 -
5
votes1
answer229
viewsA: Speech Recognition does not recognize special characters
There are 2 errors, first order: document.getElementById("textarea").innerHTML = resultado; resultado.replace("arroba", "@"); Are you doing the replace then, it has to be before, something else you…
-
1
votes1
answer699
viewsA: How to send all files from a folder via FTP in PHP?
Use http://php.net/manual/en/book.ftp.php An example of uploading: <?php $ftp_server = '<endereço do ftp>'; $ftp_user_name = '<usuario>'; $ftp_user_pass = '<senha>'; //Arquivo…
-
1
votes1
answer805
viewsA: Change favicon in a Wamp project
This is because the browser itself tries to search for the image favicon.ico in the root folder of your site or localhost. This usually occurs in Safari and Chrome (in other browsers I didn’t notice…
-
0
votes1
answer79
viewsA: HTML word processor component
The term used to refer to this type of editor is WYSIWYG, acronym of the English expression "What You See Is What You Get", refers to something like "What you see is what you get". There are several…
-
0
votes1
answer150
viewsA: How to check the mime_type of a file after extracting with Ziparchive?
From php5.3+ you can use finfo, in older versions use mime_content_type (although it is rare to use older than PHP5.3), a retrocompatible function would be so: function mimeType($file) { $mimetype =…
phpanswered Guilherme Nascimento 98,651 -
8
votes2
answers872
viewsA: How to prevent http auto-redirect to https?
According to the https://ma.ttias.be/chrome-force-dev-domains-https-via-preloaded-hsts/ and the https://chromium-review.googlesource.com/c/chromium/src/+/669923 Since Chrome 63 (December 2017), will…
-
0
votes1
answer143
viewsA: Error while trying to access admin session in wordpress
Probably at the time of uploading via FTP wp-includes/class-wp-http-cookie.php stayed truncated (broken during upload), try to upload again only from class-wp-http-cookie.php to the folder…
wordpressanswered Guilherme Nascimento 98,651 -
3
votes1
answer46
viewsA: Problem when trying to query with PHP and MYSQL
The problem is you set twice the $this->conn: $this->conn = mysqli_connect($this->dbServer, $this->dbUser, $this->dbPassword) or die("Não foi possível estabelecer a conexão com a base…
-
1
votes1
answer330
viewsA: Error "'unistd. h': No such file or directory" with flex
The unistd.h does not exist in VS, it is usually necessary to add something like Cygwin or Gnuwin32, but the case is not quite the VS but the win_flex which is generating the files, so adding…
-
0
votes1
answer600
viewsA: Return every page via Curl
First make false the CURLOPT_HEADER, thus: CURLOPT_HEADER => true, 'Cause if you’re interested in headers you can pick up using curl_getinfo and maybe split the string (or detect when the first…
-
4
votes1
answer699
viewsQ: How do I create desktop notifications in Chrome extensions?
How to create Desktop notifications to use in web-extensions (Firefox, Chrome and etc) and also would like to know if there is any difference between Chrome, Opera and Firefox? Note: This is a…
-
6
votes1
answer699
viewsA: How do I create desktop notifications in Chrome extensions?
there is some difference between Chrome, Opera and Firefox? Currently there are some differences, but they are very specific, in this case I will quote only on the object chrome., in Firefox it is…
-
2
votes1
answer85
viewsA: Import Emails to a CRM
Use the functions of IMAP to get the message lists and can use the filter to detect the messages you want So to connect and get INBOX Uids use something like SSL: $mbox =…
emailanswered Guilherme Nascimento 98,651 -
1
votes1
answer28
viewsA: Wordpress: error in getResults
The $wpdb is NULL, which means it doesn’t exist, it wasn’t instantiated. So the wp-db.php contains only the class class wpdb {...} and nay contains the variable, to use you must include the header,…
-
1
votes1
answer1035
viewsA: How to make version control for JS file, CSS, HTML and etc
Asp.net-mvc In Asp.net-mvc you can try the solution of Soen’s reply public static class JavascriptExtension { public static MvcHtmlString IncludeVersionedJs(this HtmlHelper helper, string filename)…
-
2
votes1
answer1418
viewsA: INSTALL_FAILED_UPDATE_INCOMPATIBLE when trying to install apk
According to the series of responses in INSTALL_FAILED_UPDATE_INCOMPATIBLE when I Try to install Compiled . apk on device This message means that the application is already installed: Failure…
androidanswered Guilherme Nascimento 98,651 -
1
votes1
answer121
viewsA: How to create a Bitmap larger than 9999 pixels
According to this reply from Soen this is a GDI+ limitation imposed by Windows. "GDI" creates a memory-mapped file view for bitmap pixel data. This makes it very efficient, bitmaps tend to be large…
-
3
votes1
answer439
viewsA: What is the purpose of "ASP.Net" folders?
According to the documentation ASP.NET Web Site Layout App_browsers Contains browser settings (files .Browser) that ASP.NET uses to identify individual browsers and determine their capabilities. For…
-
1
votes2
answers57
viewsA: Input is not being checked via php
Matheus if you want via PHP do so: <?php $checkedisgift0 = Mage::getSingleton('core/session')->getInputMensagem() == 1 ? 'checked' : ''; ?> <input type="radio" id="isgift0" name="isgift"…
-
2
votes2
answers3792
viewsA: Onunload methods and onbeforeunload do not work
I’ve talked about this a few times: Function Onunload Javascript How to catch event that closes the browser? Jquery beforeunload is called when I click on link To summarize the answers, onunload and…
javascriptanswered Guilherme Nascimento 98,651 -
0
votes1
answer147
viewsA: PHP error in Atom editor
This means that the environment variables do not have the php path, to add first locate the folder where PHP is, assuming it is c:\php\php.exe copy only the c:\php, now do the following Right-click…
-
6
votes1
answer219
viewsQ: How to communicate tabs with an extension/add-on and store variables?
I want to be able to communicate tabs with an extension and go storing values in variables and share these values between tabs, how can I do this? Note: This is a tutorial question, read more on: I…
-
4
votes1
answer219
viewsA: How to communicate tabs with an extension/add-on and store variables?
Note: link with full and functional example to use/test: https://github.com/brcontainer/tutorial-add-on-stack-overflow For something to run you must use the background.js in its length and store the…
-
0
votes1
answer781
viewsA: I cannot extract data from a site or file . txt
You can use regular expression (regex), an example that would work with your . txt: #tvg-logo="(https?://[^\s]+)"(\s+|)group-title="\w+",([\s\S]+?)(https?://[^\s]+)# The explanation of the regex:…
-
4
votes3
answers1943
viewsA: Run Python and C# together
There is no way to import, both languages have no relation, now be want to trigger the execution of a Python through a script c# so the story is different, it is possible using System.Diagnostics;…
-
2
votes1
answer886
viewsA: How to format value in php?
The problem is you’re trying to add up after using the number_format, this makes no sense, you can only add what is number as strings that can do the cast or types int, float and bool See if doing…
phpanswered Guilherme Nascimento 98,651 -
0
votes2
answers190
viewsA: Open Fancybox on specific page
Can use parse_url to check the $_SERVER['REQUEST_URI'] Note 1: the mistake: "Uncaught Referenceerror: $ is not defined at (index):36 (Anonymous) @ (index):36" Indicates that jQuery has not been…
-
0
votes1
answer603
viewsA: Problem with footer
How did I respond in /a/205755/3635 you want that even if the page does not have enough content the footer appears in fixed at the end of the view-port, so that the spacing is not blank and if the…
-
2
votes2
answers1448
viewsA: How do I get a specific column from a . txt file with PHP
Just use the fgetcsv and to catch the first column use $data[0], it is also necessary to ignore the first row, which represents only the names of the columns, should look something like this: $row =…
-
2
votes1
answer53
viewsA: Google extension Chrome shows no default popup
First problem, to use "default_locale": "en_US" it is necessary to have the folder _locales, the second problem is that you did not close the title tag: <title>ODM Integration<title> The…
-
10
votes1
answer318
viewsQ: Is there any pythonic way to make "Slice" from an array?
In Javascript there is the Array.prototype.slice: var input = [ 'laranja', 'limão', 'melancia', 'mamão' ]; var aparada = input.slice(1, -1); console.log( aparada ); And in the PHP the array_slice:…
-
1
votes2
answers960
viewsA: Echo colored in php
Use str_split, explode or even iterate string will not work if it happens to be using Unicode (UTF-8 for example), as explained in: str_split does not work well in string containing UTF-8?…
-
1
votes2
answers630
viewsA: How can I create sequence and math series functions in python?
It’s nothing simple, there are different mathematical operations and types of equations, what you can do is split the string and evaluate everything in a loop, like for or while. There is nothing…
-
4
votes3
answers2240
viewsA: Python libraries to check if a number is prime
You can use libraries, but really I see no need to install an additional library for something "simple" and that seldom will be used in something serious. So the only library you’ll need is the…