Posts by Guilherme Nascimento • 98,651 points
2,383 posts
-
3
votes3
answers1214
viewsA: How to style the input type search "clean" icon?
Yes, the one x (cancel button) some if the mouse is not above the element and has no way to preserve it visible, I even found a article about customizing the cancel button, but if you read it…
-
1
votes3
answers47
viewsA: PHP-error but still sends what is requested
By guarantee add the mysqli_real_escape_string at the $key as it did in the $email, I believe the hash does not contain ', but it may be the flaw yet yes: $key = hash('sha256', uniqid("", true));…
-
5
votes3
answers2757
viewsA: Detect if a particular page opens within an IFRAME
Yes, you can do as I explained in Javascript - Difference between this and self, then inside the page that can possibly be called inside the iframe add this: if (window.top !== window.self) {…
-
1
votes1
answer113
viewsA: Form with $_files does not save the file in the site folders
Error must be occurring due to some quote with apostrophe ', this conflicts with the mysql apostrophes, because he thinks he closed a column, but then comes an inexperienced character. To correct…
-
5
votes4
answers1260
viewsA: Footer always at the bottom of the page
From what I understand you nay want it fixed and yes that does not stay the spacing blank, in this case you will have to match position: relative with absolute, is not at all obscure, it is enough…
-
6
votes2
answers4248
viewsA: Error "Fatal error: Cannot redeclare (Previously declared)"
The mistake: Fatal error: Cannot redeclare timeCorridoDois() (Previously declared in C: xampp htdocs php component requests ff_notificacao_php.php:136) in C: xampp htdocs php component requests…
phpanswered Guilherme Nascimento 98,651 -
2
votes3
answers1306
viewsA: Diagram of class MVC
This is totally relative, it doesn’t necessarily matter how the Controller reads the Model data or how it sends data to the Model to validate, what matters is that only the controller has access to…
-
0
votes1
answer46
viewsA: Export from SQL to Excel and perform Download Syntax error: Unexpected ',', expecting end-of-input
Doesn’t seem to be a problem in the query by looking at the documentation of the send_data I guess I missed the :, change this: send_data mt_dispositivo.to_xls(:except => [:id_conta]),…
-
1
votes2
answers305
viewsA: Simple html dom grab "text/javascript" link?
You can use the native PHP API called DOMDocument combined with curl or file_get_contents and then use preg_match, a simple example to understand: <?php $meuhtml = ' <script…
phpanswered Guilherme Nascimento 98,651 -
1
votes1
answer2954
viewsA: Php does not load Css
On the built-in server when you do this php -S localhost:8000 index.php In fact index.php will work as a "proxy", that is, you should not actually pass the index.php, you should only pass something…
-
1
votes1
answer1888
viewsA: Forbidden 403 apache2 on Ubuntu
The problem of displaying permission error and then the error of not processing php scripts via Apache apparently is caused by some wrong editing your, or more probably because you installed…
-
0
votes1
answer5261
viewsA: ERROR: Access denied for user 'root'@'localhost' (using password: YES)
Hosts, servers, etc., usually do not have the Mysql server on the same machine as Apache (where php is and etc.), this is because usually the stations where the database servers are located are…
phpanswered Guilherme Nascimento 98,651 -
4
votes3
answers5502
viewsA: Remove TAG with Javascript
In jQuery it would be this: $("#remove").click(function () { $("[class='3']").remove(); }); <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>…
-
1
votes2
answers151
viewsA: How to Resolve Syntax Error
On line 14 missing "escape" the quotation marks inside the "quotation marks": $headers .= "boundary="$boundary"\r\n"; Do this: $headers .= "boundary=\"$boundary\"\r\n"; It is also necessary to…
phpanswered Guilherme Nascimento 98,651 -
0
votes1
answer167
viewsA: Rewrite sending to wrong page
Your "group" of [a-z,0-9,A-Z-] makes no sense and the use of .+ all that is inside [...] almost redundant, have to learn first regex before leaving doing anything friend, not wanting to sound bad,…
-
2
votes4
answers54
viewsA: Doubt about the use of the VS2015 SPA Template
I’d like to alert him to a possible problem in your Html.BeginForm you defined Action as Email: @using (Html.BeginForm("Email", "Email", ... But in your Controller you call Action EnviarEmail:…
-
4
votes1
answer1505
viewsA: Error "Warning: putenv() has been disabled for security reasons"
The getenv is not a function of Laravel, despite being used by him, messages "similar" to this: Warning: ... has been disabled for security reasons Indicate that the server administrator has…
-
2
votes1
answer112
viewsA: Conditional Comments IE7 does not work
If I understand what you’re saying you want some sort of ELSE for the condition, could do this if !(IE 7), for example: <!--[if IE 7]> <p>Você esta usando Internet Explorer 7!</p>…
-
4
votes1
answer163
viewsA: Why deploy with PHP is simpler?
ASP.NET and PHP PHP is a language almost entirely dedicated to the web and PHP runs "embedded" next to HTML, other languages are basically languages, what they handle is input and output, in case…
-
0
votes1
answer1441
viewsA: Hide domain directory using htaccess
This . htaccess seems very wrong: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^\.]+)$ $1.php [NC,L] <IfModule mod_rewrite.c> RewriteEngine on RewriteBase / RewriteRule…
htaccessanswered Guilherme Nascimento 98,651 -
1
votes1
answer148
viewsA: Doubt with API access - using Angular - typescript
I believe that being Ionic it is possible to leave more permissive if it is in a webView (mobile app), but since you have control over the site, simply remove the FilesMatch, just like this in your…
-
5
votes2
answers9898
viewsA: Error "Content-Type is not allowed by Access-Control-Allow-Headers in preflight Response"
Error states that header use/customization is not allowed Content-Type in requisition (for example when Ajax requires your PHP) and that you must release using Access-Control-Allow-Headers By Ajax…
-
0
votes3
answers557
viewsA: See if a video has been paused to upload?
Instead of using the setInteval could take advantage that this really using jQuery and adjust using onplay, onpause, onsuspend and onwaiting for something like: function updateVideo(video) { var…
-
2
votes1
answer348
viewsA: Ajax does not work in Internet explorer 6
Of jQuery 2 from now on there is no more support for IE 6/7/8 browsers and maybe some things don’t work in Android 2 and Internet Explorer 9, as said in…
-
3
votes2
answers1177
viewsA: Code to Leverage Browser Cache Leaves the Site Offline
The problem is the quotes “ and ”, this type of quotation marks does not work, should be replaced by " for both of us: <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/jpg "access…
-
1
votes2
answers356
viewsA: How to use . htaccess with 2 arguments
Would this be: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^stream/([^/]+)$ stream.php?nome=$1 [L,QSA] The flag L prevents the next…
htaccessanswered Guilherme Nascimento 98,651 -
0
votes1
answer96
viewsA: Return image upload in index.php
The $_POST do not obtain the file, the correct is $_FILES and the form must have enctype="multipart/form-data", before leaving doing anything I recommend you start studying by the documentation…
-
2
votes1
answer91
viewsA: PHP code does not work
Just read the error expects parameter 1 to be resource, boolean given, translating would be: Parameter 1 was expected to be a Resource, but got a boolean That is to say fsockopen got false and how…
phpanswered Guilherme Nascimento 98,651 -
6
votes2
answers13141
viewsA: Help with jquery Uncaught Typeerror: $ is not a Function
It’s probably the order that added jQuery, the order in HTML should always be this: <script src="caminho do jquery/jquery.js"></script> <script src="caminho do…
-
2
votes1
answer157
viewsA: Laravel 4.2 and Ajax image upload
The serialize of jQuery ($("#formEvent").serialize()) can’t stand it <input type=file>, have to adjust this using FormData, as I explained in: /a/77280/3635 The code could go something like:…
-
1
votes1
answer78
viewsA: Same code producing distinct results in Codeenvy and Windows 8.1
I may be wrong, but it may be the moment you use writerow the variable row already have line break, so could use .strip thus: reader = csv.reader(fin) writer = csv.writer(fout) for row in reader: if…
-
1
votes1
answer495
viewsA: input type file does not load file. CSV
The $_FILES['file']['tmp_name']; saves the file in the folder tmp system, this folder probably does not allow reading at the time of upload, maybe something permission, must have occurred errors…
-
0
votes2
answers134
viewsA: I’m trying to send email with HTML and PHP and I can’t
Your line 43 is wrong, there’s a ; before the .: echo 'Houve algum erro no envio. Tente novamente!'; .$mail->ErrorInfo; Which generates an error like: Parse error: syntax error, Unexpected '.' in…
-
2
votes1
answer62
viewsA: Python - How to get driver names C: D: F: I:
As Anderson suggested, use win32api.GetVolumeInformation, just iterate with the for, thus: import win32api drives = win32api.GetLogicalDriveStrings() drives = drives.split('\000') for drive in…
-
3
votes1
answer45
viewsA: How to remove point altitude in a Poligono?
If the Poligono point is always at the end of the line and the number 20 can be variant, you can use regex before saving to vector: <?php $kml = ' -112.2550785337791,36.07954952145647,20…
phpanswered Guilherme Nascimento 98,651 -
9
votes2
answers742
viewsQ: Deny/hide access to files starting with dot, like . git, . svn, . Ds_store, . yml
By default Apache denies access to files whose name begins with .ht, as an example .htaccess: <Files ~ "^\.ht"> Require all denied </Files> But I notice that many files use the prefix .,…
-
2
votes1
answer40
viewsA: Virtualhost returning strange characters?
This looks like compressed response (probably gzip), many browsers support Gzip as response (almost all), but what happens is that in your case you must be compressing twice, or the API domain is…
-
2
votes2
answers397
viewsA: Problems with HTTPS and WWW Redirection
How did I respond in /a/184459/3635, just change the last two lines: # Redireciona para o HTTPS independente do domínio RewriteCond %{HTTPS} off RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI}…
-
3
votes3
answers904
viewsA: Problem when rotating android cell screen
Should add the flag configChanges with the value keyboardHidden, orientation and screenSize in his Activity No Xamarim You can add the flags with Android.Content.PM.ConfigChanges sort of like this:…
-
15
votes1
answer3906
viewsA: Javascript - Difference between `this` and `self`
The this can be anything, depending on where it was applied, it’s used along with classes in Javascript and prototype to refer to the object, if it is not an object then two situations may occur: In…
javascriptanswered Guilherme Nascimento 98,651 -
0
votes1
answer428
viewsA: simple quotes not working inside form
You start with: echo " And in the middle of the code is this: "input[name='enable']" In other words, the quotation marks of "input[name='enable']" are "breaking" the quotes of the echo "...";, you…
-
1
votes2
answers1401
viewsA: Convert image size before uploading PHP
You can achieve this with Javascript (Canvas API, Filereader API and Ajax), examples: /a/63018/3635 /a/145713/3635 Example using Canvas, FileReader and Ajax: <script type="text/javascript">…
phpanswered Guilherme Nascimento 98,651 -
2
votes2
answers334
viewsA: Attempted to call Function "iconv_strlen"
The iconv is installed by default (compiled) in current versions, but it may be that eventually the PHP has been compiled using flag --without-iconv, if this is the case and you don’t have access to…
-
3
votes1
answer289
viewsA: How to create a range button with pure javascript
How pure Javascript has no way, will always depend HTML and CSS, in this case an example generated with http://danielstern.ca/range.css/ would be this (in this case just use the input[type=range]…
javascriptanswered Guilherme Nascimento 98,651 -
9
votes3
answers570
viewsA: How to jump from one tab to the other in Sublime Text?
On Windows/Linux (PC) how Renan responded: Ctrl + Pgup Go to previous tab Ctrl + Pgdn Go to next tab In Mac OSX: ⌘ + ⇧ + [ Go to left tab ⌘ + ⇧ + ] Go to right tab Other shortcuts On PC Alt + [NUM]…
sublime-textanswered Guilherme Nascimento 98,651 -
3
votes3
answers3386
viewsA: Limit of input characters
I would like to suggest some modifications to what has already been proposed: First keydown works well, but there is a limitation, but if you use it you will have to combine onpaste and oninput (or…
-
2
votes2
answers306
viewsA: Organize a json and write the results
Just for the record, this JSON is in invalid format: { "result":[ { “COD”:[10,3,4,11,1], "DESCRICAO”:[mouse,teclado,monitor,webcam,celular], "ESTOQUE”:[10,2,5,1,0], "QUANT_UNID":[ UN,UN,UN,UN,CX] }…
phpanswered Guilherme Nascimento 98,651 -
3
votes1
answer804
viewsA: transfer from one database to another
The database is not connected with Wordpress or PHP "directly", this should explain some things: What’s the difference between Mysql and phpMyAdmin? What a difference from Xampp, Wamp, Easyphp,…
-
4
votes2
answers7773
viewsA: The mbstring Extension is Missing. Please check your PHP Configuration
The extension=php_mbstring.dll would be windows on Ubuntu the correct would be: extension=mbstring.so Without the prefix php_ and with the extension .so, note that use sudo apt-get install…
-
3
votes1
answer797
viewsA: How to redeem external IP address on Android?
As explained in this reply it is not possible do this without relying on an external service: No, it is not possible. Your machine has access to local IP only, provided by the internal DNS service…