Posts by Rafael Carneiro de Moraes • 447 points
14 posts
-
0
votes1
answer20
viewsA: Use IF in Pyautogui in Python (automation)
Pyautogui only performs automation, it still cannot detect this type of event on the computer. What you can do is use, together with Pyautogui, the library pynput. import pyautogui from pynput…
-
0
votes1
answer69
viewsA: Exercise of the book Eloquent Javascript
function hasEvent(event, entry) { /* Retorna true/false se o array "events" do objeto "entry" contém o "event". Aqui, verifica-se se o índice em que o event está. Caso não exista…
-
3
votes2
answers56
viewsA: How do I show a person’s name and not their key in a script that uses onclick()?
In its function displayName() function exibirNome() { var nome = document.querySelector("#cdcliente").value; if (nome) { alert(nome + " foi excluído(a) com sucesso"); } } Change nome for this…
-
1
votes1
answer39
viewsA: Php 7.1, How to make a REGEX of the following standard:<div class='inline-render' data-type='credit-card' data-Listing-id='1234'>?
Try this: \data-type='credit-card'(\s?)data-listing-id='(.*?)'\U Tested in: https://www.phpliveregex.com/p/rHE…
-
-1
votes2
answers495
viewsA: How do I read an XML with HTML markup
Are you already using a PHP library? Otherwise, try using Simplexml. <?php $xml = simplexml_load_file('arq.xml'); foreach ($xml->children() as $page){ foreach($page->children() as $table){…
-
3
votes1
answer275
viewsQ: Iterate XML with VBA and pass data to cells
I’m starting to mess with VBA now and I have the following problem: I was able to make a code that makes a SOAP request for a webservice and returns me an XML with the data of a person’s electronic…
-
1
votes1
answer403
viewsA: Compare values of several arrays contained in a PHP array
From what I understand, in the end the price should always be the priority. Anyway, you can use array_multisort() to sort your array and then return the contents of the first index. <?php…
-
1
votes3
answers596
viewsA: How to arrange the date order?
You can use this function I made for my website: <?php function data($data){ $f = explode("-", $data); //Gera um array com 0 = ano, 1 = mês, 2 = dia $g = $f[2]."/".$f[1]."/".$f[0]; //Isso é uma…
-
3
votes1
answer38
viewsQ: SQL checking data content
I’m making a search system for my blog (it already looks for post category and tags). Is there any SQL command (or if the SQL itself already does it) that makes it check all the contents of the data…
-
2
votes1
answer522
viewsQ: Login with Cookie or Session on PHP5
I am implementing an administrative area on my site and always used $_SESSION to log in. However, I now need the user login saved if he leaves the page. My question: I need to use the $_COOKIEto…
-
6
votes1
answer953
viewsQ: Bootstrap side menu not configured in mobile version
I’m fighting to make a website and present it on my TCC. I separated the sections of the site (body, head, header, footer...) into isolated files to be able to move more easily. I took great care to…
-
0
votes6
answers3209
viewsA: How to turn string into time in PHP?
You can convert hours and minutes to seconds to make the difference easier to calculate. $horaA = "01:30:00"; // HORA INICIAL $horaB = "20:23:12"; // HORA FINAL // Função de calculo. Se tiver mais…
-
2
votes1
answer4344
viewsA: Equation of 1° degree in C
Taking into account an equation of the type Ax + b = c, being: Ax: the sum of all x of the equation b: the sum of all numbers in the equation c: the result And assuming that your program will…
-
7
votes3
answers122074
viewsA: Place text next to image
You must place the image inside a <p>/<div> and use an element align on the tag <img>. Would look like this: <div> <img align="left"> Lorem Ipsum </div>…