Posts by Guilherme Nascimento • 98,651 points
2,383 posts
-
2
votes1
answer39
viewsA: How I create a table that way just like that anyway
Using colspan, if you intend that a column (<td>) specifies occupy the space equivalent to 3 columns then seven in the desired column <td colspan="3">, if it were to occupy the space of…
html5answered Guilherme Nascimento 98,651 -
1
votes1
answer280
viewsA: "Absent expression after unary operator '-'" when trying to install postgres by Docker
The \ to use multiple lines does not work in powershell, exchange it for "severe accent", something like this: docker run ` --name postgres ` -e POSTGRES_USER=spirit ` -e POSTGRES_DB=spiritSt ` -e…
dockeranswered Guilherme Nascimento 98,651 -
1
votes1
answer300
viewsA: Urllib.request or Request?
I don’t think it’s request.get, but in the plural requests.get, if this is the case, please understand that requests (https://pypi.org/project/requests/) is not a "native" lib, it is usually…
-
1
votes2
answers198
viewsA: Problems with QR Code Ionic reader
Error informs that settings are duplicated: /home/renanrodrigues/projects/applications/rdoe/platforms/android/gradlew: Command failed with exit code 1 Error output:…
-
3
votes1
answer372
viewsA: Post request going without angular body
Cors error, indicates that a different domain cannot access another or can not change "headers standards", so you have to allow the domain of the API agree with what the client (your angular app)…
-
0
votes1
answer77
viewsA: Delete image file while deleting from tinymce editor
If understood (the question is confused) you want to delete an image of the server that is embedded inside tinymce chance the user remove it from the editing area? I must say that this is a bad…
-
2
votes1
answer729
viewsA: Error: No module named 'email.utils'; 'email' is not a package
You created a file on Scripts Python/email.py, see what the name is email.py, this write on the execution the package email native (only for current execution). So instead of the SMTP class try to…
-
8
votes4
answers7984
viewsA: How to solve 3-hour accretion problem in Date attribute in Angular?
I’ll disagree with all the answers, about trying to settle on the client side. Although already said, the time is in UTC, so this is the UNIVERSAL time, you do not need to convert it, this would be…
-
2
votes2
answers167
viewsA: Check if canvas is drawn
Determining whether it is empty is "complicated" by the simple fact that one can draw something in "white", or draw something that is outside the visible area, yet yes I found this answer in Soen:…
-
2
votes1
answer675
viewsA: Javascript - Difference between img.src="path" and img.setAttribute('src','path')
For attributes recognized by the tag something as examples: Element.src for tags <img>, <video>, <audio>, <iframe> Element.href for tags <a>, <link> recognise as…
javascriptanswered Guilherme Nascimento 98,651 -
1
votes1
answer72
viewsA: Angular doubt - ngrx
This | is called PIPE (https://angular.io/guide/pipes), it basically takes the input and "transforms" in the desired output, in your you are using the so-called "Asyncpipe impure", which is…
-
1
votes1
answer50
viewsA: How to decrease percentually in loop?
It can be a simple while checking the current value, something like: <?php $peso = 100; $porcentagem = 20; $minimo = 8.58994; while ($peso > $minimo) { echo "Atual: $peso\n"; $peso -= (($peso…
phpanswered Guilherme Nascimento 98,651 -
2
votes1
answer487
viewsA: Problem uploading images to Laravel 6 with Ajax
You are passing the wrong amount on the formdata, the .val() in jQuery or .value in pure Javascript do not take the file, just take the name, so you are not uploading, you are sending the file path,…
-
3
votes2
answers772
viewsA: Return JSON PHP POST query
You created this which is a string: $array = '{ "cpf_cnpj": "83899526000182" }'; And tried applying json_encode: $json = json_encode($array); That is to say nay goes to Curl like this: { "cpf_cnpj":…
-
1
votes1
answer649
viewsA: Extract image text without using Tesseract
The term for this is probably OCR, which can help you find other solutions (there are other terms and even solutions), but you probably forgot to install the PIL or did not know how to install the…
pythonanswered Guilherme Nascimento 98,651 -
0
votes2
answers1943
viewsA: Problems accessing the application from the browser
There’s not much point in using localhost, the network of a "container" I believe is the part, so the way is to actually get the container IP, this reply on Soen suggests executing docker inspect in…
-
1
votes2
answers142
viewsA: Is there any way to make the "Curl" program to pause print the information on the screen?
On terminals usually "pause" works well, but it is a bit complicated to pause at the desired point, each terminal has its features, usually visual systems see with "terminal emulators" which allows…
-
2
votes2
answers371
viewsA: How to read a. txt file in Electron?
No use reading absolute or relative paths, the file is inside the "app" (in assets, usually packaged in .asar READ: https://electronjs.org/docs/tutorial/application-packaging) By logic (I am without…
-
0
votes2
answers603
viewsA: Error while trying to generate apk - Ionic v 3.20.1
And why not use Ionic-cli itself to generate APK? It informs you any lack of global dependency, as if the cordova or the @ionic/app-scripts, he even helps you install what’s missing The command in…
-
1
votes1
answer28
viewsA: Show quotes coming from Mysql
As I have already commented, it seems likely to be some conversion of ASCII quotes into some Brazilian, maybe Wordpress itself is converting at the time of saving, turning into “ (U+201C) when…
-
1
votes1
answer104
viewsA: Error trying to access Auth::user()->id, in Laravel 5.8
Probably running "deliberately" without checking if the user is logged in, just use Auth::check(): use Illuminate\Support\Facades\Auth; ... if (Auth::check()) { ... Aqui vai o seu código ... } To…
laravelanswered Guilherme Nascimento 98,651 -
0
votes1
answer116
viewsA: "Segmentation fault" error while running C program on linux shell
There’s no point in you passing the variable p that comes from FILE *p to the fgets() if the intention is to get the input "typed by the user", the error occurs precisely because the variable p is…
-
1
votes1
answer175
viewsA: How can I open Postman by excel vba?
I’m pretty sure Postman doesn’t provide an interface via Activex, for the CreateObject is this, a reference to a activex, soon it is impossible to have an object of something it does not support…
-
2
votes1
answer97
viewsA: Inheritance of Interface that is in another folder
Word Interface is reserved in PHP. You may not use this word as class name, namespaces or the like. When you receive the message as: syntax error, unexpected 'Interface' (T_INTERFACE) Just know what…
phpanswered Guilherme Nascimento 98,651 -
5
votes4
answers174
viewsA: Verify correct answer
The texts, which are the answers, come next from the element, so in DOM you can use the nextSibling (in jQuery in the API has the .next(), but is not the same thing), then it would look something…
jqueryanswered Guilherme Nascimento 98,651 -
3
votes3
answers311
viewsA: Help escape special characters php
You used the wrong function, encondeURI is to escape in "whole" URI, example: var uri = '/?q=[javascript] á é ? #teste a b c ó ú'; var resultado = encodeURI(uri); console.log(resultado); To use in…
phpanswered Guilherme Nascimento 98,651 -
0
votes1
answer90
viewsA: What are the requirements to create a windows app using Ionic?
I think Ionic needs VS2010 on the page https://visualstudio.microsoft.com/pt-br/vs/older-downloads/? rr=https%3A%2F%2Fduckduckgo.com%2F scroll and choose option 2010, download it and install. In…
-
1
votes1
answer73
viewsA: Login GITLAB using request
This error occurs because the authenticity_token changes at all times, probably is an anti-CSRF (Cross-site request forgery), the only way to make it work would be to follow the following steps: A…
-
0
votes1
answer349
viewsA: npm ERR! code E405
The package extract-text-webpack-plugins is no longer available on NPM, so there is no way to install. Allies, it was supposed to happen error 404: C:\teste>npm i --save-dev…
-
0
votes2
answers969
viewsA: python & Selenium - wait download finish to close the browser
Can’t do this with Selenium (as far as I know and searched), what you can do is take the link URL and download it via Python directly, for example: If it’s Python 2.x I couldn’t test, I don’t use…
-
4
votes1
answer44
viewsA: config() does not return what was configured
I’m rusty from Laravel, but as far as I can remember the "parameter" of the function config() should refer to the filename separated by a dot to get a specific value, for example, your file is…
-
3
votes2
answers1693
viewsA: How to remove accent using bat/cmd
No need for external dependencies/languages you can use a simple "replace", of course this would have to run in windows-1252 and everything would have to be configuring this way. Replace in CMD/BAT…
-
0
votes1
answer238
viewsA: How to make a function run in real time
I will not answer the title, because in fact it is not quite what you need, I will explain to you about the basic differences of setTimeout and setInterval. As I explained in /a/111149/3635…
-
1
votes1
answer1470
viewsA: Warning: mysqli_query(): Couldn’t fetch mysqli in C: xampp htdocs aula exercicio update.php on line 11
You are running the mysqli_close before the query, it doesn’t even make sense to run there, the correct thing is to run it after the mysqli_query, or better after all necessary. In fact there are a…
phpanswered Guilherme Nascimento 98,651 -
2
votes3
answers349
viewsA: What are the advantages of using PHP’s sprintf function?
I do not agree that it is a question of comparing which is better or necessarily which advantages of one under the other, sprintf() may seem "easier" or advantageous, but what defines this is the…
-
0
votes2
answers273
viewsA: PHP: How is sending email via SMTP without the mail function?
As an introduction, what I have already said in this reply /a/215080/3635, are "under the TCP protocol", internally the function itself mail() connects to the default hosting SMTP server (this can…
-
2
votes2
answers67
viewsA: Doubt code in Perl
Your code has 2 remaining commas in each for, is typo, here before the parentheses has a point and comma: for ($i=1; $i<15; $i = $i + 1;){ Specifically this: 1;){ Corrected: #!/usr/bin/perl for…
perlanswered Guilherme Nascimento 98,651 -
4
votes4
answers99
viewsA: Simplify value localization in arrays in PHP
Use array_filter+foreach and use array_search+array_column+foreach is no better than what you have already asked in your question, which are only 2 foreachs+if, not only of performance, but even of…
-
2
votes1
answer76
viewsA: Create a configuration ". TXT" file
Whether the format is similar to that of the .ini can try something ready, search in nuget, example: https://www.nuget.org/packages/ini-parser/, to install: PM> Install-Package ini-parser…
-
3
votes1
answer83
viewsA: Basic error in python
The Choice variable has not been defined, does not exist, does not have because the code works, the code has no way to guess what you wrote inside a string in a print: print('Choices\n1-Option…
-
0
votes1
answer76
viewsA: Manipulating XML after storing String content - PHP
Use the Domdocument::formatOutput, example: $dados = file_get_contents("http://192.168.10.180/mkl?company=teste&cpf=12345678912"); if ($dados) { $doc = new DOMDocument(); $doc->formatOutput =…
-
1
votes4
answers13342
viewsA: Multiple lines of text or code with method ". html()"
ES6 (Ecmascript 2015) and Template literals (Template strings) The "literals templates" are supported in: Chrome 41+ Edge 12+ Firefox 34+ Safari 9+ Webview Android 41+ Node.js 4+ They support line…
-
5
votes1
answer991
viewsA: Python: remove double quotes from a list
Not need to convert to string with .join() and use eval() for that is a exaggeration, Python has functionality and internal Apis that solve many things well, in your case just make a for to process…
python-3.xanswered Guilherme Nascimento 98,651 -
0
votes1
answer101
viewsA: Allow https source access
This is not CORS error, is security error even, you want to load an HTTP resource into an HTTPS page, you understand? This breaks security, because there even having Https still yes for the browser…
-
3
votes3
answers599
viewsA: Adjust time in PHP string
Simply always severe (INSERT INTO, UPDATE, REPLACE) as UTC, so it’s great that your bank is UTC, because if you change the region system or even change the country and the times are as…
-
1
votes2
answers362
viewsA: How to connect PDO with named Sqlserver instances?
I believe that the named instances surround each one on its own port, if I am not mistaken the door of the instances change every time it starts, then the way is to fix the port, I believe this is…
-
0
votes2
answers352
viewsA: Crontab does not run PHP function of the file in the directory
As far as I know the line command php does not access remote pages, or if you access it you probably need to release in php.ini the allow_url_fopen, still not necessarily run, actually run on the…
-
3
votes1
answer203
viewsA: How to create a Progressbar with Python and Pyqt5?
You can do it in two ways, set the range with the amount of files (only at the beginning, you do not need to stay within the "operation" of copies): self.progressBar.setRange(0,…
-
2
votes2
answers849
viewsA: Add a None display to a div
Contrary to what was said in the other reply /a/396042/3635, it can rather parse strings in DOM and set values in attributes, such as style="", but regex is a tricky way to do it, there’s no reason…
-
1
votes1
answer58
viewsA: Qt Error: ASSERT Failure in Qlist<T>
The error indicates that the selected index "does not exist" within the array: index out of range But I am responding not for this, but simply because it makes no sense to use regular expression for…