qid int64 4 19.1M | question stringlengths 18 48.3k | answers list | date stringlengths 10 10 | metadata list |
|---|---|---|---|---|
74,673,489 | <p>I am trying to deploy my react application on netlify. It is working fine on my desktop and even <code>npm run build</code> is properly working. The material ui packages that I am using are also working fine on my desktop but when I am deploying on netlify the build fails. This is the error log</p>
<pre><code>12:16:... | [
{
"answer_id": 74673497,
"author": "Tim Biegeleisen",
"author_id": 1863229,
"author_profile": "https://Stackoverflow.com/users/1863229",
"pm_score": 2,
"selected": false,
"text": "switch while (true) {\n String userInput = scan.nextLine();\n\n switch(userInput) {\n case \".h... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74673489",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16666888/"
] |
74,673,492 | <p>This here changes all the squares to pink. <a href="https://jsfiddle.net/7cye4hfu/1/" rel="nofollow noreferrer">https://jsfiddle.net/7cye4hfu/1/</a></p>
<p>If I wanted to change one of the pink squares to a different color, how would I do that?</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-consol... | [
{
"answer_id": 74673497,
"author": "Tim Biegeleisen",
"author_id": 1863229,
"author_profile": "https://Stackoverflow.com/users/1863229",
"pm_score": 2,
"selected": false,
"text": "switch while (true) {\n String userInput = scan.nextLine();\n\n switch(userInput) {\n case \".h... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74673492",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20658906/"
] |
74,673,518 | <p>I can't able to use flexWrap property inside the ScrollView container.</p>
<p>My code looks like this</p>
<pre><code>function Home({ navigation }) {
return (
<View style={styles.container}>
<ScrollView style={styles.scrollContainer}>
<LayoutButton
navigation={navigation}
... | [
{
"answer_id": 74673545,
"author": "Dorian",
"author_id": 20642451,
"author_profile": "https://Stackoverflow.com/users/20642451",
"pm_score": 0,
"selected": false,
"text": "flex: 1"
},
{
"answer_id": 74673590,
"author": "O2K",
"author_id": 13957052,
"author_profile": ... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74673518",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15717417/"
] |
74,673,537 | <p>I have a master-detail page in blazor wasm: a left panel with a list of items, and a right panel with the selected item.</p>
<p>An example (ascii generated <a href="https://asciiflow.com/#/share/eJyrVspLzE1VssorzcnRUcpJrEwtUrJSqo5RqohRsrI0M9GJUaoEsowsDIGsktSKEiAnRkkBAnwdg0NcgxRwABfXEEdPn5iYvEdT9gxdBHG%2FQmZJaq6CIYr%... | [
{
"answer_id": 74673545,
"author": "Dorian",
"author_id": 20642451,
"author_profile": "https://Stackoverflow.com/users/20642451",
"pm_score": 0,
"selected": false,
"text": "flex: 1"
},
{
"answer_id": 74673590,
"author": "O2K",
"author_id": 13957052,
"author_profile": ... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74673537",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9971404/"
] |
74,673,542 | <p>this is the code I have so far</p>
<pre><code>public class WindowHelpGui extends JFrame{
JScrollPane scroll;
//constructor
public WindowHelpGui(){
//add window title
super("Help");
//set window layout
setLayout(null);
JTabbedPane tabbedPane = new JTabbe... | [
{
"answer_id": 74673545,
"author": "Dorian",
"author_id": 20642451,
"author_profile": "https://Stackoverflow.com/users/20642451",
"pm_score": 0,
"selected": false,
"text": "flex: 1"
},
{
"answer_id": 74673590,
"author": "O2K",
"author_id": 13957052,
"author_profile": ... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74673542",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20679621/"
] |
74,673,568 | <p>I am learning the backend in node. I am trying to execute the following piece of code
`</p>
<pre><code>const axios= require('axios')
async function getData(){
const resp = await axios.get('https://jsonplaceholder.typicode.com/todos/1')
console.log('hello',resp.data)
}
getData()
</code></pre>
<p>I am getting... | [
{
"answer_id": 74673668,
"author": "Eduardo Procópio Gomez",
"author_id": 10827693,
"author_profile": "https://Stackoverflow.com/users/10827693",
"pm_score": 1,
"selected": false,
"text": "br Accept-Encoding deflate await axios.get('https://jsonplaceholder.typicode.com/todos/1', {\n h... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74673568",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11964388/"
] |
74,673,571 | <p>I have a list of integers like this</p>
<pre><code>numbers = [1, 5, 7, 19, 22, 55]
</code></pre>
<p>I want to have a function that takes this as input and gives me a list of paired tuples that should contain the numbers as <code>(1,5), (5,7), (7,19)</code> and so on.</p>
<p>Kindly suggest.</p>
<p>I have tried using ... | [
{
"answer_id": 74673586,
"author": "Lexpj",
"author_id": 10229386,
"author_profile": "https://Stackoverflow.com/users/10229386",
"pm_score": 0,
"selected": false,
"text": "lst = [(numbers[i],numbers[i+1]) for i in range(0,len(numbers)-1)]\n"
},
{
"answer_id": 74673595,
"autho... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74673571",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10117185/"
] |
74,673,631 | <p>I'm creating an app with firebase as a database. After sending data to firebase, app screen should pop out for that I had bloclistener on the screen but after sending the data to firestore database, nothing is happening, flow is stopped after coming to loaded state in bloc file why? check my code so that you will kn... | [
{
"answer_id": 74673586,
"author": "Lexpj",
"author_id": 10229386,
"author_profile": "https://Stackoverflow.com/users/10229386",
"pm_score": 0,
"selected": false,
"text": "lst = [(numbers[i],numbers[i+1]) for i in range(0,len(numbers)-1)]\n"
},
{
"answer_id": 74673595,
"autho... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74673631",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14668121/"
] |
74,673,662 | <p>I have two programs.
1:</p>
<pre><code>#include <iostream>
using namespace std;
int main () {
do {
cout<<"Hello world";
char yn='y';
} while (yn=='y' || yn=='Y');
return 0;
}
</code></pre>
<p>2:</p>
<pre><code>#include <iostream>
using namespace ... | [
{
"answer_id": 74673688,
"author": "john",
"author_id": 882003,
"author_profile": "https://Stackoverflow.com/users/882003",
"pm_score": 2,
"selected": false,
"text": "yn int main () {\n do\n {\n cout<<\"Hello world\";\n char yn='y';\n // scope of yn variable st... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74673662",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19630256/"
] |
74,673,689 | <p>I have a dataframe that looks like that:</p>
<pre><code> col1
0 10
1 5
2 8
3 12
4 13
5 6
6 9
7 11
8 10
9 3
10 21
11 18
12 14
13 16
14 30
15 45
16 31
17 40
18 38
</code></pre>
<p>For each cell in 'col1' I calculate a range of values:</p>
<pre>... | [
{
"answer_id": 74674318,
"author": "Panda Kim",
"author_id": 20430449,
"author_profile": "https://Stackoverflow.com/users/20430449",
"pm_score": 1,
"selected": false,
"text": "df['df_min'] = df.col1 - df.col1 * 0.2\ndf['df_max'] = df.col1 + df.col1 * 0.2\nn = 3\ns = pd.Series(dtype='floa... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74673689",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19568665/"
] |
74,673,700 | <p>I heard that React Props is read only by default, however, I could overwrite props value in a component without errors. Is there settings to make props read only?</p>
<pre><code>interface Props {
readonly isText: boolean;
}
const ComponentA: FC<Props> = ({isText}: Props) {
isText = false // <- I can ch... | [
{
"answer_id": 74674318,
"author": "Panda Kim",
"author_id": 20430449,
"author_profile": "https://Stackoverflow.com/users/20430449",
"pm_score": 1,
"selected": false,
"text": "df['df_min'] = df.col1 - df.col1 * 0.2\ndf['df_max'] = df.col1 + df.col1 * 0.2\nn = 3\ns = pd.Series(dtype='floa... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74673700",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7359831/"
] |
74,673,707 | <p>Take these two list of strings for example.</p>
<pre><code>names = ['Jack', 'Steve', 'Marc', 'Xavier', 'Bob']
names_copy = ['Steve', 'Marc', 'Xavier', 'Bob', 'Jack']
</code></pre>
<p>Essentially I'm trying to find a way to sort <code>names_copy</code> in the same way that <code>names</code> is sorted.</p>
<p>So, a s... | [
{
"answer_id": 74677550,
"author": "Timus",
"author_id": 14311263,
"author_profile": "https://Stackoverflow.com/users/14311263",
"pm_score": 0,
"selected": false,
"text": "names_copy_sorted = sorted(names_copy, key=names.index)\n names_copy names names key priorities = dict((n, i) for i,... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74673707",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20679438/"
] |
74,673,724 | <p>I have a java class, but when I'm trying to build a project I get an error</p>
<pre class="lang-none prettyprint-override"><code>error: unclosed string literal return load().query("""
^
</code></pre>
<p><em>(the third quote)</em></p>
<p>Can you plea... | [
{
"answer_id": 74673842,
"author": "Paresh_Maheshwari",
"author_id": 15412080,
"author_profile": "https://Stackoverflow.com/users/15412080",
"pm_score": -1,
"selected": false,
"text": "@Component(ThreatImplMethodRepository.NAME)\npublic class ThreatImplMethodRepository extends \nDefaultR... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74673724",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13993894/"
] |
74,673,772 | <p>I know already upload answer to this same question but I try them they are not working for me because there is also some some update in selenium code too.
<strong>Getting this Error</strong> <code>selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element <div class=&... | [
{
"answer_id": 74673886,
"author": "Fazlul",
"author_id": 12848411,
"author_profile": "https://Stackoverflow.com/users/12848411",
"pm_score": 1,
"selected": false,
"text": " import time\n\n skill = WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH,'//div[contains(@clas... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74673772",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20147022/"
] |
74,673,815 | <p>I have been watching videos of C#.net, Asp.net, and MVC from the kudvenkat youtube channel this man is so brilliant at teaching dot net technology but kudvenkat`s dot net videos are from 2012 and I think there will be dot net version 4.0 but still, currently so many peoples are learning dot net from him so here I wa... | [
{
"answer_id": 74673886,
"author": "Fazlul",
"author_id": 12848411,
"author_profile": "https://Stackoverflow.com/users/12848411",
"pm_score": 1,
"selected": false,
"text": " import time\n\n skill = WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH,'//div[contains(@clas... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74673815",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20457998/"
] |
74,673,825 | <p>I have an array like:</p>
<pre><code>arr = ["100 abc", "ad", "5 star", "orange"];
</code></pre>
<p>I want to sort firstly strings with no numbers at the beginning and then strings with numbers add at the end, omit numbers and sort strings by name alphabetically.</p>
<p>Expecte... | [
{
"answer_id": 74673979,
"author": "LawrenceWebDev",
"author_id": 6533103,
"author_profile": "https://Stackoverflow.com/users/6533103",
"pm_score": 0,
"selected": false,
"text": "const startsWithNum = (str) => /^\\d/.test(str);\n\nconst afterNumPart = (str) => str.match(/^\\d+\\s(.*)/)[0... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74673825",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15209188/"
] |
74,673,827 | <p>I'm trying to create a custom iterator over a string's characters, with the difference that it "splits" the string into two iterators. Which one is then used in its own <code>next()</code> depends on custom logic.</p>
<pre class="lang-rs prettyprint-override"><code>struct WrappingIter<I> {
iter_1... | [
{
"answer_id": 74673979,
"author": "LawrenceWebDev",
"author_id": 6533103,
"author_profile": "https://Stackoverflow.com/users/6533103",
"pm_score": 0,
"selected": false,
"text": "const startsWithNum = (str) => /^\\d/.test(str);\n\nconst afterNumPart = (str) => str.match(/^\\d+\\s(.*)/)[0... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74673827",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7151327/"
] |
74,673,857 | <p>I'm cleaning some text data and I've come across a problem associated with removing newline text. For this data, there are not merely <code>\n</code> strings in the text, but <code>\n\n</code> strings, as well as numbered newlines such as: <code>\n2</code> and <code>\n\n2</code>. The latter are my problem. How does ... | [
{
"answer_id": 74673979,
"author": "LawrenceWebDev",
"author_id": 6533103,
"author_profile": "https://Stackoverflow.com/users/6533103",
"pm_score": 0,
"selected": false,
"text": "const startsWithNum = (str) => /^\\d/.test(str);\n\nconst afterNumPart = (str) => str.match(/^\\d+\\s(.*)/)[0... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74673857",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18667604/"
] |
74,673,859 | <p>I have two json datas as</p>
<pre><code>json_1 = [{'purchasedPerson__id': 2, 'credit': 3000}, {'purchasedPerson__id': 4, 'credit': 5000}]
json_2 = [{'purchasedPerson__id': 1, 'debit': 8526}, {'purchasedPerson__id': 4, 'debit': 2000}]
</code></pre>
<p>i want to merge both the json and needed optput as</p>
<pre><code>... | [
{
"answer_id": 74673899,
"author": "Dileep",
"author_id": 3786004,
"author_profile": "https://Stackoverflow.com/users/3786004",
"pm_score": 0,
"selected": false,
"text": "# Initialize the final JSON array\njson_final = []\n\n# Loop through the first JSON data set\nfor item in json_1:\n ... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74673859",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14442225/"
] |
74,673,863 | <p>how to click on anchor tag in the card and redirects me to another page with more details of the current card example click on opens new tab with current (clicked) card details here is an api for item <a href="https://api.npoint.io/d275425a434e02acf2f7/News/0" rel="nofollow noreferrer">https://api.npoint.io/d275425a... | [
{
"answer_id": 74673874,
"author": "Muhammad Salman",
"author_id": 15715337,
"author_profile": "https://Stackoverflow.com/users/15715337",
"pm_score": 1,
"selected": false,
"text": "function handleClick(event) {\n // Prevent the default behavior of the anchor tag\n event.preventDefault... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74673863",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20676584/"
] |
74,673,894 | <pre><code>for (int i = 1; i <= size; i++)
{
printf("Enter element %d: ", i);
scanf("%d", &array[i]);
if (array [i] < 0)
break;
}
printf("[");
for (int i = 1; i <= size; i++)
{
if (array[i] < 0)
break;
printf("%d", ar... | [
{
"answer_id": 74673874,
"author": "Muhammad Salman",
"author_id": 15715337,
"author_profile": "https://Stackoverflow.com/users/15715337",
"pm_score": 1,
"selected": false,
"text": "function handleClick(event) {\n // Prevent the default behavior of the anchor tag\n event.preventDefault... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74673894",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20680229/"
] |
74,673,906 | <p><strong>models.py</strong></p>
<pre><code>class Log(models.Model):
source = models.CharField(max_length=1000, default='')
date = models.DateTimeField(default=datetime.now, blank = True)
</code></pre>
<p><strong>views.py</strong></p>
<p>The objects in the Log model are filtered so that only those with source ... | [
{
"answer_id": 74673874,
"author": "Muhammad Salman",
"author_id": 15715337,
"author_profile": "https://Stackoverflow.com/users/15715337",
"pm_score": 1,
"selected": false,
"text": "function handleClick(event) {\n // Prevent the default behavior of the anchor tag\n event.preventDefault... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74673906",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14723671/"
] |
74,674,016 | <p>I would like to know where in my code the form went wrong.</p>
<pre><code><?php
if(isset($_POST['submit'])) {
$arrayName = array("TeacherA", "TeacherB", "TeacherC" , "TeacherD", "TeacherE");
$minimum = 5;
$maximum = 10;
$name = $_POST['yourName'];
$em... | [
{
"answer_id": 74674317,
"author": "Vicky Maharjan",
"author_id": 9135930,
"author_profile": "https://Stackoverflow.com/users/9135930",
"pm_score": -1,
"selected": false,
"text": "if(!isset($name)){\n echo \"Please do register with us before you can login\";\n}\nelse{\n echo \"Welcome\... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674016",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15033925/"
] |
74,674,025 | <p>I have a bit complicated PowerQuery query which has many steps. Within these steps I have a date, team and conditions as below (not actual data)</p>
<p><a href="https://i.stack.imgur.com/0UOdJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0UOdJ.png" alt="enter image description here" /></a></p>
... | [
{
"answer_id": 74674518,
"author": "David Bacci",
"author_id": 18345037,
"author_profile": "https://Stackoverflow.com/users/18345037",
"pm_score": 0,
"selected": false,
"text": "let\n Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText(\"i45WMtQ31DcyMDJW0lFyDAISAYn... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674025",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11657343/"
] |
74,674,033 | <p>I am trying to define custom function and I wanted to find how can I calculate estimated cost of that function</p>
<p><a href="https://www.postgresql.org/docs/current/sql-createfunction.html" rel="nofollow noreferrer">https://www.postgresql.org/docs/current/sql-createfunction.html</a></p>
<p>I tried giving differen... | [
{
"answer_id": 74677289,
"author": "Laurenz Albe",
"author_id": 6464308,
"author_profile": "https://Stackoverflow.com/users/6464308",
"pm_score": 1,
"selected": false,
"text": "seq_page_cost"
},
{
"answer_id": 74677330,
"author": "Marcell Almeida",
"author_id": 1690338,
... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674033",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7805549/"
] |
74,674,071 | <p>It's really expensive to transfer whole model from server to client specially when loading lists. The solution is to ignore empty, null or default values which can be refilled in client side. Consider a <code>Customer</code> model like this:</p>
<pre><code>export class Customer {
customerId: number = 0;
ncod... | [
{
"answer_id": 74674793,
"author": "Mehyar Sawas",
"author_id": 5012127,
"author_profile": "https://Stackoverflow.com/users/5012127",
"pm_score": 0,
"selected": false,
"text": "this.http.get<Customer>('/api/getCustomer').subscribe((response) => {\n const customer = {...new Customer(... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674071",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6363853/"
] |
74,674,094 | <p>If there is any wrong property (For example if I send the payload data, Person_ instead of Person), model <strong>fully</strong> gets as null <em>(Post([FromBody] Request data))</em></p>
<pre><code>public class Person
{
public Guid Id { get; set; }
public string? Firstname { get; set; }
public string? La... | [
{
"answer_id": 74674329,
"author": "vivek nuna",
"author_id": 6527049,
"author_profile": "https://Stackoverflow.com/users/6527049",
"pm_score": 0,
"selected": false,
"text": "Person Request public Person Person_ { get; set; } public virtual Person? Person_ { get; set; } Person JsonPrope... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674094",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2748122/"
] |
74,674,114 | <p>I am new in java. I am trying convert simple java app with terminal output to a app with a GUI or UI. I have seen small java applications with little window , like calculator or currency converter.</p>
<p>This is the program I am trying to convert to a GUI app
<a href="https://github.com/Abhinav-26/Employee-Manageme... | [
{
"answer_id": 74674329,
"author": "vivek nuna",
"author_id": 6527049,
"author_profile": "https://Stackoverflow.com/users/6527049",
"pm_score": 0,
"selected": false,
"text": "Person Request public Person Person_ { get; set; } public virtual Person? Person_ { get; set; } Person JsonPrope... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674114",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20680462/"
] |
74,674,141 | <p>I have example data as follows:</p>
<pre><code>library(data.table)
datA <- fread("ID somevar
NA 4
NA 3
2 5")
datB <- fread("ID somevar
7 4
NA 3
NA 5")
dat_list <- list(datA, datB)
</code></pre... | [
{
"answer_id": 74674220,
"author": "tmfmnk",
"author_id": 5964557,
"author_profile": "https://Stackoverflow.com/users/5964557",
"pm_score": 1,
"selected": false,
"text": "dplyr dat_list %>%\n bind_rows(., .id = \"dataset_ID\") %>%\n mutate(ID = ifelse(is.na(ID), 99 + cumsum(is.na(ID)), I... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674141",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8071608/"
] |
74,674,245 | <p>this is the code I'm trying to implement for the dataset file and as I mentioned before the result just gives a 0 and the error :</p>
<p><strong>RuntimeWarning: overflow encountered in exp
predictions = 1 / (1 + np.exp(-predictions))</strong></p>
<p>I tried many solutions for other codes related with this prediction... | [
{
"answer_id": 74674270,
"author": "Ishan Kumar",
"author_id": 11472268,
"author_profile": "https://Stackoverflow.com/users/11472268",
"pm_score": 1,
"selected": false,
"text": "import numpy as np\n\n# Define a large input value\nx = 1e100\n\n# Compute the exponential of the input value\... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674245",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15165506/"
] |
74,674,267 | <p>I have 2 objects where I want the second one to be in the same order as the first one.</p>
<p>Ex:</p>
<pre><code>const obj1 = [
{ key: 1, id: 1, name: "John" },
{ key: 2, id: 2, name: "Ann" },
{ key: 3, id: 3, name: "Kate" }
];
const obj2 = [
{ key: 2, id: 2, name: "Ann&qu... | [
{
"answer_id": 74674270,
"author": "Ishan Kumar",
"author_id": 11472268,
"author_profile": "https://Stackoverflow.com/users/11472268",
"pm_score": 1,
"selected": false,
"text": "import numpy as np\n\n# Define a large input value\nx = 1e100\n\n# Compute the exponential of the input value\... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674267",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9832432/"
] |
74,674,268 | <p>I have written algorithm that solves the pluszle game matrix.
Input is numpy array.</p>
<p>Now I want to recognize the digits of matrix from screenshot.
<a href="https://i.stack.imgur.com/WUmc7.jpg" rel="nofollow noreferrer">there are different levels, this is hard one</a></p>
<p><a href="https://i.stack.imgur.com/s... | [
{
"answer_id": 74674861,
"author": "chrslg",
"author_id": 20037042,
"author_profile": "https://Stackoverflow.com/users/20037042",
"pm_score": 1,
"selected": false,
"text": "(hard<240).any(axis=2) (hard>120).any(axis=2)\n (hard<240).any(axis=2) & (hard>120).any(axis=2)\n config='digits' p... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674268",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18607862/"
] |
74,674,289 | <p>I would appreciate some help understanding the output of a small educational program I put together. I am new to OpenCV and don't have much C++ experience.</p>
<p>The goal of the script is to perform the following:</p>
<ul>
<li>Load an image</li>
<li>Perform DFT on the image</li>
<li>Apply a circular binary mask to ... | [
{
"answer_id": 74677413,
"author": "Cris Luengo",
"author_id": 7328782,
"author_profile": "https://Stackoverflow.com/users/7328782",
"pm_score": 2,
"selected": false,
"text": "mask.cols/2 mask.rows/2 ifftshift ifftshift ifftshift"
},
{
"answer_id": 74680367,
"author": "avi",
... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674289",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12872754/"
] |
74,674,297 | <p><strong>Linux bash</strong>: why the two shell script as follow had different result?</p>
<pre><code>[root@yumserver ~]# data="a,b,c";IFS=",";for i in $data;do echo $i;done
a
b
c
[root@yumserver ~]# IFS=",";for i in a,b,c;do echo $i;done
a b c
</code></pre>
<p>expec... | [
{
"answer_id": 74674452,
"author": "arkascha",
"author_id": 1248114,
"author_profile": "https://Stackoverflow.com/users/1248114",
"pm_score": 2,
"selected": false,
"text": "IFS=\",\";for i in ${var=\"a,b,c\"};do echo $i;done\n"
},
{
"answer_id": 74674566,
"author": "M. Nejat ... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674297",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20680709/"
] |
74,674,308 | <p>I found something in my search, which I don't understand. The goal is to read out the angle of a pointer in a pressure gauge. In my research, I found this example:</p>
<p><a href="https://circuits-ninja.pl/reading-an-indication-from-an-analog-pressure-gauge-using-the-esp32-cam-module-with-an-ov2640-and-opencv-camera... | [
{
"answer_id": 74674452,
"author": "arkascha",
"author_id": 1248114,
"author_profile": "https://Stackoverflow.com/users/1248114",
"pm_score": 2,
"selected": false,
"text": "IFS=\",\";for i in ${var=\"a,b,c\"};do echo $i;done\n"
},
{
"answer_id": 74674566,
"author": "M. Nejat ... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674308",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20136915/"
] |
74,674,328 | <p>I'm trying to reverse a string. I use the solution of <a href="https://stackoverflow.com/questions/27996430/reversing-a-string-in-rust">this post</a> and it works.</p>
<p>But I would like to try with bytes instead of grapheme clusters as shown below:</p>
<pre class="lang-rust prettyprint-override"><code>pub fn rever... | [
{
"answer_id": 74674343,
"author": "Haim Cohen",
"author_id": 3752715,
"author_profile": "https://Stackoverflow.com/users/3752715",
"pm_score": 0,
"selected": false,
"text": ".chars() .collect() pub fn reverse2(input: &str) -> String {\n let s: String = input\n .chars()\n ... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674328",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14553818/"
] |
74,674,411 | <p>I have the following vector called <code>input</code>:</p>
<pre><code>input <- c(1,2,1,NA,3,2,NA,1,5,6,NA,2,2)
[1] 1 2 1 NA 3 2 NA 1 5 6 NA 2 2
</code></pre>
<p>I would like to split this vector into multiple vectors by each NA. So the desired output should look like this:</p>
<pre><code>> output
[[... | [
{
"answer_id": 74674509,
"author": "tpetzoldt",
"author_id": 3677576,
"author_profile": "https://Stackoverflow.com/users/3677576",
"pm_score": 3,
"selected": false,
"text": "NA cumsum NA input <- c(1,2,1,NA,3,2,NA,1,5,6,NA,2,2)\ntmp <- cumsum(is.na(input))\nlapply(split(input, tmp), na.o... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674411",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14282714/"
] |
74,674,421 | <p>I have a txt file that updates with new data every few seconds. It is stored and generated locally on a raspberry pi, which will also act as the server.</p>
<p>I want its contents to be added to and html code for displaying.</p>
<p>It should update without manual reloading of the page.</p>
<p>Is there a way to do th... | [
{
"answer_id": 74674509,
"author": "tpetzoldt",
"author_id": 3677576,
"author_profile": "https://Stackoverflow.com/users/3677576",
"pm_score": 3,
"selected": false,
"text": "NA cumsum NA input <- c(1,2,1,NA,3,2,NA,1,5,6,NA,2,2)\ntmp <- cumsum(is.na(input))\nlapply(split(input, tmp), na.o... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674421",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17333122/"
] |
74,674,440 | <p>I want to send a data object with fetch api with keepalive to the current page and get the data through php. how can I do it.</p>
<p>Data To Send</p>
<pre><code>{
name: 'blabla',
age: 432,
type: 'pig'
}
</code></pre>
<p>I want to recieve as a post variable</p>
<pre><code>$_POST['name'];
</code></pre>
<p>I've t... | [
{
"answer_id": 74674509,
"author": "tpetzoldt",
"author_id": 3677576,
"author_profile": "https://Stackoverflow.com/users/3677576",
"pm_score": 3,
"selected": false,
"text": "NA cumsum NA input <- c(1,2,1,NA,3,2,NA,1,5,6,NA,2,2)\ntmp <- cumsum(is.na(input))\nlapply(split(input, tmp), na.o... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674440",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20680889/"
] |
74,674,513 | <p>I'm new to springboot and fiddling around with DI.</p>
<p>I'm having a Service</p>
<pre><code>public class GreeterService {
private ObjectMapper objectMapper;
public GreeterService(ObjectMapper objectMapper) {
this.objectMapper = objectMapper;
}
public String greeting() throws JsonProcessi... | [
{
"answer_id": 74674509,
"author": "tpetzoldt",
"author_id": 3677576,
"author_profile": "https://Stackoverflow.com/users/3677576",
"pm_score": 3,
"selected": false,
"text": "NA cumsum NA input <- c(1,2,1,NA,3,2,NA,1,5,6,NA,2,2)\ntmp <- cumsum(is.na(input))\nlapply(split(input, tmp), na.o... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674513",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/877383/"
] |
74,674,559 | <p>i need to truncate portions of a string that are found between a regex pattern.</p>
<ul>
<li>if a portion length is <code><=</code> to the given padding, leave the portion as it is.</li>
<li>the starting portion should be truncated from the left.</li>
<li>the ending portion should be truncated from the right.</li... | [
{
"answer_id": 74674607,
"author": "Isfan Bogdan",
"author_id": 2915547,
"author_profile": "https://Stackoverflow.com/users/2915547",
"pm_score": 0,
"selected": false,
"text": "const truncateBetweenPattern = (str, pattern, padding=0, sep='...') => {\n const regex = new RegExp(pattern, '... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674559",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1428445/"
] |
74,674,599 | <p>I'm trying to run a python file that imports a module using other modules in the grandparent folder. The file structure is:</p>
<pre><code>directory_0
|
directory_1
| |
| directory_2
| |
| __init__.py (define the method A and import another method B from file_2.py)
| |
| ... | [
{
"answer_id": 74674607,
"author": "Isfan Bogdan",
"author_id": 2915547,
"author_profile": "https://Stackoverflow.com/users/2915547",
"pm_score": 0,
"selected": false,
"text": "const truncateBetweenPattern = (str, pattern, padding=0, sep='...') => {\n const regex = new RegExp(pattern, '... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674599",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6760729/"
] |
74,674,601 | <p><a href="https://stackoverflow.com/a/7486111/17273668">https://stackoverflow.com/a/7486111/17273668</a> ; from what I have seen here to make a class "static" , we have to make it final with private constructor and static fields and methods.</p>
<p>Is there any difference between making the constructor priv... | [
{
"answer_id": 74674652,
"author": "knittl",
"author_id": 112968,
"author_profile": "https://Stackoverflow.com/users/112968",
"pm_score": 2,
"selected": false,
"text": "abstract Optional.of"
}
] | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674601",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17273668/"
] |
74,674,604 | <p>I use fetch() to print labels. There are some scenario when I need to loop through the data and print multiple labels. The printing it's working fine, but after the first loop the script stop running.</p>
<p>I use async function in order to slow down a printing.</p>
<pre><code>async function printing() {
for (l... | [
{
"answer_id": 74674652,
"author": "knittl",
"author_id": 112968,
"author_profile": "https://Stackoverflow.com/users/112968",
"pm_score": 2,
"selected": false,
"text": "abstract Optional.of"
}
] | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674604",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11117759/"
] |
74,674,611 | <p>I just finished implementing a working Python code for the Dijkstra-Pathfinding algorithm. I am applying this algorithm to a graph with edges, which I have written as a list of tuples:</p>
<pre><code>graph = Graph([
("a", "b", 2),("a", "c", 5),
("a", ... | [
{
"answer_id": 74674652,
"author": "knittl",
"author_id": 112968,
"author_profile": "https://Stackoverflow.com/users/112968",
"pm_score": 2,
"selected": false,
"text": "abstract Optional.of"
}
] | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674611",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20681092/"
] |
74,674,629 | <pre class="lang-py prettyprint-override"><code>n=int(input("Enter a number: "))
p=1
for i in range(n):
p*=i
print(p)
</code></pre>
<p>I wanted to find out the factorial of a number but I always get 0 as output.</p>
| [
{
"answer_id": 74674652,
"author": "knittl",
"author_id": 112968,
"author_profile": "https://Stackoverflow.com/users/112968",
"pm_score": 2,
"selected": false,
"text": "abstract Optional.of"
}
] | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674629",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20675377/"
] |
74,674,649 | <p>I'm writing a programme that converts complex numbers.
Right now I'm having problems with this piece of code:</p>
<pre><code>import numpy
complexnr = 1+1j
mod= numpy.absolute(complexnr)
print(mod)
</code></pre>
<p>The output of this code is:</p>
<pre><code>1.4142135623730951
</code></pre>
<p>I would like to get √2 ... | [
{
"answer_id": 74674992,
"author": "Davide_sd",
"author_id": 2329968,
"author_profile": "https://Stackoverflow.com/users/2329968",
"pm_score": 0,
"selected": false,
"text": "from sympy import *\ncabs = lambda z: sqrt(re(z)**2 + im(z)**2)\ncomplexnr = 1 + 1j\nprint(cabs(complexnr))\n# out... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674649",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20396924/"
] |
74,674,654 | <p>I have a dataframe such as :</p>
<pre><code>Names1 Gene_name Status
SP1 GENE1 0
SP1 GENE1 1
SP1 GENE1 1
SP1 GENE1 2
SP1 GENE1 2
SP1 GENE2 0
SP3 GENE2 0
SP1 GENE2 1
SP2 GENE2 2
SP4 GENE3 1
SP4 GENE3 2
SP5 GENE3 0
SP5 GENE3 ... | [
{
"answer_id": 74674826,
"author": "Panda Kim",
"author_id": 20430449,
"author_profile": "https://Stackoverflow.com/users/20430449",
"pm_score": 3,
"selected": true,
"text": "g = df.groupby(['Names1', 'Gene_name'])\ng['Status'].agg(lambda x: '-'.join(x.astype('str').sort_values().unique(... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674654",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12559770/"
] |
74,674,695 | <p>Let's say I have a list of ints called <code>List<int> List1 = new() {1,2,3,4}</code> and <code>List<int> List2 = new() {2,3,4}</code>.</p>
<p>I need to check if List2 has everything List1 has. Keep in mind that list lengths may vary.</p>
<p>I have no idea on how to make it. Searching on the internet did... | [
{
"answer_id": 74674756,
"author": "vivek nuna",
"author_id": 6527049,
"author_profile": "https://Stackoverflow.com/users/6527049",
"pm_score": 0,
"selected": false,
"text": "ls2 ls1 bool isSubset = !ls2.Except(ls1).Any();\n"
},
{
"answer_id": 74674767,
"author": "stbychkov",... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674695",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20192169/"
] |
74,674,700 | <p><br />
I want to filter and get the results of each index that</p>
<p>it's name starts with <code>"abc"</code> and the state is <code>"DISABLED"</code>.</p>
<p>My file looks like this:</p>
<pre class="lang-json prettyprint-override"><code>➜ ~ cat test.json | head
{
"Rules": [
{
... | [
{
"answer_id": 74674801,
"author": "mpromonet",
"author_id": 3102264,
"author_profile": "https://Stackoverflow.com/users/3102264",
"pm_score": 3,
"selected": true,
"text": "cat test.json | jq -r '.[] | .[] | select((.Name | startswith(\"abc\")) and .State == \"DISABLED\") \n Name cat te... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674700",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19364640/"
] |
74,674,740 | <p>Faced a problem. On the site, i need to generate such a number of certain lines (via document.write("Welcome to my page") ) that the user will tell through the dialog box, when dialog box opening on the page. All this happens through <script> ... </script>. I tried it in different ways, but not... | [
{
"answer_id": 74674798,
"author": "Mohsin Mehmood",
"author_id": 12248102,
"author_profile": "https://Stackoverflow.com/users/12248102",
"pm_score": -1,
"selected": true,
"text": "function run() {\n // Ask the user how many times to repeat the line\n let count = prompt(\"How many time... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674740",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20681184/"
] |
74,674,746 | <p>In the plot, smaller bubbles will be hidden by bigger bubbles. if I use alpha, they will appear. I would like that small bubbles superpose the bigger ones without using alpha</p>
<pre><code> library(ggplot2)
library(dplyr)
</code></pre>
<h1>The dataset is provided in the gapminder library</h1>
<pre><code> l... | [
{
"answer_id": 74675173,
"author": "Allan Cameron",
"author_id": 12500315,
"author_profile": "https://Stackoverflow.com/users/12500315",
"pm_score": 3,
"selected": true,
"text": "shape = 21 library(ggplot2)\nlibrary(dplyr)\nlibrary(gapminder)\nlibrary(colorspace)\n\ndata <- gapminder %>%... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674746",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11101169/"
] |
74,674,764 | <p>What is the default ARIA role of a <code>div</code> or <code>span</code> in HTML? Or, in other words, what is the ARIA role of non-interactive elements and the elements that don't have a specific ARIA role assigned to them? Is it <code>none</code> or <code>presentation</code>? Or is it not defined? And if it is, do ... | [
{
"answer_id": 74677412,
"author": "Robin Zigmond",
"author_id": 8475054,
"author_profile": "https://Stackoverflow.com/users/8475054",
"pm_score": 3,
"selected": true,
"text": "div span generic generic role none presentation presentation role div <div> aria-hidden=\"true\" generic none p... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674764",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16333629/"
] |
74,674,832 | <p>I am getting picture from gallery using this code.i want to pass this image view to another activity and show it.In second activity i want to catch it.It is same as data passing through an activities but the images are not working in that method.Any suggetions?</p>
<pre><code> val getContent = registerForActivity... | [
{
"answer_id": 74677412,
"author": "Robin Zigmond",
"author_id": 8475054,
"author_profile": "https://Stackoverflow.com/users/8475054",
"pm_score": 3,
"selected": true,
"text": "div span generic generic role none presentation presentation role div <div> aria-hidden=\"true\" generic none p... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674832",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5117918/"
] |
74,674,850 | <p>I'm trying to make a class in Delphi that handles files. I have a property that returns the size of the file and another one that returns the position of the file. I don't know if any error can happen with these calls. Should I raise an exception?</p>
<p>My code is:</p>
<pre><code>function TFile.GetSize: Int64;
var
... | [
{
"answer_id": 74675019,
"author": "Eirik A.",
"author_id": 2022963,
"author_profile": "https://Stackoverflow.com/users/2022963",
"pm_score": 0,
"selected": false,
"text": "SetFilePointer() GetFileSize()"
},
{
"answer_id": 74678532,
"author": "Remy Lebeau",
"author_id": 6... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674850",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20681380/"
] |
74,674,894 | <p>In cpp, <br />
I know <code>&</code> is used to get the address<br />
and <code>::</code> is used to get the member of class,<br />
but, what's the usage of <code>&::</code> ?</p>
<p>Here is the example of the function <code>connect</code> of qt5:</p>
<pre><code>QtWidgetsApplication2::QtWidgetsApplication2(Q... | [
{
"answer_id": 74674926,
"author": "Mohsin Mehmood",
"author_id": 12248102,
"author_profile": "https://Stackoverflow.com/users/12248102",
"pm_score": 0,
"selected": false,
"text": "connect(ui.pushButton_select, &QPushButton::clicked, std::bind(&QtWidgetsApplication2::select_file, this));... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674894",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17774109/"
] |
74,674,898 | <p>I ran into a problem with Redshift. I'm generating a sequence of dates and want to embed it in a table to work with the range. But Redshift only supports generation on the leader node. It is not possible to insert the data on the nodes. Nowhere in the documentation have I found information on how to insert the gene... | [
{
"answer_id": 74674944,
"author": "Breezer",
"author_id": 260640,
"author_profile": "https://Stackoverflow.com/users/260640",
"pm_score": 1,
"selected": false,
"text": "create table INSERT INTO public.date_sequence\nSELECT date '2019-12-31' + INTERVAL AS date_range\nFROM generate_series... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674898",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20680866/"
] |
74,674,908 | <p>I am trying to add a underline like symbol below the active link for that purpose i am used ::after element and set it's width to 100% to get its parent element's width but the psudo element is way much bigger when width is 100%;</p>
<p>my html code is </p>
<pre><code><header class="main-header">
&... | [
{
"answer_id": 74675063,
"author": "ctrl-alt-delor",
"author_id": 537980,
"author_profile": "https://Stackoverflow.com/users/537980",
"pm_score": 0,
"selected": false,
"text": ".main-nav-list li.m {\n border-bottom: 5px solid tomato;\n}\n .main-nav-list li.m .main-nav-list li.m {\n bo... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674908",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20300178/"
] |
74,674,910 | <p>Is there a neat way to simplify this if statement?
I need n to be >= 2 and <= 100 and value to increase by one for every seventh step (except the first one which should be between 2 and 7 and last one which should be between 98 and 100).</p>
<pre><code>if n >= 2 and n <= 7:
value = 1
elif n > 7 an... | [
{
"answer_id": 74674973,
"author": "Swifty",
"author_id": 20267366,
"author_profile": "https://Stackoverflow.com/users/20267366",
"pm_score": 2,
"selected": true,
"text": "if 2 <= n <= 100:\n value = (n+6)//7\n numdict = {2:1,3:7,4:4,5:2,6:0,7:8,8:10,9:18,10:22,11:20,12:28,13:68}\n\nd... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674910",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14898307/"
] |
74,674,913 | <p><a href="https://i.stack.imgur.com/w3vXI.png" rel="nofollow noreferrer">enter image description here</a>
Getting issues with my code unable to understand what to do next can anyone help me out</p>
<pre><code># Importing the libraries
import numpy as np
import pandas as pd
import tensorflow as tf
from tensorflow.kera... | [
{
"answer_id": 74674973,
"author": "Swifty",
"author_id": 20267366,
"author_profile": "https://Stackoverflow.com/users/20267366",
"pm_score": 2,
"selected": true,
"text": "if 2 <= n <= 100:\n value = (n+6)//7\n numdict = {2:1,3:7,4:4,5:2,6:0,7:8,8:10,9:18,10:22,11:20,12:28,13:68}\n\nd... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674913",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20681432/"
] |
74,674,917 | <p>I'm building my first app using RTK query.
I need to set my authorization token in my headers. It is stored in a cookie, but they can't be accessed from the apiSlice, which means I need to store the token in my states which I'd have access to when setting my headers.</p>
<p>I get the token from my cookies when the a... | [
{
"answer_id": 74674952,
"author": "odnualam",
"author_id": 10875688,
"author_profile": "https://Stackoverflow.com/users/10875688",
"pm_score": -1,
"selected": false,
"text": "const authSlice = createSlice({\n name: 'auth',\n initialState: {\n token: null\n },\n reducers: {\n /... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674917",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9774624/"
] |
74,674,948 | <pre><code> int a[] = {1, 6, 3, 4, 5, 8, 7};
for(int i = 0; i < a.length; i++){
if (a[i] % 2 == 0) {
int b = new int[3];
b[i] = a[i];
System.out.print(b[i] + " ");
}
}
</code></pre>
<p>//I want a new array b, to have the even values of a. How can I make this wo... | [
{
"answer_id": 74674952,
"author": "odnualam",
"author_id": 10875688,
"author_profile": "https://Stackoverflow.com/users/10875688",
"pm_score": -1,
"selected": false,
"text": "const authSlice = createSlice({\n name: 'auth',\n initialState: {\n token: null\n },\n reducers: {\n /... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674948",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20177615/"
] |
74,674,950 | <p>I'm building a Formula1 race simulator in python and I'm trying to make a overtake function, basically, i've all the drivers stored in a list and once one of the drivers surpasses the other I need to invert their position in the list</p>
<pre><code>['hamilton','vertsappen','perez','sainz']
['hamilton','perez','verst... | [
{
"answer_id": 74674965,
"author": "J. M. Arnold",
"author_id": 14852784,
"author_profile": "https://Stackoverflow.com/users/14852784",
"pm_score": 1,
"selected": false,
"text": "def overtake_driver(drivers, overtaker, overtaken):\n # Find the indices of the overtaker and the overtaken ... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674950",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19994378/"
] |
74,674,956 | <p>I tried to create several maps and saved as png files. In cycle I got all mapes per <code>year</code>. I want to add which year on the map, and I tried <code>title=i</code> and <code>fig.update_layout(title_text=i, title_x=0.5)</code>, but it does not work.</p>
<pre><code>import plotly.express as px
import pandas as... | [
{
"answer_id": 74674965,
"author": "J. M. Arnold",
"author_id": 14852784,
"author_profile": "https://Stackoverflow.com/users/14852784",
"pm_score": 1,
"selected": false,
"text": "def overtake_driver(drivers, overtaker, overtaken):\n # Find the indices of the overtaker and the overtaken ... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674956",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17418636/"
] |
74,674,960 | <pre><code>
</code></pre>
<pre><code>import java.text.BreakIterator;
import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner in= new Scanner(System.in);
System.out.println("nomber");
int n= in.nextInt();
int s= n*n;
int l = (""+... | [
{
"answer_id": 74674965,
"author": "J. M. Arnold",
"author_id": 14852784,
"author_profile": "https://Stackoverflow.com/users/14852784",
"pm_score": 1,
"selected": false,
"text": "def overtake_driver(drivers, overtaker, overtaken):\n # Find the indices of the overtaker and the overtaken ... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674960",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18397913/"
] |
74,674,974 | <p>I'm using OpenTok RTC. And I need to only grant permission for Mic only.</p>
<p>I have been reading the documentations and I'm using the getDevices which asks for camera and mic permissions. And I only need Mic permission</p>
<p>I can't find a way around this yet</p>
<p>Link for getDevices <a href="https://tokbox.co... | [
{
"answer_id": 74674965,
"author": "J. M. Arnold",
"author_id": 14852784,
"author_profile": "https://Stackoverflow.com/users/14852784",
"pm_score": 1,
"selected": false,
"text": "def overtake_driver(drivers, overtaker, overtaken):\n # Find the indices of the overtaker and the overtaken ... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674974",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16843374/"
] |
74,674,980 | <p>I'm trying to remove all the unnecessary words and characters from the values in this column. I want the rows to contain 'Entry level', 'Mid-Senior level' etc. Also is there anyway to translate the arabic to english or shall I use replace function?</p>
<p>df_africa.seniority_level.value_counts()</p>
<pre><code>{'Sen... | [
{
"answer_id": 74674965,
"author": "J. M. Arnold",
"author_id": 14852784,
"author_profile": "https://Stackoverflow.com/users/14852784",
"pm_score": 1,
"selected": false,
"text": "def overtake_driver(drivers, overtaker, overtaken):\n # Find the indices of the overtaker and the overtaken ... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674980",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19697147/"
] |
74,674,996 | <p>I have a nested list like:</p>
<pre><code>[["bla","blabla","x=17"],["bla","x=13","z=13","blabla"],["x=27","blabla","bla","y=24"]]
</code></pre>
<p>I need to have this sorted by x (from least to most) as (oth... | [
{
"answer_id": 74675035,
"author": "J. M. Arnold",
"author_id": 14852784,
"author_profile": "https://Stackoverflow.com/users/14852784",
"pm_score": 1,
"selected": false,
"text": "sort_this_list = [\n [\"bla\",\"blabla\",\"x=17\"],\n [\"bla\",\"x=13\",\"z=13\",\"blabla\"],\n [\"x... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674996",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17788139/"
] |
74,674,998 | <p>Fair Warning: I'm a student trying to build an app for our research.</p>
<p>So I'm Trying to build an app where the user Defines the amount of Q/A he/she wants, then the app will ask for the user to put different Q/A until it reaches the an equal amount where it will then open up a new page to make the user answer t... | [
{
"answer_id": 74675035,
"author": "J. M. Arnold",
"author_id": 14852784,
"author_profile": "https://Stackoverflow.com/users/14852784",
"pm_score": 1,
"selected": false,
"text": "sort_this_list = [\n [\"bla\",\"blabla\",\"x=17\"],\n [\"bla\",\"x=13\",\"z=13\",\"blabla\"],\n [\"x... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74674998",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15408335/"
] |
74,675,002 | <p>I have an array of objects with some car data inside :</p>
<pre><code>const cars = [
{
"id": 1,
"car_make": "Lincoln",
"car_model": "Navigator",
"car_year": 2009,
"data": {
"rating": 4.9,
"engines": [3, 4, 5, 6]
}
},
{
&quo... | [
{
"answer_id": 74675083,
"author": "flyingfox",
"author_id": 3176419,
"author_profile": "https://Stackoverflow.com/users/3176419",
"pm_score": 2,
"selected": false,
"text": "engines car.data.engines.reduce((a,b) => a+b,0)\n car.data.engines = car.data.engines.reduce((a,b) => a+b,0)\n con... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74675002",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19434894/"
] |
74,675,009 | <p>Here I am trying to retrieve the IP address of the user, and with the timezone that I got from the IP address, I want to check if the date is 1/01/2023 for that country and then if it is, I want to redirect the user to another subdomain which has a Happy New Year Page:</p>
<pre><code><?php
$ip = $_SERVER['REMOTE... | [
{
"answer_id": 74675083,
"author": "flyingfox",
"author_id": 3176419,
"author_profile": "https://Stackoverflow.com/users/3176419",
"pm_score": 2,
"selected": false,
"text": "engines car.data.engines.reduce((a,b) => a+b,0)\n car.data.engines = car.data.engines.reduce((a,b) => a+b,0)\n con... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74675009",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14735936/"
] |
74,675,135 | <p>which tag we will use for adding the background image and how to remake it's size full length</p>
<p>I tried by using style tag in html of head section
background-image:url;</p>
| [
{
"answer_id": 74675083,
"author": "flyingfox",
"author_id": 3176419,
"author_profile": "https://Stackoverflow.com/users/3176419",
"pm_score": 2,
"selected": false,
"text": "engines car.data.engines.reduce((a,b) => a+b,0)\n car.data.engines = car.data.engines.reduce((a,b) => a+b,0)\n con... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74675135",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20655393/"
] |
74,675,137 | <p>I'm trying to better understand how to work with nested JSON objects in JavaScript/React.
I am getting data through the GitLab API in the following form:</p>
<pre><code>const merge_requests = [
{
"id": 39329289,
"iid": 156,
"project_id": 231,
&qu... | [
{
"answer_id": 74675083,
"author": "flyingfox",
"author_id": 3176419,
"author_profile": "https://Stackoverflow.com/users/3176419",
"pm_score": 2,
"selected": false,
"text": "engines car.data.engines.reduce((a,b) => a+b,0)\n car.data.engines = car.data.engines.reduce((a,b) => a+b,0)\n con... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74675137",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13382276/"
] |
74,675,152 | <p>I wrote a code like this:</p>
<pre><code>Age: <input type="text" id="age">
</code></pre>
<p>And JavaScript:</p>
<pre><code><script>
function validateForm() {
let age = document.getElementById("age").value;
if (age) // is number?
}
</script>
</co... | [
{
"answer_id": 74675083,
"author": "flyingfox",
"author_id": 3176419,
"author_profile": "https://Stackoverflow.com/users/3176419",
"pm_score": 2,
"selected": false,
"text": "engines car.data.engines.reduce((a,b) => a+b,0)\n car.data.engines = car.data.engines.reduce((a,b) => a+b,0)\n con... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74675152",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18003111/"
] |
74,675,163 | <p>I have tried changing a bunch of things in the CSS with classes and id's, but nothing seems to make it so that both images will be on the far side of the screen (logo on the far left and profile on the far right).</p>
<p>Tried lots of different things like <code>text-align</code> and different <code>justify-contents... | [
{
"answer_id": 74675083,
"author": "flyingfox",
"author_id": 3176419,
"author_profile": "https://Stackoverflow.com/users/3176419",
"pm_score": 2,
"selected": false,
"text": "engines car.data.engines.reduce((a,b) => a+b,0)\n car.data.engines = car.data.engines.reduce((a,b) => a+b,0)\n con... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74675163",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20681660/"
] |
74,675,191 | <p>I am calling rest api which expects nonce header. The nonce must be unique timestamp and every consecutive call should have <em>timestamp > previous one</em>. My goal is to launch 10 go routines and from each one do a call to the web api. Since we do not have control over the routine execution order we might end ... | [
{
"answer_id": 74675339,
"author": "techdobycon",
"author_id": 20681475,
"author_profile": "https://Stackoverflow.com/users/20681475",
"pm_score": 0,
"selected": false,
"text": "package main\n\nimport (\n \"fmt\"\n \"sync\"\n \"time\"\n)\n\nvar wg sync.WaitGroup = sync.WaitGroup... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74675191",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3585843/"
] |
74,675,207 | <p>I'm trying to reload page with new params on state changed:</p>
<pre><code>@Watch('workspace')
onWorkspaceChanged(o: Workspace, n: Workspace){
if(o.type === n.type && o.id === n.id) return;
this.$router.push({name: this.$route.name as string, params: {id: `${n.id}`, type: `${ n.type == WorkspaceType.COMP... | [
{
"answer_id": 74675339,
"author": "techdobycon",
"author_id": 20681475,
"author_profile": "https://Stackoverflow.com/users/20681475",
"pm_score": 0,
"selected": false,
"text": "package main\n\nimport (\n \"fmt\"\n \"sync\"\n \"time\"\n)\n\nvar wg sync.WaitGroup = sync.WaitGroup... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74675207",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7727553/"
] |
74,675,239 | <p>I'm running Python 3.9.2 on a Raspberry Pi and I've written a script that will read water temperatures from my boiler and write them to a CSV file. However, each data item in the output file appears on a new line.</p>
<p>Here's my code:</p>
<pre><code>from subprocess import check_output
import csv
header = ['Flow', ... | [
{
"answer_id": 74675339,
"author": "techdobycon",
"author_id": 20681475,
"author_profile": "https://Stackoverflow.com/users/20681475",
"pm_score": 0,
"selected": false,
"text": "package main\n\nimport (\n \"fmt\"\n \"sync\"\n \"time\"\n)\n\nvar wg sync.WaitGroup = sync.WaitGroup... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74675239",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20681553/"
] |
74,675,245 | <p>I know there a bazillion question like this, but I couldn't find a good answer.
I'm compiling a source with preprocessor tokens defined in CFLAGS:</p>
<p>-D X=string1 -D Y=string2</p>
<p>I'm trying to create a string literal in my header file that combines these two values and use it in my sources like:</p>
<pre><co... | [
{
"answer_id": 74675339,
"author": "techdobycon",
"author_id": 20681475,
"author_profile": "https://Stackoverflow.com/users/20681475",
"pm_score": 0,
"selected": false,
"text": "package main\n\nimport (\n \"fmt\"\n \"sync\"\n \"time\"\n)\n\nvar wg sync.WaitGroup = sync.WaitGroup... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74675245",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11881725/"
] |
74,675,273 | <p>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.</p>
<p>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... | [
{
"answer_id": 74675309,
"author": "DotNetRussell",
"author_id": 2051392,
"author_profile": "https://Stackoverflow.com/users/2051392",
"pm_score": 3,
"selected": true,
"text": "\nCREATE OR REPLACE FUNCTION random_interval(\n p_min IN NUMBER,\n p_max IN NUMBER, \n p_period ... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74675273",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16771377/"
] |
74,675,276 | <p>Hello I have a dataframe such as :</p>
<pre><code>Species COL1 COL2 COL3 COL4 COL5
SP1 0 0 0 1-2 0-1-2
SP2 1-2 2 0 1 0
SP3 0-1 1 2 0 1-2
</code></pre>
<p>and I would like to add new columns to count for each row the number of specific unique values such as :</p>
<pre><code>... | [
{
"answer_id": 74675309,
"author": "DotNetRussell",
"author_id": 2051392,
"author_profile": "https://Stackoverflow.com/users/2051392",
"pm_score": 3,
"selected": true,
"text": "\nCREATE OR REPLACE FUNCTION random_interval(\n p_min IN NUMBER,\n p_max IN NUMBER, \n p_period ... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74675276",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12559770/"
] |
74,675,330 | <p>I'm trying to upload some files, but when I upload a file that already exists in the path, it overwrites the existing file. I'm trying to get the files renamed if a file with same name exists in the path, such that if file.pdf gets uploaded, it gets renamed file(1).pdf if there is an existing file that goes by file.... | [
{
"answer_id": 74675309,
"author": "DotNetRussell",
"author_id": 2051392,
"author_profile": "https://Stackoverflow.com/users/2051392",
"pm_score": 3,
"selected": true,
"text": "\nCREATE OR REPLACE FUNCTION random_interval(\n p_min IN NUMBER,\n p_max IN NUMBER, \n p_period ... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74675330",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20373344/"
] |
74,675,349 | <p>I got some error but I couldnt fix it. I want to add a new city with a country name but country id (if exists) will not change in database(it wont add with a new id).</p>
<p>Here is my City class;</p>
<pre><code> [Table("Cities")]
public class City
{
[Key]
public int Id { get; set; ... | [
{
"answer_id": 74675309,
"author": "DotNetRussell",
"author_id": 2051392,
"author_profile": "https://Stackoverflow.com/users/2051392",
"pm_score": 3,
"selected": true,
"text": "\nCREATE OR REPLACE FUNCTION random_interval(\n p_min IN NUMBER,\n p_max IN NUMBER, \n p_period ... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74675349",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13038711/"
] |
74,675,378 | <p>Increammentally derive ID from a **name ** column and on next load if there are new values added to that <strong>name</strong> column then assign ned ID which is not already assigned to previous data
<strong>Example:</strong>
<strong>first load</strong></p>
<div class="s-table-container">
<table class="s-table">
<th... | [
{
"answer_id": 74675309,
"author": "DotNetRussell",
"author_id": 2051392,
"author_profile": "https://Stackoverflow.com/users/2051392",
"pm_score": 3,
"selected": true,
"text": "\nCREATE OR REPLACE FUNCTION random_interval(\n p_min IN NUMBER,\n p_max IN NUMBER, \n p_period ... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74675378",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13249628/"
] |
74,675,391 | <p>I want to make a wavy text animation why when the script I made the animation doesn't run. I use mark aiming to mark 1 sentence, that's why I don't use span.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js l... | [
{
"answer_id": 74675309,
"author": "DotNetRussell",
"author_id": 2051392,
"author_profile": "https://Stackoverflow.com/users/2051392",
"pm_score": 3,
"selected": true,
"text": "\nCREATE OR REPLACE FUNCTION random_interval(\n p_min IN NUMBER,\n p_max IN NUMBER, \n p_period ... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74675391",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19802096/"
] |
74,675,402 | <p>What I want to do is to create string stream , and output stream, giving the buffer of string stream to output stream, so that it will output data to the string stream. Everything seems fine, but when I try to add data to buffer of the string stream it overrides the previous data. My question is why? and how ... | [
{
"answer_id": 74675723,
"author": "August Vilakia",
"author_id": 20314495,
"author_profile": "https://Stackoverflow.com/users/20314495",
"pm_score": 3,
"selected": true,
"text": "stringstream ostream ostream ostream stringstream stringstream s1(\"hello I am string stream\");\nstreambuf ... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74675402",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15431634/"
] |
74,675,417 | <p>I would like to count the number of color changes in a network using a function.</p>
<p>A change would be <code>"red"</code> to <code>"green"</code> (from <code>a</code> to <code>b</code> in the example)</p>
<p>Overlaps (e.g., <code>"green"</code> to <code>"green"</code> and <... | [
{
"answer_id": 74675723,
"author": "August Vilakia",
"author_id": 20314495,
"author_profile": "https://Stackoverflow.com/users/20314495",
"pm_score": 3,
"selected": true,
"text": "stringstream ostream ostream ostream stringstream stringstream s1(\"hello I am string stream\");\nstreambuf ... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74675417",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11482110/"
] |
74,675,452 | <p><a href="https://i.stack.imgur.com/lL4Sf.png" rel="nofollow noreferrer">the html tag</a></p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code><div class=""><div>... | [
{
"answer_id": 74675723,
"author": "August Vilakia",
"author_id": 20314495,
"author_profile": "https://Stackoverflow.com/users/20314495",
"pm_score": 3,
"selected": true,
"text": "stringstream ostream ostream ostream stringstream stringstream s1(\"hello I am string stream\");\nstreambuf ... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74675452",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20327977/"
] |
74,675,467 | <p>I have a MSSQL database table <code>Events</code>. I am worried that performance could be improved.</p>
<pre><code>EventId LocationId Start End Quantity Price Currency
1 4 2022-08-31 22:00:00.0000000 +02:00 2022-08-31 23:00:00.0000000 +02:0... | [
{
"answer_id": 74677135,
"author": "Martin Smith",
"author_id": 73226,
"author_profile": "https://Stackoverflow.com/users/73226",
"pm_score": 2,
"selected": false,
"text": "LocationId End Start LocationId, End LocationId, Start key LocationId, Start LocationId, End Start < @end INCLUDE (... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74675467",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19331755/"
] |
74,675,507 | <p>Probably a dumb question but I'm using toTimestamp(now()) to retrieve the timestamp. Is there any way to offset the now() by my specified timeframe.</p>
<p>What I have now:</p>
<pre><code>> print(session.execute('SELECT toTimestamp(now()) FROM system.local').one())
2022-12-04 12:12:47.011000
</code></pre>
<p>My g... | [
{
"answer_id": 74677135,
"author": "Martin Smith",
"author_id": 73226,
"author_profile": "https://Stackoverflow.com/users/73226",
"pm_score": 2,
"selected": false,
"text": "LocationId End Start LocationId, End LocationId, Start key LocationId, Start LocationId, End Start < @end INCLUDE (... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74675507",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17671554/"
] |
74,675,512 | <p>Update, I have created a signal file like this, so for example if an employer has created a shift, the admin will get an email notification like this:</p>
<pre><code>from django.db.models.signals import post_save
from django.dispatch import receiver
from .models import Shift
from django.core.mail import send_mail
... | [
{
"answer_id": 74677135,
"author": "Martin Smith",
"author_id": 73226,
"author_profile": "https://Stackoverflow.com/users/73226",
"pm_score": 2,
"selected": false,
"text": "LocationId End Start LocationId, End LocationId, Start key LocationId, Start LocationId, End Start < @end INCLUDE (... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74675512",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11118289/"
] |
74,675,514 | <p>I have tried everything to serve my media file but yet getting same 404 error. Please guide.</p>
<p>My docker-compose file:</p>
<pre><code>version: "3.9"
services:
nginx:
container_name: realestate_preprod_nginx_con
build: ./nginx
volumes:
- static_volume:/home/inara/RealEstatePrePr... | [
{
"answer_id": 74677135,
"author": "Martin Smith",
"author_id": 73226,
"author_profile": "https://Stackoverflow.com/users/73226",
"pm_score": 2,
"selected": false,
"text": "LocationId End Start LocationId, End LocationId, Start key LocationId, Start LocationId, End Start < @end INCLUDE (... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74675514",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20681969/"
] |
74,675,562 | <p>I'm currently training on codewars, and today was multiples of 3 and 5.
I tried with a casual solution using reduce + ternary, and it worked.</p>
<p>I then tried to solve it with recusrive function.
Instructions are as follow :</p>
<p>If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3... | [
{
"answer_id": 74675592,
"author": "yanai edri",
"author_id": 5841996,
"author_profile": "https://Stackoverflow.com/users/5841996",
"pm_score": 3,
"selected": true,
"text": "function solution(number) {\n // Base case: return 0 if the number is negative\n if (number < 0) {\n return 0... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74675562",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8002971/"
] |
74,675,584 | <p>I have a table like this-</p>
<pre><code>Hotel Earning
Abu 1000
Zain 400
Show 500
Zint 300
Abu 500
Zain 700
Abu 500
Abu 500
Abu 800
Abu 1600
Show 1300
Zint 600
... | [
{
"answer_id": 74675592,
"author": "yanai edri",
"author_id": 5841996,
"author_profile": "https://Stackoverflow.com/users/5841996",
"pm_score": 3,
"selected": true,
"text": "function solution(number) {\n // Base case: return 0 if the number is negative\n if (number < 0) {\n return 0... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74675584",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20538008/"
] |
74,675,595 | <p>This is the code I came up with so far. The goal is to generate a table 10x10 just like in the image <a href="https://i.stack.imgur.com/7yQ4s.jpg" rel="nofollow noreferrer">what i need</a></p>
<p>The problem that I can't seem to understand is why it doesn't generate zeros and the last number 27 and just throws every... | [
{
"answer_id": 74675705,
"author": "shaham",
"author_id": 15030723,
"author_profile": "https://Stackoverflow.com/users/15030723",
"pm_score": 0,
"selected": false,
"text": " values[i][j] = n++;\n\n System.out.printf(values[i][j] + \" \");\n \n"
},
{
"answer_id": 74675758... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74675595",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20616194/"
] |
74,675,632 | <p>I have the following code</p>
<pre class="lang-py prettyprint-override"><code>(Pdb) set(range(2, 2)).issubset(set(range(10, 95)))
True
</code></pre>
<p>and I don't understand why it's returning <code>True</code>. <code>issubset</code> is supposed to check if a set contains all the items of another set, but <code>2</... | [
{
"answer_id": 74675705,
"author": "shaham",
"author_id": 15030723,
"author_profile": "https://Stackoverflow.com/users/15030723",
"pm_score": 0,
"selected": false,
"text": " values[i][j] = n++;\n\n System.out.printf(values[i][j] + \" \");\n \n"
},
{
"answer_id": 74675758... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74675632",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/940158/"
] |
74,675,639 | <p>I am trying to set the <code>defaultValue</code> for on the <code><Select /></code> component from react-select package.</p>
<p>However, when I do set the default value, using a react hook (useState), it does not render the default values.</p>
<p>If I was to hard code the array, it renders he default values fi... | [
{
"answer_id": 74675870,
"author": "Swaraj Gandhi",
"author_id": 2125838,
"author_profile": "https://Stackoverflow.com/users/2125838",
"pm_score": 2,
"selected": true,
"text": "import React, { useEffect, useState } from \"react\";\nimport Select from \"react-select\";\n\nexport default f... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74675639",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12129150/"
] |
74,675,664 | <p>I need to check if 24 hours have passed between two dates. If 24 hours have passed, I will update the data in my room database, if not, I will not. How can I do that. I thought about keeping a date with shared preferences and comparing that date with the current date, but I don't know how to do that.</p>
| [
{
"answer_id": 74675870,
"author": "Swaraj Gandhi",
"author_id": 2125838,
"author_profile": "https://Stackoverflow.com/users/2125838",
"pm_score": 2,
"selected": true,
"text": "import React, { useEffect, useState } from \"react\";\nimport Select from \"react-select\";\n\nexport default f... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74675664",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18002913/"
] |
74,675,698 | <p>I have 2 scripts one on player :</p>
<pre><code>using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerPositionCorrection : MonoBehaviour
{
Transform _playerTransform;
public float _xAxys;
public float _newXAxys;
public GameObject _changerPlayerPosition;
... | [
{
"answer_id": 74675870,
"author": "Swaraj Gandhi",
"author_id": 2125838,
"author_profile": "https://Stackoverflow.com/users/2125838",
"pm_score": 2,
"selected": true,
"text": "import React, { useEffect, useState } from \"react\";\nimport Select from \"react-select\";\n\nexport default f... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74675698",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14730288/"
] |
74,675,713 | <p>Below is the problem I found on the internet.</p>
<pre><code>int main()
{
int a[4] = { 10, 21, 32, 43};
int *p = a + 3;
++*--p;
++*p--;
p[2] += p[1];
for (int i = 0; i < 4; ++i)
printf("%d - %d\t", a[i]);
return 0;
}
</code></pre>
<p>//What will be the outp... | [
{
"answer_id": 74675870,
"author": "Swaraj Gandhi",
"author_id": 2125838,
"author_profile": "https://Stackoverflow.com/users/2125838",
"pm_score": 2,
"selected": true,
"text": "import React, { useEffect, useState } from \"react\";\nimport Select from \"react-select\";\n\nexport default f... | 2022/12/04 | [
"https://Stackoverflow.com/questions/74675713",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13341238/"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.