[Solved] Changing dynamically CSS DIV Background every certain time [duplicate]

[ad_1] You can use the setInterval function to change the image each X seconds and array to store the url’s: HTML <div id=”head”> content </div> CSS #head { background:#181015 url( ../images/bg_header.jpg) no-repeat; background-size: cover; min-height:520px; } JS var head = document.getElementById(‘head’), images = [‘img1.jpg’, ‘img2.jpg’, ‘img3.jpg’], i = 0; setInterval(function(){ if (i === images.length) i … Read more

[Solved] Python xml help? Finish my program?

[ad_1] You create a root element using ET.Element(), adding the children you want to it. Then, you give that as the root to an ET.ElementTree, and call .write() on that, setting xml_declaration to True. import xml.etree.cElementTree as ET def record_time(root, time, speed, acc): attribs = {“t”: str(time), “speed”: str(speed), “acc”: str(acc)} ET.SubElement(root, “record”, attribs) root … Read more

[Solved] How to execute the asynchronous task several times?

[ad_1] You can iterate through the list size and call asynchronous task in that. for(int i=0; i<list.size();i++) { // Call AsyncTask with any value you want to pass // just generate a constructor accordingly new AsyncTask(i).execute(); } And get the value in AsyncTask class with required constructor : public class AsyncTask{ Integer position; public AsyncTask(Integer … Read more

[Solved] want to remove the space between two divisions using css

[ad_1] For the start do li { margin-bottom: 0; margin-top: 0;} since by default li element has bottom/top (depending on a browser) margin. If you need to “squeeze” the elements even more, then go with the negative values for the margin. 1 [ad_2] solved want to remove the space between two divisions using css

[Solved] Unable to capture records name , price and rating and image in Requests Python [closed]

[ad_1] You have to scrape the adidas site and use regex: import requests import re endpoint = “https://www.adidas.com.au/continental-80-shoes/G27707.html” headers = { ‘User-Agent’: ‘Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36’ } response = requests.get(endpoint, headers = headers) data = response.text pricereg = r”(?<=\”price\”:)(.*)(?=,\”)” namereg = r”(?<=\”name\”:)(.*)(?=,\”co)” ratingreg= r”(?<=\”ratingValue\”:)(.*)(?=,\”reviewCou)” price = re.search(pricereg, data, re.MULTILINE).group() … Read more

[Solved] User/Admin login in PHP

[ad_1] Could you try this out? $conn = mysql_connect (“localhost”, “root”,””); mysql_select_db(“a_blub”,$conn); $result = mysql_query(“SELECT password FROM user WHERE username=””.mysql_real_escape_string($_POST[“theusername’]).”‘ LIMIT 1”, $conn); $row = mysql_fetch_assoc($result); if ($_POST[‘thepassword’] == $row[‘password’]) { if ($row[‘admin’] == 1) { header(“Location: hit-counter.php”); exit; } else { header(“Location: index_loginsuccesful.php”); exit; } } else { header(“Location: index_loginfailed.php”); exit; } 2 [ad_2] … Read more

[Solved] SQL Rows into Columns

[ad_1] You cannot achieve this with transpose. rather try using natural full outer join WITH T AS (SELECT P.*, ROW_NUMBER ( ) OVER (PARTITION BY PERSON, LEVELS ORDER BY LANGUAGE) R FROM PROGRAMMER P) SELECT PERSON, SENIOR, MID, JUNIOR FROM (SELECT PERSON, R, LANGUAGE SENIOR FROM T WHERE LEVELS = ‘SENIOR’) NATURAL FULL OUTER JOIN … Read more

[Solved] Recover damaged lotus [closed]

[ad_1] Well…try this steps: Open the “Start” menu and click “Computer” or “My Computer” depending on your version of Windows. Navigate to the C drive. Open the “Notes” folder. Double-click on the “Notes.ini” file to open it in Notepad. Place a semicolon (;) in front of the following two lines to temporarily disable VirusScan: AddInsMenus=NCMenu … Read more

[Solved] Remove text that starts with [closed]

[ad_1] You could use the following regex to replace from the first – character and any characters there after. $(“.colsborder h3″).each(function(){ var str = $(this).text(); var replaced = str.replace(/-.*/, ”); $(this).text(replaced) }); <script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js”></script> <div class=”colsborder”> <h3>Startoftext-needtoremove</h3> </div> This method would be faster than using the substring or split methods. 1 [ad_2] solved Remove text … Read more

[Solved] Take input from keyboard and edit existing text file

[ad_1] You need to write to your file using the file stream you have defined once you have taken your inputs and you can do that using fout as follows. Additionally, there are different modes in which you could open a file for writing to it, which you can go through here. fout.open(“FootballTeam.txt”); cout << … Read more