Posts by Guilherme Nascimento • 98,651 points
2,383 posts
-
1
votes1
answer303
viewsA: No notification appears in Chrome only in firefox
Missing one else if it is not allowed the use of this by the user, Aliais all its code this nonsense, has an event that runs after the DOMContentLoaded and another that runs deliberately when the…
-
1
votes1
answer126
viewsA: Float ignores the margin
The float causes the parent element not to adapt the height to the content, to solve this it is necessary to use clear: both with an element at the end or with a pseudo-element, an example: .content…
-
3
votes1
answer31
viewsA: Get domain name dynamically in htaccess file
Just remove the domain, the rewriterule will only need if you really want to change domino, the same goes for the ErrorDocument, in case just do this: RewriteCond %{HTTP_HOST} !^www\. RewriteRule…
htaccessanswered Guilherme Nascimento 98,651 -
3
votes1
answer31
viewsA: Button CSS on tablet does not look like shown on PC and Responsive Design Mode
It’s probably Webkit (Safari or native to Android), just use the property: #buttonhide2 { -webkit-appearance: none; -moz-appearance: none; appearance: none; }…
-
1
votes1
answer2576
viewsA: Bad Request in Post idHTTP with Delphi
I don’t know much about Delphi (I only had a brief experience with Object Pascal, which maybe today should be a little different from both), but it seems to me that this:…
-
2
votes1
answer327
viewsA: How to preserve an iframe cache?
Do you want CACHE even, or do you want to "keep the frame" with the content already loaded? I say this because CACHE is not solved in front-end., is resolved in the HTTP response next to the browser…
-
0
votes1
answer55
viewsA: How to handle this array code with php?
Theoretically this would be: $recuperado = $var["*original"]["transaction_id"]; var_dump($recuperado); But as your array shows NULL: ["transaction_id"]=> NULL Then the value is null. The asterisk…
-
5
votes2
answers236
viewsA: The preg_replace is cutting letters with accent
Your range in the [...] this one of a-z and 0-9, a until z only consider the letters of the "alphabet" and not its variations, working with accents in Urls Slug from my point of view is a bad idea,…
-
4
votes2
answers495
viewsA: How do I read an XML with HTML markup
Use a series of foreach for something like this is to take an immense turn in something that can be solved in a simple way, if use DOMDocument::saveHTML combined with…
-
8
votes1
answer720
viewsQ: How to customize emojis (Unicode) of a page?
On Windows operating system while using emojis the source used by browsers usually is the Segoe UI Emoji Note: in Firefox it has its own "emoji system", I believe it uses the Twemoji Mozilla: -…
-
1
votes1
answer780
viewsA: Error: "Unknown: failed to open stream: No such file or directory in Unknown on line 0"
Probably 2 things are possible: The accent on the ê in Feira_de_Ciências You are writing things inside an administrator privilege folder Programs and Files (x86)…
phpanswered Guilherme Nascimento 98,651 -
1
votes1
answer88
viewsA: Simple_html_dom what is the difference between the two Urls?
I debugged the script and noticed that URL1 passes the limit of MAX_FILE_SIZE, which is currently 600000, see simple_html_dom.php line 66: define('MAX_FILE_SIZE', 600000); Then you can increase this…
-
6
votes1
answer143
viewsA: strpos() not behaving as it should
First we validate Urls so the chance of failing is very high, following problem points: strpos only case-sensitive czech strpos "can" (depends on how you use) fail depending on the case strpos will…
phpanswered Guilherme Nascimento 98,651 -
6
votes2
answers505
viewsQ: How to limit the interval between two dates in the <input type="Month">?
Although there are 3 questions I believe that all apply to the same case about the "range/range" It is possible to limit the "range" between two dates in the <input type="month">? If yes,…
-
2
votes1
answer88
viewsA: Images compressed with Imagick fail Pagespeed test
The original image is 628x480, meaning the image speaks to compression and "resizing": The compaction and resizing of https://www.infochat.com.br/...1809042141221536108082.0203631465967.jpg could…
-
2
votes2
answers45
viewsA: How to use data from another site via LINK/ID
No need to download a whole lib as http://simplehtmldom.sourceforge.net/ for something so simple. Just use what you already have native: $dom = new DOMDocument;…
-
6
votes2
answers208
viewsA: PHP - associative array: check the amount of elements within a value (which has an array) of a key
This is not an array within another: books => "book1", "book2" For it to be an array it would have to be like this (ps: put quotes on keys as well): $array = array( "user" => "user1", "name"…
-
1
votes3
answers952
viewsA: Change color of the Sidemenu icon
I believe that in the global SCSS should do something like: ion-header { ion-icon { color: #fc0; /*laranja*/ } } In Ionic 1 the file to be edited is the ./scss/ionic.app.scss and in ionic3 is the…
ionicanswered Guilherme Nascimento 98,651 -
3
votes2
answers74
viewsA: Hello, I have an unwanted horizontal margin between two Divs, I would like to know where the error is
This is because the element <P> has a native margin, this margin leaks out of the <div>, This is called margin collapse In accordance with W3 Collapsing Margins: The adjacent margins of…
-
1
votes1
answer482
viewsA: Does Npm run without Node installed?
There are many possibilities for this, the most probable from my point of view is that, you installed the Node.js, that is to say, it already has it installed, but it is not GLOBAL (in the…
-
1
votes1
answer50
viewsA: MVC Codeigniter
This is wrong: $this->confirma_model->confirma('$h'); Single quotes (apostrophes) do not understand PHP variables, just pass directly: $this->confirma_model->confirma($h); For presently…
-
1
votes1
answer79
viewsA: PHP and C#communication error
I’m not sure, but I believe it’s for lack of defining the Content-Type of the request, thus: using System.Net; using System.Collections.Specialized; string valor = "1"; string urlAddress =…
-
6
votes1
answer142
viewsQ: How does "umask" work in PHP and when should we use it or not?
I was reading the documentation of umask and I came across this: When PHP is being used as a server module, the umask is Restored when each request is finished. Translating: When PHP is being used…
-
2
votes3
answers163
viewsA: How to draw a ribbon(gift loop or label) on a div?
For the record, this kind of effect is usually called "Ribbon", as it resembles a gift tie, box or similar use It will not be enough to just rotate a DIV, we will have to "trim it", IE, we will have…
-
1
votes2
answers331
viewsA: PHP - Curitiba WS semrpe returns 403
I’m not sure, but I think this is wrong: $headers = [ 'POST /Iss.NfseWebService/nfsews.asmx HTTP/1.1', <---- ISTO There is no reason to send the "VERB" in headers, the Url itself already…
-
1
votes1
answer42
viewsA: mysqli num_rows expects Parameter 1 to be mysqli_result
You have to execute the store_result and preferably if you’re going to use OOP then use everything like this, there’s no reason why in the mysqli API to mix procedural with OOP (I’m only talking…
-
1
votes1
answer585
viewsA: Accent error in Python 2.7
Apparently in cmd with Python2.7 just use the u"...", thus: print u"á é í" Note that the document should also be saved in utf-8 without BOM Using Notepad++: Using Sublime Text: I tested in the…
-
3
votes2
answers229
viewsA: Read XML with equal PHP nodes
The first element (called root element) is the <Listings>, that is, the object in $xml already is the <Listings>, so there’s no point in trying to catch $xml->Listings, for the $xml…
-
3
votes3
answers887
viewsA: How to print a constant in the middle of a string, without concatenating?
I don’t think it’s possible, at least as far as I read from the documentation: http://php.net/manual/en/language.types.string.php#language.types.string.syntax.double However doing some tests I…
-
1
votes2
answers43
viewsA: Element selector: Select above the tenth element
Via selector I’m almost certain it’s impossible, however there is the method .slice() that is proper to "filter" taking only what you want, example: $(function () { var els = $('.img').slice(9);…
jqueryanswered Guilherme Nascimento 98,651 -
2
votes1
answer335
viewsA: Open Access file on linux
I think the message makes it very clear that it is "file not found": SQLSTATE[01000] Sqldriverconnect: 0 [unixODBC][Driver Manager]Can’t open lib 'Microsoft Access Driver (*.mdb)' : file not found…
-
0
votes2
answers118
viewsA: Leave left and right side with height 100% independent of the content size
How did I respond in /a/325574/3635 But to solve the problem of overflow it would be enough to create an element "grandfather", thus: .avo { overflow: auto; height: 400px; /*altura fixa*/ } .pai {…
-
2
votes4
answers2040
viewsA: Problem with height of Ivs that do not accompany each other’s content
A suggestion with flex would be to use like this: .pai { display: -ms-flex; display: -webkit-flex; display: flex; } .pai > .coluna-1, .pai > .coluna-2 { width: 50%; } .pai > .coluna-1 {…
-
1
votes1
answer207
viewsA: Error loading XML into Laravel
As far as I’m concerned $request->file() (returns Illuminate\Http\UploadedFile) Laravel does not return a string, even if you look at the documentation you will notice that there is no __toString…
-
1
votes1
answer1701
viewsA: HTTP Basic Authentication with AJAX and php
As far as I know setRequestHeader expects strings and not functions, this is wrong: function (username, password) { var tok = user + ':' + password; var hash = Base64.encode(tok); return 'Basic ' +…
-
2
votes1
answer735
viewsA: Selenium Webdriver error accentuation
The problem is not in Selenium, probably the problem is in the site you are trying to encode or decode to utf8, simply there may be invalid characters, which probably in the page you try to access…
-
4
votes2
answers621
viewsA: Removing unnecessary question mark from a String
Can use regex thus: import re print(re.sub('\\?+', '?', "Olá????")) The \?+ search for question marks in sequence and exchange for '?' Note: The \\ in front of the ? serves to escape the ? in regex…
-
2
votes1
answer41
viewsA: Function within function - PHP
It was supposed to be working, if you say the error that occurs maybe you can point out where it was, anyway do not really know why you did it, you could just create another private method and…
phpanswered Guilherme Nascimento 98,651 -
3
votes2
answers168
viewsA: How to make a single meta Description and meta Keywords in a PHP document that only has 1 header for all pages
Just take what you already have, read your gera_titulos this one more for a get_titulos, I mean, it would be more interesting if the function itself generated everything, even the HTML, and honestly…
-
2
votes1
answer79
viewsA: I migrated my http site to https and lost Facebook comments
In accordance with the facebook documentation, can’t move likes, shares, or comments directly to the new URL, but you can use the old URL as the canonical source for the number of likes or shares in…
-
2
votes2
answers206
viewsA: Sum int with date - PHP
I know that so far the question has probably been solved, I came to comment on the lack of space: You missed a spot here: "+'$ultima_frequencia'days" wouldn’t be like this "+'$ultima_frequencia'…
-
3
votes3
answers69
viewsA: standard argument in javascript function
The aforementioned Default parameter (default parameter/Default parameter) is a good way out: function foo(bar = 1) { console.log(bar); } foo(); foo('oi'); Yet what no one has yet quoted is that…
javascriptanswered Guilherme Nascimento 98,651 -
1
votes3
answers4410
viewsA: How to remove whitespace from a string with Regex in PHP?
The question this vague, can not know if the input will be just an image or can be an HTML with multiple images, if it is the second case so initially you should preferably manipulate the DOM, for…
-
0
votes2
answers25
viewsA: Listing files from a directory that start with a given text
Can use glob(), being like this: $ano = 2018; $mes = 10; $pasta = 'foo/bar/downloads'; foreach (glob($pasta . '/' . $ano . '_' . $mes . '_*.zip') as $arquivo) { echo 'Arquivo:', $arquivo,…
-
2
votes1
answer357
viewsA: Creating a directory with mkdir php
Change: \..\assets For: /../assets Allies don’t even need to use: define('DP', DIRECTORY_SEPARATOR); Both Windows and Linux accept /, then do it like this: // arquivo config.php…
phpanswered Guilherme Nascimento 98,651 -
1
votes1
answer81
viewsA: Php frameworks comparison software
If you have Apache installed on your machine, then you can use the line command ab (Apachebench), Assuming it is in folders, example usage (Readable): ab -n 1000 -c 10 http://localhost/laravel/…
-
1
votes1
answer121
viewsA: Errors using PREG_MATCH
Your proposed validation "method" is quite ineffective. Understand what time texts have accents and certain characters and another time not, the way you did the preg_match obliges to have all…
phpanswered Guilherme Nascimento 98,651 -
0
votes2
answers528
viewsA: Location.Reload(true) does not work
I had this same problem, I tell you that the best way would be to change the image Urls, as uses classic Asp (vbscript) could do so: Function UltimaModificacao(arquivo) dim fs, f set fs =…
-
2
votes3
answers137
viewsA: Text abbreviation <td> does not work
Use overflow:ellipsis; and white-space:nowrap; with the selector td {} or in the element <td style=""> It won’t work because the Tds and Ths behave differently than type elements block and…
-
1
votes1
answer2232
viewsA: Error in mail() - Must Issue the STARTTLS command first
This is really wrong: imap.gmail.com Imap is to receive and not to send emails, they are completely different protocols, probably the correct one: SMTP="ssl://smtp.gmail.com"; smtp_port=465 As…