qid int64 4 19.1M | question stringlengths 18 48.3k | answers list | date stringlengths 10 10 | metadata list |
|---|---|---|---|---|
74,330,556 | <p>I created an extension, where I placed a script into a page markup and performs some actions according to the following <a href="https://stackoverflow.com/questions/9515704/access-variables-and-functions-defined-in-page-context-using-a-content-script/9517879#9517879">article</a>:</p>
<pre><code>var s = document.crea... | [
{
"answer_id": 74330748,
"author": "Melron",
"author_id": 8920328,
"author_profile": "https://Stackoverflow.com/users/8920328",
"pm_score": 1,
"selected": false,
"text": "public static void main(String[] args) {\n int[] CarSales= {1234,2343,1456,4567,8768,2346,9876,4987,7592,9658,7851... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330556",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19435750/"
] |
74,330,569 | <p>How would you split a column based on name and take the confidence Intervals split by specific names?</p>
<p>Can't Index because importing a file a range, because importing different files. Can't hardcode names</p>
<p>Data Looks like:</p>
<pre><code>Name | Score
Anna 90
Anna 90
Anna 30
Anna 60
Anna 60
Ann... | [
{
"answer_id": 74330824,
"author": "jay.sf",
"author_id": 6574038,
"author_profile": "https://Stackoverflow.com/users/6574038",
"pm_score": 1,
"selected": false,
"text": "tapply ci ci <- \\(x, a=.05) {\n p <- sapply(list(length, sd, mean), \\(f) f(x))\n tt <- -qt(a/2, p[1] - 1)\n p[3]... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330569",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6063433/"
] |
74,330,590 | <p>I'm trying to use the <code>.find()</code> method in mongodb. The output yeilds a <code>mongodb::Cursor</code>. I'm unable to convert the cursor into a vector so that I can wrap them in a json and send it to my front-end. This is the following idea I've tried</p>
<p><a href="https://i.stack.imgur.com/LE6Fj.jpg" rel=... | [
{
"answer_id": 74331020,
"author": "Peterrabbit",
"author_id": 18242865,
"author_profile": "https://Stackoverflow.com/users/18242865",
"pm_score": 1,
"selected": false,
"text": "next let mut results: Vec<Document> = Vec::new();\n\nwhile let Some(result) = cursor.next().await {\n match... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330590",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11750308/"
] |
74,330,630 | <p>I have an app that uses expo-camera to take a picture. I would like to implement a function that would let user to draw over a taken picture. What is the best way to achieve this?</p>
<p>What have I tried?</p>
<ul>
<li>react-native-sketch-canvas (looks like this component is no longer supported)</li>
</ul>
| [
{
"answer_id": 74331020,
"author": "Peterrabbit",
"author_id": 18242865,
"author_profile": "https://Stackoverflow.com/users/18242865",
"pm_score": 1,
"selected": false,
"text": "next let mut results: Vec<Document> = Vec::new();\n\nwhile let Some(result) = cursor.next().await {\n match... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330630",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20184613/"
] |
74,330,632 | <p>I'm using the version 2 searchtweets api for learning proposes.</p>
<p>Following the documentation available here: <a href="https://pypi.org/project/searchtweets-v2/" rel="nofollow noreferrer">https://pypi.org/project/searchtweets-v2/</a>, I'm trying to run the following code:</p>
<pre><code> import json
... | [
{
"answer_id": 74331020,
"author": "Peterrabbit",
"author_id": 18242865,
"author_profile": "https://Stackoverflow.com/users/18242865",
"pm_score": 1,
"selected": false,
"text": "next let mut results: Vec<Document> = Vec::new();\n\nwhile let Some(result) = cursor.next().await {\n match... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330632",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15740505/"
] |
74,330,682 | <p>Most factory patterns I've seen in typescript are based on some named mapping between a name and the Class type.</p>
<p>A naive summary implementation:</p>
<pre><code>const myMap = {
classOne: ExampleClass,
classTwo: AnotherClass
}
(k: string) => { return new myMap[k] }
</code></pre>
<p>I wanted to take this m... | [
{
"answer_id": 74335628,
"author": "Dimava",
"author_id": 5734961,
"author_profile": "https://Stackoverflow.com/users/5734961",
"pm_score": 1,
"selected": false,
"text": "Constructor<T> type _builtin = InstanceType<any> // T extends abstract new (...args: any) => infer R ? R : any\ntype ... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330682",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/452928/"
] |
74,330,707 | <p>I'm trying to read a file which contains the structure PointID CoordX CoordY, like this:</p>
<pre><code>1 565.0 575.0
2 25.0 185.0
3 345.0 750.0
4 945.0 685.0
5 845.0 655.0
</code></pre>
<p>Where PointID should be the ID of that dot.</p>
<p>Then, I have to create a Punto object following this structure:</p>
<pre><co... | [
{
"answer_id": 74335628,
"author": "Dimava",
"author_id": 5734961,
"author_profile": "https://Stackoverflow.com/users/5734961",
"pm_score": 1,
"selected": false,
"text": "Constructor<T> type _builtin = InstanceType<any> // T extends abstract new (...args: any) => infer R ? R : any\ntype ... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330707",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10734814/"
] |
74,330,721 | <p>I am trying to perform a sort of aggregation, but with the creation of new columns.</p>
<p>Let's take the example of the dataframe below:</p>
<pre><code>df = pd.DataFrame({'City':['Los Angeles', 'Denver','Denver','Los Angeles'],
'Car Maker': ['Ford','Toyota','Ford','Toyota'],
'Qty': [50000,100000,80000,7000... | [
{
"answer_id": 74335628,
"author": "Dimava",
"author_id": 5734961,
"author_profile": "https://Stackoverflow.com/users/5734961",
"pm_score": 1,
"selected": false,
"text": "Constructor<T> type _builtin = InstanceType<any> // T extends abstract new (...args: any) => infer R ? R : any\ntype ... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330721",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10033990/"
] |
74,330,739 | <p>I have this dataset-</p>
<pre><code> group sub_group value date
0 Animal Cats 12 today
1 Animal Dogs 32 today
2 Animal Goats 38 today
3 Animal Fish ... | [
{
"answer_id": 74333897,
"author": "r-beginners",
"author_id": 13107804,
"author_profile": "https://Stackoverflow.com/users/13107804",
"pm_score": 3,
"selected": true,
"text": "[0.25,1.25,2.25] # group id add\ndf['gr_id'] = df['group'].astype('category').cat.codes\n\nimport plotly.expres... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330739",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11117255/"
] |
74,330,750 | <p>I need to build a query which performs subtraction on basis of client name here is my query I built for getting data</p>
<pre><code>SELECT invoice.client_name, (Sum(invoice.freight_rate)+Sum(invoice.total_basic_amount)+Sum(invoice.delivery_rate))
FROM invoice GROUP BY invoice.client_name
UNION SELECT client_na... | [
{
"answer_id": 74333897,
"author": "r-beginners",
"author_id": 13107804,
"author_profile": "https://Stackoverflow.com/users/13107804",
"pm_score": 3,
"selected": true,
"text": "[0.25,1.25,2.25] # group id add\ndf['gr_id'] = df['group'].astype('category').cat.codes\n\nimport plotly.expres... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330750",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20269333/"
] |
74,330,776 | <p>For an assignment, I had to make a program to see if the user input contained any of the three letters: r, c or p. If it was wrong, I had to keep asking the user to retype the input until the user typed the correct answer.[<img src="https://i.stack.imgur.com/NKxxl.jpg" alt="Please ignore the code in the comments" />... | [
{
"answer_id": 74330796,
"author": "HKTE",
"author_id": 12412262,
"author_profile": "https://Stackoverflow.com/users/12412262",
"pm_score": 1,
"selected": false,
"text": "while (input does not contain r, c or p) {\n // Show error, ask for new input\n}\n// Input is now valid\n"
},
{
... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330776",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20427784/"
] |
74,330,792 | <p>I do have python data frame as below. I am trying to slice the data frame where ever "slice" column value is 10 and then find the min of "low" column between 10 and previous non 0 value column</p>
<pre><code> date open high low close slice
0 2022-05-19 09:... | [
{
"answer_id": 74331806,
"author": "that_data_guy",
"author_id": 17129357,
"author_profile": "https://Stackoverflow.com/users/17129357",
"pm_score": 1,
"selected": false,
"text": "data['slice_min'] = None\ndata['slice_min_index_ref'] = None\n\ndef get_mins(data):\n\n min = None\n i... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330792",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10695736/"
] |
74,330,801 | <p><strong>Background:</strong> Trying to use ckeditor5 as a replacement for my homegrown editor in a non-invasive way - meaning without changing my edited content or its class definitions. Would like to have WYSIWYG in the editor. Using django_ckeditor_5 as a base with my own ckeditor5 build that includes ckedito5-ins... | [
{
"answer_id": 74331806,
"author": "that_data_guy",
"author_id": 17129357,
"author_profile": "https://Stackoverflow.com/users/17129357",
"pm_score": 1,
"selected": false,
"text": "data['slice_min'] = None\ndata['slice_min_index_ref'] = None\n\ndef get_mins(data):\n\n min = None\n i... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330801",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20427640/"
] |
74,330,865 | <p>In a Spring Boot app, I am using Hibernate and 2 tables is created properly. However, I also need to insert data one of these tables and for this purpose I thought I should use Flyway.</p>
<p>Then I just added insert clauses to the Flyway and use the following parameters for Hibernate and Flyway in application.prope... | [
{
"answer_id": 74337685,
"author": "Duc Vo",
"author_id": 9543676,
"author_profile": "https://Stackoverflow.com/users/9543676",
"pm_score": 2,
"selected": false,
"text": "insert data"
}
] | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330865",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20416459/"
] |
74,330,877 | <p>i have an simple rest api that have a h2 database so my plan is when i run multiple instances of the same app they will have different in memory databases.Now i want to syncronize these databases beetwen them.I thought kafka to be a good solution , so for example when i get an POST for instance with port 8080 , i sh... | [
{
"answer_id": 74331229,
"author": "Paweł Szymczyk",
"author_id": 4203773,
"author_profile": "https://Stackoverflow.com/users/4203773",
"pm_score": 2,
"selected": false,
"text": "@RestController\nclass MessageEventForDepartmentController {\n \n @Autowired\n KafkaTemplate<String, Messa... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330877",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17063310/"
] |
74,330,881 | <p>Good evening!
I have a task: implement any function to sort array and then check if two arrays(the input and the output) are the same(meaning that the values are the same). Values in array are random, so there my be something like [5,2,5,5,6,-1,3,0,84305]</p>
<p>I was thinking about checking if elements are in both ... | [
{
"answer_id": 74331229,
"author": "Paweł Szymczyk",
"author_id": 4203773,
"author_profile": "https://Stackoverflow.com/users/4203773",
"pm_score": 2,
"selected": false,
"text": "@RestController\nclass MessageEventForDepartmentController {\n \n @Autowired\n KafkaTemplate<String, Messa... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330881",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20427956/"
] |
74,330,920 | <p>Parsed Message
{
"date": "2022-02-04",
"customerID": 123,
"customerInfo": {
"id": 123,
"lastname": "Smith",
"firstname": "David",
"email": "testing@email.com",
},
"currency": "EUR"
}</p>
... | [
{
"answer_id": 74332046,
"author": "Mocas",
"author_id": 2410199,
"author_profile": "https://Stackoverflow.com/users/2410199",
"pm_score": 0,
"selected": false,
"text": "\"Initialize_variable\": {\n \"type\": \"InitializeVariable\",\n \"inputs\": {\n \"variables\": [ {\... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74330920",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7581658/"
] |
74,331,014 | <p>I have a simple problem, for which I have to find how many numbers in a specified interval where the digits of one number are all different. I wrote the code to find these numbers but can't count how many outputs?
for example, 244 is not acceptable as two digits are similar, 243 is acceptable because all digits are ... | [
{
"answer_id": 74331104,
"author": "OliDev",
"author_id": 17194494,
"author_profile": "https://Stackoverflow.com/users/17194494",
"pm_score": 2,
"selected": true,
"text": "#NEW CODE\ncount = 0\n#END OF NEW CODE\nlist = []\nfor i in range(234,567):\n list.append (i)\nfor n in list:\n ... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331014",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20428091/"
] |
74,331,061 | <p>I have a .txt file which contains an invitation template, where certain values have to be replaced by strings in a given vector.</p>
<p>The text looks like this:</p>
<p>Dear ,''''we are happy to invite you to our annual showroom . The event starts on at in , .''We look forward to your visist.'</p>
<p>Now I need ... | [
{
"answer_id": 74331104,
"author": "OliDev",
"author_id": 17194494,
"author_profile": "https://Stackoverflow.com/users/17194494",
"pm_score": 2,
"selected": true,
"text": "#NEW CODE\ncount = 0\n#END OF NEW CODE\nlist = []\nfor i in range(234,567):\n list.append (i)\nfor n in list:\n ... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331061",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19407340/"
] |
74,331,074 | <p>Is it possible to create a formula in Excel or Google Sheets that compares two cells with text values and returns the number of words that match.</p>
<p>Example:
Cell A2 = This is an apple
Cell B2 = This was a rotten apple
Value returned: 2</p>
| [
{
"answer_id": 74331257,
"author": "Nabnub",
"author_id": 9538684,
"author_profile": "https://Stackoverflow.com/users/9538684",
"pm_score": 1,
"selected": false,
"text": "= query(query(transpose(split(A2 & \" \" & B2, \" \")),\n \"Select count(Col1) group by Col1 label count(Col1)... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331074",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4574597/"
] |
74,331,089 | <p>Here I have a code containing a simple class printing something. I want to multithread it.</p>
<pre><code>import threading
import time
import random
class Useless:
def __init__(self, numb):
self.numb = numb
def printing(self):
time.sleep(random.uniform(0.05, 0.09))
print(f'number {... | [
{
"answer_id": 74331157,
"author": "sudden_appearance",
"author_id": 14882395,
"author_profile": "https://Stackoverflow.com/users/14882395",
"pm_score": 1,
"selected": false,
"text": "def printing(self):\n print(f'number {self.numb} is being printed God knows what for...\\n', end='')\... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331089",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20426821/"
] |
74,331,109 | <p>The string fileString contains multiple lines of characters, like this:</p>
<pre><code>1234a6b4ba21ba54f6bde411930b0b1ec6df
3124a6b4ba21ba54f6bde411930b0b1ef248
2134a6b4ba21ba54f6bde411900b89f7dcf3
4123a6b4ba21ba54f6bde411920bbf835b60
</code></pre>
<p>I'd like to move the first 4 characters of every line to the end ... | [
{
"answer_id": 74331157,
"author": "sudden_appearance",
"author_id": 14882395,
"author_profile": "https://Stackoverflow.com/users/14882395",
"pm_score": 1,
"selected": false,
"text": "def printing(self):\n print(f'number {self.numb} is being printed God knows what for...\\n', end='')\... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331109",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
74,331,139 | <p>For this problem, I have a separate txt file which contains a list of values down below:</p>
<pre><code>Years+1900 Populationx106
0 1650
10 1750
20 1860
30 2070
40 2300
50 2560
60 3040
70 3710
80 4450
90 5280
100 6080
110 6870
</code></pre>
<p>For the problem I'm working on, I'm supposed to obtain that file and ... | [
{
"answer_id": 74331157,
"author": "sudden_appearance",
"author_id": 14882395,
"author_profile": "https://Stackoverflow.com/users/14882395",
"pm_score": 1,
"selected": false,
"text": "def printing(self):\n print(f'number {self.numb} is being printed God knows what for...\\n', end='')\... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331139",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20427936/"
] |
74,331,141 | <pre><code>name = input(enter name)
age = input(age)
print(“My name is print(name). I’m print(age) years old.”)
</code></pre>
<p>Nobbie experiment.
Beginner level task.
And the above query came to my mind.</p>
| [
{
"answer_id": 74331167,
"author": "Keshav V.",
"author_id": 18131236,
"author_profile": "https://Stackoverflow.com/users/18131236",
"pm_score": 0,
"selected": false,
"text": "name = input('Enter your name ')\nage = input ('Enter your age ')\n\nprint(f'My name is {name}. I\\'m {age} year... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331141",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20428158/"
] |
74,331,146 | <p>I'm having trouble getting hyperlinks for tennis matches listed on a webpage, how do I go about fixing the code below so that it can obtain it through print?</p>
<p>To note: I'm applying this code in Visual Studio 2022.</p>
<pre><code>import requests
from bs4 import BeautifulSoup
response = requests.get(&qu... | [
{
"answer_id": 74331167,
"author": "Keshav V.",
"author_id": 18131236,
"author_profile": "https://Stackoverflow.com/users/18131236",
"pm_score": 0,
"selected": false,
"text": "name = input('Enter your name ')\nage = input ('Enter your age ')\n\nprint(f'My name is {name}. I\\'m {age} year... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331146",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14745788/"
] |
74,331,147 | <pre><code>const [userInfo, setUserInfo] = useState([]);
const handleUserInfo = (id) => {
fetch(`https://602e7c2c4410730017c50b9d.mockapi.io/users/${id}`)
.then(res => res.json())
.then(data => setUserInfo(data))
}
</code></pre>
<pre><code><input type="text" defau... | [
{
"answer_id": 74331167,
"author": "Keshav V.",
"author_id": 18131236,
"author_profile": "https://Stackoverflow.com/users/18131236",
"pm_score": 0,
"selected": false,
"text": "name = input('Enter your name ')\nage = input ('Enter your age ')\n\nprint(f'My name is {name}. I\\'m {age} year... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331147",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18401394/"
] |
74,331,175 | <p>so basically I have created the bins and the have the means of each bin, having these two columns in a dataframe. Now I am plotting these two columns, but I want the exact number as x lable instead of bins. I am considering renaming each bin by its mid-point. please look at the pictures. The first one is my current ... | [
{
"answer_id": 74331167,
"author": "Keshav V.",
"author_id": 18131236,
"author_profile": "https://Stackoverflow.com/users/18131236",
"pm_score": 0,
"selected": false,
"text": "name = input('Enter your name ')\nage = input ('Enter your age ')\n\nprint(f'My name is {name}. I\\'m {age} year... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331175",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20318210/"
] |
74,331,197 | <p>c-programming output printf()</p>
<p>Hi guys,</p>
<p>I have a question to following code:
`</p>
<pre><code>#include <stdio.h>
int main() {
printf("%f\n", (8/5)/2);
printf("%f\n", (float) 5/2);
printf("%f\n", (8/5)/2);
return 0;
}
</code></pre>
<p>Line 3 and five a... | [
{
"answer_id": 74331276,
"author": "Chris",
"author_id": 15261315,
"author_profile": "https://Stackoverflow.com/users/15261315",
"pm_score": 1,
"selected": false,
"text": "int double % gcc test.c\ntest.c:3:20: warning: format specifies type 'double' but the argument has type 'int' [-Wfor... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331197",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20428108/"
] |
74,331,208 | <p>I am trying to parse song titles from a website, but can't figure out how to grab the specific div that has them. I've tried about a dozen different methods but always get back an empty list.</p>
<p>If you go to the url and inspect one of the youtube videos there, you will find a div with a class of <code>single-po... | [
{
"answer_id": 74331450,
"author": "Prophet",
"author_id": 3485434,
"author_profile": "https://Stackoverflow.com/users/3485434",
"pm_score": 2,
"selected": false,
"text": "soup = BeautifulSoup(browser.page_source, 'html.parser')\ntitles = soup.find_all(\".single-post-oembed-youtube-wrapp... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331208",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2176186/"
] |
74,331,210 | <p>I have a simple custom function on Google Apps script, returning two lines of text:</p>
<pre><code>function RPE_MAX() {
const values = ['one', 'two']
const first = values[0]
const second = values[1]
const formatted = `${first} \n ${second}`
return formatted
}
</code></pre>
<p>How can I return the first lin... | [
{
"answer_id": 74331642,
"author": "Cooper",
"author_id": 7215091,
"author_profile": "https://Stackoverflow.com/users/7215091",
"pm_score": 1,
"selected": false,
"text": "function RPE_MAX() {\n const red = SpreadsheetApp.newTextStyle().setForegroundColor(\"red\").build();\n const blu =... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331210",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3259922/"
] |
74,331,222 | <p>I am generating tables in latex. But the text's font is way too small compared to the main text size, which is 12 pt.
Here is the Latex code</p>
<pre><code>\begin{table}[htp]
\renewcommand{\arraystretch}{2}
\large
\resizebox{1\textwidth}{!}{%
\begin{tabular}{|c|c|c|c|c|c|}
\hline
\textbf{Air pollutant} & \tex... | [
{
"answer_id": 74331642,
"author": "Cooper",
"author_id": 7215091,
"author_profile": "https://Stackoverflow.com/users/7215091",
"pm_score": 1,
"selected": false,
"text": "function RPE_MAX() {\n const red = SpreadsheetApp.newTextStyle().setForegroundColor(\"red\").build();\n const blu =... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331222",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9783140/"
] |
74,331,235 | <p>I am facing while opening my android app. I tried with below steps but I am getting this below error. Kindly help me. my Android app builds fine but when I run it I get the below error. It references a class which is not something that I use. Any ideas?</p>
<pre><code>com.qa.android E/unknown:NativeModuleInitError:... | [
{
"answer_id": 74334272,
"author": "Ammar Halbouni",
"author_id": 10028543,
"author_profile": "https://Stackoverflow.com/users/10028543",
"pm_score": 3,
"selected": false,
"text": "android/buld.gradle allprojects def REACT_NATIVE_VERSION = new File(['node', '--print',\"JSON.parse(require... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331235",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17916341/"
] |
74,331,244 | <p>I have some doubts about my insert method. it is compiling, but with no result. I presume that it is containing some coding errors. Can you help me resolving this? Thanks in advance.</p>
<pre><code>private:
T* elements;
int capacity;
int nbElements;
template <class T>
v... | [
{
"answer_id": 74334272,
"author": "Ammar Halbouni",
"author_id": 10028543,
"author_profile": "https://Stackoverflow.com/users/10028543",
"pm_score": 3,
"selected": false,
"text": "android/buld.gradle allprojects def REACT_NATIVE_VERSION = new File(['node', '--print',\"JSON.parse(require... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331244",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20342311/"
] |
74,331,287 | <p>I am trying to make a function in C that takes the contents of a file and returns the contents as a string. I got it to works except for one odd detail. This is the current code:</p>
<pre><code>char *getFileContents(const char *filePath) {
if (filePath == NULL) return NULL;
char buffer[1000];
char char... | [
{
"answer_id": 74334272,
"author": "Ammar Halbouni",
"author_id": 10028543,
"author_profile": "https://Stackoverflow.com/users/10028543",
"pm_score": 3,
"selected": false,
"text": "android/buld.gradle allprojects def REACT_NATIVE_VERSION = new File(['node', '--print',\"JSON.parse(require... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331287",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20269580/"
] |
74,331,290 | <p>I am starting my journey with Cypess and I have met the small problem. I need to check if div element has text which is one of two.</p>
<pre><code> getText(text1, text2) {
cy.get([data-cy=default-login-failed-label]).should('have.any.text', (text1, text2))
}
</code></pre>
<p>Could someone help me please? :)</p... | [
{
"answer_id": 74334272,
"author": "Ammar Halbouni",
"author_id": 10028543,
"author_profile": "https://Stackoverflow.com/users/10028543",
"pm_score": 3,
"selected": false,
"text": "android/buld.gradle allprojects def REACT_NATIVE_VERSION = new File(['node', '--print',\"JSON.parse(require... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331290",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20428256/"
] |
74,331,331 | <p>I'm a beginner in flutter, I want to display a text on the far left and a button on the far right in a container, here is my code:</p>
<pre><code>Container(
width: double.infinity,
margin: const EdgeInsets.all(10),
padding: const EdgeInsets.all(8.0),
),... | [
{
"answer_id": 74334272,
"author": "Ammar Halbouni",
"author_id": 10028543,
"author_profile": "https://Stackoverflow.com/users/10028543",
"pm_score": 3,
"selected": false,
"text": "android/buld.gradle allprojects def REACT_NATIVE_VERSION = new File(['node', '--print',\"JSON.parse(require... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331331",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20349488/"
] |
74,331,342 | <p>I have a script that adds a class "notransition" to the body on the page load (it removes it after set time). I want to remove background-color and color transition from every element, but it doesn't seem to work.</p>
<pre><code>$(window).on("load", function(){
$("body").addClass(&q... | [
{
"answer_id": 74334272,
"author": "Ammar Halbouni",
"author_id": 10028543,
"author_profile": "https://Stackoverflow.com/users/10028543",
"pm_score": 3,
"selected": false,
"text": "android/buld.gradle allprojects def REACT_NATIVE_VERSION = new File(['node', '--print',\"JSON.parse(require... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331342",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19647863/"
] |
74,331,362 | <p>I am defining few ADTs representing logic formulas. They all use i.e. <code>And</code> constructor, but then differ in what other constructors they use. I'd like to reuse case class definitions with a hope that I could reuse some code later. I'd like to do something like:</p>
<pre class="lang-scala prettyprint-overr... | [
{
"answer_id": 74332539,
"author": "ELinda",
"author_id": 7484259,
"author_profile": "https://Stackoverflow.com/users/7484259",
"pm_score": 0,
"selected": false,
"text": "PositiveFormula Formula Boolean sealed trait Formula\nsealed trait PositiveFormula extends Formula\ncase class Not(su... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331362",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10497132/"
] |
74,331,366 | <p>`</p>
<pre><code>import re
import os
from flask import Flask, request, render_template, current_app
from flask_mail import Mail, Message
app = Flask(__name__)
app.config['MAIL_DEFAULT_SENDER'] = os.environ['MAIL_DEFAULT_SENDER']
app.config["MAIL_PASSWORD"] = os.environ["MAIL_PASSWORD"]
app.conf... | [
{
"answer_id": 74332539,
"author": "ELinda",
"author_id": 7484259,
"author_profile": "https://Stackoverflow.com/users/7484259",
"pm_score": 0,
"selected": false,
"text": "PositiveFormula Formula Boolean sealed trait Formula\nsealed trait PositiveFormula extends Formula\ncase class Not(su... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331366",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19199513/"
] |
74,331,370 | <p>I have an instance template that is supposed to run my app in a container running on Google Cloud's Container-Optimized OS. When I create a single VM from this template it runs just fine, but when I use it to create an instance group the containers don't start.</p>
<p>According to the logs the machine didn't even tr... | [
{
"answer_id": 74338043,
"author": "DazWilkin",
"author_id": 609290,
"author_profile": "https://Stackoverflow.com/users/609290",
"pm_score": 1,
"selected": false,
"text": "gcloud compute instance-templates create-with-container --create-disk --disk gcloud Q=\"74331370\"\nPROJECT=\"$(whoa... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331370",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/840819/"
] |
74,331,409 | <p>I want to label encode subgroups in a pandas dataframe. Something like this:</p>
<pre class="lang-none prettyprint-override"><code>| Category | | Name |
| ---------- | | --------- |
| FRUITS | | Apple |
| FRUITS | | Orange |
| FRUITS | | Apple |
| Vegetables | | Onion |
| Vegetable... | [
{
"answer_id": 74331522,
"author": "Andrej Kesely",
"author_id": 10035985,
"author_profile": "https://Stackoverflow.com/users/10035985",
"pm_score": 1,
"selected": false,
"text": ".ngroup() df[\"Label\"] = (\n df.groupby(\"Category\")\n .apply(lambda x: x.groupby(\"Name\", sort=Fal... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331409",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14464348/"
] |
74,331,415 | <p>I wan to create a python script that print out a directory tree.
I'm aware there are tons of information about the topic, and many ways to achieve it.
Still, my problem really is about recursion.</p>
<p>In order to face the problem i choosed a OOP way:
Create a Class TreeNode
Store some props and methods
calling in ... | [
{
"answer_id": 74331522,
"author": "Andrej Kesely",
"author_id": 10035985,
"author_profile": "https://Stackoverflow.com/users/10035985",
"pm_score": 1,
"selected": false,
"text": ".ngroup() df[\"Label\"] = (\n df.groupby(\"Category\")\n .apply(lambda x: x.groupby(\"Name\", sort=Fal... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331415",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20428297/"
] |
74,331,438 | <pre><code>chars = list(range(0,10))
numbers_list = list(range(0,25))
for comb in itertools.combinations_with_replacement(chars, 5):
for A in numbers_list:
pure = str(A) + ':' + str(comb)
B = pure.replace(")", "").replace("(", "").replace("... | [
{
"answer_id": 74331659,
"author": "will-wright-eng",
"author_id": 14343465,
"author_profile": "https://Stackoverflow.com/users/14343465",
"pm_score": 1,
"selected": false,
"text": "import itertools, hashlib, csv\n\ndata = []\nchars = list(range(0,10)) \nnumbers_list = list(range(0,25))\... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331438",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20428284/"
] |
74,331,447 | <p>I am trying to export my NumPy matrix to a <code>.tiff</code> file then to read its contents to verify if it worked. Given the following snippet</p>
<pre class="lang-py prettyprint-override"><code>import numpy as np
import cv2
data = np.array([[-0.1 for _ in range(128)] for _ in range(128)], dtype=np.float32)
cv2.i... | [
{
"answer_id": 74331659,
"author": "will-wright-eng",
"author_id": 14343465,
"author_profile": "https://Stackoverflow.com/users/14343465",
"pm_score": 1,
"selected": false,
"text": "import itertools, hashlib, csv\n\ndata = []\nchars = list(range(0,10)) \nnumbers_list = list(range(0,25))\... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331447",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12985747/"
] |
74,331,471 | <p>I am trying to use the BoolToObject converter class referenced here <a href="https://learn.microsoft.com/en-us/dotnet/communitytoolkit/maui/converters/bool-to-object-converter" rel="nofollow noreferrer">https://learn.microsoft.com/en-us/dotnet/communitytoolkit/maui/converters/bool-to-object-converter</a></p>
<p>In m... | [
{
"answer_id": 74331659,
"author": "will-wright-eng",
"author_id": 14343465,
"author_profile": "https://Stackoverflow.com/users/14343465",
"pm_score": 1,
"selected": false,
"text": "import itertools, hashlib, csv\n\ndata = []\nchars = list(range(0,10)) \nnumbers_list = list(range(0,25))\... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331471",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6015925/"
] |
74,331,474 | <p>Via SQL, I'm trying to get from this:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>id</th>
<th>group_id</th>
<th>session_id</th>
<th>field_label</th>
<th>field_value</th>
<th>sent_at</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>frosted flakes</td>
<td>blue bowl</td>
<td>first_name<... | [
{
"answer_id": 74331634,
"author": "ahmed",
"author_id": 12705912,
"author_profile": "https://Stackoverflow.com/users/12705912",
"pm_score": 3,
"selected": true,
"text": "ROW_NUMBER SELECT group_id, session_id,\n CONCAT_WS(' ', \n MAX(CASE WHEN field_label='first_n... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331474",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/392849/"
] |
74,331,493 | <p>I am trying to copy the last populated row from one spreadsheet to the first not populated row on another spreadsheet. This function works where the source and target sheet are from the same spreadsheet, but not if they are from different spreadsheets.</p>
<pre><code>function moveRows() {
// identifying source &a... | [
{
"answer_id": 74331607,
"author": "great_pan",
"author_id": 20200173,
"author_profile": "https://Stackoverflow.com/users/20200173",
"pm_score": 1,
"selected": false,
"text": "function moveRows() {\n let sourceSs = SpreadsheetApp.openById('1PugO3VL8ZkGzA6zcYfUkQK4WkU-FfRUBHUzRDTmEbYE');... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331493",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20426572/"
] |
74,331,538 | <p>I have started to face this issue just recently. I'm using the Visual Studio 2022 Preview latest. I made a few simple changes to the DB and used the validation tool in dbForge Studio 2022 for SQL Server to validate all objects. The DB is valid.</p>
<p>When I try to update my context, I get the following output.</p>
... | [
{
"answer_id": 74344057,
"author": "Hassan Gulzar",
"author_id": 481656,
"author_profile": "https://Stackoverflow.com/users/481656",
"pm_score": 1,
"selected": true,
"text": "CREATE TABLE [dbo].[LookupImportBrand] (\n [CompanyId] BIGINT NOT NULL,\n [BranchId] BIGINT ... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331538",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/481656/"
] |
74,331,553 | <p>I'm doing one of the freeCodeCamp' JavaScript course tasks and can't find the explanation why my code works for some of the given cases and does not work for others.</p>
<p>The exercise is:</p>
<blockquote>
<p>Return the lowest index at which a value (second argument) should be inserted into an array (first argument... | [
{
"answer_id": 74344057,
"author": "Hassan Gulzar",
"author_id": 481656,
"author_profile": "https://Stackoverflow.com/users/481656",
"pm_score": 1,
"selected": true,
"text": "CREATE TABLE [dbo].[LookupImportBrand] (\n [CompanyId] BIGINT NOT NULL,\n [BranchId] BIGINT ... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331553",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11052810/"
] |
74,331,556 | <p>So I am creating a sheet to track some data, and I have it fed into a chart via a ratio and a date, so for instance, I had 10 and 5 equals a ratio of 2, at this particular time. I was able to find a script to automate the date, but I also wanted to automate the ratio, as every time I have to put in cell reference/ c... | [
{
"answer_id": 74344057,
"author": "Hassan Gulzar",
"author_id": 481656,
"author_profile": "https://Stackoverflow.com/users/481656",
"pm_score": 1,
"selected": true,
"text": "CREATE TABLE [dbo].[LookupImportBrand] (\n [CompanyId] BIGINT NOT NULL,\n [BranchId] BIGINT ... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331556",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20428426/"
] |
74,331,577 | <p>In a Swift navigation split view once all of the data has been loaded from core data (indicated by the isLoading variable being equal to false) the Progress View stops being displayed but the detail view is now empty. What I would like have happen at this point is for the Summary view to be displayed. I think this... | [
{
"answer_id": 74344057,
"author": "Hassan Gulzar",
"author_id": 481656,
"author_profile": "https://Stackoverflow.com/users/481656",
"pm_score": 1,
"selected": true,
"text": "CREATE TABLE [dbo].[LookupImportBrand] (\n [CompanyId] BIGINT NOT NULL,\n [BranchId] BIGINT ... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331577",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14880506/"
] |
74,331,606 | <p><a href="https://i.stack.imgur.com/rvesO.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rvesO.jpg" alt="enter image description here" /></a></p>
<p>I have this plot I made with the code below. As you can see, the leftmost graph is made very narrow when I arrange these plots into a grid. I want th... | [
{
"answer_id": 74344057,
"author": "Hassan Gulzar",
"author_id": 481656,
"author_profile": "https://Stackoverflow.com/users/481656",
"pm_score": 1,
"selected": true,
"text": "CREATE TABLE [dbo].[LookupImportBrand] (\n [CompanyId] BIGINT NOT NULL,\n [BranchId] BIGINT ... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331606",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8896225/"
] |
74,331,626 | <p>How would I call this class within a class? I'm getting the 'class' is not defined error.</p>
<pre><code>class testArray:
class testObject:
blah = 0
def __init__(self, number):
self.number = 1
# Problem here
object = testObject()
object.blah = self.number
</code></pr... | [
{
"answer_id": 74331647,
"author": "OtterLord",
"author_id": 19355475,
"author_profile": "https://Stackoverflow.com/users/19355475",
"pm_score": 2,
"selected": false,
"text": "testArray.testObject() testArray.testObject.myFunction()"
},
{
"answer_id": 74331717,
"author": "Kin... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331626",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4595424/"
] |
74,331,639 | <p>I was doing a program that consisted of through these modules below create a new page on google, but it was not possible, because of some errors.</p>
<pre><code>from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.chrome.service import Service
servico=Servi... | [
{
"answer_id": 74333930,
"author": "Prophet",
"author_id": 3485434,
"author_profile": "https://Stackoverflow.com/users/3485434",
"pm_score": 0,
"selected": false,
"text": "ChromeDriverManager hromedriver.exe from selenium import webdriver\nfrom selenium.webdriver.chrome.service import Se... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331639",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19520348/"
] |
74,331,644 | <p>I printed out every iteration. The contents of the list are perfect. But for some reason heappop is returning -8 val even though there is -15 in the list. Help me out</p>
<pre><code>class FoodRatings:
def __init__(self, foods: List[str], cuisines: List[str], ratings: List[int]):
self.find_cuisi... | [
{
"answer_id": 74333930,
"author": "Prophet",
"author_id": 3485434,
"author_profile": "https://Stackoverflow.com/users/3485434",
"pm_score": 0,
"selected": false,
"text": "ChromeDriverManager hromedriver.exe from selenium import webdriver\nfrom selenium.webdriver.chrome.service import Se... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331644",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18506786/"
] |
74,331,651 | <p>I have captured an image with React Native (expo-app) and can't find a proper way to send it to backend, mostly 500 and 422 appears (422 at this example).</p>
<p>Here is how a image data looks</p>
<pre><code>{"base64": null, "height": 820, "uri": "file:///var/mobile/Containers/Data... | [
{
"answer_id": 74333930,
"author": "Prophet",
"author_id": 3485434,
"author_profile": "https://Stackoverflow.com/users/3485434",
"pm_score": 0,
"selected": false,
"text": "ChromeDriverManager hromedriver.exe from selenium import webdriver\nfrom selenium.webdriver.chrome.service import Se... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331651",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18683435/"
] |
74,331,660 | <p>I came across this example when looking at <code>std::enable_if</code>:</p>
<pre><code>template<class T,
typename = std::enable_if_t<std::is_array<T>::value> >
void destroy(T* t)
{
for(std::size_t i = 0; i < std::extent<T>::value; ++i) {
destroy((*t)[i]);
}
}
</code></pre>
<p>In... | [
{
"answer_id": 74331714,
"author": "Remy Lebeau",
"author_id": 65863,
"author_profile": "https://Stackoverflow.com/users/65863",
"pm_score": 4,
"selected": true,
"text": "typename = enable_if_t<...> std::enable_if<...>::type std::enable_if std::enable_if<...>::type void type std::is_arra... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331660",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19333949/"
] |
74,331,680 | <p>I am trying to dynamically create a list of links to files in a static folder and failing with nested {{ {{ }} }} that would be logically required.</p>
<p>A Flask server has files in</p>
<pre><code>/Static/FileFolder
</code></pre>
<p>they are collected in a list with</p>
<pre><code>FileList = []
for path in os.... | [
{
"answer_id": 74331714,
"author": "Remy Lebeau",
"author_id": 65863,
"author_profile": "https://Stackoverflow.com/users/65863",
"pm_score": 4,
"selected": true,
"text": "typename = enable_if_t<...> std::enable_if<...>::type std::enable_if std::enable_if<...>::type void type std::is_arra... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331680",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12713674/"
] |
74,331,722 | <p>I am trying to split texts into "steps"
Lets say my text is</p>
<pre><code>my $steps = "1.Do this. 2.Then do that. 3.And then maybe that. 4.Complete!"
</code></pre>
<p>I'd like the output to be:</p>
<pre><code>"1.Do this."
"2.Then do that."
"3.And then maybe that."
... | [
{
"answer_id": 74331989,
"author": "ikegami",
"author_id": 589924,
"author_profile": "https://Stackoverflow.com/users/589924",
"pm_score": 2,
"selected": false,
"text": "split my @steps = split /\\s+(?=\\d+\\.)/, $steps;\n"
},
{
"answer_id": 74332049,
"author": "zdim",
"a... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331722",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20428539/"
] |
74,331,754 | <p>My typescript package contains a global type file that defines the <code>history</code> object like this:</p>
<p>lib.dom.d.ts</p>
<pre><code>interface History {
readonly length: number;
scrollRestoration: ScrollRestoration;
readonly state: any;
back(): void;
forward(): void;
go(delta?: number... | [
{
"answer_id": 74331768,
"author": "Dakeyras",
"author_id": 1857909,
"author_profile": "https://Stackoverflow.com/users/1857909",
"pm_score": 0,
"selected": false,
"text": "history const myHistory = (history as unknown) as TypedHistory\nconsole.log(myHistory.state.key) // works\nconsole.... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331754",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12914833/"
] |
74,331,755 | <p>Currently taking CS50 Web Programming with Python and Javascript. I'm on the Week 3 Django lecture and trying to follow along but I'm running into trouble while trying to run python manage.py run server.</p>
<p>I'm getting the "ImportError: Couldn't import Django. Are you sure it's installed and available on yo... | [
{
"answer_id": 74331933,
"author": "T. Bill",
"author_id": 8341684,
"author_profile": "https://Stackoverflow.com/users/8341684",
"pm_score": 0,
"selected": false,
"text": "python manage.py runserver"
},
{
"answer_id": 74332002,
"author": "Kings_M",
"author_id": 12904301,
... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331755",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19002425/"
] |
74,331,856 | <p>So, React has UseState hook, and we should use it like this.</p>
<pre><code>const [value, setValue] = useState(0);
</code></pre>
<p>And if we want to change a value, it should be written like this:</p>
<pre><code>const increase = () => {
setValue(value + 1)
}
</code></pre>
<p>Why it's not possible to write it lik... | [
{
"answer_id": 74331992,
"author": "Balaji KR",
"author_id": 17787336,
"author_profile": "https://Stackoverflow.com/users/17787336",
"pm_score": 0,
"selected": false,
"text": "setValue() setValue()"
}
] | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331856",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10331051/"
] |
74,331,861 | <p>I want to group and aggregate and then calculate a ratio based on values in a certain column.</p>
<p>In R it's pretty straight forward.</p>
<pre><code>df = data.frame(a = c('a', 'a', 'b', 'b'),
b = c('x', 'y', 'x', 'y'),
value = 1:4)
df %>%
group_by(a) %>%
summarise(calc... | [
{
"answer_id": 74332113,
"author": "Anoushiravan R",
"author_id": 14314520,
"author_profile": "https://Stackoverflow.com/users/14314520",
"pm_score": 2,
"selected": false,
"text": "import pandas as pd\nimport numpy as np\n\ncond1 = lambda x: x['value'].loc[x['b'].eq('x')].to_numpy()\ncon... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331861",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5319229/"
] |
74,331,876 | <p>Without relying on <code>const_cast</code>, how can one make a C++ data member <code>const</code> <em>after but not during</em> construction when there is an expensive-to-compute intermediate value that is needed to calculate multiple data members?</p>
<p>The following minimal, complete, verifiable example further e... | [
{
"answer_id": 74331916,
"author": "Igor Tandetnik",
"author_id": 1670129,
"author_profile": "https://Stackoverflow.com/users/1670129",
"pm_score": 3,
"selected": false,
"text": "class T {\nprivate:\n T(int n, int expensive)\n : value{n-1}, a_{ka*expensive}, b_{kb*expensive} {}\npubl... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331876",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1275653/"
] |
74,331,877 | <p>So I have this dataset of temperatures. Each line describe the temperature in celsius measured by hour in a day.
<a href="https://i.stack.imgur.com/FfaUN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FfaUN.png" alt="enter image description here" /></a></p>
<p>So, I need to compute a new variable... | [
{
"answer_id": 74331916,
"author": "Igor Tandetnik",
"author_id": 1670129,
"author_profile": "https://Stackoverflow.com/users/1670129",
"pm_score": 3,
"selected": false,
"text": "class T {\nprivate:\n T(int n, int expensive)\n : value{n-1}, a_{ka*expensive}, b_{kb*expensive} {}\npubl... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331877",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18085406/"
] |
74,331,883 | <p>What I'm trying to do is simply find and define an x and y coordinate for the highest number in the array.</p>
<p>For example, 50000 would output: x = 2, y = 2. Is there an easy way to accomplish this?</p>
<p>I created this code below:</p>
<pre><code>data_array = [[0, 1, 2, 3, 50000],
[5, 6, 7, 8, 9],
... | [
{
"answer_id": 74331916,
"author": "Igor Tandetnik",
"author_id": 1670129,
"author_profile": "https://Stackoverflow.com/users/1670129",
"pm_score": 3,
"selected": false,
"text": "class T {\nprivate:\n T(int n, int expensive)\n : value{n-1}, a_{ka*expensive}, b_{kb*expensive} {}\npubl... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331883",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19563976/"
] |
74,331,918 | <p>I am trying to compile the ANTLR4 runtime sources
with GCC compiler and MinGW libraries. Is that
possible.</p>
<p>My development environment :
Windows 10, CodeBlocks, GCC, MinGW libraries</p>
<p>Compilation stops with the following error :</p>
<blockquote>
<p>error: 'mutex' in namespace 'std' does not name a type</p... | [
{
"answer_id": 74331916,
"author": "Igor Tandetnik",
"author_id": 1670129,
"author_profile": "https://Stackoverflow.com/users/1670129",
"pm_score": 3,
"selected": false,
"text": "class T {\nprivate:\n T(int n, int expensive)\n : value{n-1}, a_{ka*expensive}, b_{kb*expensive} {}\npubl... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331918",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18617454/"
] |
74,331,930 | <p>I have a task in where I am instructed to create a method that returns words from a string based on a given length. The specific instructions are as follows:</p>
<p><strong>This method will input a sentence with multiple words separated by spaces. The input number represents the size of the word we are looking for. ... | [
{
"answer_id": 74332004,
"author": "Jens",
"author_id": 3636601,
"author_profile": "https://Stackoverflow.com/users/3636601",
"pm_score": 0,
"selected": false,
"text": "public static long howManyWord(String s, int n) {\n \n String[] words = s.split(\" \"); // split at blank to get ... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331930",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20143802/"
] |
74,331,939 | <p>Let's say I have a function <code>f()</code> which I know accepts 1 argument, <code>action</code>, followed by a variable number of arguments.</p>
<p>Depending on the initial <code>action</code> value, the function expects a different set of following arguments, e.g. for action <code>1</code> we know we must have 3 ... | [
{
"answer_id": 74331995,
"author": "Dr. V",
"author_id": 7078614,
"author_profile": "https://Stackoverflow.com/users/7078614",
"pm_score": 3,
"selected": true,
"text": "f def f(action, *args, **kwargs):\n if action == 1:\n f_1(*args, **kwargs)\n ...\n\ndef f_1(p1, p2, p3):\n... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331939",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1159290/"
] |
74,331,984 | <p>Have this struct of User and Post and I try to make Name from User to be included within Post Struct when a user create a new post.</p>
<pre><code>type User struct {
ID int
Name string
Created time.Time
}
type Post struct {
ID int
PostTitle string
PostDesc string... | [
{
"answer_id": 74331995,
"author": "Dr. V",
"author_id": 7078614,
"author_profile": "https://Stackoverflow.com/users/7078614",
"pm_score": 3,
"selected": true,
"text": "f def f(action, *args, **kwargs):\n if action == 1:\n f_1(*args, **kwargs)\n ...\n\ndef f_1(p1, p2, p3):\n... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74331984",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15370616/"
] |
74,332,068 | <p>I have a really specific problem and can't think of an answer.</p>
<p>I have a function to generate a letter H or V.</p>
<p>I want to make that if the generator exceedes the limit for H to pick V and if the limit for V gets exceeded to pick H.</p>
<p>Example</p>
<p>Limit for H is 10
Limit for V is 10</p>
<pre><code>... | [
{
"answer_id": 74331995,
"author": "Dr. V",
"author_id": 7078614,
"author_profile": "https://Stackoverflow.com/users/7078614",
"pm_score": 3,
"selected": true,
"text": "f def f(action, *args, **kwargs):\n if action == 1:\n f_1(*args, **kwargs)\n ...\n\ndef f_1(p1, p2, p3):\n... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74332068",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13642569/"
] |
74,332,075 | <p>Im trying to thrown an error from inside an for..of loop that sums array elements. In this case when it is present an object and array as part of the array. Jasmine is passing me all tests except this one. I'll show you my code. Keep in mind i've been learning for two weeks and stuff like .catch and .try I think sho... | [
{
"answer_id": 74331995,
"author": "Dr. V",
"author_id": 7078614,
"author_profile": "https://Stackoverflow.com/users/7078614",
"pm_score": 3,
"selected": true,
"text": "f def f(action, *args, **kwargs):\n if action == 1:\n f_1(*args, **kwargs)\n ...\n\ndef f_1(p1, p2, p3):\n... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74332075",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19805012/"
] |
74,332,129 | <p>i am tryng to make an IF function for a value of opacity and then divide it by 10 to get a decimal in a range between <code>(0.9 to 0.0)</code>, the function works when there is no value <code>(!e.target.style.opacity)</code> and when opacityValue gets to <code>9</code>; but then it gets stucked in <code>8</code>, ... | [
{
"answer_id": 74332157,
"author": "Michael M.",
"author_id": 13376511,
"author_profile": "https://Stackoverflow.com/users/13376511",
"pm_score": 1,
"selected": false,
"text": "const btn = document.getElementById('btn');\nbtn.addEventListener('click', () => {\n if (!btn.style.opacity) b... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74332129",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18758297/"
] |
74,332,171 | <p>I have 2 tables in a database, <code>users</code> and <code>users_removed</code> with columns "id(primary key), email(unique), password" and "id, user_id(foreign key (user_id) references users(id)" respectively.</p>
<p>When a user registers the <code>users</code> table gets the data accordingly. ... | [
{
"answer_id": 74332157,
"author": "Michael M.",
"author_id": 13376511,
"author_profile": "https://Stackoverflow.com/users/13376511",
"pm_score": 1,
"selected": false,
"text": "const btn = document.getElementById('btn');\nbtn.addEventListener('click', () => {\n if (!btn.style.opacity) b... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74332171",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14148548/"
] |
74,332,182 | <p>I have this code in in Python with SymPy:</p>
<pre class="lang-py prettyprint-override"><code>import sympy
from sympy import symbols, Matrix
phi = symbols('phi')
x = symbols('x')
y = symbols('y')
N1 = sympy.cos(phi)
N2 = sympy.sin(phi)
N3 = -sympy.sin(phi)
N4 = sympy.cos(phi)
N1.subs('phi', sympy.Float(0.785))
N2.su... | [
{
"answer_id": 74332521,
"author": "prusso",
"author_id": 20135706,
"author_profile": "https://Stackoverflow.com/users/20135706",
"pm_score": 0,
"selected": false,
"text": "T = Matrix(2, 2, [N1, N2, N3, N4]).subs('phi',0.785)\n https://docs.sympy.org/latest/modules/matrices/common.html?h... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74332182",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20135706/"
] |
74,332,212 | <p>I'm trying to download download a zip file from this site:</p>
<p><a href="https://resultados.tse.jus.br/oficial/app/index.html#/eleicao/dados-de-urna;e=e545;uf=mg;ufbu=mg;mubu=40037;zn=0001;se=0101/log-da-urna" rel="nofollow noreferrer">https://resultados.tse.jus.br/oficial/app/index.html#/eleicao/dados-de-urna;e=e... | [
{
"answer_id": 74335861,
"author": "baduker",
"author_id": 6106791,
"author_profile": "https://Stackoverflow.com/users/6106791",
"pm_score": 2,
"selected": true,
"text": "import os\nimport time\nimport urllib.parse\nfrom pathlib import Path\nfrom shutil import copyfileobj\n\nimport reque... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74332212",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11391978/"
] |
74,332,215 | <pre><code>def get_data(url):
r = requests.get(url)
soup = BeautifulSoup(r.text, 'html.parser')
return soup
current_data = get_data(link)
x = current_data.find_all(text="Style Code:")
</code></pre>
<p>I'm trying to get the style code of a shoe off ebay but the problem is that it doesn't have a specific... | [
{
"answer_id": 74332267,
"author": "Rahul K P",
"author_id": 4407666,
"author_profile": "https://Stackoverflow.com/users/4407666",
"pm_score": 1,
"selected": false,
"text": "spans = soup.find_all('span', attrs={'class':'ux-textspans'})\nstyle_code = None\nfor idx, span in enumerate(spans... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74332215",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12850168/"
] |
74,332,226 | <p>Build tools it is specifically asking for are located at C:\Users\id\AppData\Local\Android\sdk\build-tools How do I tell cordova where to look?</p>
<p>I have set location value to ANDROID_HOME, ANDROID_SDK_HOME, ANDROID_BUILD, and ANDROID_SDK_ROOT and nothing works</p>
| [
{
"answer_id": 74332267,
"author": "Rahul K P",
"author_id": 4407666,
"author_profile": "https://Stackoverflow.com/users/4407666",
"pm_score": 1,
"selected": false,
"text": "spans = soup.find_all('span', attrs={'class':'ux-textspans'})\nstyle_code = None\nfor idx, span in enumerate(spans... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74332226",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18208694/"
] |
74,332,269 | <p>I'm doing a double linked list from scratch in C and was programming the iter(able) function.
However my struct has a bunch of fields and I don't necessarily want to mess with all when I call the function. I want to choose what member to alter in the function call.</p>
<pre><code>typedef struct s_command
{
int ... | [
{
"answer_id": 74332318,
"author": "Joshua",
"author_id": 14768,
"author_profile": "https://Stackoverflow.com/users/14768",
"pm_score": -1,
"selected": false,
"text": "void dll_iter(t_command *lst, void *(*decoder)(t_command *entry), void (*f)(void *argpointer))\n{\n if (!lst || !deco... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74332269",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16498000/"
] |
74,332,279 | <p>I have a big number of lambdas, all sharing the same libraries. Due to size constraints I can not package the libraries together with the lambda neither use the Lambda Layers, so I have created a Docker image (let's call it lambda_base:latest) with all the required libraries installed and deployed it in ECR.</p>
<p>... | [
{
"answer_id": 74332318,
"author": "Joshua",
"author_id": 14768,
"author_profile": "https://Stackoverflow.com/users/14768",
"pm_score": -1,
"selected": false,
"text": "void dll_iter(t_command *lst, void *(*decoder)(t_command *entry), void (*f)(void *argpointer))\n{\n if (!lst || !deco... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74332279",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/948425/"
] |
74,332,285 | <p>I am trying to assign classes into an element depending on whether or not a <code>boolean</code> is true. I was able to do this using <code>v-bind:class</code> for some classes. However now I want to do this again for another <code>boolean</code> at the same time. This is for a to-do list app.</p>
<p>my current code... | [
{
"answer_id": 74332459,
"author": "yoduh",
"author_id": 6225326,
"author_profile": "https://Stackoverflow.com/users/6225326",
"pm_score": 1,
"selected": false,
"text": "<div\n :class=\"{ '!bg-gray-800 text-gray-600 line-through': task.checked, '!bg-gray-100': task.selected }\"\n v-for... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74332285",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20296392/"
] |
74,332,286 | <p>I have an AV log file showing a number of values for each process scanned: Name, Path, Total files scanned, Scan time. The file contains hundreds of these process entries (example below) and for <em>Total files scanned</em> and <em>Scan time</em> I'd like to sort and print the highest (or longest) values so I can d... | [
{
"answer_id": 74332346,
"author": "Shawn",
"author_id": 9952196,
"author_profile": "https://Stackoverflow.com/users/9952196",
"pm_score": 1,
"selected": false,
"text": "perl $ perl -00 -lne 'm/Scan time \\(ns\\):\\s+\"(\\d+)\"/ && push @procs, [ $_, $1 ];\n END { print $... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74332286",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20422003/"
] |
74,332,315 | <p>How do we authenticate the app to the Firestore? (not using service account), because when service account have conflicts when security rules which needs authenticate. When I'm switching to production mode and perform a query I got this message</p>
<p><a href="https://i.stack.imgur.com/wUazU.png" rel="nofollow noref... | [
{
"answer_id": 74332514,
"author": "Frank van Puffelen",
"author_id": 209103,
"author_profile": "https://Stackoverflow.com/users/209103",
"pm_score": 3,
"selected": true,
"text": "request.auth"
},
{
"answer_id": 74376306,
"author": "Kissel James Paalaman",
"author_id": 20... | 2022/11/05 | [
"https://Stackoverflow.com/questions/74332315",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12675979/"
] |
74,332,369 | <p>I output the scraped data in JSON format. Custom scrapy pipeline outputs a list of dictionaries in JSON format. Item type looks like this:</p>
<pre><code>[{
"product_id": "11980174",
"brand_id": 25354,
"brand_name": "Gucci",
"title": "b... | [
{
"answer_id": 74332514,
"author": "Frank van Puffelen",
"author_id": 209103,
"author_profile": "https://Stackoverflow.com/users/209103",
"pm_score": 3,
"selected": true,
"text": "request.auth"
},
{
"answer_id": 74376306,
"author": "Kissel James Paalaman",
"author_id": 20... | 2022/11/06 | [
"https://Stackoverflow.com/questions/74332369",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18183763/"
] |
74,332,374 | <p>I have the following table :</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>city</th>
<th>state</th>
<th>numOrder</th>
<th>date</th>
<th>deadlineDate</th>
</tr>
</thead>
<tbody>
<tr>
<td>NY</td>
<td>NY</td>
<td>111</td>
<td>2022/11/05</td>
<td>2022/11/06</td>
</tr>
<tr>
<td>LA</td>
<td>... | [
{
"answer_id": 74332456,
"author": "slambeth",
"author_id": 1154544,
"author_profile": "https://Stackoverflow.com/users/1154544",
"pm_score": 0,
"selected": false,
"text": "SELECT A.COL1/B.COL1 AS MY_RATIO_COL\nFROM\n (SELECT COL1 FROM MY_TABLE WHERE [BLA BLA BLA]) A\n JOIN\n (SELECT ... | 2022/11/06 | [
"https://Stackoverflow.com/questions/74332374",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20429050/"
] |
74,332,388 | <p>I need a function to allow me to update the sheet, for example, if I want to update one row, I want to be able to do it without erasing all the values in that row</p>
<pre><code>//function to get data by email - so as to get row with corresponding email
function getDataByEmail1(email){
var sheet = SpreadsheetApp.... | [
{
"answer_id": 74332706,
"author": "Tanaike",
"author_id": 7108653,
"author_profile": "https://Stackoverflow.com/users/7108653",
"pm_score": 1,
"selected": false,
"text": "check null table_values status function updateRecord(email, password, id, sex, date) {\n var sheet = SpreadsheetApp... | 2022/11/06 | [
"https://Stackoverflow.com/questions/74332388",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13995470/"
] |
74,332,390 | <p>I am attempting to understand what this snippet of code does:</p>
<pre><code>passwd1=re.sub(r'^.*? --', ' -- ', line)
password=passwd1[4:]
</code></pre>
<p>I understand that the top line uses regex to remove the " -- ", and the bottom line I think removes something as well? I went back to this code after a... | [
{
"answer_id": 74332412,
"author": "Nathaniel Ford",
"author_id": 442945,
"author_profile": "https://Stackoverflow.com/users/442945",
"pm_score": 3,
"selected": true,
"text": "r'^.*? -- r ^ .*? -- -- re.sub() -- Google -- MyPassword -- MyPassword passwd1 = re.sub(r'^.* --', '', line)\n ... | 2022/11/06 | [
"https://Stackoverflow.com/questions/74332390",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17170174/"
] |
74,332,403 | <p>I have this code:</p>
<p><code>type(i[0]) == 'str'</code>. How can I get it as a list? and later get <code>print(i[0][0]) == 'a'</code></p>
<pre><code>import csv
i = [['a', 'b'], 'c', 'd']
with open('a.csv', 'a', newline='', encoding='utf-8') as file:
writer = csv.writer(file, delimiter=';')
writer.writerow(... | [
{
"answer_id": 74332412,
"author": "Nathaniel Ford",
"author_id": 442945,
"author_profile": "https://Stackoverflow.com/users/442945",
"pm_score": 3,
"selected": true,
"text": "r'^.*? -- r ^ .*? -- -- re.sub() -- Google -- MyPassword -- MyPassword passwd1 = re.sub(r'^.* --', '', line)\n ... | 2022/11/06 | [
"https://Stackoverflow.com/questions/74332403",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19983217/"
] |
74,332,435 | <p>I have a this warning:</p>
<pre><code>[Vue warn]: Error in render: "TypeError: Cannot read properties of undefined (reading 'nestedArray')"
</code></pre>
<p>What is the solution to this? This is my beforeCreate functions:</p>
<pre><code> beforeCreate() {
this.$store.dispatch("loadCities").th... | [
{
"answer_id": 74332469,
"author": "Dakeyras",
"author_id": 1857909,
"author_profile": "https://Stackoverflow.com/users/1857909",
"pm_score": -1,
"selected": false,
"text": "if (!this.nestedArray[item.row]) this.nestedArray beforeCreate() {\n this.$store.dispatch(\"loadCities\").the... | 2022/11/06 | [
"https://Stackoverflow.com/questions/74332435",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19301566/"
] |
74,332,440 | <p>The <a href="https://en.cppreference.com/w/cpp/language/parameter_pack" rel="nofollow noreferrer">cppreference page on parameter pack</a> states there is a parameter pack like this:</p>
<pre><code>type ... pack-name(optional) (1)
</code></pre>
<p>But how do you use it?</p>
<p>This doesn't work and the error is sy... | [
{
"answer_id": 74332542,
"author": "Nelfeal",
"author_id": 3854570,
"author_profile": "https://Stackoverflow.com/users/3854570",
"pm_score": 0,
"selected": false,
"text": "template<int... Ints>\nint sum_2_int()\n{\n return (int)(Ints + ...);\n}\n\nsum_2_int<1, 2, 3>(); // template arg... | 2022/11/06 | [
"https://Stackoverflow.com/questions/74332440",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5202246/"
] |
74,332,552 | <p>I am making a list word counter and trying to merge two dictionaries that have a counter for each character, but I keep getting the wrong outputs. Here is what I attempted in an effort to figure out why. Everything seems to go well except for the last two keys in the dictionary.</p>
<pre><code>counts = {"a"... | [
{
"answer_id": 74332585,
"author": "Chris",
"author_id": 15261315,
"author_profile": "https://Stackoverflow.com/users/15261315",
"pm_score": 0,
"selected": false,
"text": "collections.defaultdict defaultdict defaultdict >>> from collections import defaultdict\n>>> d = defaultdict(int)\n>... | 2022/11/06 | [
"https://Stackoverflow.com/questions/74332552",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20017084/"
] |
74,332,613 | <p>This question is already solved, it is a mapping from a String to a "Maybe a", with empty,insert,lookup functions as defined below, i'm unable to understand the solution.</p>
<p>The code:</p>
<pre><code>type Map a = String -> Maybe a
empty :: Map a
empty = \x -> Nothing
insert :: (String, a) -> ... | [
{
"answer_id": 74332774,
"author": "Steven",
"author_id": 6543301,
"author_profile": "https://Stackoverflow.com/users/6543301",
"pm_score": 3,
"selected": true,
"text": "type Map a = String -> Maybe a Map a String -> Maybe a Map a String -> Maybe a empty :: Map a empty String Maybe a \\x... | 2022/11/06 | [
"https://Stackoverflow.com/questions/74332613",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20426362/"
] |
74,332,637 | <p>I have a df thats big, and has int's and float's inside, some have bigger values over 1 thousand, and that gives error when using them as int</p>
<p>ex:<br />
A B C
0 1,598 65.79 79<br />
1 -300 46.90 90</p>
<p><a href="https://i.stack.imgur.com/leUQh.png" rel="nofollow... | [
{
"answer_id": 74332736,
"author": "fholl124",
"author_id": 14320213,
"author_profile": "https://Stackoverflow.com/users/14320213",
"pm_score": 0,
"selected": false,
"text": "import pandas as pd\n\ndef convert_value(input_value):\n return input_value.replace(\"Dollars\", \"Pounds\")\n... | 2022/11/06 | [
"https://Stackoverflow.com/questions/74332637",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20354586/"
] |
74,332,703 | <p>Given:</p>
<pre><code>d = {'c': 3, 'b': 2, 'a': 1, 'd': 4, 'e': 5}
sorted_dict = d.keys()
sorted_dict = sorted(sorted_dict)
for key in sorted_dict:
print(key)
</code></pre>
<p>How do I make it so that it outputs every other key. Right now it outputs:</p>
<pre><code>a
b
c
d
e
</code></pre>
<p>but I want it to ou... | [
{
"answer_id": 74332721,
"author": "Mateen Ulhaq",
"author_id": 365102,
"author_profile": "https://Stackoverflow.com/users/365102",
"pm_score": 0,
"selected": false,
"text": "d d = {'c': 3, 'b': 2, 'a': 1, 'd': 4, 'e': 5}\nd = dict(sorted(d.items()))\n for i, key in enumerate(d.keys()):\... | 2022/11/06 | [
"https://Stackoverflow.com/questions/74332703",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20066884/"
] |
74,332,710 | <p>I am trying to create a countdown timer using useEffect hook and setInterval function, but it is not ever executing the code when the timer reaches 0. Also, when I console.log the value of the countdown variable it doesn't decrement.</p>
<pre><code>
// set up counter for (un)flipped phone countdown
// countdown ... | [
{
"answer_id": 74333124,
"author": "J.dev",
"author_id": 10196369,
"author_profile": "https://Stackoverflow.com/users/10196369",
"pm_score": 1,
"selected": false,
"text": "const [countdown, setCountdown] = useState(20);\n\nuseEffect(() => {\n let intervalID = setInterval(() => {\n se... | 2022/11/06 | [
"https://Stackoverflow.com/questions/74332710",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11683609/"
] |
74,332,719 | <p>The following code attempts to store a <code>void</code> pointer inside a pointer of a different type using <code>memcpy</code> (i.e. <em>not</em> casting) and then recover the original <code>void</code> pointer. Does it invoke undefined behavior?</p>
<pre><code>#include <assert.h>
#include <string.h>
#i... | [
{
"answer_id": 74332863,
"author": "selbie",
"author_id": 104458,
"author_profile": "https://Stackoverflow.com/users/104458",
"pm_score": 0,
"selected": false,
"text": "void alloc_mem(void* p)\n{\n void* mem = malloc(100);\n strcpy(mem, \"hello world\\n\");\n *(void**)p = mem;\n... | 2022/11/06 | [
"https://Stackoverflow.com/questions/74332719",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17039046/"
] |
74,332,751 | <p>I'm working on site navigation, and I'm trying to create a dropdown menu. I have three list items with additional unordered lists that I would like to drop down. However, I am having issues with the :hover pseudo-class. If I do <code>nav ul:hover ul {display: block;}</code> then a dropdown appears, but it occurs ... | [
{
"answer_id": 74332827,
"author": "str1ng",
"author_id": 12826055,
"author_profile": "https://Stackoverflow.com/users/12826055",
"pm_score": 2,
"selected": true,
"text": "ul/ol <ul>\n <li>Python</li>\n <li>JavaScript</li>\n <li>C</li>\n <li>Swift</li>\n ... | 2022/11/06 | [
"https://Stackoverflow.com/questions/74332751",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20429300/"
] |
74,332,756 | <p>Trying to install lxml on Python 311. Faced with this error.</p>
<pre><code>PS C:\Users\chharlie\Desktop\code> pip install lxml
Collecting lxml
Using cached lxml-4.9.1.tar.gz (3.4 MB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: lxml
Building wheel for lxml (setup.py) ... e... | [
{
"answer_id": 74332827,
"author": "str1ng",
"author_id": 12826055,
"author_profile": "https://Stackoverflow.com/users/12826055",
"pm_score": 2,
"selected": true,
"text": "ul/ol <ul>\n <li>Python</li>\n <li>JavaScript</li>\n <li>C</li>\n <li>Swift</li>\n ... | 2022/11/06 | [
"https://Stackoverflow.com/questions/74332756",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20429389/"
] |
74,332,757 | <p>I have an old script where I extract the contents of archives into a new directory with the name of the archives. I need to simplify this as I find it inefficient since the commands run regardless. I'm not an expert with bash, and this worked for a while, but has become unbearable of late.</p>
<p>I get constant erro... | [
{
"answer_id": 74332828,
"author": "Zac Anger",
"author_id": 5774952,
"author_profile": "https://Stackoverflow.com/users/5774952",
"pm_score": 1,
"selected": false,
"text": "file atool Unpack-[random number] valid_exts=(\"zip\", \"rar\") # etc\nfor f in $(find . -type f); do\n if [[ \"$... | 2022/11/06 | [
"https://Stackoverflow.com/questions/74332757",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12947441/"
] |
74,332,790 | <p>I would like use a for loop over a list of pandas dataframes, to make similar changes to each one. But the changes don't seem to take effect globally.</p>
<p>For a simpler example that works as expected (but with python lists instead of dataframes): the following works as I would expect it to:</p>
<p><strong>Examp... | [
{
"answer_id": 74332828,
"author": "Zac Anger",
"author_id": 5774952,
"author_profile": "https://Stackoverflow.com/users/5774952",
"pm_score": 1,
"selected": false,
"text": "file atool Unpack-[random number] valid_exts=(\"zip\", \"rar\") # etc\nfor f in $(find . -type f); do\n if [[ \"$... | 2022/11/06 | [
"https://Stackoverflow.com/questions/74332790",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20427868/"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.