Posts

Want to add french version to the website and trouble in lauching it due to 'index.html'

I want to add a drop-down so that people can see the French version of my website. When I double-click the ‘index.html’ file, it works fine from the local computer, but I’m having trouble hosting it on GitHub. Here is the link to the repository- https://github.com/Kkhurana007/blog_le07decembre.github.io

BeautifulSoup find.text returns empty string although element exists

I am scraping the following; https://www.espn.com/nfl/scoreboard/ and trying to get the times of the games import requests from bs4 import BeautifulSoup r = requests.get("https://www.espn.com/nfl/scoreboard") soup = BeautifulSoup(r.content, "lxml") for section in soup.find_all("section", {"class": "Card gameModules"}): for game in section.find_all("section", {"class": "Scoreboard bg-clr-white flex flex-auto justify-between"}): print(game.find("div", {"class": "ScoreCell__Time ScoreboardScoreCell__Time h9 clr-gray-03"}).text) Even though it should return the times of the games, it just returns empty strings. Why is this?

'no such file' error with Swift ArgumentParser package

I've added the Swift Argument Parser package to my Xcode Project, and I get the following errors: dyld[12294]: Library not loaded: @rpath/ArgumentParser.framework/Versions/A/ArgumentParser Reason: tried: .... (code signature in PackageFrameworks/ArgumentParser.framework/Versions/A/ArgumentParser' not valid for use in process: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)) '/System/Volumes/Preboot/Cryptexes/OS@rpath/ArgumentParser.framework/Versions/A/ArgumentParser' (no such file) '/Library/Frameworks/ArgumentParser.framework/Versions/A/ArgumentParser' (no such file), '/System/Library/Frameworks/ArgumentParser.framework/Versions/A/ArgumentParser' (no such file, not in dyld cache) The build settings are defaults. If I select "Disable Library Validation", then it will run in Xcode, but the executable won't run in the Terminal, with the same errors. I'm on Ventura 13.1 and Xcode 14....

QODBC Online linked server to SQL server has empty tables - no data

I have a linked server from SSMS to Quickbooks through QODBC Online. I have run the QODBC Setup Screen and connected to the desired client. The query runs but returns no data. it shows all the column names but no data. am I missing a step? created linked server. tested connection. run query. no results Im able to connect and receive data through powerbi but nothing on sql server. what am i missing?

Mocking Azure BlobServiceClient in Python

I am trying to write a unit test that will test azure.storage.blob.BlobServiceClient class and its methods. Below is my code A fixture in the conftest.py @pytest.fixture def mock_BlobServiceClient(mocker): azure_ContainerClient = mocker.patch("azure.storage.blob.ContainerClient", mocker.MagicMock()) azure_BlobServiceClient= mocker.patch("azure_module.BlobServiceClient", mocker.MagicMock()) azure_BlobServiceClient.from_connection_string.return_value azure_BlobServiceClient.get_container_client.return_value = azure_ContainerClient azure_ContainerClient.list_blob_names.return_value = "test" azure_ContainerClient.get_container_client.list_blobs.return_value = ["test"] yield azure_BlobServiceClient Contents of the test file from azure_module import AzureBlob def test_AzureBlob(mock_BlobServiceClient): azure_blob = AzureBlob() # This assertion passes mock_BlobServiceClient.from_connection_string.asser...

How to simulate a bad First Input Delay (Web Core Vitals) score?

I need to create a webpage that will generate a bad First Input Delay (FID) value. In case you aren't aware, FID is part of Google's Web Core Vitals. I want to simulate a bad FID because I am testing a website scanning tool that is supposed to flag a bad FID value. Therefore I want to simulate a bad value on a webpage to make sure it works. To be clear - I am NOT trying to fix my First Input Delay. I want to create a webpage that gives a bad First Input Delay value on purpose. But I'm not sure how to do that. I have a HTML page with <button id="button">Click Me</button> . And in the <head> I have added this script: <script type="module"> // Get the First Input Delay (FID) Score import {onFID} from 'https://unpkg.com/web-vitals@3/dist/web-vitals.attribution.js?module'; // Get the button element const button = document.getElementById('button'); // Add a click event listener to the button button.addEventList...

How to download images

I am trying to follow the firebase docs to download my user image from firebase storage but my image is not downloading and I received this error Thread 1: Fatal error: Unexpectedly found nil while unwrapping an Optional value What am I missing from this code that will allow me to download my image from firebase storage let storage = Storage.storage() let storageRef = storage.reference(forURL: "gs://kaw-tank-work-904a6.appspot.com/ProfileImages/profilePic") storageRef.getData(maxSize: 1 * 1024 * 1024) { data, error in if error != nil { print("there was an error! \(String(describing: error))") print("image was retrieved") // Data for "images/island.jpg" is returned ...