content
stringlengths
86
88.9k
title
stringlengths
0
150
question
stringlengths
1
35.8k
answers
list
answers_scores
list
non_answers
list
non_answers_scores
list
tags
list
name
stringlengths
30
130
Q: Confused about Powershell parameter documentation I'm not sure if I'm confused about how some of Powershell documentation regarding parameters work, or if the documentation has some mistakes. For example, the docs for get-verb [1] say that for parameter -Group, the cmdlet accepts pipeline input, at position 0. How...
Confused about Powershell parameter documentation
I'm not sure if I'm confused about how some of Powershell documentation regarding parameters work, or if the documentation has some mistakes. For example, the docs for get-verb [1] say that for parameter -Group, the cmdlet accepts pipeline input, at position 0. However, in the Inputs section, it says "None". Also, this...
[ "\nRegarding the first question, the docs are in fact showing inaccurate information and GitHub Issue #9522 was raised to correct this.\nLooking at Get-Help we see the following:\nPS ..\\pwsh> Get-Help Get-Verb -Parameter * | Select-Object Name, Position\n\nname position\n---- --------\nGroup 0\nVerb 1\n\nYet, i...
[ 1 ]
[]
[]
[ "powershell" ]
stackoverflow_0074680814_powershell.txt
Q: Proper way to get TAI timestamp in kotlin I want to get the TAI timestamp in kotlin in "seconds":"nanoseconds" format. It's my current solution and I'm sure there would be some better way to achieve this, import java.time.Instant import java.time.temporal.ChronoUnit; fun main() { val epochNanoseconds = Chrono...
Proper way to get TAI timestamp in kotlin
I want to get the TAI timestamp in kotlin in "seconds":"nanoseconds" format. It's my current solution and I'm sure there would be some better way to achieve this, import java.time.Instant import java.time.temporal.ChronoUnit; fun main() { val epochNanoseconds = ChronoUnit.NANOS.between(Instant.EPOCH, Instant.now()...
[ "Yes, you can use the toEpochMilli() method of the Instant class to obtain the number of milliseconds since the start of the epoch as a long value. You can then use this long value to calculate the number of seconds and nanoseconds remaining. The following example demonstrates how this can be done:\nJava:\nlong epo...
[ 0 ]
[]
[]
[ "epoch", "java", "kotlin" ]
stackoverflow_0074681344_epoch_java_kotlin.txt
Q: Difficulty implement a C++ array of type abstract base class while having multiple different derived classes in it We are coding a board game for an OOP C++ class where different spaces need to have different types of member data but we also want to be able to quickly access the data at any space. The design we ha...
Difficulty implement a C++ array of type abstract base class while having multiple different derived classes in it
We are coding a board game for an OOP C++ class where different spaces need to have different types of member data but we also want to be able to quickly access the data at any space. The design we have right now consists of a "board" array that is length 40 and it is of type "space" pointer. Space is a fully abstract ...
[ "If you want to access the data1 and data3 member variables of your spaceType1 and spaceType2 classes, respectively, you will need to cast the pointers stored in the Board array to the appropriate derived class. For example, you could use a dynamic cast to convert a Space* to a spaceType1* and access data1 like thi...
[ 0 ]
[]
[]
[ "c++", "oop" ]
stackoverflow_0074681327_c++_oop.txt
Q: could I loop through 3 arrays and join them to one list? could I loop through 3 arrays and join to one list ? list1 = ['test1','test2','test3'] list2 = ['2022-12-12T16:44','2022-12-12T13:45','2022-12-12T22:57'] list3 = ['low','medium','high'] can i get something like this? result =[ ['test1','2022-12-12T16:4...
could I loop through 3 arrays and join them to one list?
could I loop through 3 arrays and join to one list ? list1 = ['test1','test2','test3'] list2 = ['2022-12-12T16:44','2022-12-12T13:45','2022-12-12T22:57'] list3 = ['low','medium','high'] can i get something like this? result =[ ['test1','2022-12-12T16:44','low']] ['test2','2022-12-12T13:45','medium'] ['test...
[ "zip allows you to iterate simultaneously on several iterables (truncating to the length of the shortest iterable):\nlist4 = [ [a,b,c] for a,b,c in zip(list1,list2,list3)]\n\n# [['test1', '2022-12-12T16:44', 'low'],\n# ['test2', '2022-12-12T13:45', 'medium'],\n# ['test3', '2022-12-12T22:57', 'high']]\n\n" ]
[ 3 ]
[]
[]
[ "arrays", "list", "loops", "python", "tuples" ]
stackoverflow_0074681376_arrays_list_loops_python_tuples.txt
Q: lxml: Xpath works in Chrome but not in lxml I'm trying to scrape information from this episode wiki page on Fandom, specifically the episode title in Japanese, 謀略Ⅳ:ドライバーを奪還せよ!: Conspiracy IV: Recapture the Driver! (謀略Ⅳ:ドライバーを奪還せよ!, Bōryaku Fō: Doraibā o Dakkan seyo!) I wrote this xpath which selects the text in ...
lxml: Xpath works in Chrome but not in lxml
I'm trying to scrape information from this episode wiki page on Fandom, specifically the episode title in Japanese, 謀略Ⅳ:ドライバーを奪還せよ!: Conspiracy IV: Recapture the Driver! (謀略Ⅳ:ドライバーを奪還せよ!, Bōryaku Fō: Doraibā o Dakkan seyo!) I wrote this xpath which selects the text in Chrome: //div[@class='mw-parser-output']/span/spa...
[ "As with all questions of this sort, start by breaking down your xpath into smaller expressions:\nLet's start with the first expression...\n>>> content.xpath(\"//div[@class='mw-parser-output']\")\n[<Element div at 0x7fbf905d5400>]\n\nGreat, that works! But if we add the next component from your expression...\n>>> ...
[ 0 ]
[]
[]
[ "lxml", "lxml.html", "python", "python_3.x", "xpath" ]
stackoverflow_0074681144_lxml_lxml.html_python_python_3.x_xpath.txt
Q: JavaScript hover via addEventListener I have one box (#fB) and one checkbox (#chck). I'm trying to put hover on this box based on checked or unchecked checkbox. I've written condition IF, but this hover is triggered as FALSE too. I've tried put .pointerEvents = "none"; as a FALSE, but nothing happens. Any advice w...
JavaScript hover via addEventListener
I have one box (#fB) and one checkbox (#chck). I'm trying to put hover on this box based on checked or unchecked checkbox. I've written condition IF, but this hover is triggered as FALSE too. I've tried put .pointerEvents = "none"; as a FALSE, but nothing happens. Any advice where is the problem? Thank you very much. ...
[ "It looks like your code is removing the event listeners from the box element when the checkbox is not checked. However, you are passing anonymous functions to the removeEventListener method, which won't work because those functions are not the same as the functions that were added as event listeners.\nTo fix this,...
[ 0 ]
[]
[]
[ "javascript" ]
stackoverflow_0074681373_javascript.txt
Q: App crashes because of pendingIntent when targeting to Android 12 App crashed because of Nearby message API when targeting to android 12. Here is the crash log 2021-10-07 18:59:44.916 10343-10384/com.example.nearbymessagescanner E/AndroidRuntime: FATAL EXCEPTION: GoogleApiHandler Process: com.example.nearbymessage...
App crashes because of pendingIntent when targeting to Android 12
App crashed because of Nearby message API when targeting to android 12. Here is the crash log 2021-10-07 18:59:44.916 10343-10384/com.example.nearbymessagescanner E/AndroidRuntime: FATAL EXCEPTION: GoogleApiHandler Process: com.example.nearbymessagescanner, PID: 10343 java.lang.IllegalArgumentException: com.example.nea...
[ "\nIt sounds strange, but the fix is adding work manager dependency 2.7.0+ : implementation \"androidx.work:work-runtime:2.7.0\"\n\nYou have to update dependencies that should support Android 12 braking changes (I had to update some third parties). Check that on github and documentation pages\n\nAlso, some librarie...
[ 7, 2, 1, 0 ]
[]
[]
[ "android", "google_nearby", "google_play_services" ]
stackoverflow_0069479332_android_google_nearby_google_play_services.txt
Q: How can I get gmail label names into a list? In google sheets or otherwise In google app script I'm trying to take the gmail labels and print them in a clean list or line where I can suffix every line to easily make filters in bulk. Like this: labelname1, labelname2, labelname3, etc. Any help is greatly appreciate...
How can I get gmail label names into a list? In google sheets or otherwise
In google app script I'm trying to take the gmail labels and print them in a clean list or line where I can suffix every line to easily make filters in bulk. Like this: labelname1, labelname2, labelname3, etc. Any help is greatly appreciated This is as close as ive gotten. Im mainly trying to get it to print to google ...
[ "You can use the Array.join() method to combine the names of the labels into a single string, separated by a comma and a space:\nfunction retrieveLabelNames() {\n var labels = GmailApp.getUserLabels();\n var labelNames = labels.map(function(label) {\n return label.getName();\n });\n var labelString = labelNa...
[ 0 ]
[]
[]
[ "arrays", "google_apps_script", "google_sheets", "javascript" ]
stackoverflow_0074681216_arrays_google_apps_script_google_sheets_javascript.txt
Q: Sum similar keys in an array of objects I have an array of objects like the following: [ { 'name': 'P1', 'value': 150 }, { 'name': 'P1', 'value': 150 }, { 'name': 'P2', 'value': 200 }, { 'name': 'P3', 'value': 450 } ] ...
Sum similar keys in an array of objects
I have an array of objects like the following: [ { 'name': 'P1', 'value': 150 }, { 'name': 'P1', 'value': 150 }, { 'name': 'P2', 'value': 200 }, { 'name': 'P3', 'value': 450 } ] I need to add up all the values for objects w...
[ "First iterate through the array and push the 'name' into another object's property. If the property exists add the 'value' to the value of the property otherwise initialize the property to the 'value'. Once you build this object, iterate through the properties and push them to another array. \nHere is some code...
[ 40, 29, 6, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0 ]
[ "let arr = [\n {'name':'P1','value':150,'apple':10},\n {'name':'P1','value':150,'apple':20},\n {'name':'P2','value':200,'apple':30},\n {'name':'P2','value':600,'apple':30},\n {'name':'P3','value':450,'apple':40}\n];\n\nlet obj = {}\n\narr.forEach((item)=>{\n if(obj[item.name]){\...
[ -1, -2 ]
[ "arrays", "javascript", "object" ]
stackoverflow_0024444738_arrays_javascript_object.txt
Q: Trying to overflow HTML tags instead of wrapping is breaking the flex spacing I'm applying CSS to the pre code selector in order to make styled code blocks,like you'd see on GitHub or elsewhere. I'm using flexbox for the layout, and I have two "panel" divs side-by-side inside of a "box" div, one of which has a co...
Trying to overflow HTML tags instead of wrapping is breaking the flex spacing
I'm applying CSS to the pre code selector in order to make styled code blocks,like you'd see on GitHub or elsewhere. I'm using flexbox for the layout, and I have two "panel" divs side-by-side inside of a "box" div, one of which has a code block (Which is just code inside of <pre><code> tags), and the "box" div is insid...
[ "It looks like the issue you're experiencing is caused by the fact that the pre and code elements are inline-block elements, which means that they will not take up the full width of their parent container. Instead, they will only be as wide as their content.\nOne solution to this problem would be to change the disp...
[ 0 ]
[]
[]
[ "css", "flexbox", "html" ]
stackoverflow_0074681388_css_flexbox_html.txt
Q: how to plot the multiple data frames on a single violin plot next to each other? I have two data frames, and the shapes of the two data frames are not same. I want to plot the two data frame values of the violin plots next to each other instead of overlapping. import pandas as pd import numpy as np import matplot...
how to plot the multiple data frames on a single violin plot next to each other?
I have two data frames, and the shapes of the two data frames are not same. I want to plot the two data frame values of the violin plots next to each other instead of overlapping. import pandas as pd import numpy as np import matplotlib.pyplot as plt data1 = { 'DT' : np.random.normal(-1, 1, 100), 'RF' : np.ra...
[ "I suggest relabeling the columns in each dataframe to reflect the dataframe number, e.g.:\ndata2 = {\n 'DT2' : np.random.normal(-1, 1, 50),\n 'RF2' : np.random.normal(-1, 1, 60),\n 'KNN2' : np.random.normal(-1, 1, 80)\n}\n\nYou may then:\n\nconcatenate both dataframes:\ndf = pd.concat([df1, df2], axis=1)\...
[ 0 ]
[]
[]
[ "matplotlib", "python", "violin_plot" ]
stackoverflow_0074680995_matplotlib_python_violin_plot.txt
Q: Remove features with whitespace in sklearn Countvectorizer with char_wb I am trying to build char level ngrams using sklearn's CountVectorizer. When using analyzer='char_wb' the vocab has features with whitespaces around it. I want to exclude the features/words with whitespaces. from sklearn.feature_extraction.tex...
Remove features with whitespace in sklearn Countvectorizer with char_wb
I am trying to build char level ngrams using sklearn's CountVectorizer. When using analyzer='char_wb' the vocab has features with whitespaces around it. I want to exclude the features/words with whitespaces. from sklearn.feature_extraction.text import CountVectorizer vectorizer = CountVectorizer(binary=True, analyzer='...
[ "I hope you get an improved answer because I'm confident this answer is a bit of a bad hack. I'm not sure it does what you want, and what it does is not very efficient. It does produce your vocabulary though (probably)!\nimport re\n\ndef my_analyzer(s):\n out=[]\n for w in re.split(r\"\\W+\", s):\n i...
[ 0 ]
[]
[]
[ "countvectorizer", "python", "scikit_learn", "tfidfvectorizer" ]
stackoverflow_0074638757_countvectorizer_python_scikit_learn_tfidfvectorizer.txt
Q: SOLVED; Chromium Webdriver with "--no-sandbox" is opening a fully transparent/invisible Chrome window The relevant code is as follows: ' # find the Chromium profile with website caches for the webdriver chrome_options = Options() profile_filepath = "user-data-dir=" + "/home/hephaestus/.config/chromium/...
SOLVED; Chromium Webdriver with "--no-sandbox" is opening a fully transparent/invisible Chrome window
The relevant code is as follows: ' # find the Chromium profile with website caches for the webdriver chrome_options = Options() profile_filepath = "user-data-dir=" + "/home/hephaestus/.config/chromium/Profile1" chrome_options.add_argument(str(profile_filepath)) # put chromium into --no-sandbox ...
[ "So I found a solution that works for me!\n\nUninstall and reinstall Chromium completely. When reinstalling, check that your Chromium version matches with Selenium (which I didn't even know was a thing).\n\nDO NOT run your Python code as a sudo user. I did \"sudo python3 upload_image.py\" and got the \"DevToolsActi...
[ 0 ]
[]
[]
[ "chromium", "python", "selenium", "webdriver" ]
stackoverflow_0074593964_chromium_python_selenium_webdriver.txt
Q: Generating random INTERVAL I have a function below that returns a random INTERVAL between a range of hours, which appears to be working fine but is currently limited to hours only. I would would like to expand this functionality to also support returning a random INTERVAL for days, minutes by passing in a literal ...
Generating random INTERVAL
I have a function below that returns a random INTERVAL between a range of hours, which appears to be working fine but is currently limited to hours only. I would would like to expand this functionality to also support returning a random INTERVAL for days, minutes by passing in a literal (ie 'DAY', 'MINUTE' or 'SECOND')...
[ "Try giving this a shot instead\n\nCREATE OR REPLACE FUNCTION random_interval(\n p_min IN NUMBER,\n p_max IN NUMBER, \n p_period VARCHAR2\n ) RETURN INTERVAL DAY TO SECOND\n IS\n BEGIN\n IF p_period = 'HOUR' THEN \n RETURN floor(dbms_random.value(p_min, p_max)) * interval '1' hour\...
[ 2, 0 ]
[]
[]
[ "function", "intervals", "oracle" ]
stackoverflow_0074675273_function_intervals_oracle.txt
Q: The task is: Given a group of integers, find the maximum value among them all, how do i do it without arrays using c++? The task is: Given a group of integers, find the maximum value among them all. Input Givin an integer N (1≤N≤10^5) – the number of integers to be entered. The following line contains N space-sepa...
The task is: Given a group of integers, find the maximum value among them all, how do i do it without arrays using c++?
The task is: Given a group of integers, find the maximum value among them all. Input Givin an integer N (1≤N≤10^5) – the number of integers to be entered. The following line contains N space-separated integers (−10^18≤ai≤10^18) — ai is the value of the ith integer. Output Print the answer to the task. Examples input 4 ...
[ "The inputted integers can be negative. When all the integers are negative, your code will print out 0 since that is bigger than all the input integers. A possible way to fix this is to set c to -10^18. Another way would be to somehow initialize c as the first value.\n" ]
[ 1 ]
[]
[]
[ "c++" ]
stackoverflow_0074681402_c++.txt
Q: How to validate and sanitize array of data in php? I want to validate and sanitize data which comes from POST array. My POST data is something like this: Array ( [category_name] => fsdfsfwereq34 [subCategory] => Array ( [0] => sdfadsffasfasdf [1] => sdfasfdsafadsf ...
How to validate and sanitize array of data in php?
I want to validate and sanitize data which comes from POST array. My POST data is something like this: Array ( [category_name] => fsdfsfwereq34 [subCategory] => Array ( [0] => sdfadsffasfasdf [1] => sdfasfdsafadsf [2] => safdfdasfas ) [category-submitte...
[ "You can use foreach to loop through all values of an array. In the loop you can push your filtered values to a new array $subCategory (e.g.).\nE.g.:\n$subCategory = $_POST['subCategory'];\n$subcategories = array();\nif (!empty( $subCategory ) && is_array( $subCategory ) ) {\n foreach( $subCategory as $key => $val...
[ 3, 3, 0 ]
[]
[]
[ "arrays", "php", "sanitization", "validation" ]
stackoverflow_0029841311_arrays_php_sanitization_validation.txt
Q: How to find the index of an array where summation is greater than a target value? Suppose I have a 1D array sorted in descending order, like: arr = np.array([10, 10, 8, 5, 4, 4, 3, 2, 2, 2]) I want the index value, where the summation of this array starting from 0 to that index is greater than or equal to a specif...
How to find the index of an array where summation is greater than a target value?
Suppose I have a 1D array sorted in descending order, like: arr = np.array([10, 10, 8, 5, 4, 4, 3, 2, 2, 2]) I want the index value, where the summation of this array starting from 0 to that index is greater than or equal to a specified target value. For example, let the target value be 40: index=0 (0) => sum=10 (10) ...
[ "To find the index of an array where the summation is greater than a target value in Python, you can use a for loop to iterate over the elements in the array and keep track of the running total. When the running total is greater than the target value, you can return the index at which that occurred.\n# define the t...
[ 0, 0 ]
[]
[]
[ "arrays", "numpy", "python" ]
stackoverflow_0074681382_arrays_numpy_python.txt
Q: Getting content from a dm in discord.py So I want to know if it is possible, that a bot gets the content sent to it in a dm and send that in a specifyed channel on a server. So basically you dm the bot the word "test" and the bots sends the word in a channel of a server A: Yes, it is possible for a bot to receiv...
Getting content from a dm in discord.py
So I want to know if it is possible, that a bot gets the content sent to it in a dm and send that in a specifyed channel on a server. So basically you dm the bot the word "test" and the bots sends the word in a channel of a server
[ "Yes, it is possible for a bot to receive a direct message and then repost the message in a specified channel on a server. This can be done using the Discord API.\nYou can do the following:\n\nCreate a Discord bot and add it to your server. You can do this using the Discord developer portal.\n\nUse the Discord API ...
[ 0 ]
[]
[]
[ "discord", "discord.py", "python" ]
stackoverflow_0074681161_discord_discord.py_python.txt
Q: How to calculate distance after key is pressed? Hey so I'm trying to calculate a person's score after they press a key. I have three arrows and I want to find how far the arrow is from the center and use that to find the score. This is what I have so far: import turtle import math sc = turtle.Screen() sc.title("A...
How to calculate distance after key is pressed?
Hey so I'm trying to calculate a person's score after they press a key. I have three arrows and I want to find how far the arrow is from the center and use that to find the score. This is what I have so far: import turtle import math sc = turtle.Screen() sc.title("Arrow Game") sc.bgcolor("#C7F6B6") arrow1= turtle.Tu...
[ "To make your code wait until a key is pressed, you can use the turtle.Screen.onkeypress() method. This method takes two arguments: a callback function that will be called when the key is pressed, and the key that you want to listen for.\nHere is an example of how you can use the onkeypress() method to wait for a k...
[ 0, 0 ]
[]
[]
[ "python" ]
stackoverflow_0074681396_python.txt
Q: Spring Configuration Problem: Not a managed type: Entity I am trying to create Entities for a Postgres Database using Spring Data JPA and am getting this error the whole time: Error creating bean with name 'rawDataService': Unsatisfied dependency expressed through field 'rawDataRepository': Error creating bean w...
Spring Configuration Problem: Not a managed type: Entity
I am trying to create Entities for a Postgres Database using Spring Data JPA and am getting this error the whole time: Error creating bean with name 'rawDataService': Unsatisfied dependency expressed through field 'rawDataRepository': Error creating bean with name 'rawDataRepository' defined in com.example.testcontro...
[ "I solved it. After rebuilding the project it could not detect javax anymore and only suggested Jakarta.persistence. Now it is working\n" ]
[ 0 ]
[]
[]
[ "hibernate", "spring", "spring_boot", "spring_data", "spring_data_jpa" ]
stackoverflow_0074680587_hibernate_spring_spring_boot_spring_data_spring_data_jpa.txt
Q: Microk8s ArgoCD Error during SSL Handshake I have a problem. In my home setup, I have a portal server, which controls all the HTTP/HTTPS traffic of all hosted domains and then forwards it to the right server using proxy. One of the sites where I am having this current trouble has the following apache config: <Virt...
Microk8s ArgoCD Error during SSL Handshake
I have a problem. In my home setup, I have a portal server, which controls all the HTTP/HTTPS traffic of all hosted domains and then forwards it to the right server using proxy. One of the sites where I am having this current trouble has the following apache config: <VirtualHost *:80> ServerName my.domain.com ...
[ "It sounds like you have set up an Ingress resource in your Kubernetes cluster to handle incoming traffic to your ArgoCD UI at my.domain.com. The nginx.ingress.kubernetes.io/ssl-passthrough: \"true\" annotation indicates that you want SSL/TLS traffic to be passed directly to the backend service without being termin...
[ 0, 0, 0, 0 ]
[]
[]
[ "kubernetes", "kubernetes_ingress", "microk8s", "ssl" ]
stackoverflow_0074680239_kubernetes_kubernetes_ingress_microk8s_ssl.txt
Q: Spawning threads for performance I am writing a rust script that needs to brute force the solution to some calculation and is likely to run 2^80 times. That is a lot! I am trying to make it run as fast as possible and thus want to divide the burden to multiple threads. However if I understand correctly this only a...
Spawning threads for performance
I am writing a rust script that needs to brute force the solution to some calculation and is likely to run 2^80 times. That is a lot! I am trying to make it run as fast as possible and thus want to divide the burden to multiple threads. However if I understand correctly this only accelerates my script if the threads ac...
[ "Use std::thread::available_parallelism to know how many threads to run and let your OS handle the rest.\nTypically when you create a thread, the OS thread scheduler is given free liberty to decide where and when those threads execute, however it will do so in a way that best takes advantage of CPU resources. So of...
[ 1 ]
[]
[]
[ "multithreading", "performance", "rust" ]
stackoverflow_0074681365_multithreading_performance_rust.txt
Q: How to Successfully Build the Open Source Apple Chess Game in XCode I am trying to download and run the source code of a previous version of the Apple macOS chess game (preferably in the 369-408 version range) using XCode 14.1. The game is written in Objective-C and interfaces with a chess engine called "sjeng" th...
How to Successfully Build the Open Source Apple Chess Game in XCode
I am trying to download and run the source code of a previous version of the Apple macOS chess game (preferably in the 369-408 version range) using XCode 14.1. The game is written in Objective-C and interfaces with a chess engine called "sjeng" that is written in C. (Correct me if I'm wrong). I have already navigated ...
[ "Here is how it worked for me:\n\nDownload the project from here (build tag 408);\nUnarchive the project and open MBChess.xcodeproj file with Xcode;\nOpen MBChess target and do as follows:\n\nChange Bundle Identifier to something more relevant to you\nEnable \"Automatically manage signing\" flag\nChoose your Apple ...
[ 0 ]
[]
[]
[ "apple_open_source", "build", "c", "objective_c", "xcode" ]
stackoverflow_0074660340_apple_open_source_build_c_objective_c_xcode.txt
Q: How to properly install MechanicalSoup for Python? I wanted to practice web scraping with Python module MechanicalSoup, but when I started installing it using pip install mechanicalsoup I encountered this error "Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?". I then tried runnin...
How to properly install MechanicalSoup for Python?
I wanted to practice web scraping with Python module MechanicalSoup, but when I started installing it using pip install mechanicalsoup I encountered this error "Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?". I then tried running pip3 install lxml --use-pep517 to install lxml and its...
[ "To properly install MechanicalSoup, you need to make sure that you have the required dependencies installed. In this case, it looks like you need to install the lxml library.\nHere are the steps you can follow to properly install MechanicalSoup:\nCreate a Python virtual environment for your project, if you haven't...
[ 0 ]
[]
[]
[ "beautifulsoup", "mechanicalsoup", "python", "web_scraping" ]
stackoverflow_0074681403_beautifulsoup_mechanicalsoup_python_web_scraping.txt
Q: J unit test for function that returns a csv file I have a function checkInbox() which runs a script that gets values from a mysql table and returns it in a csv file as well as prints it on the terminal. My question is how can I run a j unit test to make sure that the information in the terminal is correct. checkIn...
J unit test for function that returns a csv file
I have a function checkInbox() which runs a script that gets values from a mysql table and returns it in a csv file as well as prints it on the terminal. My question is how can I run a j unit test to make sure that the information in the terminal is correct. checkInbox(): public class CheckInbox { public stati...
[ "Your test should assert that the code under test returns expecteds results when called when particular input values.\nassertEquals(inbox.csv, inbox.checkInbox(1, 1));\n\ncheckInbox(int, int) currently returns an int. You're comparing an int result with \"inbox.csv\" - an int cannot equal a String so this doesn't m...
[ 0 ]
[]
[]
[ "java", "junit", "mysql" ]
stackoverflow_0074681252_java_junit_mysql.txt
Q: AutoHotKey Script for date time function, what code for "MM" may be substituted to provide the month as text "i.e. NOV, DEC, etc." my script follows My current script is: #z:: FormatTime, CurrentpateTime„ MM.dd.yyyy HH:mm:ss -{SPACE} sendInput %CurrentDateTlme% return I wish to have the month display as text In th...
AutoHotKey Script for date time function, what code for "MM" may be substituted to provide the month as text "i.e. NOV, DEC, etc." my script follows
My current script is: #z:: FormatTime, CurrentpateTime„ MM.dd.yyyy HH:mm:ss -{SPACE} sendInput %CurrentDateTlme% return I wish to have the month display as text In the resultant output [JAN, FEB, MAR, APR, etc.] I wish to be able to enter date time sequences with a keysstroke anywhere I am working on my PC. I simply do...
[ "If you are after month format as JAN, FEB..., you can use MMM date format.\nFrom documentation:\nMMM Abbreviated month name (e.g. Jan) in the current user's language\n\nFor example:\nFormatTime, CurrentpateTime,, MMM\nStringUpper, result, CurrentpateTime\nMsgBox %result%\n\nwill display : DEC\n" ]
[ 0 ]
[]
[]
[ "autohotkey", "datetime", "integer", "replace", "windows" ]
stackoverflow_0074680536_autohotkey_datetime_integer_replace_windows.txt
Q: What's the name of flutter widget that has icons bellow the screen? What's the name of the Flutter widget that has icons below the screen and I can slide to right and left to change between these screens (Ex: Twitter main page) I could create a Container with a Row and the Icons and do this manually, but I suspec...
What's the name of flutter widget that has icons bellow the screen?
What's the name of the Flutter widget that has icons below the screen and I can slide to right and left to change between these screens (Ex: Twitter main page) I could create a Container with a Row and the Icons and do this manually, but I suspect that already exists this widget on Flutter.
[ "this bottom navigation bar can be done using BottomNavigationBar in the bottomNavigationBar property on your Scaffold :\nbottomNavigationBar: BottomNavigationBar(\n items: [\n BottomNavigationBarItem(icon: Icon(Icons.home), label: 'Home'),\n BottomNavigationBarItem(\n icon: Icon(Icons.busines...
[ 0 ]
[]
[]
[ "dart", "flutter", "user_interface" ]
stackoverflow_0074681374_dart_flutter_user_interface.txt
Q: NodeJS get audio file I have stored some audio files in GridFS, and I am able to do a find() query to fetch them. But how do I get them so I can stream the audio from these files? import clientPromise from "../../lib/mongodb"; import { MongoClient, GridFSBucket } from 'mongodb' var CryptoJS = require("crypto-js");...
NodeJS get audio file
I have stored some audio files in GridFS, and I am able to do a find() query to fetch them. But how do I get them so I can stream the audio from these files? import clientPromise from "../../lib/mongodb"; import { MongoClient, GridFSBucket } from 'mongodb' var CryptoJS = require("crypto-js"); //import { hash } from 'b...
[ "// Import the necessary modules\nimport { MongoClient, GridFSBucket } from 'mongodb'\n\n// Import the client connection promise\nimport clientPromise from '../../lib/mongodb'\n\n// Import the 'crypto' module to generate a unique filename\nimport crypto from 'crypto'\n\n// Import the 'path' module to help with gene...
[ 0 ]
[]
[]
[ "audio", "gridfs", "mongodb", "node.js" ]
stackoverflow_0072011858_audio_gridfs_mongodb_node.js.txt
Q: Python how to do find with leading and trailing spaces I'm doing an extensive word search. How do I do a find that keeps leading and trailing spaces. the word is imported from a list. An example: find " oil " in "Use Cooking Oil" but do not find with "Sally spoiled the food." .find() strips the leading and trailin...
Python how to do find with leading and trailing spaces
I'm doing an extensive word search. How do I do a find that keeps leading and trailing spaces. the word is imported from a list. An example: find " oil " in "Use Cooking Oil" but do not find with "Sally spoiled the food." .find() strips the leading and trailing spaces. nltk tokenizing does also. this code works if i wa...
[ "You could split the sentence into an array of words. This way, you can see if a word is present in the array, and thus overcome false positives:\nwords = [word.lower() for word in sentence.split()]\nif 'oil' in words:\n print(True)\n\nHere, I have also made sure that every word in the sentence is lowercase, suc...
[ 0, 0 ]
[]
[]
[ "find", "python", "space" ]
stackoverflow_0074680977_find_python_space.txt
Q: How to not rebuild the project without changes in the directory? I'm trying to write Makefile which would rebuild the file "./target/js/bundle.js" after changing any file in a directory "./ts" or its subdirectories. "make" should not rebuild "./target/js/bundle.js" without changing any file in a directory "./ts" o...
How to not rebuild the project without changes in the directory?
I'm trying to write Makefile which would rebuild the file "./target/js/bundle.js" after changing any file in a directory "./ts" or its subdirectories. "make" should not rebuild "./target/js/bundle.js" without changing any file in a directory "./ts" or its subdirectories. The structure of the project: /ts - directory wi...
[ "This rule:\ntarget/js/bundle.js: ts/*\n cd ts && tsc\n\nsays that if the file target/js/bundle.js does not exist, or it does exist but some file matching the glob pattern ts/* has a newer modification time, then re-run the recipe.\nSo, if you're seeing the recipe re-run every time then one of those two thin...
[ 0, 0 ]
[]
[]
[ "makefile" ]
stackoverflow_0074681271_makefile.txt
Q: dbt get value from agate.Row to string I want to run a macro in a COPY INTO statement to S3 bucket. Apparently in snowflake I can't do dynamic path. So I'm doing a hacky way to solve this. {% macro unload_snowflake_to_s3() %} {# Get all tables and views from the information schema. #} {%- set query -%} ...
dbt get value from agate.Row to string
I want to run a macro in a COPY INTO statement to S3 bucket. Apparently in snowflake I can't do dynamic path. So I'm doing a hacky way to solve this. {% macro unload_snowflake_to_s3() %} {# Get all tables and views from the information schema. #} {%- set query -%} select concat('COPY INTO @MY_STAGE/yea...
[ "You might have better luck with dbt_utils.get_query_results_as_dict.\nBut you don't need to use your database to construct that path. The jinja context has a run_started_at variable that is a Python datetime object, so you can build your string in jinja, without hitting the database:\n{% set yr = run_started_at.st...
[ 0, 0 ]
[]
[]
[ "dbt" ]
stackoverflow_0074344248_dbt.txt
Q: How to override Invoke configuration project-wide for Fabric? I'm currently specifying a connection override per constructor call: fabric2.Connection(…, config=invoke.Config(overrides={"shell": "bash"})). How would I translate this to a configuration file, so that I don't have to configure it per call? Fabric does...
How to override Invoke configuration project-wide for Fabric?
I'm currently specifying a connection override per constructor call: fabric2.Connection(…, config=invoke.Config(overrides={"shell": "bash"})). How would I translate this to a configuration file, so that I don't have to configure it per call? Fabric doesn't seem to have a way to set Connection parameters (connect_kwargs...
[]
[]
[ "To specify the overrides parameter in a Fabric configuration file, you can use the connect_kwargs parameter in the connection section of the configuration file, like this:\nconnection:\nconnect_kwargs:\noverrides:\nshell: bash\nThis will pass the specified overrides dictionary as the overrides parameter to the fab...
[ -1 ]
[ "configuration", "pyinvoke", "python_fabric_2" ]
stackoverflow_0074681399_configuration_pyinvoke_python_fabric_2.txt
Q: Marching Cubes generating holes in mesh I'm working on a Marching Cubes implementation in Unity. My code is based on Paul Bourke's code actually with a lot of modifications, but anyway i'm checking if a block at a position is null if it is than a debug texture will be placed on it. This is my MC script public...
Marching Cubes generating holes in mesh
I'm working on a Marching Cubes implementation in Unity. My code is based on Paul Bourke's code actually with a lot of modifications, but anyway i'm checking if a block at a position is null if it is than a debug texture will be placed on it. This is my MC script public class MarchingCubes { private World world; p...
[ "It looks like you're using a 3D array to store the corner values of a block at a position. If you want to check whether a block at a position is null, it might be easier to use a 2D array and store the block data instead of the corner values. You can then check whether the block at a position is null and assign th...
[ 0 ]
[]
[]
[ "c#", "marching_cubes", "unity3d" ]
stackoverflow_0044760112_c#_marching_cubes_unity3d.txt
Q: What's the easiest way to test a createUIDefinion.json file for Azure solution templates? I'm in the process of publishing my solution template in the Azure marketplace. My mainTemplate.json file, for example, is easy to test without publishing because I can deploy from Git. But I can't seem to test the UI file vi...
What's the easiest way to test a createUIDefinion.json file for Azure solution templates?
I'm in the process of publishing my solution template in the Azure marketplace. My mainTemplate.json file, for example, is easy to test without publishing because I can deploy from Git. But I can't seem to test the UI file via Git deployment. So the problem is getting my createUIdefinition.json file tested in a timely ...
[ "I found my answer. There's a specially crafted URL that can be used to preview createUIDefinition.json. The format is like this:\n<a href=\"https://portal.azure.com/#blade/Microsoft_Azure_Compute/CreateMultiVmWizardBlade/internal_bladeCallId/anything/internal_bladeCallerParams/{\"initialData\":{},\"providerConfig\...
[ 6, 4, 0, 0 ]
[]
[]
[ "azure", "azure_marketplace", "json" ]
stackoverflow_0036522270_azure_azure_marketplace_json.txt
Q: php output buffer not working after php 7.4 to php 8.1 upgrade The below code is not printing anything in the browser. actually, It should show the header menu. if I remove ob_start(); and ob_end_clean() at least its printing menu without CSS. // Turn on output buffering HTML ob_start(); echo preg_replace( '/\n|...
php output buffer not working after php 7.4 to php 8.1 upgrade
The below code is not printing anything in the browser. actually, It should show the header menu. if I remove ob_start(); and ob_end_clean() at least its printing menu without CSS. // Turn on output buffering HTML ob_start(); echo preg_replace( '/\n|\t/i', '', implode( '' , $wr_nitro_header_html ) ); WR_Nitro_Header...
[ "It looks like you are using the ob_start and ob_end_clean functions to buffer the output of your code and then store it in the $wr_nitro_header_html array. In PHP 8.1, the behavior of output buffering has changed and you may need to update your code to account for this.\nOne possible solution is to use the ob_get_...
[ 0 ]
[]
[]
[ "output_buffering", "php_8.1", "wordpress" ]
stackoverflow_0074650983_output_buffering_php_8.1_wordpress.txt
Q: Power Automate: Using "Wait for image" and "Extract text with OCR" in unattended mode possible? I want to automate a Webswing session to run in unattended mode. Webswing is a web server that allows applications to run within the web browser. So there is no access to UI elements that the bot could access. Therefore...
Power Automate: Using "Wait for image" and "Extract text with OCR" in unattended mode possible?
I want to automate a Webswing session to run in unattended mode. Webswing is a web server that allows applications to run within the web browser. So there is no access to UI elements that the bot could access. Therefore, I initially worked with image recognition (e.g., using the "Wait for image" and "Extract text with ...
[ "Yes, however it is worth keeping in mind that the screen size needs to be set to the size you run the flow in when attended.\nSee: how to set screen resolution unattended mode\n" ]
[ 0 ]
[]
[]
[ "power_automate", "power_automate_desktop" ]
stackoverflow_0074274779_power_automate_power_automate_desktop.txt
Q: FFMPEG concatenate two streams from multiple numerated files I have bunch of numerated files which represent audio and video stream, like that: vod-idx-video=5000000-1.ts vod-idx-video=5000000-2.ts ... vod-idx-video=5000000-700.ts vod-idx-audio_fra=128000-1.aac vod-idx-audio_fra=128000-2.aac ... vod-idx-audio_fra=...
FFMPEG concatenate two streams from multiple numerated files
I have bunch of numerated files which represent audio and video stream, like that: vod-idx-video=5000000-1.ts vod-idx-video=5000000-2.ts ... vod-idx-video=5000000-700.ts vod-idx-audio_fra=128000-1.aac vod-idx-audio_fra=128000-2.aac ... vod-idx-audio_fra=128000-700.aac number of files for video and audio streams is the ...
[ "do not mind, I figured out the command\n" ]
[ 0 ]
[]
[]
[ "ffmpeg" ]
stackoverflow_0074680054_ffmpeg.txt
Q: TF2 transform can't find an actuall existing frame In a global planner node that I wrote, I have the following init code #!/usr/bin/env python import rospy import copy import tf2_ros import time import numpy as np import math import tf from math import sqrt, pow from geometry_msgs.msg import Vector3, Point from st...
TF2 transform can't find an actuall existing frame
In a global planner node that I wrote, I have the following init code #!/usr/bin/env python import rospy import copy import tf2_ros import time import numpy as np import math import tf from math import sqrt, pow from geometry_msgs.msg import Vector3, Point from std_msgs.msg import Int32MultiArray from std_msgs.msg impo...
[ "Try adding a timeout to your lookup_transform() function call, as your transformation may not be available when you need it:\ntransform = self.tfBuffer.lookup_transform('cell_tower', 'world',rospy.Time.now(), rospy.Duration(1.0))\n\n" ]
[ 0 ]
[]
[]
[ "python", "ros", "slam", "subscriber", "tf2_ros" ]
stackoverflow_0074681266_python_ros_slam_subscriber_tf2_ros.txt
Q: how to parse all data I dont know why but when i get all data from requests it works but if i want get data by some category it return me that import requests import json headers = {'Accept': 'application/json, text/javascript, */*; q=0.01', 'Accept-Encoding': 'gzip, deflate, br', 'Accept-La...
how to parse all data
I dont know why but when i get all data from requests it works but if i want get data by some category it return me that import requests import json headers = {'Accept': 'application/json, text/javascript, */*; q=0.01', 'Accept-Encoding': 'gzip, deflate, br', 'Accept-Language': 'uk-UA,uk;q=0.9,en...
[ "It looks like you need to authenticate with the server before you can access the data in the second URL. The server is returning a \"Login Required\" error because it is unable to verify that you are authorized to access the data.\nTo fix this issue, you need to include the necessary authentication information in ...
[ 0, 0 ]
[]
[]
[ "json", "parsing", "python" ]
stackoverflow_0074681343_json_parsing_python.txt
Q: How to create security group ingress dynamically in terraform I am creating a security group that has some standard ingress rules. I also want to add additional ingress rules based on a variable. variable "additional_ingress" { type = list(object({ protocol = string from_port = string to_port ...
How to create security group ingress dynamically in terraform
I am creating a security group that has some standard ingress rules. I also want to add additional ingress rules based on a variable. variable "additional_ingress" { type = list(object({ protocol = string from_port = string to_port = string cidr_blocks = list(string) })) default = [] } ...
[ "This is most easily managed with the aws_security_group_rule resource and the for_each meta-argument:\nresource \"aws_security_group_rule\" \"ec2\" {\n for_each = var.additional_ingress\n\n type = each.value.type\n from_port = each.value.from_port\n to_port = each.value.to_port\n...
[ 4, 0 ]
[]
[]
[ "terraform", "terraform_provider_aws" ]
stackoverflow_0074661359_terraform_terraform_provider_aws.txt
Q: Outliers in certain values in column R Outliers data Given Data: Color | Number Green | 5 Red | 20 Green | 5 Green | 15 Green | 100 Red | 7 Red | 10 Red | 8 Green | 6 . Want to only take values of "green"’s number only and then plot and find outliers for them. How do you...
Outliers in certain values in column R
Outliers data Given Data: Color | Number Green | 5 Red | 20 Green | 5 Green | 15 Green | 100 Red | 7 Red | 10 Red | 8 Green | 6 . Want to only take values of "green"’s number only and then plot and find outliers for them. How do you do this?
[ "We may subset the dataset where the Color is \"Green\", select the 'Number' column and use boxplot and extract the outliers\nboxplot(subset(Data, Color == \"Green\", select = Number)$Number)$out\n[1] #100\n\n" ]
[ 0 ]
[]
[]
[ "r" ]
stackoverflow_0074681452_r.txt
Q: I am able to hit the API and output correct data. How do I pull the data from async Function and convert it to CSV format? ` // dog.ceo API async function fetchDogApiResult (apiPath) { const response = await fetch(`https://dog.ceo/api/${apiPath}`); if (!response.ok) throw new Error(`Response not OK (${respons...
I am able to hit the API and output correct data. How do I pull the data from async Function and convert it to CSV format?
` // dog.ceo API async function fetchDogApiResult (apiPath) { const response = await fetch(`https://dog.ceo/api/${apiPath}`); if (!response.ok) throw new Error(`Response not OK (${response.status})`); const data = await response.json(); if (data.status !== 'success') throw new Error('Response not successful');...
[ "To convert the data to a CSV format with three columns, you can use the json2csv library to convert the JSON data to a CSV string. You can then write the CSV string to a file or output it to the console.\nHere is an example of how to do this:\nconst json2csv = require('json2csv');\n\n// dog.ceo API\n\nasync functi...
[ 0 ]
[]
[]
[ "api", "javascript" ]
stackoverflow_0074681431_api_javascript.txt
Q: PLSQL Error PLS-00457: expressions have to be of SQL types I am really unable to figure out why I am unable to make the below code work. I tried to replicate the scenario explained in the below answer Trying to use a FORALL to insert data dynamically to a table specified to the procedure CREATE TABLE VISION.TEMP_T...
PLSQL Error PLS-00457: expressions have to be of SQL types
I am really unable to figure out why I am unable to make the below code work. I tried to replicate the scenario explained in the below answer Trying to use a FORALL to insert data dynamically to a table specified to the procedure CREATE TABLE VISION.TEMP_TEST_TABLE ( A NUMBER(10), B NUMBER(10) ) CREATE OR REPLAC...
[ "There are two problems with this line of code:\nexecute immediate\n'insert into TEMP_TEST_TABLE select * from table(:TEST_FS_ARRAY_OBJ)'\nusing TEST_FS_ARRAY_OBJ;\n\n\nYou cannot pass table name as bind variable.\nYou cannot use locally defined nested table in SQL statement. It has to be defined in schema level to...
[ 0 ]
[]
[]
[ "plsql" ]
stackoverflow_0074678675_plsql.txt
Q: Why my batch script its creating standard users and not admin? I'm trying to run the following command to generate a admin user using Batch. But everytime I run it, it just create standard users. Someone can please give me a hint ? @echo off rem Prompt the user for the username of the admin user set /p username=E...
Why my batch script its creating standard users and not admin?
I'm trying to run the following command to generate a admin user using Batch. But everytime I run it, it just create standard users. Someone can please give me a hint ? @echo off rem Prompt the user for the username of the admin user set /p username=Enter the username of the admin user: rem Prompt the user for the pa...
[ "It looks like you are using the correct commands to create a user and add them to the local Administrators group. However, the issue may be with the net user command.\nThe net user command has a parameter called /add which is used to create a new user account. However, this parameter does not specify that the user...
[ 0 ]
[]
[]
[ "batch_file", "windows" ]
stackoverflow_0074681410_batch_file_windows.txt
Q: Create new input for local storage Incrementing and storing the scores on local storage are working fine. Score gets incremented depending if game is won or lost. When I refresh the page (scores go to 0) and start playing again, it starts updating the same local storage from the beginning. Is it possible to leave ...
Create new input for local storage
Incrementing and storing the scores on local storage are working fine. Score gets incremented depending if game is won or lost. When I refresh the page (scores go to 0) and start playing again, it starts updating the same local storage from the beginning. Is it possible to leave the last local storage as it is and set/...
[ "If I’m understanding the question correctly, you can initialize a key to be used for local storage on page load. Ie maybe the current time stamp in ms.\nconst storageKey = +new Date();\n\nThen later to access localStorage, you can do\nlocalStorage.setItem(storageKey, JSON.stringify({ \n wins: document.getElementB...
[ 0 ]
[]
[]
[ "local_storage" ]
stackoverflow_0074681358_local_storage.txt
Q: Coin Toss game for fun How do I create a coin toss using def and return and using random int 0 and 1. I have never used python before. So I'm wondering how to make a function. from random import randint num = input('Number of times to flip coin: ') flips = [randint(0,1) for r in range(num)] results = [] for object...
Coin Toss game for fun
How do I create a coin toss using def and return and using random int 0 and 1. I have never used python before. So I'm wondering how to make a function. from random import randint num = input('Number of times to flip coin: ') flips = [randint(0,1) for r in range(num)] results = [] for object in flips: if object...
[ "Like this?\nfrom random import randint\n\ndef flipcoin(num_of_times):\n results = []\n for i in range(num_of_times):\n results.append(randint(0,1))\n return results\n\nnum = int(input('Number of times to flip coin: '))\nresults = flipcoin(num)\n\nprint(results)\n\nEDIT: Dealing with coin faces, als...
[ 0, 0 ]
[]
[]
[ "python", "python_3.x" ]
stackoverflow_0074681448_python_python_3.x.txt
Q: Python: how to instantiate a class "like a data class"? Data classes have this nice property of a much short / more readable "init function". Example: from dataclasses import dataclass, field @dataclass class MyClass1: x: int = field(default=1) y: int = field(default=2) As opposed to: class MyClass2: ...
Python: how to instantiate a class "like a data class"?
Data classes have this nice property of a much short / more readable "init function". Example: from dataclasses import dataclass, field @dataclass class MyClass1: x: int = field(default=1) y: int = field(default=2) As opposed to: class MyClass2: def __init__(self, x : int = 1, y : int = 2): self.x = x...
[ "In Python, classes are defined using the class keyword, and the @dataclass decorator is used to make a class a data class. The field function is used to specify the default value for a field in the class.\nTo define a class without using the @dataclass decorator, you can simply use the class keyword followed by th...
[ 0 ]
[]
[]
[ "python", "python_dataclasses" ]
stackoverflow_0074681453_python_python_dataclasses.txt
Q: Detect use-after-move for global variables After some effort, I convinced both the clang compiler and clang-tidy (static analyzer) to warn of a use-after-move situation. (see https://stackoverflow.com/a/74250567/225186) int main(int, char**) { a_class a; auto b = std::move(a); a.f(); // warns here, fo...
Detect use-after-move for global variables
After some effort, I convinced both the clang compiler and clang-tidy (static analyzer) to warn of a use-after-move situation. (see https://stackoverflow.com/a/74250567/225186) int main(int, char**) { a_class a; auto b = std::move(a); a.f(); // warns here, for example "invalid invocation of method 'f' on o...
[ "It is possible to use clang's consumed annotations to detect use-after-move situations in global variables, but it requires additional steps and may not be practical in all cases.\nWhen a global variable is moved, its type is changed to the \"consumed\" state, indicating that it is no longer valid for use. However...
[ 0 ]
[ "Yes, it is possible to generalize use-after-move detection for global variables in C++ using clang's \"consumable\" and \"callable_when\" annotations. These annotations allow you to specify the \"typestate\" of an object - whether it is in the \"consumed\" or \"unconsumed\" state - and whether a certain method can...
[ -1, -1, -2 ]
[ "c++", "clang", "clang_tidy", "move", "static_analysis" ]
stackoverflow_0074266113_c++_clang_clang_tidy_move_static_analysis.txt
Q: Migrate from template_file to templatefile Apparently, template_file was deprecated, and I need to migrate to templatefile I have the following YAML that needs to be populated with two variables data "template_file" "user_data" { template = file("cloud-init.yaml") vars = { user = var.USER tskey = var....
Migrate from template_file to templatefile
Apparently, template_file was deprecated, and I need to migrate to templatefile I have the following YAML that needs to be populated with two variables data "template_file" "user_data" { template = file("cloud-init.yaml") vars = { user = var.USER tskey = var.TAILSCALE_AUTHKEY } } Used below user_data = ...
[ "Create a separate .yml file\nThen call the template .yml file through:\n\nuser_data = file(\"filename.yml\")\n\n", "These days you should use templatefile, not template_file. In your case you could do:\nlocals {\n user_data = templatefile(\"cloud-init.yaml\", {\n user = var.USER\n tskey = var.TAILSCALE_AU...
[ 0, 0 ]
[]
[]
[ "terraform" ]
stackoverflow_0074508452_terraform.txt
Q: How to locate a specific var type inside many others arrays in python? I'd like know how can I localize a specific type variable in a set of arrays, that could change its own length structure, i.e: [[[[11.0, 16.0], [113.0, 16.0], [113.0, 41.0], [11.0, 41.0]], ("I WANNA BE LOCATED", 548967)]] I just needed to extr...
How to locate a specific var type inside many others arrays in python?
I'd like know how can I localize a specific type variable in a set of arrays, that could change its own length structure, i.e: [[[[11.0, 16.0], [113.0, 16.0], [113.0, 41.0], [11.0, 41.0]], ("I WANNA BE LOCATED", 548967)]] I just needed to extract the type variable that is a Str in this case: "I WANNA BE LOCATED" I tr...
[ "Here is an example of how you could use these functions to extract the string from the nested array:\n# Define the nested array\narr = [[[[11.0, 16.0], [113.0, 16.0], [113.0, 41.0], [11.0, 41.0]], (1, \"I WANNA BE LOCATED\",)]]\n\n# Define a function to extract the string from the nested array\ndef extract_string(...
[ 1, 1, 1 ]
[]
[]
[ "filter", "indexing", "list", "numpy", "python" ]
stackoverflow_0074681279_filter_indexing_list_numpy_python.txt
Q: How do I get the unix timestamp as a variable in C++? I am trying to make an accurate program that tells you the time, but I can't get the current Unix timestamp. Is there any way I can get the timestamp? I tried using int time = std::chrono::steady_clock::now(); but that gives me an error, saying that 'std::chron...
How do I get the unix timestamp as a variable in C++?
I am trying to make an accurate program that tells you the time, but I can't get the current Unix timestamp. Is there any way I can get the timestamp? I tried using int time = std::chrono::steady_clock::now(); but that gives me an error, saying that 'std::chrono' has not been declared. By the way, I'm new to C++ Let me...
[ "Try using std::time, it should be available in Dev C++ 5.11, but let me know if it also throws an error:\n#include <iostream>\n#include <ctime>\n#include <cstddef> // Include the NULL macro\n\nint main() {\n // Get the current time in seconds\n time_t now = std::time(NULL);\n\n // Convert the Unix timesta...
[ 0, 0 ]
[]
[]
[ "c++", "dev_c++", "unix_timestamp" ]
stackoverflow_0074680489_c++_dev_c++_unix_timestamp.txt
Q: how do I fix this key signing error in google play console? So I just built the new version of my app but when I upload the apk to the google play console I get this error Image of Error I have no idea what's causing it. I checked and within unity the key is the same one I used the first time I built the app. ID i...
how do I fix this key signing error in google play console?
So I just built the new version of my app but when I upload the apk to the google play console I get this error Image of Error I have no idea what's causing it. I checked and within unity the key is the same one I used the first time I built the app. ID is same from the keystore. I have no idea what's causing this or h...
[ "You must the same signing key used to sign the app bundle when it was initially uploaded to the Google Play Store. This signing key is typically stored in a Keystore file, which you can use to sign the app bundle using the jarsigner tool.\n", "\nYou should use choose the same Project Key Alias of the Keystore.\n...
[ 0, 0 ]
[]
[]
[ "google_play_console", "unity3d" ]
stackoverflow_0074681241_google_play_console_unity3d.txt
Q: How to make this REACT APP display some text? I'm trying to display some text in my react course, but the app won't display it. I've starter the react app called "myapp" and created a file "TodoList.js" which is rendered on my "App.js", but when I write some text on TodoList.js it doesn't appear on the app This is...
How to make this REACT APP display some text?
I'm trying to display some text in my react course, but the app won't display it. I've starter the react app called "myapp" and created a file "TodoList.js" which is rendered on my "App.js", but when I write some text on TodoList.js it doesn't appear on the app This is the App.js code: import React from "react"; import...
[]
[]
[ "In the React 18, Render method has changed. App.js and TodoList should be no problem, the problem will be in index.js\nindex.js should look like this.\nimport React from 'react';\nimport ReactDOM from 'react-dom/client';\nimport App from './App';\n\nconst root = ReactDOM.createRoot(document.getElementById('root'))...
[ -1 ]
[ "javascript", "reactjs" ]
stackoverflow_0074680580_javascript_reactjs.txt
Q: R package caret: How to access the results of both the training and testing data? I am using the following code: tc <- trainControl(method = "cv", number = 20) lm1_cv <- train(y~., data = data, method = "lm", preProcess = c("center", "scale"), trControl = tc) lm1_cv Which has the following outpu...
R package caret: How to access the results of both the training and testing data?
I am using the following code: tc <- trainControl(method = "cv", number = 20) lm1_cv <- train(y~., data = data, method = "lm", preProcess = c("center", "scale"), trControl = tc) lm1_cv Which has the following output: Linear Regression 1338 samples 6 predictor Pre-processing: centered (8), scale...
[ "Yes, the average results of all the testing data are stored in the lm1_cv$results object. The train() function in the caret package automatically performs cross-validation and stores the results in the results element of the returned object.\nTo access the average results (RMSE, etc.) of all the training data, you...
[ 0 ]
[]
[]
[ "machine_learning", "r", "r_caret", "regression" ]
stackoverflow_0074679463_machine_learning_r_r_caret_regression.txt
Q: Getting error when I try to upgrade react-router v5 to V6 I m getting typescript error when I tried to upgraded React-router-dom v5 to v6, How can I fix this typescript error. below you can find the code Thanks in advance ` export function withRouter(ui: React.ReactElement) { const history = useNavigate(); con...
Getting error when I try to upgrade react-router v5 to V6
I m getting typescript error when I tried to upgraded React-router-dom v5 to v6, How can I fix this typescript error. below you can find the code Thanks in advance ` export function withRouter(ui: React.ReactElement) { const history = useNavigate(); const routerValues: any = { history: undefined, location: ...
[ "Try this:\nexport function withRouter(ui: React.ReactElement) {\n const history = useNavigate();\n const location = useLocation();\n \n const routerValues: any = {\n history: history,\n location: location\n };\n\n const result = (\n <MemoryRouter>\n {ui}\n </MemoryRouter>\n );\n\n return {...
[ 0, 0 ]
[]
[]
[ "javascript", "react_router_dom", "reactjs", "typescript" ]
stackoverflow_0074673119_javascript_react_router_dom_reactjs_typescript.txt
Q: Got email of 85% Amazon RDS used in Free Tier I am using an Amazon EC2 instance to host my site using the AWS Free Tier. I received this email: Dear AWS Customer, Your AWS account has exceeded 85% of the usage limit for one or more AWS Free Tier-eligible services for the month of September. AWS Free Tier Usage as...
Got email of 85% Amazon RDS used in Free Tier
I am using an Amazon EC2 instance to host my site using the AWS Free Tier. I received this email: Dear AWS Customer, Your AWS account has exceeded 85% of the usage limit for one or more AWS Free Tier-eligible services for the month of September. AWS Free Tier Usage as of 09/29/2019: AWS Free Tier: 17.1331 GB-Mo Usage...
[ "From AWS Forums Posted by: BrianW@AWS\n\nYou should not be getting this message. The free tier is based on\n allocated storage, not consumed storage. If you allocate a 20 GB\n database, you will not exceed the free tier no matter how much you\n insert into the database. We will on making sure these e-mails are...
[ 1, 0, 0 ]
[]
[]
[ "amazon_ec2", "amazon_rds", "amazon_web_services" ]
stackoverflow_0058173657_amazon_ec2_amazon_rds_amazon_web_services.txt
Q: Amazon web services auto scaling group creation error I'm having trouble with creating an auto scaling group. The error message is attached.(https://i.stack.imgur.com/ouL9U.png). I'm not exactly sure what the error is asking me to resolve. I was able to create an auto scaling group without using a custom VPC but n...
Amazon web services auto scaling group creation error
I'm having trouble with creating an auto scaling group. The error message is attached.(https://i.stack.imgur.com/ouL9U.png). I'm not exactly sure what the error is asking me to resolve. I was able to create an auto scaling group without using a custom VPC but now using one, I am getting errors and not sure how to resol...
[ "There could be several reasons for an error when creating an Amazon Web Services (AWS) auto scaling group. Some common causes include:\nIncorrect configuration of the auto scaling group's settings, such as the minimum and maximum number of instances or the desired capacity.\n\nInadequate permissions for the user o...
[ 0 ]
[]
[]
[ "amazon", "amazon_vpc", "amazon_web_services", "autoscaling", "aws_auto_scaling" ]
stackoverflow_0074681469_amazon_amazon_vpc_amazon_web_services_autoscaling_aws_auto_scaling.txt
Q: Error: No value associated with key CodingKeys I'm trying to fetch JSON data from a currency API. But I'm getting the below error: CurrencyConverter[32130:2625405] [boringssl] boringssl_metrics_log_metric_block_invoke(153) Failed to log metrics keyNotFound(CodingKeys(stringValue: "rates", intValue: nil), Swift.De...
Error: No value associated with key CodingKeys
I'm trying to fetch JSON data from a currency API. But I'm getting the below error: CurrencyConverter[32130:2625405] [boringssl] boringssl_metrics_log_metric_block_invoke(153) Failed to log metrics keyNotFound(CodingKeys(stringValue: "rates", intValue: nil), Swift.DecodingError.Context(codingPath: [], debugDescription...
[ "It looks like you are trying to parse the JSON data into an object of type ExchangeRates, which has a property rates that is a dictionary of type [String: Double]. However, the JSON data you are trying to parse does not have a property named \"rates\" in it.\n" ]
[ 0 ]
[]
[]
[ "api", "json", "swift" ]
stackoverflow_0074678446_api_json_swift.txt
Q: Selenium - python webdriver exits from browser after loading I try to open browser using Selenium in Python and after the browser opens, it exits from it, I tried several ways to write my code but every possible way works this way. Thank you in advance for help `from selenium import webdriver from selenium.webdriv...
Selenium - python webdriver exits from browser after loading
I try to open browser using Selenium in Python and after the browser opens, it exits from it, I tried several ways to write my code but every possible way works this way. Thank you in advance for help `from selenium import webdriver from selenium.webdriver import Chrome from selenium.webdriver.chrome.service import Ser...
[ "It looks like you are using the webdriver.Chrome class to create your Chrome driver instance. This class has a service parameter that you can use to specify the Chrome service that should be used to start the Chrome browser.\nIn your code, you are creating a Chrome service using the Service class and passing it to...
[ 0, 0 ]
[]
[]
[ "automation", "crash", "python", "selenium", "webdriver" ]
stackoverflow_0074681137_automation_crash_python_selenium_webdriver.txt
Q: How to return HTML from Next.js middleware? I'm trying to return HTTP Status Code 410 (gone) alongside a custom simple HTML: <h1>Error 410</h1> <h2>Permanently deleted or Gone</h2> <p>This page is not found and is gone from this server forever</p> Is it possible? Because I can't find a method on NextResp...
How to return HTML from Next.js middleware?
I'm trying to return HTTP Status Code 410 (gone) alongside a custom simple HTML: <h1>Error 410</h1> <h2>Permanently deleted or Gone</h2> <p>This page is not found and is gone from this server forever</p> Is it possible? Because I can't find a method on NextResponse object. How can I return HTML from middlewar...
[ "This is not supported anymore.\n\nMiddleware can no longer produce a response body as of v12.2+.\n\nhttps://nextjs.org/docs/messages/returning-response-body-in-middleware\n", "this is the type. there is no method to send html\ntype NextApiResponse<T = any> = ServerResponse<IncomingMessage> & {\n send: Send<T>...
[ 2, 0, 0 ]
[]
[]
[ "javascript", "next.js" ]
stackoverflow_0074570148_javascript_next.js.txt
Q: How to detect and change shape in Java OpenGL I drew some shapes using OpenGL, here is the code: The drawing methods: private void drawRectangle(GL2 gl, double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4) { gl.glBegin(GL2.GL_LINE_LOOP); gl.glVertex2d(x1, y1); ...
How to detect and change shape in Java OpenGL
I drew some shapes using OpenGL, here is the code: The drawing methods: private void drawRectangle(GL2 gl, double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4) { gl.glBegin(GL2.GL_LINE_LOOP); gl.glVertex2d(x1, y1); gl.glVertex2d(x2, y2); gl.glVertex2d(x...
[ "If you want to fill the shape with a color, you must use one of the Triangle primitives instead of GL2.GL_LINE_LOOP. e.g.: GL2.GL_TRIANGLE_FAN:\ngl.glBegin(GL2.GL_TRIANGLE_FAN);\ngl.glVertex2d(x1, y1);\ngl.glVertex2d(x2, y2);\ngl.glVertex2d(x3, y3);\ngl.glVertex2d(x4, y4);\ngl.glEnd();\n\ngl.glBegin(GL2.GL_TRIANGL...
[ 0 ]
[]
[]
[ "java", "javafx", "jogl", "opengl", "swing" ]
stackoverflow_0074681441_java_javafx_jogl_opengl_swing.txt
Q: Protect AWS API Gateway To Only My Extension Calling It Is it a possibility to setup something like the API Gateway CORS Access-Control-Allow-Origin to only allow a Firefox extension that I am writing to call it? Setting Access-Control-Allow-Origin to '*' is what I did for testing, but does not seem like a good po...
Protect AWS API Gateway To Only My Extension Calling It
Is it a possibility to setup something like the API Gateway CORS Access-Control-Allow-Origin to only allow a Firefox extension that I am writing to call it? Setting Access-Control-Allow-Origin to '*' is what I did for testing, but does not seem like a good policy for when it is released. I wondered if there was anyway ...
[ "Just a note; CORS is for browsers to restrict cross-origin HTTP requests. CORS won't stop someone invoking the API from outside a browser e.g. using cURL, Postman, or some other non-browser based app.\n", "Yes, it is possible to restrict access to your API Gateway to only certain clients, such as your Firefox ex...
[ 1, 0 ]
[]
[]
[ "amazon_web_services", "api", "cors", "manifest" ]
stackoverflow_0074680138_amazon_web_services_api_cors_manifest.txt
Q: Search engine for over 5000 entities from .txt files I have over 5000 .txt files stored locally on my app each file is at least 15 lines of words So am trying to search with multiple words all over the 5000 list Finally i was able to search in all of them but with only one problem The app freezes until the whole p...
Search engine for over 5000 entities from .txt files
I have over 5000 .txt files stored locally on my app each file is at least 15 lines of words So am trying to search with multiple words all over the 5000 list Finally i was able to search in all of them but with only one problem The app freezes until the whole process finished Future<List<FatwaModel>> searchFatawy(Stri...
[ "Instead of calling that method directly on your app ( on the main thread ), you will need to call it in another isolate that doesn't share a memory with the main thread.\nad the quickest and easiest way to do it is by calling a compute() method which spawns an isolate and runs the provided callback on that isolate...
[ 0 ]
[]
[]
[ "dart", "flutter", "regex", "search" ]
stackoverflow_0074681363_dart_flutter_regex_search.txt
Q: Array out of bound exception Java I am trying to run a program for school where I need to fix the error but I can't seem to find the error for some reason. I receive a ArrayIndexOutOfBoundException: Index 3 out of bounds for length 3 error for line 17. Here is the line 17: CellPhone(Long.parseLong(temp[0]),temp[1]...
Array out of bound exception Java
I am trying to run a program for school where I need to fix the error but I can't seem to find the error for some reason. I receive a ArrayIndexOutOfBoundException: Index 3 out of bounds for length 3 error for line 17. Here is the line 17: CellPhone(Long.parseLong(temp[0]),temp[1],Integer.parseInt(temp[3]),Double.parse...
[ "It looks like you're trying to access the element at index 3 in the temp array on line 17, but that array only has 3 elements in it (indices 0, 1, and 2). This is why you're getting the ArrayIndexOutOfBoundException: Index 3 out of bounds for length 3 error.\nOne way to fix this is to change the line of code so th...
[ 0 ]
[]
[]
[ "arrays", "java", "object" ]
stackoverflow_0074681464_arrays_java_object.txt
Q: How to choose the values for input and output dim in layers? based on what? I'm trying to build a graph encoder in pytorch_geometric, that takes the graph features as input and produces embeddings in a low dimensionality in unsupervised learning. so would be this Encoder model be a correct model to do this job? I ...
How to choose the values for input and output dim in layers? based on what?
I'm trying to build a graph encoder in pytorch_geometric, that takes the graph features as input and produces embeddings in a low dimensionality in unsupervised learning. so would be this Encoder model be a correct model to do this job? I dont know how to set the input dimensionalty correctly to make it work for all ty...
[ "It looks like you are trying to multiply a tensor of shape 441x4 with a tensor of shape 44x4 in the forward method of the Encoder class. This is not possible because the inner dimensions (the second and third dimensions) must match in order to perform matrix multiplication.\nYou can fix this error by ensuring that...
[ 0 ]
[]
[]
[ "python_3.x", "pytorch_geometric" ]
stackoverflow_0074675268_python_3.x_pytorch_geometric.txt
Q: (Convert decimals to fractions) Java I have been trying to figure this out for hours, but I can not do it. I was trying to search something to get some help, but everything I can find uses BigInteger, and we can not use that for this assignment. (Convert decimals to fractions) Write a program that prompts the user...
(Convert decimals to fractions) Java
I have been trying to figure this out for hours, but I can not do it. I was trying to search something to get some help, but everything I can find uses BigInteger, and we can not use that for this assignment. (Convert decimals to fractions) Write a program that prompts the user to enter a decimal number and displays th...
[ "Your main problem is that your algorithm is wrong. I don't see how adding (or subtracting) the whole number part and the \"fractional\" part would yield a fractional representation of the number.\nA possible algorithm is to just remove the . and put it as the numerator. Put the denominator as 10 to the power of ho...
[ 0 ]
[]
[]
[ "java" ]
stackoverflow_0074681440_java.txt
Q: Pass Elements in Variant Array as Arguments to ParamArray Background I am creating a VBA function (UDF) called MyUDF(), which wraps CallByName(). I wish to mimic precisely the signature and parametric behavior of CallByName(). Furthermore, MyUDF() must copy its Args() argument to a modular variable ArgsCopy — a V...
Pass Elements in Variant Array as Arguments to ParamArray
Background I am creating a VBA function (UDF) called MyUDF(), which wraps CallByName(). I wish to mimic precisely the signature and parametric behavior of CallByName(). Furthermore, MyUDF() must copy its Args() argument to a modular variable ArgsCopy — a Variant array — whose elements are then passed by MyUDF() as fur...
[ "It sounds like you want to be able to pass an array of arguments to the MyUDF() function, which in turn will be passed on to the CallByName() function. In order to do this, you can declare the Args() argument of MyUDF() as a ParamArray, which will allow it to accept an optional, variable number of arguments of the...
[ 0 ]
[]
[]
[ "paramarray", "parameter_passing", "user_defined_functions", "vba", "wrapper" ]
stackoverflow_0074587176_paramarray_parameter_passing_user_defined_functions_vba_wrapper.txt
Q: Type '"standard"' is not assignable to type 'MatFormFieldAppearance' Updated my angular project to 15 and I notice matformfield appearance ="standard" is no longer useable. A: Turns out that the deprecated versions of these modules would somehow pull the angular 14 versions. so it makes appearance ="standard" us...
Type '"standard"' is not assignable to type 'MatFormFieldAppearance'
Updated my angular project to 15 and I notice matformfield appearance ="standard" is no longer useable.
[ "Turns out that the deprecated versions of these modules would somehow pull the angular 14 versions. so it makes appearance =\"standard\" useable. Seem google angular team has not found a way to make use of appearance =\"standard\" in angular 15.0.2 as yet\n" ]
[ 0 ]
[]
[]
[ "angular", "html", "typescript" ]
stackoverflow_0074681244_angular_html_typescript.txt
Q: How to convert space separated file to tab delimited file in python? I have two data files, viz., 'fin.dat' and 'shape.dat'. I want to format 'shape.dat' just the way the 'fin.dat' is written with Python. The files can be found here https://easyupload.io/m/h94wd3. The snippets of the data structures are given here...
How to convert space separated file to tab delimited file in python?
I have two data files, viz., 'fin.dat' and 'shape.dat'. I want to format 'shape.dat' just the way the 'fin.dat' is written with Python. The files can be found here https://easyupload.io/m/h94wd3. The snippets of the data structures are given here fin.dat,shape.dat. Please help me doing that.
[ "To convert a space-separated file to a tab-delimited file in Python, you can use the replace() method to replace all occurrences of spaces with tabs. Here's an example:\n# Open the file in read mode\nwith open('input.txt', 'r') as input_file:\n # Read the file content\n content = input_file.read()\n\n# Repla...
[ 1 ]
[]
[]
[ "numpy", "pandas", "python" ]
stackoverflow_0074681480_numpy_pandas_python.txt
Q: use purrr package to create multiple shiny reactive expressions from tibble tldr: I want to condense multiple reactive expressions (over 300 lines of code) in order to improve readability and maintanability. I did great upgrades by following this thread and its dependencies. My observers were transformed into obse...
use purrr package to create multiple shiny reactive expressions from tibble
tldr: I want to condense multiple reactive expressions (over 300 lines of code) in order to improve readability and maintanability. I did great upgrades by following this thread and its dependencies. My observers were transformed into observeEvents triggered by FP with the purrr package (way more efficient and easier t...
[ "This worked for me (all objects from your example):\nlibrary(purrr)\n## ...\n pwalk(vars, ~{\n output[[..3]] <<- reactive({\n req(input[[..1]], input[[..2]])\n return(input[[..1]] > input[[..2]])\n })\n })\n# ...\n\nNote the double left assignment <<- needed to address the...
[ 0 ]
[]
[]
[ "functional_programming", "purrr", "r", "shiny", "shiny_reactivity" ]
stackoverflow_0074680745_functional_programming_purrr_r_shiny_shiny_reactivity.txt
Q: Reverse standardization after removing rows I have been working with R for about six months now, and so I am still somewhat of a novice with a lot of this. I have a large dataset of 260 columns with 1000 rows and I need to convert the data to standard deviation units and then removing outliers which do not meet th...
Reverse standardization after removing rows
I have been working with R for about six months now, and so I am still somewhat of a novice with a lot of this. I have a large dataset of 260 columns with 1000 rows and I need to convert the data to standard deviation units and then removing outliers which do not meet the set SD criteria. I have managed to convert the ...
[ "Try\ni1 <- !rowSums(ds_z > 2)\nno_out <- ds_z[i1, ]\n lst1 <- lapply(attributes(ds_z)[-1], \\(x) x[i1])\nno_out2 <- (no_out * lst1$`scaled:scale`) + lst1$`scaled:center`\n no_out2 <- round(no_out2) \n\n" ]
[ 0 ]
[]
[]
[ "outliers", "r", "reverse", "standardization" ]
stackoverflow_0074671328_outliers_r_reverse_standardization.txt
Q: std::ranges::any_of fails when compiling with Apple Clang 14.0 When I compile my program I get this error: error: no member named 'any_of' in namespace 'std::ranges'. However, I do include all the necessary headers (e.g. algorithm). I use c++20 standard and my compiler version is Apple Clang 14.0. Why do I get thi...
std::ranges::any_of fails when compiling with Apple Clang 14.0
When I compile my program I get this error: error: no member named 'any_of' in namespace 'std::ranges'. However, I do include all the necessary headers (e.g. algorithm). I use c++20 standard and my compiler version is Apple Clang 14.0. Why do I get this error? I highly appreciate it if someone is able to explain to me ...
[ "Range version of the <algorithm> library has not been implemented in Apple Clang 14.0. You can check this by going through each versions of Xcode release notes, or by going through the library files.\nRange version of the <algorithm> library has been added to their most recent stable branch of LLVM however, so you...
[ 0 ]
[]
[]
[ "apple_m1", "c++", "c++20", "clang" ]
stackoverflow_0074679839_apple_m1_c++_c++20_clang.txt
Q: Why does Undetered Chromedriver not work with Selenium Wire I want to make a request using Selenium Wire. The site has an anti -bot protection. I tried to use only Undetateded-Chromedriver. Everything work well. import undetected_chromedriver as uc driver = uc.Chrome() driver.get(f'https://nowsecure.nl/') time.s...
Why does Undetered Chromedriver not work with Selenium Wire
I want to make a request using Selenium Wire. The site has an anti -bot protection. I tried to use only Undetateded-Chromedriver. Everything work well. import undetected_chromedriver as uc driver = uc.Chrome() driver.get(f'https://nowsecure.nl/') time.sleep(10) driver.close() driver.quit() But when I use Selenium Wi...
[ "You have to add an options in your undetected chrome browser.\noptions = uc.ChromeOptions()\noptions.add_argument('--start-maximized')\noptions.add_argument('--disable-notifications')\n\ndriver = uc.Chrome(options=options, seleniumwire_options={\n 'proxy': {\n 'http': f'http://{proxy_user}:{proxy_passw...
[ 0 ]
[]
[]
[ "cloudflare", "python", "selenium", "seleniumwire", "undetected_chromedriver" ]
stackoverflow_0074680942_cloudflare_python_selenium_seleniumwire_undetected_chromedriver.txt
Q: React Native : Task :app:installDebug FAILED Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0 i am trying to create a react native project i have 2 android devices 1 is running android 9 and 1 is running android 12 my app is getting is installing and running on device that...
React Native : Task :app:installDebug FAILED Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0
i am trying to create a react native project i have 2 android devices 1 is running android 9 and 1 is running android 12 my app is getting is installing and running on device that has android 9 but my app is not running on android 12 i get the following error > Task :app:installDebug Installing APK 'app-debug.apk' on '...
[ "It appears that you are trying to install and run a React Native app on an Android device, but the app is not running on the device that has Android 12 installed. This is likely because the app is using deprecated Gradle features, which are not compatible with Gradle 8.0 or later.\nTo fix this issue, you can try u...
[ 0 ]
[ "In terminal, enter the android folder with\ncd android\n\nthen run\n.\\gradlew clean\n\nAfter that your app should run.\n" ]
[ -2 ]
[ "android", "react_native" ]
stackoverflow_0074568858_android_react_native.txt
Q: how to use info from .txt file to create variables in python? I'm very new to python, and I'd like to know how I can use the info in a text file to create variables. For example, if the txt file looked like this: vin_brand_type_year_price 2132_BMW_330xi_2016_67000 1234_audi_a4_2019_92000 9876_mclaren_720s_2022_327...
how to use info from .txt file to create variables in python?
I'm very new to python, and I'd like to know how I can use the info in a text file to create variables. For example, if the txt file looked like this: vin_brand_type_year_price 2132_BMW_330xi_2016_67000 1234_audi_a4_2019_92000 9876_mclaren_720s_2022_327000 How do I then, for example, use it to make a variable called vi...
[ "We can then use the index() method to find the index of the \"vin\" header in the list of header values. This will give us the index of the VIN number in each line of the text file. We can then use this index to extract\n# Create an empty list to store the VIN numbers.\nvin = []\n\n# Open the text file and read it...
[ 1, 1, 0, 0 ]
[]
[]
[ "python" ]
stackoverflow_0074681417_python.txt
Q: Number of pixels declared for SizedBox's width & height not universal across multiple devices Here's an example of declaring the height & width of a SizedBox: SizedBox(width: 40, height: 40) In some cases (on other devices), I've noticed that sometimes the dimensions get overflowed and causes errors. In my mind, I...
Number of pixels declared for SizedBox's width & height not universal across multiple devices
Here's an example of declaring the height & width of a SizedBox: SizedBox(width: 40, height: 40) In some cases (on other devices), I've noticed that sometimes the dimensions get overflowed and causes errors. In my mind, I thought that declaring by pixel number would be universal across all devices because 200 pixels sh...
[ "Consider using the FractionallySizedBox to set a percentage of the width/height that should be taken from all screens:\nFractionallySizedBox(\n heightFactor: 0.2, // will take 20% of the screen height.\n widthFactor: 0.4, // will take 40% of the screen width.\n);\n\n" ]
[ 0 ]
[]
[]
[ "dart", "flutter" ]
stackoverflow_0074681401_dart_flutter.txt
Q: PHP - How user can set directory where downloaded file will be saved? I am making a simple application in which the user uploads files using 2 HTML input:file fields and a zip archive is created from them. Is there any way I can let the user choose where this zip can go? (Something like a "Save As" window). This i...
PHP - How user can set directory where downloaded file will be saved?
I am making a simple application in which the user uploads files using 2 HTML input:file fields and a zip archive is created from them. Is there any way I can let the user choose where this zip can go? (Something like a "Save As" window). This is my current solution, which saves archive only to default download destina...
[ "To allow the user to choose where to save the zip file, you could use the HTML5 element to create a \"Save As\" dialog box. Here's an example:\n<form action=\"upload.php\" method=\"post\" enctype=\"multipart/form-data\">\n <label for=\"fileone\">Choose the first file to include in the zip archive:</label>\n <in...
[ 0, 0 ]
[]
[]
[ "php" ]
stackoverflow_0074681503_php.txt
Q: How to change Keycloak logo on the Admin console page in keycloak.v2 theme I am trying to find a way to replace Keycloak image on the Admin console page using Keycloak.v2 theme which is the default theme starting from Keycloak 19. Note that replacing themes\keycloak.v2\account\resources\public\logo.svg didn't real...
How to change Keycloak logo on the Admin console page in keycloak.v2 theme
I am trying to find a way to replace Keycloak image on the Admin console page using Keycloak.v2 theme which is the default theme starting from Keycloak 19. Note that replacing themes\keycloak.v2\account\resources\public\logo.svg didn't really help.
[ "The new admin UI (starting from keycloak 19) has been delivered through keycloak-admin-ui.jar. In order to customize any UI components, it has to be done by forking this repo and build on your own.\n", "In Keycloak, one of the ways you can change the Keycloak logo is by overriding a theme. The benefit of doing ...
[ 0, 0 ]
[]
[]
[ "keycloak", "keycloak_services", "reactjs" ]
stackoverflow_0074607048_keycloak_keycloak_services_reactjs.txt
Q: Laravel CSP how to allow inline styles in laravel-mix webpack I am using spatie/laravel-csp package to set CSP headers on laravel application. But the inline style could not be applied and refused with the following error. Refused to apply inline style because it violates the following Content Security Policy dir...
Laravel CSP how to allow inline styles in laravel-mix webpack
I am using spatie/laravel-csp package to set CSP headers on laravel application. But the inline style could not be applied and refused with the following error. Refused to apply inline style because it violates the following Content Security Policy directive: "style-src 'self' 'nonce-TjpZGox5zGathTvJDeVMfxzHaOtWMc7v' ...
[ "To allow inline styles in your Laravel application using the spatie/laravel-csp package, you need to modify the style-src directive in your Content Security Policy (CSP) to include the 'unsafe-inline' keyword.\nHere is an example of how your CSP header might look with the 'unsafe-inline' keyword added to the style...
[ 0 ]
[]
[]
[ "laravel", "laravel_mix", "webpack" ]
stackoverflow_0073741808_laravel_laravel_mix_webpack.txt
Q: Using PIL module to open file from GCS I am a beginner in programming, and this is my first little try. I'm currently facing a bottleneck, I would like to ask for the help. Any advice will be welcome. Thank you in advance! Here is what I want to do: To make a text detection application and extract the text for the...
Using PIL module to open file from GCS
I am a beginner in programming, and this is my first little try. I'm currently facing a bottleneck, I would like to ask for the help. Any advice will be welcome. Thank you in advance! Here is what I want to do: To make a text detection application and extract the text for the further usage(for instance, to map some of ...
[ "PIL does not have built in ability to automatically open files from GCS. you will need to either\n\nDownload the file to local storage and point PIL to that file or\n\nGive PIL a BlobReader which it can use to access the data:\nfrom PIL import Image\nfrom google.cloud import storage\n\nstorage_client = storage.Cli...
[ 0 ]
[]
[]
[ "gcs", "google_cloud_storage", "path", "python", "python_imaging_library" ]
stackoverflow_0074678150_gcs_google_cloud_storage_path_python_python_imaging_library.txt
Q: How to send a value as parameter to the Factory Class I need to run a Factory 50 times, so inside the DatabseSeeder: public function run() { for($i=1;$i<=50;$i++){ (new CategoryQuestionFactory($i))->create(); } } So as you can see, I tried passing a variable called $i as parameter to CategoryQuesti...
How to send a value as parameter to the Factory Class
I need to run a Factory 50 times, so inside the DatabseSeeder: public function run() { for($i=1;$i<=50;$i++){ (new CategoryQuestionFactory($i))->create(); } } So as you can see, I tried passing a variable called $i as parameter to CategoryQuestionFactory class. Then at this Factory, I tried this: class ...
[ "It seems to me that you want to seed the intermediate table. There are methods that can be use when seeding them one of them is has() which is the one i always use.\n/**\n* will create a one question and 3 category then create a data in the intermediate table. \n* expected data : \n* question_id | category_id\n* ...
[ 1, 1, 0, 0, 0 ]
[]
[]
[ "laravel", "laravel_9", "laravel_factory", "laravel_seeding", "php" ]
stackoverflow_0074411525_laravel_laravel_9_laravel_factory_laravel_seeding_php.txt
Q: Flutter - Generate .ipa file The official Flutter documentations says that the following command produces both ipa and xcarchive files. flutter build ipa From the Flutter documentation to generate ipa Run flutter build ipa to produce an Xcode build archive (.xcarchive file) in your project’s build/ios/archive/ ...
Flutter - Generate .ipa file
The official Flutter documentations says that the following command produces both ipa and xcarchive files. flutter build ipa From the Flutter documentation to generate ipa Run flutter build ipa to produce an Xcode build archive (.xcarchive file) in your project’s build/ios/archive/ directory and an App Store app bun...
[ "You can generate .ipa file for distribution using Xcode via following steps\n1.Open iOS folder of your project in Xcode\n\nthen Product -> Archive\nIt once this is complete open up the Organiser and click the latest version.\n\n\n3.Now click on Distribute App This will open list of method for export. Select the ex...
[ 0, 0 ]
[]
[]
[ "flutter", "ios", "ipa" ]
stackoverflow_0072947376_flutter_ios_ipa.txt
Q: Why vs terminal window is not showing react variant? PS C:\Users\shakhawat.hossain07\Desktop\nasaspace_app_challenge> npm create vite@latest √ Project name: ... nasaspace_app_challenge √ Select a framework: » React ? Select a variant: » - Use arrow-keys. Return to submit. > JavaScript TypeScript Why is is n...
Why vs terminal window is not showing react variant?
PS C:\Users\shakhawat.hossain07\Desktop\nasaspace_app_challenge> npm create vite@latest √ Project name: ... nasaspace_app_challenge √ Select a framework: » React ? Select a variant: » - Use arrow-keys. Return to submit. > JavaScript TypeScript Why is is not showing like this?: ? Select a variant: » - Use arrow...
[ "It might have changed with an update.\nAnyways, \"react\" is \"Javascript\" and \"react-ts\" would be \"Typescript\" in the first prompt\n" ]
[ 0 ]
[]
[]
[ "reactjs", "vite", "web_site_project" ]
stackoverflow_0074668537_reactjs_vite_web_site_project.txt
Q: Why can't you access an element of a list at an index without previously using the Add method? Why doesn't this program work if the list has been made with a set size? List<int> list = new List<int>(2); list[0] = 1; Console.WriteLine(list[0]) This is the error: System.ArgumentOutOfRangeException: 'Index was out o...
Why can't you access an element of a list at an index without previously using the Add method?
Why doesn't this program work if the list has been made with a set size? List<int> list = new List<int>(2); list[0] = 1; Console.WriteLine(list[0]) This is the error: System.ArgumentOutOfRangeException: 'Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index
[ "Because the list is empty. That's why there are no elements thus no range\n", "I think a bit more explanation is in order. You are thinking that the \"2\" parameter in the List constructor creates a list of size 2. It does not. It creates an empty list with a capacity of 2.\nWhat that means effectively is that i...
[ 1, 0 ]
[]
[]
[ "c#", "collections", "indexing", "list", "oop" ]
stackoverflow_0074681213_c#_collections_indexing_list_oop.txt
Q: Overlapping Elements in PyQT6 In my application, I have an image and I'm trying to create a button under the application. Instead, the button appears on top of the image. This is my code so far: import sys from PyQt5.QtWidgets import QApplication, QMainWindow, QLabel, QGridLayout, QWidget, QPushButton from PyQt5.Q...
Overlapping Elements in PyQT6
In my application, I have an image and I'm trying to create a button under the application. Instead, the button appears on top of the image. This is my code so far: import sys from PyQt5.QtWidgets import QApplication, QMainWindow, QLabel, QGridLayout, QWidget, QPushButton from PyQt5.QtGui import QPixmap class Example(...
[ "It looks like you're adding the self.label widget twice to the grid layout, but you're not adding the button to the layout at all. You need to add the button to the grid layout using the addWidget() method, just like you're doing for the self.label widget.\nHere's an example of how you could modify your code to ad...
[ 0 ]
[]
[]
[ "pyqt6", "user_interface" ]
stackoverflow_0074681523_pyqt6_user_interface.txt
Q: How to split H256 into u32, u112, u112 in Rust 0x638d0490000000004b7cdeca2fe41a1b6411000000158fb5610df6aa553bfedb of type H256 https://docs.rs/ethers/0.17.0/ethers/types/struct.H256.html# It is a storage slot on EVM. A single slot is uint256, but there, three different values were packed into one storage slot (tha...
How to split H256 into u32, u112, u112 in Rust
0x638d0490000000004b7cdeca2fe41a1b6411000000158fb5610df6aa553bfedb of type H256 https://docs.rs/ethers/0.17.0/ethers/types/struct.H256.html# It is a storage slot on EVM. A single slot is uint256, but there, three different values were packed into one storage slot (thats how EVM works). So uint112 + uint112 + uint32 wer...
[ "In Rust, you can split a 256-bit integer into three 128-bit integers using the .split_into_32_and_128() method provided by the num_bigint crate.\nHere's an example of how you could do that:\nextern crate num_bigint;\nuse num_bigint::BigUint;\n\nfn main() {\n // Parse the 256-bit integer from its hexadecimal rep...
[ 0, 0 ]
[]
[]
[ "rust" ]
stackoverflow_0074680730_rust.txt
Q: Executes tests in parallel failing on Jenkins but passing locally I am writing here maybe I can get some ideas what can be the issue. I am using serenity with cucumber and spring. The following packages are used by serenity 3.3.2: serenity-core serenity-screenplay serenity-screenplay-webdriver serenity-screenplay-...
Executes tests in parallel failing on Jenkins but passing locally
I am writing here maybe I can get some ideas what can be the issue. I am using serenity with cucumber and spring. The following packages are used by serenity 3.3.2: serenity-core serenity-screenplay serenity-screenplay-webdriver serenity-screenplay-rest serenity-ensure serenity-spring serenity-junit serenity-cucumber A...
[ "I have the same problem which I can’t solve yet. Either the test fails because the element is not found but the screenshot shows the opposite or it fails because the element is still visible, but not on the screenshot. Tried many different waits, but no results. Did you find anything?\n" ]
[ 0 ]
[]
[]
[ "automated_tests", "cucumber_serenity", "jenkins" ]
stackoverflow_0073554455_automated_tests_cucumber_serenity_jenkins.txt
Q: Binary matrix multiplication I got a matrix A, with the following bytes as rows: 11111110 (0xfe) 11111000 (0xf8) 10000100 (0x84) 10010010 (0x92) My program reads a byte from stdin with the function sys.stdin.read(1). Suppose I receive the byte x 10101010 (0xaa). Is there a way using numpy to perform the multi...
Binary matrix multiplication
I got a matrix A, with the following bytes as rows: 11111110 (0xfe) 11111000 (0xf8) 10000100 (0x84) 10010010 (0x92) My program reads a byte from stdin with the function sys.stdin.read(1). Suppose I receive the byte x 10101010 (0xaa). Is there a way using numpy to perform the multiplication: >>> A.dot(x) 0x06 (0000...
[ "1. Not using dot\nYou do not need to fully expand your matrix to do bitwise \"multiplication\" on it. You want to treat A as a 4x8 matrix of bits and x as an 8-element vector of bits. A row multiplication yields 1 for the bits that are on in both A and x and 0 if either bit is 0. This is equivalent to applying bit...
[ 0, 0 ]
[]
[]
[ "numpy", "python" ]
stackoverflow_0044203732_numpy_python.txt
Q: Heroku build fails on git push because of Rollup I am deploying my first Heroku app (NodeJS) but when it comes to the last 'git push heroku master' step, I get an error that causes the build to fail because of problems with rollupjs. I dont even think I am using Rollup for anything in my app, and I even tried glob...
Heroku build fails on git push because of Rollup
I am deploying my first Heroku app (NodeJS) but when it comes to the last 'git push heroku master' step, I get an error that causes the build to fail because of problems with rollupjs. I dont even think I am using Rollup for anything in my app, and I even tried global and dependency uninstall of Rollup to see if it wou...
[ "Mac and Windows (one of which you're probably using to develop) have case-insensitive filesystems. Linux (which you're deploying to) has case-sensitive filesystems. ./sections/Home.jsx will work on your computer, but not on Heroku — change it to ./Sections/Home.jsx. And a personal tip, if you want to avoid problem...
[ 0 ]
[]
[]
[ "heroku", "node.js", "npm", "reactjs", "rollup" ]
stackoverflow_0074681097_heroku_node.js_npm_reactjs_rollup.txt
Q: How to convert an arbitary channel tensor to opencv dnn blob? I'm using opencv dnn for infering onnx model, and I'v found dnn::blobFromImage can transfer an image to blob as input of dnn::Net, but if there anyway to transfer arbitary shape tensor (e.g. (1,8,256,256) instead of 3 channels) to blob for infering ? ...
How to convert an arbitary channel tensor to opencv dnn blob?
I'm using opencv dnn for infering onnx model, and I'v found dnn::blobFromImage can transfer an image to blob as input of dnn::Net, but if there anyway to transfer arbitary shape tensor (e.g. (1,8,256,256) instead of 3 channels) to blob for infering ?
[ "cv::Mat tensor = ... // tensor with shape (1, 8, 256, 256)\ncv::Mat blob = cv::dnn::blobFromImage(tensor, 1.0, cv::Size(256, 256), cv::Scalar(0, 0, 0), true, false, CV_32F);\n\n\n" ]
[ 0 ]
[]
[]
[ "blob", "dotnetnuke", "opencv", "tensor" ]
stackoverflow_0074677983_blob_dotnetnuke_opencv_tensor.txt