Posts by Guilherme Nascimento • 98,651 points
2,383 posts
-
3
votes1
answer3536
viewsA: Alert auto close using Bootstrap
First you are passing a function called selector as a selector onClick="$(selector).click()", and it only works because jQuery tries to solve any function like a callback to get the string, which is…
-
3
votes1
answer96
viewsA: How to recover data from model?
That is wrong: if(count($dados) == 1){ return $dados; } The $dados is a PDOStatement, I may be wrong, but he only iterates with a foreach, it does not count the results, for that you must do it:…
-
3
votes1
answer631
viewsA: Image inside an SVG
Images with different aspect of measurement do not fit if the size of the element used, note that both images below only worked because the aspect is the same as the measurements you passed in the…
-
1
votes1
answer74
viewsA: How to avoid rewriting redirects?
Removes the R=301, this flag states that it is to redirect 301 according to the documentation https://httpd.apache.org/docs/current/rewrite/flags.html#flag_r, but if you just want to rewrite the…
-
2
votes1
answer517
viewsA: Problems with displaying my site on facebook
This error message probably occurs when you confuse the attribute property with name: The "og:****" Property should be explicitly provided, Even if a value can be inferred from other tags. Some you…
-
1
votes3
answers2856
viewsA: What can cause file_get_contents to give "timeout" error?
There are four possibilities: Firewall or any blocking or proxy software configured on your machine or network (somewhat difficult to say) As of version 5.6, PHP works completely differently with…
-
1
votes1
answer174
viewsA: Animation with CSS and jQuery
In the element <div class="f-modal-icon f-modal-success animate"> remove the class animate, thus: <div class="dialogbox"> <div> <div> <div class="f-modal-alert">…
-
2
votes2
answers123
viewsA: How to generate search result shortcode for a PHP system in a PHP page?
If they are all on the same sites or mysql is accessible between the sites You can just create a function like this: global.php: <?php function exibirDados(query) { //Evita conectar multiplas…
-
13
votes2
answers478
viewsA: When we are a variable I passed from JS to PHP it adds up
PHP is back-end and Javascript is front-end. What PHP does is generate a page, it can be html, txt, image, etc., or it runs on server before reaching your browser, Javassript runs on browser. Read…
-
2
votes2
answers1529
viewsA: Hosting Laravel system 5.3 in subdomain
It doesn’t look like a mod_rewrite error, if it were it would be for not having active, but there is a if. First to be sure of the problem, look up the PHP error log (it is a file . txt, this…
laravel-5.3answered Guilherme Nascimento 98,651 -
5
votes0
answers116
viewsQ: How to print an existing PDF using Poppler (Qt5)?
I’m using Poppler for Qt5, but I’ve reviewed the API documentation https://people.freedesktop.org/~aacid/Docs/Qt5/ to read existing PDF documents, I need to put the functionality to send to printer,…
-
5
votes1
answer1552
viewsA: Open Facebook Profile in the app
I believe the person’s profile has to be the numeric ID and you must be adding the person’s name Facebook protocol:// facebook://facebook.com/inbox facebook://facebook.com/info?user=544410940 (ID…
-
4
votes2
answers8830
viewsA: Error: Failed to find 'ANDROID_HOME' Environment variable
That seems to be wrong: export ANDROID_HOME=/</usr/local/android-studio/>/android-sdk-linux The broker would probably be this: export ANDROID_HOME=/usr/local/android-studio/android-sdk-linux…
-
5
votes1
answer1783
viewsA: Possibility to view doc,docx in the browser
If the case is just visualize Solution practice, if it is to render only, convert to PDF, this technically solves a lot of compatibility problem between different browsers and even absence of…
-
8
votes3
answers218
viewsA: Is it possible to load alternative . css links in case the primary link is not working?
In pure HTML is not possible, but if you use Javascript you can do something like: function loadCssFallback(el) { var url = el.getAttribute("data-fallback"); console.log("Carregando fallback:",…
-
2
votes1
answer374
viewsA: How to create nested array from information received via POST
If it is array don’t need to make a string, does everything in array even: $arraySaida = array(); for ($i = 0; $i < $dados['dados']['n-parcelas']; $i++) { $arraySaida[] = array( $id.'-'. ($i+1),…
-
1
votes1
answer288
viewsA: Error while trying to connect bd MSSQL Server using PDO
When it runs the script in windows I believe it uses the comma so (dblib:host=HOST,PORTA): new PDO('dblib:host=db-gadel-campinas.lexos.com.br,1500;dbname=<banco>', '<usuario>',…
-
10
votes4
answers2392
viewsA: NPM, Bower and Composer, which one to use?
composer is for PHP packages (although it is possible to install more than PHP, you can even install things like bootstrap and jQuery) and it installs packages available on https://packagist.org How…
-
4
votes2
answers759
viewsA: Understanding parameters and arguments in functions
Understand that you will only create a function if necessary, that is if the function is executed more than once (this is a more common scenario example, there are others), the argument is if the…
-
4
votes1
answer353
viewsA: How to pass response from one command as argument to another command?
If I understand what you need is to pass the outworking of command ruby as an argument for another program, in windows I believe that will need to store the value in a variable, ways I managed to…
-
2
votes1
answer799
viewsA: PHP - How to send background request ( HTTP SMS API )
Meet Curl? Should stay like this: $sms_user = '[email protected]'; $sms_msg = 'Obrigado Por Entrar Em Contato'; $sms_senha = 'senha'; $sms_telefone = preg_replace('#[^\d]#', '', $telefone); //Remove…
-
0
votes2
answers199
viewsA: Error request with jquery-autocomplete?
I think the problem is that you’re not passing the parameter correctly: $.getJSON("/path/ajax", { q: request }, function(result) { I believe it would be right: $.getJSON("/path/ajax", { q:…
-
6
votes1
answer566
viewsA: How does [modus operandi] autoload in PHP work?
The spl_autoload_register intercepts all your calls that are made like this: $foo = new AlgumaCoisa(); instantiate a class echo AlgumaCoisa::teste; catch a constant echo AlgumaCoisa::$teste; take a…
-
1
votes1
answer460
viewsA: jQuery Autocomplete - Keywords
The source parameter supports a function (function), a simple example: $(".sugestoes").autocomplete({ source: function(request, response) { if (request.term === "barco") { response(["naval"]); } }…
-
3
votes1
answer281
viewsA: I put the file extension as . phtml and only Chrome is displaying all the code. Why?
I believe that it is not actually working in any browser, but other browsers other than Chrome should be downloading the file instead of displaying or should be interpreting as text/html, which…
-
9
votes2
answers1855
viewsA: Is there any way to download a Youtube video using urllib?
Note: Remember that Youtube has terms and conditions, if the videos are not yours I do not recommend doing this, as the Wallace said There is a dependency-free lib called pytube, install using PIP,…
-
2
votes2
answers93
viewsA: Is it possible to use Elide with Qlabel?
The response of Luiz helped me, however I needed something to do automatically, I thought to use the paintEvent or something like that, but the resizeEvent worked well, elidedlabel. h #ifndef…
qtanswered Guilherme Nascimento 98,651 -
3
votes4
answers1313
viewsA: Capture user-typed input with PHP Shell
A simple example you can do to use is to create some functions (to do similar to goto in cmd) and use the STDIN (which is a shortcut to fopen('php://stdin', 'r')) getting something like this:…
-
6
votes2
answers239
viewsA: How to pass command line arguments in PHP?
Use $argv, thus: var_dump($argv); Is similar to c Note that $argv[0] always returns the name of the script called, for example in Windows: C:\Users\Guilherme\Desktop>php teste.php foo bar Array (…
phpanswered Guilherme Nascimento 98,651 -
5
votes1
answer51
viewsA: Jquery keyboard event does not respond
The way you did got added multiple events for when you press a key, the keyup has been added 4 times for example, maybe it is conflicting with the other keyDowns, really it is not necessary to make…
-
6
votes1
answer111
viewsQ: Is it incorrect to change the arguments in an extended class in PHP?
It is incorrect (or "semantically incorrect") to change the arguments in an extended class in PHP? For example I created this class: class Bar { public function __construct($message, $code, $timer)…
-
13
votes2
answers4047
viewsA: What are the main differences between JSON and BSON formats?
There’s no way to compare the performance, that is very relative, depends on the layer and at the end it will probably be JSON again (at runtime), it may be that there is a "cache" or something like…
jsonanswered Guilherme Nascimento 98,651 -
1
votes3
answers65
viewsA: Global function for plugin
This would be kind of wrong in the context of the selected element, as thus: $.fn.myPlugin.clearAll= function () { $(this).data('clearAll')(); }; You will be selecting the function and not the…
-
10
votes2
answers331
viewsA: Semicolon(;) in Ecmascript 6 is no longer required?
The point and comma (semicolon) has never been mandatory at the end of lines, its use is another, it aims to separate expressions who are on the same line or within a for. Note that in the…
-
1
votes1
answer779
viewsA: Error sending simple email with python
According to this reply on Soen is because Windows requires the UAC administrator privilege, to resolve this right-click cmd.exe and select the option Run as Administrator and then try to run the…
-
2
votes1
answer247
viewsA: Import error when sending simple email with python
Change the name of your file from email.py for enviaremail.py (or anything), he seems to be conflicting with the import email.utils (used by lib SMTP) And then try: python enviaremail.py It is…
-
2
votes2
answers92
viewsA: Create control flow in playlist for web player
I believe the code should look like this: var img = ['1','2','3','4']; var indice = 0; function troca(i) { //Verifica se o numero esta dentro da quantidade de indices if (i < img.length) { indice…
-
6
votes3
answers30488
viewsA: What is the difference between "{ }" and "[ ]" brackets?
[] is used to create arrays indexed (i.e., they work with numbers), each item being a new "index" within the array, it would be almost the same as Array() The {} is an object, looks a little like…
-
3
votes1
answer1013
viewsA: Press "Guide" to search the site?
Probably refers to the application/opensearchdescription+xml, is an XML format that adds custom search to your site, should look something like this: <link rel="search"…
google-chromeanswered Guilherme Nascimento 98,651 -
6
votes1
answer3327
viewsA: Reading accented CSV file in Python?
Depends on which encoding saved the file .csv Note: in python 2 o csv only supports ASCII UTF-8 If the file .csv is saved as UTF-8 can do as per python 3 documentation: import csv with…
-
5
votes1
answer139
viewsA: What is the purpose of the "system" directory of the micro-framework Inphinit?
The framework is mine and really has reason for everything in how it was done, unfortunately I have not had time to document it in a way that can make it useful, I will try not to delay in the…
-
3
votes2
answers93
viewsQ: Is it possible to use Elide with Qlabel?
I’m trying to use the element QLabel and if the text execrates the width size it can look like this: Add 3 points to the right: Foo bar baz foo bar... Add 3 points from center: Foo bar ba...oo bar…
qtasked Guilherme Nascimento 98,651 -
0
votes1
answer205
viewsA: Content is not allowed in Prolog
I believe the encoding, do this: <?php header('Content-type: application/xml'); echo '<?xml version="1.0" encoding="UTF-8"?>'; ?> <vxml version="2.1"…
-
2
votes1
answer151
viewsA: How to put the same animation on two canvas at the same time?
Instead of doing all the work of copying, for each update of the animation you will have to copy again, it is makes as much trouble for you as for the browser to run, you can simply add the…
-
9
votes1
answer1523
viewsA: What is the purpose of the "use" command and what is its relation to anonymous functions?
The use passes the value of one or more variables to the scope of the anonymity function making this value accessible (inheriting the variable), for example if you do this: <?php $a = 'Olá,…
-
7
votes3
answers7113
viewsA: Remove space between html list item
This spacing occurs because the elements with inline-block causes normal line or space break spacings to affect rendering, as this is the expected effect of the properties they use inline (as…
-
2
votes1
answer3263
viewsA: How to change local URL on IIS
Open the program notepad.exe as administrator, then do the following: Go to Filing cabinet > Open up... Clear the way [drive]:\[pasta windows]\system32\drivers\etc\hosts (in most cases is…
-
2
votes1
answer4352
viewsA: How to access the public Storage directory in Laravel 5.3?
If storage/public refers to something like /home/user/projeto-em-laravel/public/storage/public I think it would be interesting to change your strategy, the folder storage should not be directly…
-
2
votes2
answers1040
viewsA: How to disable responsive from a css site
Responsiveness is one thing and adaptive is another, you have to make sure what you’re using, in case of responsiveness there’s no way without touching any part of the code, you can for example…
-
4
votes2
answers894
viewsA: Upload/upload images with php
Your code is pretty messed up, and yet you used it $_POST["imagem-produto"] and $_FILES['imagem-produto'] at the same time, does not make sense the same name in two types of variables, the site has…
phpanswered Guilherme Nascimento 98,651