on-internet

How to locate element in shadow-root (closed) host

Its my code. I have a excel datas and wanna search these on that url but vscode cant finding elements. Why it cant find that element? I tried css selector,id, xpath but didnt work. import openpyxl from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.wait import WebDriverWait path = "dvt.xlsx" driver = webdriver.Chrome() url = "https://www.boschaftermarket.com/xc/en/keysecure.html" driver.implicitly_wait(5) driver.get(url) wb = openpyxl.load_workbook(path) sheet = wb.active sayac = 1 while sayac <= 14109: str_getVal = "A" + str(sayac) # Bir

Join the discussion →

mysql suddently not starting in xampp (WINDOWS)

I went to start xampp and suddenly mysql isn't starting. This happened the other day, I deleted the ib_logfiles and restarated it, and that worked. But that isn't working this time. I tried copying everything from backup to the data folder, but when I log into localhost, it is asking me to reinstall wordpress, which isn't what I want either. I've looked through countless posts but nothing people are recommending seems to work. I am not a coder by any means. This is my first time using a localhost to build a website. Here's the error: 2023-10-04 13:48:34 0 [Note] Starting MariaDB 10.4.28-MariaD

Join the discussion →

Some legend elements disappear when points plotted with alpha<1 with ggplot

This plot is generated with alpha = 0.5 for the points. In the legend most of the point shapes are not displayed on-screen. The fix suggested here doesn't work. Full code for this display: qq <- data.table(LSGrp = factor(1:4), Incent=1:4, Size=1:4, LnNum = 1:4, Actual=4:1, Age=10:13) ggplot(data=qq, aes(x=Incent, y=Actual, fill=Age, shape=LSGrp, size=LnNum) ) + geom_point(col='black', alpha=0.5) + scale_fill_distiller(type='seq', palette='Spectral', guide='colorbar') + scale_shape_manual(values=c(21:24)) + guides(size=guide_legend(override.aes=list(shape=21, title='Ln Num', alpha=1)), shape=gu

Join the discussion →

Plugin [id: 'com.android.application', version: '8.3.0', apply: false] was not found in any of the following sources:

This error appears when I try to run Gradle Run: Plugin [id: 'com.android.application', version: '8.3.0', apply: false] was not found in any of the following sources: - Gradle Core Plugins (plugin is not in 'org.gradle' namespace) - Plugin Repositories (could not resolve plugin artifact 'com.android.application:com.android.application.gradle.plugin:8.3.0') Searched in the following repositories: Gradle Central Plugin Repository Google MavenRepo My Build.Gradle Properties is the following: buildscript { ext.kotlin_version = '1.7.10' repositories { google() mavenCentral() } dependencies { classp

Join the discussion →

Flutter application not working correctly with burp proxy

I have a Flutter application. I have to perform a penetration test on it. I used proxydroid to intercept requests since normal proxy settings don't work with this app. I successfully see the requests on burp, and receive a response from the server. However as soon as the response is sent to the application, a generic error message appears. I already thought about a parsing error. Without burp or with tls passthrough the app works perfectly. How can I understand what may cause the problem? I also tried to change iptables settings and set up invisible proxy on burp settings. The behaviour of the

Join the discussion →

Conan: What is the difference between specifing the compiler in environment variables or in settings?

This was my Conan (1.59) profile: [settings] arch=x86_64 arch_build=x86_64 build_type=Release compiler=clang compiler.libcxx=libstdc++11 compiler.version=14 os=Linux os_build=Linux [options] [build_requires] [env] Which didn't work, because CMake detected not the Clang executable, but executable /usr/bin/c++: -- Conan toolchain: Setting CMAKE_POSITION_INDEPENDENT_CODE=ON (options.fPIC) -- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF -- The CXX compiler identification is GNU 11.4.0 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - failed -- Check for working CXX compil

Join the discussion →

Conan: What is the difference between specifing compiler in environment variables or in settings?

This was my Conan (1.59) profile: [settings] arch=x86_64 arch_build=x86_64 build_type=Release compiler=clang compiler.libcxx=libstdc++11 compiler.version=14 os=Linux os_build=Linux [options] [build_requires] [env] Which didn't work, because CMake detected not the Clang executable, but executable /usr/bin/c++: -- Conan toolchain: Setting CMAKE_POSITION_INDEPENDENT_CODE=ON (options.fPIC) -- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF -- The CXX compiler identification is GNU 11.4.0 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - failed -- Check for working CXX compil

Join the discussion →

Conan: What is the difference between specifing compiler in env or in settings?

This was my Conan (1.59) profile: [settings] arch=x86_64 arch_build=x86_64 build_type=Release compiler=clang compiler.libcxx=libstdc++11 compiler.version=14 os=Linux os_build=Linux [options] [build_requires] [env] Which didn't work, because CMake detected not the Clang executable, but executable /usr/bin/c++: -- Conan toolchain: Setting CMAKE_POSITION_INDEPENDENT_CODE=ON (options.fPIC) -- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF -- The CXX compiler identification is GNU 11.4.0 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - failed -- Check for working CXX compil

Join the discussion →

Type hinting Python dataclasses subclass without redefining default value

When using keyword only dataclasses to define fields of a base class that are inherited by subclasses, how should the fields be type hinted in the subclasses to denote that the fields have a limited set of permissible values without re-assigning the default value? Example (for illustrative purposes - not a real world example): from dataclasses import dataclass from enum import auto, StrEnum from typing import Literal class Direction(StrEnum): DOWN = auto() LEFT = auto() UP = auto() RIGHT = auto() UNKNOWN = auto() @dataclass(kw_only=True) class Base: direction: Direction = Direction.UNKNOWN @da

Join the discussion →

Load lucene-core dependency at runtime

I want to use opensearch-rest-high-level-client and elasticsearch-rest-high-level-client libraries within my application. Both of these jars use different version of lucene-core as dependencies. Is it possible to use different version of lucene-core at runtime? I tried to find a version of both the libraries with common version of lucene-core, but couldn't find one.

Join the discussion →

How to remove debug code from js files when building using vite

I am trying to add js debug code for my library built in vue3 and i want it to be automatically removed when building to production using a separate vite.config.js file. The debug code can be sandwiched in specific comment lines like this : /* ------------test---------- */ console.log("this is a testing test"); /* ------------test---------- */ is there a way to do that in vite configuration, or which special plugins or i will need to manually open files and remove those code snippets with a node script before the compilation

Join the discussion →

pdf.js - get data of modified pdf file

I'm using the pdf.js (v3.10.111) stable version (for modern browsers) from https://mozilla.github.io/pdf.js/getting_started/#download . I'm able to load a pdf file and make graphical modification on it, and save the modified file onto my desktop. The code for this is the following: However, my goal would be to save the file back to the server. I'm not really aware how I can get the data of the modified file with Javascript / Jquery. How can I do that? Here's my current code: <!DOCTYPE html> <html> <head> <script src="build/pdf.js"></script> <script src="build/pdf.worker.js"></script> <script s

Join the discussion →

I am getting the exit code 1 for fetching the submodule in git hub action

I am using the git hub actions to deploy to app service but i am unable to fetch the submodule and getting exit code as 1 I tried by creating PAT token in the settings and authorizes SSO but i am getting the exit code 1 when i am fetching the submodule from yml file in git hub action. Fetching the repository /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/v2*:refs/remotes/origin/v2* +refs/tags/v2*:refs/tags/v2* The process '/usr/bin/git' failed with exit code 1 Waiting 16 seconds before trying again /usr/bin/git -c prot

Join the discussion →

Calculate probability that normal distribution sample is smallest in group polars python

I have a polars dataframe along the lines of: df = pl.DataFrame( { "group": [1, 1, 1, 2, 2, 2, 2], "mean": [25.5, 25.2, 24.9, 50.5, 55.1, 54.2, 60], "std": [2.5, 3.5, 1.7, 10.2, 5.5, 7.8, 20.5], } ) For each row we have a mean and standard deviation for a normal distribution. I'd like to add a column which represents the probability that when sampling, that row would have the lowest value in its group. It is a strict requirement that the column is added with an expression which can be entered into a with_columns call. I was able to write the following: def probability_smallest_in_group(series)

Join the discussion →

City break during 6h transit in Delhi

My international flight should land at 8:05 at Delhi on Sunday and my domestic flight is scheduled at 14:30. I would like to visit the city as 6 hour seems like lots of time. I dont need to check in or hand over luggae. I just need to get through security there and back. Am I naive? Does it make sense? When shall I arrive to Delhi to get back through the security?

Join the discussion →

Styling QR Code Generated with simple-QRcode in Laravel to Achieve Circular Eye Shape

I'm using the simple-QRcode package in Laravel to generate QR codes, and I'm trying to style the QR code to have a circular eye shape instead of the default square eye. However, I'm facing an issue where the eyeball shape remains square even though I've managed to change the eye to a circular shape. Here's the code I'm using to generate and style the QR code: QrCode::size(200) ->eye('circle') ->style('round') ->format('png') ->generate('Example', public_path('test.png')); Achieved QR Code want to achieve QR code like this

Join the discussion →

How to filter records from Activityparties table where the party lookup field is related to a systemuser using Web API

I'm querying appointment participants, from Dynamics 365 CRM, from the "Required Attendees" lookup field in the Appointments. I've created a query that returns records from the "activityparties" table, where "participationtypemask" equals 5 (Required Attendee). I've tried to apply a second filter to only return records where the party is a user, but the filter is ignored and I get records with all parties (accounts, contacts, cases, etc.). This is my query: OData.Feed("https://ar.api.crm4.dynamics.com/api/data/v9.2/" & "activityparties?" & "$select=_activityid_value, participationtypemask, _pa

Join the discussion →

How to have dependabot auto approve with multiple GitHub required approvers?

I'm looking for a way to have all PRs dependabot makes to auto merge if all required CI validations pass without any further manual intevention. The issue is, this is to be done on a repository that has two required approvers (not one) and may have "require review from Code Owners" set. I'm referencing this documented workflow to have all dependabot PRs automatically approved: https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions#approve-a-pull-request When running the workflow, this adds github as a reviewer. However, since our r

Join the discussion →

How to create password protect zip file in nodejs using node-7z-archive package

Please anyone guide me, how We can create password protected zip file and extract. using node-7z-archive https://www.npmjs.com/package/node-7z-archive actually I want to create password protect zip file with a folder code to create a simple zip file: const fs = require('fs'); const path = require('path'); const archiver = require('archiver'); const sourceFolder = 'create_zip'; // Replace with the actual folder path const zipFileName = 'output.zip'; // Create a writable stream to the zip file const output = fs.createWriteStream(zipFileName); // Create a zip archive const archive = archiver('zip

Join the discussion →

AttributeError: 'str' object has no attribute 'cat'

For each GENE_SYMBOLS column of a dataframe, merge the rows and retain only unique comma-separated or dash-separated values. After merging the values of each row into a list, obtain only the unique values. geneset = pd.read_csv("genesets.v2023.1.Hs.tsv", sep="\t", index_col=0) geneset = geneset.loc["GENE_SYMBOLS"] # retrieve only rows with index name "GENE_SYMBOLS" for i in geneset.columns: genes = i.cat(sep=',').tolist() # Merge all the rows of strings with "," delimiter and store as a list genes = genes.split(",") # split by the "," delimiter genes = genes.split("-") # or the "-" delimiter g

Join the discussion →

Django Custom Field with Fernet Cannot Decrypt

This is my custom field that I call in a model. Migrations succeed and I'm able to insert an encrypted value into the data table. However, it will not decrypt. Here's the custom field class: class SecureString(CharField): """Custom Encrypted Field""" #kdf = X963KDF(algorithm=hashes.SHA256(), # length=32, #sharedinfo=None, # backend=default_backend()) key = bytes(settings.FERNET_KEY,'utf-8') f = Fernet(key) def from_db_value(self, value, expression, connection): return self.f.decrypt(str.encode(value)) def get_prep_value(self, value): return self.f.encrypt(bytes(value, 'utf-8')) And here is the

Join the discussion →

In NGINX, Arabic URLs do not redirect to 410 pages (status code), but English URLs redirect to 410 pages correctly

We have a website and a website with Arabic and English addresses. We need to redirect some URLs from a 404 status code to a 410 status code in the NGINX web service (for SEO). We configured the NGINX web service and added Arabic and English URLs. English URLs successfully redirect to status code 410 (NGINX error page), but Arabic URLs do not redirect and return a 404 error page. My question is why redirecting Arabic URLs doesn't work, since the configuration for both URL types (Arabic and English) is exactly the same. Example URLs: https://example.com/test And https://example.com/تست NGINX co

Join the discussion →

How do I browse the raw data collected by Prometheus?

I'm looking for a way to browse the time based database raw data, in a way similar to how SQL Server Management Studio gives you access to the raw data held within the relational database SQL creates. It can be a GUI or console based, because with SQL you can do either or, I'm really hoping for some kind of graphical interface though. Is there a way to browse through the data? Or can someone simply explain how the raw data would look, if there were such a way? With SSMS, I'm able to get so much information about the tables, fields and rows, and see how it's all structured and related. I do und

Join the discussion →

NTAG 424 SDMENCFileData use-case

I've been burying my nose in the AN12196.pdf for a few days now and slowly getting a hang of it. What I cannot clearly understand is the idea behind the SDMENCFileData. In section 4.4.3 SDMENCFileData mirror, if I understand it correctly, it's saying that you can take any 32-character plaintext part of your URL, and it gets encrypted when tapping, am I right? What would be the use-case of this? If I had some secret thing, that's shorter than 32-chars, I have to pad it before encrypting, and if I had something longer I wouldn't be able to use it. I wanted to know what other's use this for.

Join the discussion →

How to Connect Langchain Database Agent with SqlServer

I need to connect my langchain database agent with my sqlserver database so that my agent can access the data, yet in the documention it does not explain how to do so, it only shows how to connect to sqlite like the following code: from langchain.agents import create_sql_agent from langchain.agents.agent_toolkits import SQLDatabaseToolkit from langchain.sql_database import SQLDatabase from langchain.llms.openai import OpenAI from langchain.agents import AgentExecutor from langchain.agents.agent_types import AgentType from langchain.chat_models import ChatOpenAI db = SQLDatabase.from_uri("sqlit

Join the discussion →

Spring flyway Rebase migration scripts

Hi in my project I have around 200 flyway migration scripts and I need to clean those and create a new baseline. For example, I have the following schema versions V1_0_0__baseline.sql V1_1_0__schema-change1.sql V1_2_0__schema-change2.sql . . . V1_200_0__schema-change200.sql Now I need to clean the src/main/resources/db/migration files and create a new record as below. V2_0_0__baseline.sql Then I added this config and try to rebase the schema versions spring.flyway.baselineOnMigrate = true spring.flyway.baseline-version=2 flyway core version: 8.5.13 spring boot version: 2.7.7 Are there any conf

Join the discussion →

How to strongly type fetch with Typescript

I would like to create a custom fetch function which thanks to TypeScript has strongly type params and returns. Imagine I declare types like this interface ResponseData { status: 'success' | 'error'; } interface RequestBody { foo: string; bar: number; } const endpoint = { url: '/endpointurl/', method: 'get', /* A way to associate RequestBody and ResponseData types */ }; I would like to call my custom fetch function with endpoint object and automatically have typing on the body I pass in params and the data I get in returns /* myfetch would use endpoint.url and endpoint.method to fetch data */

Join the discussion →

Expected identifier but found "*" [css-syntax-error] while updating angular 10 to 14

When I updated my angular version from 10 to 14, at the time of making build I have seen warning in command prompt. The error as below:- Warning: ▲ [WARNING] Expected identifier but found "*" [css-syntax-error] styles.css:1617:2: 1617 │ *cursor: hand; ╵ ^ SS:- Remove this CSS syntax error from commant prompt while making the build.

Join the discussion →

SEC filings data using API in python with filter for specific strings

I'm trying to extract SEC filings in a certain date range with a certain key string, for several different companies. Basically I'm trying to replicate the search in this link: SEC Edgar (https://www.sec.gov/edgar/search/#) I installed the required libraries using pip and ran the below code, which gives me all the submissions in a dict format. from sec_edgar_api import EdgarClient edgar = EdgarClient(user_agent="<Sample Company Name> <Admin Contact>@<Sample Company Domain>") # Sample CIK # manual pagination handling submissions = edgar.get_submissions(cik="104169", handle_pagination=False) How

Join the discussion →
Older stories