Posts by Guilherme Nascimento • 98,651 points
2,383 posts
-
1
votes1
answer61
viewsA: C# Selenium Chrome automation, How to access an Htmlcollection using Selenium in visual studio
Singular takes an element: nav.FindElement(By.ClassName("xxxx")); Plural handle all available: nav.FindElements(By.ClassName("xxxx"));
-
7
votes2
answers1480
viewsA: How to add references in Visual Studio Code?
Wouldn’t it just be adding the package via nuget? Link https://nuget.org/packages/NHibernate dotnet add package NHibernate Then run: dotnet build And if it’s all over dotnet publish -c Release…
-
2
votes1
answer216
viewsA: PHP Codesniffer: LF or CRLF?
It doesn’t hurt anything in Linux because the PHP interpreter knows what it needs, however I must point out that depending on how you set up GIT, it will sync according to the operating system, even…
-
4
votes2
answers127
viewsA: How to remove only the horizontal scrollbar from the page?
This does not remove the scroll, it hides, if to remove the right would apply directly on the elements: html, body { overflow-x: hidden; } We apply to both because in Chrome and Firefox it is…
-
4
votes1
answer162
viewsA: Electron creating various folders and files in my directory
The Electron, as I said before in a commenting, is based on Chromium, as well as Chrome, Opera, Bravo, etc. So the application created in HTML+CSS+JS is actually a hybrid application, IE, your…
electronanswered Guilherme Nascimento 98,651 -
4
votes1
answer28
viewsA: How to center text in the DIV making the lines line up on the left?
You can simply create a sub-element that is display: inline-block;, the element with inline-block will not occupy "100%", do not specify measure, just let the text adjust it, then it should look…
cssanswered Guilherme Nascimento 98,651 -
3
votes1
answer80
viewsA: Electron Node import returns "Undefined"
Install Electron GLOBALLY like this: npm install electron -g Then go to your folder and run your command: cd pasta/projeto electron . Your folder should contain files like: seu-app/ ├── package.json…
-
1
votes1
answer40
viewsA: How can I find out, using the C language, which graphical environment is installed on Linux?
With c exactly I believe that is not possible, each graphical environment has its own implementation, something that would not have within the language, unless it uses a third party API. But I don’t…
-
3
votes2
answers999
viewsA: I can’t get elements from a page with Puppeteer
You probably DON’T is waiting for the load to complete or it may be that the way instagram loads is dynamic and even after the load, each site makes a way. Change this: const image = await…
-
4
votes2
answers126
viewsA: Cronjob on the Node, is there?
CRONJOB does not belong to languages, belongs to the operating system, create a JOB from a script just run in the terminal: crontab -e 00 * * * * /usr/bin/node /home/usuario/foo-bar.js And you could…
-
1
votes1
answer77
viewsA: Problems with Datetime in Javascript with C#
Probably missing the "escape" in the URL, because some values in the URL should be encoded, this should solve: let a = encodeURIComponent(start.format('YYYY-MM-DDTHH:mm')); let b =…
-
5
votes2
answers115
viewsA: What are HTML meta tags for?
It has no specific use, there are tags used by browsers, for SEO, for social networks, and until they are only used internally by the site developer himself, examples of use by browsers: Zoom on…
-
2
votes3
answers71
viewsA: How to work with files and database in a way that is possible to consist
About updating a photo personally would say (being a kick on my part) that updated photos should never contain the same name, if it is web, or else in the PHP part (which is your case) adjust Urls…
-
1
votes1
answer46
viewsA: How do I currently use Keywords in google?
It won’t be overnight, it won’t be having meta tags on your site that will make it stay ahead of you, it’s neither a programming problem nor an HTML problem. SEO is "investment" (indirect), patience…
-
3
votes2
answers265
viewsA: clearInterval not for setInterval function
The value of timer is not a "ID" of the setInterval, is an anonymous function that you set: var timer = function(){ There’s no way clearInterval guess what’s inside the function, you have to take…
javascriptanswered Guilherme Nascimento 98,651 -
1
votes1
answer270
viewsA: Redirect page to previous PHP (history.back)
javascript:history.back() does not work in the header, this is instruction of the response http header and not of the page body. To make it work it has to be something like: if($redirectLoc) { echo…
phpanswered Guilherme Nascimento 98,651 -
5
votes1
answer118
viewsA: Is it possible to apply a CSS attribute only to a page that contains a substring?
There is a rule similar to @media (used for various situations including media-query), which is still under proposal and is considered experimental, the @Document, however for normal web pages (not…
-
2
votes1
answer1064
viewsA: Javascript error [Object Htmldivelement]
Are two typo their The method var pais = document.getElementById('pais') takes the element and not the value injected into the element And NEVER repeat Ids, as said in Why it is considered wrong/bad…
-
2
votes3
answers309
viewsA: What is the clipboardData.getData() method for?
I recently read statements saying: as you know can not copy or paste anything on top of a SVG ... e.clipboardData.getData('Text'), so this method managed to paste something in SVG About this quote I…
javascriptanswered Guilherme Nascimento 98,651 -
1
votes1
answer32
viewsA: How to set SSL in the cookie and display in the browser?
First I wouldn’t use: isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' This can be manipulated easily, since it comes via headers of the HTTP…
-
5
votes1
answer960
viewsA: Change DIV order to mobile with Bootstrap
Bootstrap 4 Yes, it is possible, if it is bootstrap-4 use flex-direction: row-reverse; in his .row SPECIFIC (apply with a unique ID, apply for all Rows will give problems) In the example I specified…
bootstrap-3answered Guilherme Nascimento 98,651 -
2
votes1
answer60
viewsA: Why is the sum returning 0 and only works when I place the variables as local?
You are running the sum even before the event is triggered, the sum is running when the page loads, and at this point the inputs are probably empty When you click the sum ALREADY EXECUTED, then just…
-
1
votes1
answer86
viewsA: How to run wmv in <video> (Google Chrome) tag?
WMV is not natively supported by Chrome or Firefox There is no way to make it work without each user installing on their own computer "additional" to be able to run the video, which is totally…
-
12
votes2
answers967
viewsA: What happens to a SESSION when it expires in PHP or refreshes the page?
The session is kept in a file, what you have in the "front-end" (in the client program, as browser) is a COOKIE with a key for the session, when the SESSION exceeds the life limit the GC…
-
3
votes1
answer151
viewsA: How to get the items inside an Object(stdClass) in PHP?
To stdClass just use: $foo->{'1024x1024'} Example: <?php $obj = (object) array('1024x1024' => 'foo'); var_dump($obj->{'1024x1024'}); Online example:…
-
4
votes1
answer126
viewsA: Problem styling <select> through CSS
This is not a custom SELECT, it is an alternative element SIMULATED, it is not the real SELECT that this there, is a series of elements in a plugin that simulate SELECT, the original select this…
-
1
votes1
answer38
viewsA: Does the INTERNAL_IPS variable control the Django DEBUG variable?
Apparently NAY, exactly in the own link that you posted it says: Allow the debug() context Processor to add some variables to the template context. And if you notice this debug() described is also a…
djangoanswered Guilherme Nascimento 98,651 -
1
votes1
answer346
viewsA: The localStorage function does not work
This error occurs in Chromium based browsers such as Chrome, Opera, etc As explained in:…
-
2
votes1
answer111
viewsA: PEP8, invalid escape Sequence, what’s wrong with the code
Just "escape" the "escapes", like this: re.compile("\\.\\./img/gifts/img.*\\.jpg") Or you can use the r"..." as explained in:…
pythonanswered Guilherme Nascimento 98,651 -
2
votes1
answer200
viewsA: How to pause or play the animation of a GIF in Javascript?
I’d recommend trading the GIF for CSS Sprites (that you could even control a little with :hover or other pseudo-class) or by <canvas> (this would be more complicated) But a quick fix is lib…
-
2
votes1
answer1981
viewsA: Problem with CORS - Preflight (get works, post does not)
Preflight almost always indicates what has not been configured properly, its own message: ... It does not have HTTP ok status. The HTTP ok refers to HTTP code 200, which means that when you sent a…
-
4
votes1
answer64
viewsA: How not to allow a text of a child element to overflow the parent element
Just use overflow: hidden; since it is using flex with justify-content: center; it will already align in the center, example: body { display: flex; justify-content: center; background-color: blue; }…
-
5
votes1
answer88
viewsA: replaceAll How to do repetition
If it’s to add the f at the end of the number just use regular expression (regex) getting something like: \d+\.\d+ The \d looks for a digit, d+ looks for a digit "sequence", the \. looks for a point…
-
1
votes1
answer250
viewsA: How to limit the size of an element with padding in CSS?
If you have height: 450px; doesn’t need max-height: 450px;, unless you are using any means of diplay other than block, what seems unlikely for your case, to solve would just use box-sizing:…
-
4
votes3
answers391
viewsA: What are literal types in Javascript?
Literals are exactly write the value, for example this would be a "literal array": var x = [ "a", "b", "c" ]; This is no longer: var x = new Array(); x.push("a"); x.push("b"); x.push("c"); "Literal"…
javascriptanswered Guilherme Nascimento 98,651 -
1
votes1
answer51
viewsA: Difficulty passing column in filter_by as parameter in Python3 function with Sqlalchemt
I imagine this .filter_by(self.coluna=search) is causing the following error: SyntaxError: keyword can't be an expression In case it seems to me that you want to pass the value of the key, which is…
-
1
votes1
answer181
viewsA: php does not recognize the mysqli_connect() command
If you installed Lamp by downloading from Xampp then just go to php.ini and uncomment the line: ;extension=mysqli.so To (removes the ;): extension=mysqli.so If it is php7 probably could be like…
-
0
votes2
answers26
viewsA: How to return a set of elements as a single string?
It’s not just adding two prints with one quote in each? Thus: #aspa no começo print('"', end='') print('(', end='') print(''.join(map(str, b[:3])), end='') print(')', end=' ') print(''.join(map(str,…
-
0
votes1
answer42
viewsA: JS code to give $('id'). Hide() and $('id'). show()
First your HTML is wrong or your JS is wrong, here contain an ID id="minhaDiv": <body class="curso"> <div id="minhaDiv" class="col-sm-12"> <h1>TESTE</h1> </div>…
-
1
votes1
answer44
viewsA: Foreach with querySelectAll() mouseover src [one image at a time]
Just make the selector the class itself and use $(this) instead of taking ALL images, thus: $(".imagem-do-produto").mouseover(function(){ //Remove imagens dos outros elementos acaso o mouseout não…
-
1
votes1
answer28
viewsA: Compare null field
I believe only one comma is missing before CASE and I’m not sure either, but in case you check how NULL nor need to put in the CASE column name, you’ve already added in WHEN (because of the IS NULL)…
-
0
votes2
answers153
viewsA: Without the if explanation
This Else is part of the for and not of an IF, this is normal in Python, is characteristic of the language, according to documentation:…
-
1
votes1
answer24
viewsA: Error calling com.facebook.login.widget.Loginbutton.registerCallback' method on a null Object Reference
The error probably indicates that the elements are not ready, in case the widget com.facebook.login.widget.LoginButton who tried to register the callback On Android the elements will only be…
androidanswered Guilherme Nascimento 98,651 -
0
votes1
answer28
viewsA: Referenceerror: documentId is not defined
The variable documentId does not seem to have been declared anywhere in your script, so you did not create such a variable, so it will give ReferenceError even What you want is probably this:…
-
1
votes1
answer586
viewsA: Displaying image in PDF inside a while
The problem is that DOMPDF comes with disabled remote images, strangely apply only: $html .= '<td><img src="/'.$row_transacoes['foto'].'" width="50"></td>'; Should solve, either…
-
1
votes2
answers81
viewsA: Compare dates - Text Mining
Using the function https://docs.python.org/2/library/datetime.html#datetime.datetime.strptime to "parse" the date received And use the…
-
0
votes1
answer130
viewsA: How to select multiple device images and upload them?
To select multiple images use: Intent intent = new Intent(Intent.ACTION_GET_CONTENT); intent.setType("image/*"); intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);…
-
3
votes1
answer260
viewsA: Transfer the value of a variable to Ctrl+C in Python?
You can use that ready lib, like the: https://pypi.org/project/pyperclip/ Supports Windows, Mac and Linux (Linux requires gtk or Pyqt4) Installing via PIP the pyperclip: pip install pyperclip…
-
2
votes1
answer71
viewsA: am looking for help in redis.get cache on Node.js
This doesn’t make sense: console.log(getCache('fatorial:7')); Because the Return inside a callback will not be SYNCHRONOUS, it will probably be asynchronous, and even if it was not asynchronous, yet…
-
3
votes1
answer46
viewsA: VALIDATOR BY AGE
Just use window.location with the desired address, thus: var age = Number(document.getElementById("age").value); if (isNaN(age)) { document.getElementById("demo").innerHTML = "Você não inseriu um…
javascriptanswered Guilherme Nascimento 98,651