Posts by Guilherme Nascimento • 98,651 points
2,383 posts
-
9
votes1
answer2190
viewsA: Force www and https in url - HTACCESS
I believe that using HTTP_HOST it is better to migrate or take advantage in multiple domains and REQUEST_URI add path and querystring I’d say this simplifies: # Redireciona para o HTTPS independente…
-
6
votes1
answer89
viewsA: What is the keyword Debugger for in Javascript?
Is equivalent to breakpoint of other languages, it pauses the execution of the script and only works if Developer tools browser or other debugger (like in Node.js) is open, if it is not open it will…
-
1
votes5
answers632
viewsA: PHP that returns null table fields that are neither empty nor null in Mysql
The json_encode requires UTF-8, probably this is already the format of your database, but you may not have specified this in the connection, as I explain in this reply: /a/43205/3635 If it’s OOP:…
-
2
votes1
answer407
viewsA: How to remove ion-Toolbar lift?
It seems that according to this link Toolbar just use the no-border, thus: <ion-header no-border> ... <ion-header>…
ionic2answered Guilherme Nascimento 98,651 -
3
votes2
answers315
viewsA: filesize for files larger than 2GB on x86 platforms
It seems that the problem extends beyond and despite the report of Edilson, I noticed that it is not in every environment or version of PHP that this will work well and not necessarily accurate. On…
-
1
votes2
answers736
viewsA: I can’t read the result of my cookie in the Chrome Browser, what to do?
The document.cookie do not work in protocol file:/// and often do not work if the domain accessed is http://localhost and sometimes even the http://127.0.0.1 accepted unless set via "header", which…
javascriptanswered Guilherme Nascimento 98,651 -
0
votes1
answer220
viewsA: How to make the program write all information?
It’s because you’re wearing w, use a (an "extra" is that you really don’t need to open multiple times the same file may leave Handle’s out of the while) print('Bem-vindo!') print() numero_contas =…
python-3.xanswered Guilherme Nascimento 98,651 -
2
votes1
answer396
viewsA: When I write in the input the text starts to appear in the middle instead of the beginning
It’s because of the paddings: #email { padding: 0px 35px 10px 50px; margin: 0px; } #email2 { padding: 0px 60px 120px 60px; margin: 0px; } You can exchange for width and height: aside { background:…
-
1
votes2
answers181
viewsA: How to automatically generate fields
There are many problems: First Phpmyadmin is has nothing to do with the problem (I’m just commenting because you put the tag phpmyadmin in the question, see the review), read: What’s the difference…
-
5
votes2
answers323
viewsA: How to get source of request in Asp?
HTTP_REFERER does not guarantee any safety, it is very easy to overwrite and defraud the origin since it is a header. The best to do in question to ensure the origin of the form could be using the…
aspanswered Guilherme Nascimento 98,651 -
0
votes3
answers937
viewsA: How to insert into mysql using foreach?
If $contacts->tags; for an array use implode: $leads = $client->leads->getLeads([]); foreach($leads->contacts as $contacts) { $nome = $contacts->name; $id = $contacts->id; $tags =…
-
1
votes2
answers56
viewsA: Problem . htaccess for www-free addressing
Flag missing L in the first Rule, thus: # ======== COMEÇA AQUI ======== RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L] # ======== TERMINA AQUI…
-
5
votes2
answers19501
viewsA: error: "failed to open stream: No such file or directory"
I recommend to "avoid conflicts" that you create in your index.php a constant that should have the complete path up to that point and this constant will be used in includes, like this: index php.:…
phpanswered Guilherme Nascimento 98,651 -
0
votes1
answer103
viewsA: example of login with Basic Athentication for Swift?
Perhaps this response from Soen Swift 3: let username = "usuario" let password = "senha" let loginString = String(format: "%@:%@", username, password) let loginData = loginString.data(using:…
swiftanswered Guilherme Nascimento 98,651 -
0
votes1
answer57
viewsA: Problem to update user password via ajax in Laravel 5.3
First, don’t use the & inside Javascript, if it is a querystring by ajax use only the & thus: var dataString = 'id_jogador='+id_jogador+'&password='+password; Or better switch to {},…
-
5
votes2
answers1651
viewsA: Select with JOIN
Use limit, thus: SELECT * FROM imovel JOIN imagem ON id_imagem_imovel = id_imovel ORDER BY id_imovel DESC LIMIT 1 I think if you want to show multiple properties you can use GROUP by: SELECT * FROM…
-
2
votes1
answer430
viewsA: How to run a Python Crawler with PHP
If you’re creating Crawler or if it’s simple, you might want to write it entirely in PHP, but it’s just a suggestion. Now if you want to send an "input" to another program instead of using system,…
-
2
votes1
answer410
viewsA: Error showing image with GD
If you put the second parameter in imagepng it will not display but save, as described in the documentation http://php.net/manual/en/function.imagepng.php If not set or NULL, the raw image stream…
-
2
votes1
answer977
viewsA: After migration Wordpress downloads and displays no page
Your question gave very little information, there is no way to deduce much, but perhaps that is the problem, if the . htaccess is in the same folder as wordpress (only if you are) removes…
wordpressanswered Guilherme Nascimento 98,651 -
2
votes2
answers137
viewsA: How to incorporate a div to the form article or the other way around?
This error is PHP and not HTML, $_POST with input, select, textarea and button, no use putting name="" that he won’t recognize. Maybe use input type=image resolve: <div id="cadeiras">…
-
6
votes2
answers823
viewsA: How to Manipulate UTF-8 on the Moon
Being version 5.3 (although I do not understand much) can use the module utf8 and shall have the functions: utf8.char utf8.charpattern utf8.codepoint utf8.codes utf8.len utf8.offset There is also a…
-
2
votes3
answers664
viewsA: How to convert a numeric value to Boolean?
If you’re sure the entrance is int can directly apply 0 or 1 to the .checked = status; (even though .prop('checked', status)) (as @Sergio explained): var status = 1; //valor recebido…
-
4
votes4
answers3595
viewsA: How to put picture in input type reset?
You can also try trading for <button>, see the example below, type anything in textarea and then push the button: <form> <textarea cols="40" rows="5"></textarea> <button…
-
7
votes4
answers2028
viewsA: Side by side in Bootstrap, jumping line
That’s not how bootstrap grids work, the bootstrap solution @inkeliz worked more for coincidence, but it’s not the right solution, especially when it comes to the way you applied it. As I explained…
twitter-bootstrapanswered Guilherme Nascimento 98,651 -
3
votes2
answers858
viewsA: Div bootstrap misaligned
He’s not breaking it you’re wearing col-md- wrong, if you do this (your code): <div class="col-md-3">...</div> <div class="col-md-3">...</div> <div…
-
0
votes1
answer71
viewsA: Rewrite module in . htaccess [split by folder]
The CSS folder won’t work if you don’t make the correct notes, I recommend you try using the address in all Csss with / in the front, like this: <link href="/css/estilo1.css"> <link…
htaccessanswered Guilherme Nascimento 98,651 -
2
votes1
answer1213
viewsA: Formdata is setting the string "null" to null values
There is no way to send "primitive" values unless you use a format like JSON and decode when you arrive at the server, all that is sent via HTTP will be text or "binary". Precisely for this reason…
javascriptanswered Guilherme Nascimento 98,651 -
2
votes1
answer375
viewsA: Form does not send data
You must be using or protocol file:/// instead of http:// (for example accessed file:///c:/Users/Lone/Documents/projeto/form.php instead of http://localhost/form.php) or you must be using Apache…
-
1
votes1
answer64
viewsA: Error in counting data numbers from a table using JOIN in Laravel 5.3
The group_by does not exist in Laravel 5.3, the correct is groupBy, see the documentation: https://laravel.com/docs/5.3/queries#Parameter-grouping Thus: $lista_agentes =…
-
0
votes1
answer1183
viewsA: iframe on my wordpress site
On your page is this: <div class="fusion-youtube-flash-fix">­<style type="text/css"> iframe { visibility: hidden; opacity: 0; } </style></div> Remove that tag…
-
5
votes1
answer1133
viewsA: Fatal error: Call to a Member Function num_rows() on a non-object
You are wrong result() does not return a class with functions, it returns the data, therefore it does not have the function num_rows(): $retorno = $this->db->get('votos')->result();…
-
6
votes1
answer2772
viewsA: Align icon with text vertically
Use vertical-align: middle;. Note: something important, the property vertical-align only works with elements whose value display be it inline or inline-block, when to use float or block the…
cssanswered Guilherme Nascimento 98,651 -
11
votes3
answers7003
viewsA: How to make Local Storage expire?
I would say that if the values are that simple, document.cookie I would, but you can still do it like localStorage, what you can do is create a vector in json format (maybe) and set a date to limit…
-
3
votes2
answers379
viewsA: Is there a way to view native Javascript function code?
In pure Javascript probably not, this is because the native functions usually may not be written in Javascript completely, usually they are "interfaces", that are used to access an internal browser…
javascriptanswered Guilherme Nascimento 98,651 -
3
votes2
answers14983
viewsA: Handle error: "Uncaught Typeerror: Cannot read Property of 'value' Undefined"
From what I understand is not a PHP error, what is occurring is that probably depending on from query to variable data is coming empty [], then just make an IF to check:…
-
7
votes2
answers1130
viewsA: What is the safest way to identify that the upload file is an image?
In my view technically there is no problem in using mimetypes, in fact it is much more guaranteed with them than file extensions (thing that many people do unfortunately), something I explained here…
-
4
votes1
answer119
viewsA: Problems with PHP and Xampp
Your problem is not with Xampp, you wrote the name of the wrong variable, RESQUEST_METHOD does not exist, the correct is REQUEST_METHOD, thus: if($_SERVER['REQUEST_METHOD']=='POST'){ See in the PHP…
-
1
votes1
answer259
viewsA: Receive Firebird Exception message in PHP
Starting from version 5.0 of PHP the function ibase_query returns the number of lines if it is INSERT, DELETE and UPDATE, as explained in…
-
4
votes1
answer161
viewsA: How to upload multiple files over your phone?
According to the kennel is not supported by the native browser of Android, the only one who supports "partially" is the Chrome for Android. There is not much to do outside this, however depending on…
-
5
votes3
answers1740
viewsA: How do I know how much memory my application uses in PHP?
As has already been quoted, memory_get_usage captures current memory expenditure. However, there is another function, the memory_get_peak_usage, that picks up the maximum recorded memory peak. Note:…
-
1
votes2
answers470
viewsA: How do I get Qt 5.7 with MSVC2015 to work?
I guess I just had to lower the: http://download.qt.io/official_releases/vsaddin/qt-vs-tools-msvc2015-2.0.0.vsix It’s just that it’s at the very end of the page and sometimes goes unnoticed:…
-
3
votes1
answer368
viewsA: Broken layout Safari8
The measures vm require Safari10, recommend using normal measures, see http://caniuse.com/#search=vm And safari8 also requires that the display: flex; use the prefix -webkit- (although I’m not even…
-
14
votes6
answers29816
viewsA: How to create space before or at the end of the text contained between html tags?
The problem of is that it adjusts the spacing by font size (font-size), so to adjust the layout is very difficult, what you can do is to adjust margin or padding: .foo { float:left; }…
htmlanswered Guilherme Nascimento 98,651 -
2
votes1
answer395
viewsA: Is there any way to use Laravel Eloquent in the Silex microframework?
You can use yes, according to the repository itself Illuminate/database, actually it is possible to use it independent of anything, ie you can probably use in any framework, the only dependencies is…
-
0
votes2
answers75
viewsA: Deconstructing a perl-based one-Liner error occurs "Can’t Modify single ref constructor in scalar assignment"
I may be wrong, but the bar in front of 1024 is to escape the argument passed to the /root/.ssh/rsync_rsa (in accordance with response in the Severfault): ssh -i /root/.ssh/rsync_rsa $remote " perl…
-
4
votes2
answers307
viewsA: Best practice for client to choose response format (JSON / XML)
Best practice I think "has not", depends a lot on the comfort of what you want to pass to the customer, however I recommend trying some of these You can set a route for each:…
-
4
votes2
answers536
viewsA: How to place 3 Adsense link ads side by side?
Tables are recommended for tabular data and display: flex; works only in more modern browsers, see http://caniuse.com/#search=flex To line up side by side is enough float: Note: If you’re using…
-
2
votes1
answer179
viewsA: Change meta robots WP
In WP references has the following functions: https://developer.wordpress.org/reference/functions/add_action/ Has existed since version 1.2.0…
-
4
votes1
answer112
viewsA: Data type not defined in PHP
PHP is dynamic, but even if it wasn’t, it doesn’t really define what will enter the database. In PHP it is possible to control the input data, outside that the data coming from the database has the…
phpanswered Guilherme Nascimento 98,651 -
0
votes1
answer41
viewsA: Object loads in some cell phones and in others does not load
The function addClassName does not exist natively in Javascript, in DOM you have to set the property .className. I believe what you want would be something like: <script> var _cFieldFrame =…