Posts by Guilherme Nascimento • 98,651 points
2,383 posts
-
5
votes3
answers360
viewsA: I can’t find the code error
The error is in: - IR (11%) : R$ {ir:2.f} and: - INSS (8%) : R$ {inss:2.f} If you ran separately you would notice which failed: print(f'''+ Salário Bruto : R$ {salario_bruto:.2f}''') print(f'''- IR…
-
2
votes1
answer2182
viewsA: Regular expressions limit number
If it’s to limit a number the easiest would be: if ($numero > 0 && $numero <= 1000) { //Algo aqui é executado } It has to be greater than zero and less than or equal to 1000. You don’t…
-
4
votes1
answer175
viewsA: Why is the expected " SCRIPT1004: ';' error" generated when running the application in Internet Explorer?
The for..of is not supported by IE, I mean this: for (let child of element.children){ The let is partially supported by IE11, adjustment for: for (var i = element.children.length - 1; i >= 0;…
-
1
votes1
answer108
viewsA: The.pdf file is not sent to the server
You probably specified the MAX_FILE_SIZE in the HTML form, and the PDF file exceeds this size, as stated in the documentation: https://www.php.net/manual/en/features.file-upload.errors.php…
-
14
votes3
answers2440
viewsA: Would the HTTP 418 "I’m a Teapot" response be valid?
This status 418 today is reserved to "I’m a Teapot", but I’ll tell you a little bit about this process. As already said this status is a joke, appeared on 04/01/1998, ie a joke "first of April",…
http-statusanswered Guilherme Nascimento 98,651 -
1
votes1
answer108
viewsA: Function statement within Python FUNCTION
You have two roles with the same name: def mostraLinha(tamLinha): print('=' * tamLinha) print() and: def mostraLinha(): print('=' * 25) print() Here you pass a parameter: mostraLinha(parâmetro), as…
-
1
votes1
answer85
viewsA: Ignore CSV header before inserting into the database
You can simply check with true and false: $primeiro = true; while(($data = fgetcsv($handle, 1000, ";")) !== FALSE ){ if($this->verificaDados($data[0])) { //Se true (primeira vez) executa o…
phpanswered Guilherme Nascimento 98,651 -
2
votes3
answers92
viewsA: Optimize adding events to various Javascript elements
Using "variables", example: function myFunction(a) { var cid, color; if (a === 1) { cid = a; color = '#dfdca3'; } else if (a === 2) { cid = a; color = '#ed694b'; } else if (a === 3) { cid = a; color…
javascriptanswered Guilherme Nascimento 98,651 -
1
votes1
answer693
viewsA: How to replace my project’s local repository in Git
Execute git remote -v to see what has remote. Now I want to make one thing clear to you: git remote rm ... does not remove from the Github server, it simply removes the remote and its references…
gitanswered Guilherme Nascimento 98,651 -
0
votes1
answer63
viewsA: Image upload from mobile with javascript
Just use new FormData(); (read: https://developer.mozilla.org/en-US/docs/Web/API/FormData/append), which is a native Javascript API, and so apply: var form = new FormData(); form.append('acesso',…
-
2
votes1
answer846
viewsA: Uncaught (in Promise) error Error: Element is not Attached to a Document when trying to generate a PDF of an HTML page
I don’t understand, you’re not the first one doing this, I was a collaborator of the html2canvas project (it was only a 2 code modifications) and I don’t understand why people insist on using…
-
5
votes2
answers528
viewsA: What is the difference between tag and element and html document and page?
It seems to me that’s what’s starting from < up to the >, as well as has opening tag: <nomedatag> And closing tag </nomedatag> And the element would encompass the opening tag until…
htmlanswered Guilherme Nascimento 98,651 -
1
votes1
answer41
viewsA: Site in 2 language without changing the URL, will I have problems with SEO?
I believe the official answer is here: https://support.google.com/webmasters/answer/6144055?hl=pt Google-BOT does not send the Accept-Language, then one should use different urls. Note that Google…
-
1
votes1
answer41
viewsA: Print all pages of a PDF file
The Ctrl+P only runs for HTML DOCUMENT, to print from OBJECT you will need the program/plugin used in OBJECT to even print, and remember each browser implements its PDF solution, whether this…
-
6
votes2
answers2094
viewsA: Create folder in . bat with variable name
Your code has nothing wrong with logic, it’s a syntax error and the lack of use of ENABLEDELAYEDEXPANSION to the for with set, in the syntax error you broke a line after the do of your for that…
batchanswered Guilherme Nascimento 98,651 -
4
votes1
answer38
viewsA: Document.getElementsByClassName show before
It is because the elements do not exist or were not rendered before the first script, meaning they only exist after the first script, or you use the load event to check when the page loaded:…
javascriptanswered Guilherme Nascimento 98,651 -
0
votes1
answer190
viewsA: How to make a GET request in Javascript?
Exactly as explained on MDN: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch#Supplying_your_own_request_object…
javascriptanswered Guilherme Nascimento 98,651 -
2
votes1
answer168
viewsA: How to customize PHP errors?
If these errors appear in your production server is because it is already wrong, now if this is in development then there is no reason to "customize", these errors are to help the development, to…
-
4
votes1
answer458
viewsA: Is webview useful to use as an application UI?
I’m going to focus on two things, because it seems to me that the whole problem is about this: How are the webViews in general Webwindow and platforms and where "it is" How are the webViews in…
-
3
votes1
answer113
viewsA: Is it possible to add icone to a program by creating in NET.core (Windows)?
Today I went to perform a test and apparently the tag works on netcoreapp3.1: <ApplicationIcon>nome.ico</ApplicationIcon> The logical design has to be an application, in my case I…
-
1
votes1
answer563
viewsA: What is the <Frameset> tag for?
The element <frameset> is valid in the DTD HTML Frameset as I have explained in: /a/209599/3635 Example of use: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"…
-
1
votes1
answer71
viewsQ: How to add only the Dlls needed for an (-self-contained) application?
To generate/publish an application on net-core use the command: dotnet publish -c Release --self-contained If you have configured the .csproj with <RuntimeIdentifier>, or else use this…
.net-coreasked Guilherme Nascimento 98,651 -
1
votes1
answer35
viewsA: I am trying to send a contact email through my website, but the following error:
The method echo $response->headers(); take array and no string, then use ECHO does not work, use print_r or var_dump, like this: echo $response->statusCode();…
phpanswered Guilherme Nascimento 98,651 -
3
votes1
answer122
viewsA: {{ csrf_token }} Does not work
The name= country: <input type="hidden" value="{{ csrf_token() }}"> I think it should be: <input type="hidden" name="_token" value="{{ csrf_token() }}"> However in Blade already exists…
-
4
votes1
answer113
viewsQ: Is it possible to add icone to a program by creating in NET.core (Windows)?
I’ve only used the line commands dotnet, both to generate projects and to generate solutions (.sln), however I do not know if it is possible to use resource.rc directly with dotnet with something…
-
4
votes1
answer317
viewsA: How to change default Composer installation folder?
Within the composer.json of the project adjust the config -> vendor-dir, example: "config": { "vendor-dir": "system/vendor" }, In my case I used system/vendor PS: I believe that for the global…
-
2
votes1
answer649
viewsA: How to use . env in NPM publications?
Probably the path location that lib will look for when installed on npm_modules will be different from when testing the direct script, so to solve this use the path.:…
-
1
votes1
answer124
viewsA: Capture python libpng Warning
As I said before, warnings are not mistakes, the images are probably even having problems with the color profile, but this does not directly (usually) affect what you will do with the image, and as…
-
3
votes2
answers1354
viewsA: What are the differences between an image and a container?
It seems to me that everything depends on which "context" is employing the term "container", but yes, in general (usually) "container" will refer to the "images". Now talk container in LXC context…
dockeranswered Guilherme Nascimento 98,651 -
6
votes2
answers1295
viewsA: Selenium Select Boot
The page is not loaded, the script does not wait alone the page has been downloaded and rendered, that is to say the DOM is probably not ready For this you can apply a reasonable waiting time of 10…
-
3
votes1
answer45
viewsA: Command order in robots.txt
Will not block, the rules are not necessarily "in order", the rules with the "name" quoted have "preference" on a wildcard/wildcard (*), as in the google support example itself:…
-
3
votes2
answers131
viewsA: How to load Lightbox2 when entering the page
As far as I know Event.observe(...); is a "function" of prototype.js (https://github.com/prototypejs/prototype/blob/5fddd3e/src/prototype/dom/event.js#L763, not to be confused with…
-
5
votes1
answer951
viewsA: How to take the automatic background color out of the elements on mobile devices?
This is not background color, is the highlight (Highlight) used by mobile phones to visually assist that element is "clickable", buttons and anchors (<a>) has this (usually on iOS). To solve…
-
0
votes1
answer211
viewsA: Dataframe Object has no attribute 'Sort'
The DataFrame.sort is obsolete since version 0.19 (I believe it was from this https://pandas.pydata.org/pandas-docs/version/0.19/generated/pandas.DataFrame.sort.html) and I believe that in the later…
pythonanswered Guilherme Nascimento 98,651 -
1
votes2
answers54
viewsA: Run a PHP with GET parameters
Try to use $xxx = rawurlencode($xxx); and $yyy = rawurlencode($yyy); before the curl_setopt, because if it is characters like spaces or others can complicate sending the "path" And also add the…
phpanswered Guilherme Nascimento 98,651 -
1
votes2
answers353
viewsA: Charset utf8 on the Datatable server-side
In this class ai is not simple, you have to use the method sql_connect or db() and take the result of the return, something like $resultado = SSP::sql_connect($details); and apply…
-
0
votes1
answer122
viewsA: Javafx - Initialize components only when the scene is requested
I may be mistaken, but it wouldn’t simply create the variables and just arrow them at the time of using the FXMLLoader, would first remove this: try { if (mSceneCadastrarUsuario == null)…
-
1
votes1
answer323
viewsA: Java - Java security-locked application
This is standard Javavm, it’s possible to disable security, but I wouldn’t recommend it. You’re probably also using requests of all permissions without needing to, or really your Javavm is at a…
-
1
votes1
answer864
viewsA: Image alignment in the Markdown
The markdown itself only generates the images in sequence and depending on the screen size limit where the HTML will be displayed it will break the images (the screen limit, not the markdown), what…
-
1
votes2
answers1485
viewsA: Error in php’s Count function. Warning: Count(): Parameter must be an array or an Object that Implements Countable in line 41
This is wrong: count($semana == 7) When does $semana == 7 you take a boolean (true or false) and not the array itself, it should probably be: count($semana) == 7…
phpanswered Guilherme Nascimento 98,651 -
2
votes2
answers290
viewsA: Why should we use HTML 5 instead of Javascript?
HTML5 is not an alternative technology to Javascript, it is a DOCTYPE, as I explained in: /a/209599/3635 But it’s also a term used by certain developers (which I disagreed with until I gave up…
-
0
votes1
answer115
viewsA: Error in the self.bntInsert["command"] = self command
It’s a typo: self.bntInsert = Button(self.container8, text="Inserir", font=self.fonte, width=12 self.bntInsert["command"] = self.inserirUsuario Missing one ) after the width=12, should be…
-
1
votes1
answer104
viewsA: Limit setting on entering data in mysql
In the archive my.ini should be as STRICT, in sql-mode: https://dev.mysql.com/doc/refman/8.0/en/sql-mode.html https://dev.mysql.com/doc/refman/8.0/en/sql-mode.html#sql-mode-Strict STRICT_ALL_TABLES…
mysqlanswered Guilherme Nascimento 98,651 -
1
votes1
answer270
viewsA: How to fix the error in PHP - Fatal error: Uncaught Runtimeexception: Curl error (code 77)
For Curl you must edit the php.ini line in: curl.cainfo= And for others you must edit openssl.cafile= You can download the cacert.pem: http://curl.haxx.se/ca/cacert.pem And then it fits like this:…
phpanswered Guilherme Nascimento 98,651 -
0
votes1
answer589
viewsA: Pdostatement::execute(): SQLSTATE[HY093]: Invalid Parameter number
It’s a typo, when the message appears: number of bound variables does not match number of tokens It is always related to your query "Binds" Have two TOKENS with error in CALL: :TELEFONE_1,…
-
3
votes1
answer122
viewsQ: How to avoid distortion of pixels in HTML elements in various screen/screen settings?
I noticed in a simple situation that elements with pixel are not always rendered as you imagine, a simple example is when one adjusts the browser zoom to more or less than 100%, making it appear…
-
2
votes1
answer474
viewsA: Display numeric keypad when an input receives focus on mobile version
I’m pretty sure cannot customize the keyboards on iOS and Android via web pages and if there is something probably is not cross-Platform. My suggestion to get around the problem is to use type="tel"…
-
0
votes1
answer25
viewsA: Why the animation effect is gone
Just add forwards to the animation, thus: animation: animaSidNav 1s 1 forwards; The property is "implicit", if you only need to adjust the forwards as apply other "classes" (selectors) to overwrite,…
-
0
votes2
answers50
viewsA: How to return an array and only show the count number
Can use AS to make COUNT an easier nickname and would look like this: <?php $query = mysql_query("SELECT COUNT(*) as total FROM comentario"); $linhas = mysql_fetch_assoc($query); ?> <h4…
phpanswered Guilherme Nascimento 98,651 -
1
votes1
answer142
viewsA: Wordpress Theme - Parse Error: Unexpected end of file
That is typo, there is no Closing tag like this in PHP: ?php> In PHP you should use: ?> Or as it is a script without HTML, only for the functions, you can omit the ?>, or close.…