dimanche 28 mars 2021

Inheritance in Css [closed]

I was learning different type of inheritance and I came across Revert. I was trying to use it and veerytime it did something else I wanted it to do. SO can someone in quick easy words explain what revert actualy means?




need help to loggin into my sql management studio

Iam really stuck.. I have a local database in my Sql management server. Once i upload my website to filezilla and when trying to access it online, it wont show.

Iam working in C#

and my webconfig file is like:

. I cannot log into sql server authentication using any info my host has sent me. So i have no idea what it can be.

I just need some help please. Iam new to this.




How to dynamically embed a pdf(locally stored in browser) in HTML?

I tried to use embed and iframe tags which work for the first page.

<iframe src="~/Documents/Upload/myPDF.pdf" id="pdfDisplay"> 

But when I try to change the src in javascript, I get the same page displayed over again.

document.getElementById('pdfDisplay').setAttribute("src", "~/Documents/TextDetection/Upload/" + files[currentIndex]);

Where files[current] is the dynamically generated filename that exists in the local storage.

I don't know what I am doing wrong because its not working.




Webscraping with Python Requests and getting Access Denied even after updating headers

this webscraper was working for a while but the website must have been updated so it no longer works. After each request I get an Access Denied error, I have tried adding headers but still get the same issue. This is what the code prints:

</html>

<html><head>
<title>Access Denied</title>
</head><body>
<h1>Access Denied</h1>

You don't have permission to access "http://www.jdsports.co.uk/product/white-nike-air-force-1-shadow-womens/15984107/" on this server.<p>
Reference #18.4d4c1002.1616968601.6e2013c
</p></body>
</html>

Heres the part of the code to get the HTML:

scraper=requests.Session()

headers = {
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36',
}
            
html = scraper.get(info[0], proxies= proxy_test, headers=headers).text
soup = BeautifulSoup(html, 'html.parser')

print(soup)
stock = soup.findAll("button", {"class": "btn btn-default"})

What else can I try to fix it? The website I was to scrape is https://www.jdsports.co.uk/




I Just want To Play Animation With Audio In model-viewer

I want to augment an animated 3d model in model-viewer where the animation should play in sync with audio. I have the implementation but there is some issue with augmentation surface pointing and audio sync with different browsers (Android And iOs) . Glitch Editor

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>&lt;model-viewer&gt; example</title>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />

    

    <!-- The following libraries and polyfills are recommended to maximize browser support -->
    <!-- NOTE: you must adjust the paths as appropriate for your project -->

    <!-- 🚨 REQUIRED: Web Components polyfill to support Edge and Firefox < 63 -->
    <script src="https://unpkg.com/@webcomponents/webcomponentsjs@2.1.3/webcomponents-loader.js"></script>

    <!-- 💁 OPTIONAL: Intersection Observer polyfill for better performance in Safari and IE11 -->
    <script src="https://unpkg.com/intersection-observer@0.5.1/intersection-observer.js"></script>

    <!-- 💁 OPTIONAL: Resize Observer polyfill improves resize behavior in non-Chrome browsers -->
    <script src="https://unpkg.com/resize-observer-polyfill@1.5.0/dist/ResizeObserver.js"></script>

    <!-- 💁 OPTIONAL: Fullscreen polyfill is required for experimental AR features in Canary -->
    <!--<script src="https://unpkg.com/fullscreen-polyfill@1.0.2/dist/fullscreen.polyfill.js"></script>-->

    <!-- 💁 OPTIONAL: Include prismatic.js for Magic Leap support -->
    <script src="https://unpkg.com/@magicleap/prismatic/prismatic.min.js"></script>
    
    
  </head>
  <body>
  
      <!-- pfc sync between audio time and model-viewer animation time -->
    <script>
      function Sync(selector, audioSelector) {
        var checkExist = setInterval(function() {
          if (document.querySelector(selector) != null) {
            var modelViewer = document.querySelector(selector);
            var sound = document.querySelector(audioSelector);

            sound.addEventListener("timeupdate", () => {
              modelViewer.currentTime = sound.currentTime;
            });

            
            var promise = sound.play();
            if (promise !== undefined) {
              promise
                .then(_ => {
                  // Autoplay started!
                })
                .catch(error => {
                  // Autoplay was prevented.
                  // Show a "Play" button so that user can start playback.
                });
            }
            
            
            clearInterval(checkExist);
          }
        }, 1000);
      }
    </script>  
  <!-- 
  Penguin + Train Sound = ok
  "https://cdn.glitch.com/7d7e8236-5fa5-4809-ab74-eb6bf2bef1c6%2Fmodel.glb?sound=https://cdn.glitch.com/99537520-86ee-43b2-9c9a-4e6b399f9e42%2FSteamTrain.ogg&link=https://prefrontalcortex.de"

  Train + Train sound = kein Sound
"https://cdn.glitch.com/99537520-86ee-43b2-9c9a-4e6b399f9e42%2FTrain-br111.glb?sound=https://cdn.glitch.com/99537520-86ee-43b2-9c9a-4e6b399f9e42%2FSteamTrain.ogg&link=https://prefrontalcortex.de"
   --> 
    
  <model-viewer
        src="https://cdn.glitch.com/7fa75de4-559e-4a0e-9d57-bbfce6666947%2FTrainAnimated-Blender-3.glb?sound=https://cdn.glitch.com/99537520-86ee-43b2-9c9a-4e6b399f9e42%2FSteamTrain.ogg&link=https://google.com"
        ios-src="https://cdn.glitch.com/7fa75de4-559e-4a0e-9d57-bbfce6666947%2FTrain-br111-fixedTangents.usdz?sound=https://cdn.glitch.com/7fa75de4-559e-4a0e-9d57-bbfce6666947%2FSteamTrain.mp3&link=https://google.com"
        ar
        background-color="#fffff"
        alt="BR 111"
        exposure="1"
        shadow-intensity="1"
        camera-controls
        auto-rotate
        autoplay
        quick-look-browsers="safari chrome"
        id="modelviewer"
        style="position:absolute; left:0; top:0; margin:0; padding:0; width:100%; height:100%;"
      >
  </model-viewer>

  <section class="attribution">
  <span>
        <span><audio controls autoplay loop id="sound">
              <source src="https://cdn.glitch.com/99537520-86ee-43b2-9c9a-4e6b399f9e42%2FSteamTrain.ogg" type="audio/ogg">
              <source src="https://cdn.glitch.com/7fa75de4-559e-4a0e-9d57-bbfce6666947%2FSteamTrain.mp3" type="audio/mp3">  
          </audio></span>
      </span>
    </section> 
    
    <script>
        Sync("#modelviewer", "#sound");
    </script>  
    
    <!-- 💁 Include both scripts below to support all browsers! -->
    <!-- Import the component -->
    <script
      type="module"
      src="https://unpkg.com/@google/model-viewer/dist/model-viewer.js"
    ></script>
    <script
      nomodule
      src="https://unpkg.com/@google/model-viewer/dist/model-viewer-legacy.js"
    ></script>
  </body>
</html>

Can any one help me fixing the issue . The audio is not properly in sync with the animated model. The Model rendering is also having some issue . Thank in Advance




Is there a way to have a clear image and text on top of a blurred bg-image within a div via Tailwind CSS?

I have been working on this issue for like 4 hours now and I am coming up with nothing.

I want to be able to make a card element for my website, I want the background to be blurred but i want an image on top of that blurred image and text.

I am using tailwind and so far my attempts have blurred everything.

Here is my attempt https://play.tailwindcss.com/PK2FXaIYx4?size=564x720




The way....what is the shortest way to the correct information

how do programers get access to the correct information without having to ask, like what is the way, Let me give an example, in order to use postgres in Django application, You will have to install something called psycopg2, but in Django-postgres documentation https://docs.djangoproject.com/en/3.1/ref/contrib/postgres/ Theres no such thing as "getting started", theres no mention of psycopg2 at all, u will just have to spend a lot time to google it or watch a video, and if google doesn't have the answer or you just didn't search it correctly, you are stuck, And this is only an example, i have encountered many of these situations, and it's so frustrating, I mean i didn't write postgres and i didn't write django either, i don't know how it works unless someone told me, it doesn't feel like im in control, it's not like a math problem or algorithm where you just have to solve it on your own, but you are in control, The problem is some basic information is just too hard to find in the documentation, the way i do it doesn't seem right, Is everyone else doing it like this? or is there a "smart way" to find it? or a smart way to read the docs?