qid int64 4 19.1M | question stringlengths 18 48.3k | answers list | date stringlengths 10 10 | metadata list |
|---|---|---|---|---|
74,348,635 | <p>My input dataframe looks like this:</p>
<pre class="lang-none prettyprint-override"><code>+----------+-------+-------+
| timestamp| weight| id|
+----------+-------+-------+
|01-01-2022| 123| abc123|
|02-02-2022| 456| def456|
|03-03-2022| 789| ghi789|
+----------+-------+-------+
</code></pre>
<p>The go... | [
{
"answer_id": 74350390,
"author": "Vaebhav",
"author_id": 9108912,
"author_profile": "https://Stackoverflow.com/users/9108912",
"pm_score": 2,
"selected": true,
"text": "create_map F.lit(column_name) map_concat data = [('01-01-2022', 123, 'abc123'), ('02-02-2022', 456, 'def456'), ('03-0... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74348635",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7079271/"
] |
74,348,640 | <p>I am trying to create this query (to use it as a KPI in the dashboard section) but I am getting the below error <strong>Divide by zero</strong></p>
<p>The query that I am using:</p>
<pre><code>with cte_ext as (
select count(*) as total_count
from snowflake.account_usage.query_history
where start_time = :daterange... | [
{
"answer_id": 74350390,
"author": "Vaebhav",
"author_id": 9108912,
"author_profile": "https://Stackoverflow.com/users/9108912",
"pm_score": 2,
"selected": true,
"text": "create_map F.lit(column_name) map_concat data = [('01-01-2022', 123, 'abc123'), ('02-02-2022', 456, 'def456'), ('03-0... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74348640",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20121612/"
] |
74,348,644 | <p>I was working on a simple portfolio webpage and was making three boxes that includes one image each and some information.</p>
<p>The text in each box are aligned in the center but the image sticks on the left side of the box. I'm not sure why the text and the image are not aligned together.</p>
<p>here is the code o... | [
{
"answer_id": 74348769,
"author": "Hein Htet Aung",
"author_id": 20441438,
"author_profile": "https://Stackoverflow.com/users/20441438",
"pm_score": 0,
"selected": false,
"text": " img {\n display: block;\n margin: auto;\n }\n"
},
{
"answer_id": 74348851,
... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74348644",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19337662/"
] |
74,348,691 | <p>I'm trying to get the HTML of Billboard's top 100 chart, but I keep getting only about half of the page.</p>
<p>I tried getting the page source using this code:</p>
<pre><code>from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager... | [
{
"answer_id": 74348814,
"author": "Prophet",
"author_id": 3485434,
"author_profile": "https://Stackoverflow.com/users/3485434",
"pm_score": 0,
"selected": false,
"text": "driver.implicitly_wait(10) print(driver.page_source) WebDriverWait expected_conditions time.sleep(10) driver.implici... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74348691",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18989951/"
] |
74,348,707 | <p>I have a Dataframe in python, with the data coming from a csv.
In the column "Date" I have a date (:)) but I don't know the date format. How can I detect it?</p>
<p>e.g.: I can have 05/05/2022. this can be M/D/Y or D/M/Y. I can manually understand it by looking at other entries, but I wish I can do it auto... | [
{
"answer_id": 74349496,
"author": "0x0fba",
"author_id": 20339407,
"author_profile": "https://Stackoverflow.com/users/20339407",
"pm_score": 1,
"selected": false,
"text": "pytz dateutil dateutil from dateutil.parser import parse\n\nparse('05/05/2022') # datetime.datetime(2022, 5, 5, 0,... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74348707",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20441382/"
] |
74,348,725 | <p>I am in the process of migrating a very large multisite installation to newer OS platforms. Running ClearCase 9. In one particular migration stage all the VOBs appear to have migrated correctly, ct lsvob -s -host xxxx shows no VOBs remaining on the old server, but now I am getting packets stuck in the incoming bin o... | [
{
"answer_id": 74349496,
"author": "0x0fba",
"author_id": 20339407,
"author_profile": "https://Stackoverflow.com/users/20339407",
"pm_score": 1,
"selected": false,
"text": "pytz dateutil dateutil from dateutil.parser import parse\n\nparse('05/05/2022') # datetime.datetime(2022, 5, 5, 0,... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74348725",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4196455/"
] |
74,348,738 | <p>I'm trying to add opacity to my background in CSS, but the navbar is getting the opacity and not the background.</p>
<p>I don't know what I'm doing wrong.</p>
<p>I tried to change the body tag in CSS, but the navbar is getting the opacity and not the background.</p>
<pre class="lang-css prettyprint-override"><code>... | [
{
"answer_id": 74349496,
"author": "0x0fba",
"author_id": 20339407,
"author_profile": "https://Stackoverflow.com/users/20339407",
"pm_score": 1,
"selected": false,
"text": "pytz dateutil dateutil from dateutil.parser import parse\n\nparse('05/05/2022') # datetime.datetime(2022, 5, 5, 0,... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74348738",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17716431/"
] |
74,348,765 | <p>I have a DLL in pure C code. I would like to find a way to remove the library name prefix from the functions, classes, and structs; EX:</p>
<pre><code>// lib.h
void foobar();
</code></pre>
<pre><code>// lib.hpp
namespace foo {
bar();
}
</code></pre>
<p>I would like to avoid simply writing a wrapper for every fun... | [
{
"answer_id": 74348897,
"author": "hyde",
"author_id": 1717300,
"author_profile": "https://Stackoverflow.com/users/1717300",
"pm_score": 1,
"selected": false,
"text": "// lib.hpp\nnamespace foo {\n constexpr auto bar = foobar;\n}\n constexpr inline static"
},
{
"answer_id": 7... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74348765",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17895879/"
] |
74,348,776 | <p>After adding the item to the array.it is not show means not render.</p>
<p>i am try myself but no success</p>
<p>my code It below you can run it online</p>
<pre><code>import React,{useState,useEffect} from 'react';
import { StyleSheet, Text, View,TouchableOpacity,ScrollView} from 'react-native';
export default f... | [
{
"answer_id": 74348855,
"author": "Martin Omacht",
"author_id": 4551645,
"author_profile": "https://Stackoverflow.com/users/4551645",
"pm_score": 1,
"selected": false,
"text": "dummyarray.push(...) useState setDummyArray(prevArr => [...prevArr, {id:2, product:\"mobile phone\"}])"
},
... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74348776",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20424966/"
] |
74,348,848 | <p>I have a header that works perfectly fine in its own html file and I have a product details page that also is fine on its own. When I add the header to the product page it messes up entirely and pushes the header out of the way, placing part of the product details to the right of the header.</p>
<p>I tried using ins... | [
{
"answer_id": 74348855,
"author": "Martin Omacht",
"author_id": 4551645,
"author_profile": "https://Stackoverflow.com/users/4551645",
"pm_score": 1,
"selected": false,
"text": "dummyarray.push(...) useState setDummyArray(prevArr => [...prevArr, {id:2, product:\"mobile phone\"}])"
},
... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74348848",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14571351/"
] |
74,348,854 | <p>While refactoring my angular application I basically want to get rid of all subscriptions in order to use only <code>async</code> pipe provided by angular (just a declarative approach instead of an imperative one).</p>
<p>I have problems to implement a declarative approach when multiple sources can lead to changes i... | [
{
"answer_id": 74349095,
"author": "MGX",
"author_id": 20059754,
"author_profile": "https://Stackoverflow.com/users/20059754",
"pm_score": 0,
"selected": false,
"text": "EventEmitter <button (click)=\"remove$.next(i)\">remove</button>\n <button (click)=\"removeItem(item, i)\">remove</but... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74348854",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17298437/"
] |
74,348,859 | <p>Is there a way to bring a database offline in Sybase ASE 16.0?</p>
<p>I know a database gets set offline when loading a dump, but that can't be the only way to set a database offline.</p>
<p><br>There is also an <a href="https://accounts.sap.com/saml2/idp/sso?SAMLRequest=fZJRT8IwFIX%2FytL3sW6BIA2QIMRIgriw6YNvpbuTJlt... | [
{
"answer_id": 74351695,
"author": "markp-fuso",
"author_id": 7366100,
"author_profile": "https://Stackoverflow.com/users/7366100",
"pm_score": 0,
"selected": false,
"text": "dbcc dbreboot('shutdown',<dbname1>[,<dbname2>, ...,<dbnameN>])\n online database dbcc dbreboot('restart',<dbname>... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74348859",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19745277/"
] |
74,348,870 | <p>Created empty project of nuxt 3.0.0-rc13 using <code>pnpm dlx nuxi init nuxt-app</code>, dependencies installed using <code>pnpm install --shamefully-hoist</code>.</p>
<p>Deployment server started using <code>pnpm dev</code> but requests end with 500. Error says <code>request to http://localhost:3000/__nuxt_vite_nod... | [
{
"answer_id": 74352235,
"author": "kissu",
"author_id": 8816585,
"author_profile": "https://Stackoverflow.com/users/8816585",
"pm_score": 2,
"selected": true,
"text": "v16.18.0 v18.12.1"
}
] | 2022/11/07 | [
"https://Stackoverflow.com/questions/74348870",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5941712/"
] |
74,348,874 | <p>So I have an array of images, which I would like to hide or show on a click of a button.
right now when I try to hide the image, it will hide the entire array.</p>
<pre><code> import "./main.css";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import React, { useEffect, useSt... | [
{
"answer_id": 74352235,
"author": "kissu",
"author_id": 8816585,
"author_profile": "https://Stackoverflow.com/users/8816585",
"pm_score": 2,
"selected": true,
"text": "v16.18.0 v18.12.1"
}
] | 2022/11/07 | [
"https://Stackoverflow.com/questions/74348874",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18474470/"
] |
74,348,887 | <p>I have two array of objects with no common properties:</p>
<pre><code>let a = [
{id: 1},
{id: 2},
{id: 3},
];
let b = [
{day: 12},
{day: 15}
];
</code></pre>
<p>I want to merge the props of <code>b</code> into <code>a</code>. Initially, I tried</p>
<pre><code>let m = a.map((i,x) => ({id: i.id, day: b[... | [
{
"answer_id": 74348958,
"author": "Nina Scholz",
"author_id": 1447675,
"author_profile": "https://Stackoverflow.com/users/1447675",
"pm_score": 3,
"selected": true,
"text": "undefined const\n a = [{ id: 1 }, { id: 2 }, { id: 3 }],\n b = [{ day: 12 }, { day: 15 }],\n m = a.map((... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74348887",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/435867/"
] |
74,348,933 | <p>I have a data frame</p>
<pre><code>df<-data.frame(id=rep(1:10,each=10),
Room1=rnorm(100,0.4,0.5),
Room2=rnorm(100,0.3,0.5),
Room3=rnorm(100,0.7,0.5))
</code></pre>
<p>I want to mutate Room1 column by group (those in id = 10) using case_when:</p>
<pre><code>data <- d... | [
{
"answer_id": 74349091,
"author": "zephryl",
"author_id": 17303805,
"author_profile": "https://Stackoverflow.com/users/17303805",
"pm_score": 3,
"selected": true,
"text": "id dplyr::percent_rank(runif(n())) <= .2 id case_when() if_else() set.seed(13)\nlibrary(dplyr) \n\ndata <- df %>%\... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74348933",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11261595/"
] |
74,348,938 | <p>Let's take a sample dataframe :</p>
<pre><code>df = pd.DataFrame({"Date": ["2022-10-01","2022-10-02","2022-10-03","2022-10-04","2022-10-05","2022-10-06","2022-10-01","2022-10-02","2022-10-03","2022-10-04",&q... | [
{
"answer_id": 74348999,
"author": "mozway",
"author_id": 16343464,
"author_profile": "https://Stackoverflow.com/users/16343464",
"pm_score": 3,
"selected": true,
"text": "ffill bfill df['Quantity'] = (df.groupby('Animal', group_keys=False)['Quantity']\n .apply(lambda ... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74348938",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12292032/"
] |
74,348,945 | <p>I am trying to make inventory functionality using Discord.js and struggling on how to push an item to the array inside JSON Object.
Inside the JSON, every user with unique 'userID' has their own array 'inventory'.</p>
<p>The thing I want to achieve is:
After user types 'get' command in the chat, the item is pushed t... | [
{
"answer_id": 74349270,
"author": "Caladan",
"author_id": 17641423,
"author_profile": "https://Stackoverflow.com/users/17641423",
"pm_score": 2,
"selected": true,
"text": "const inventory = {\n \"userID\": {\n \"inventory\": [\"testOne\"]\n }\n}\n\nconst item = \"test\"\nconst user... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74348945",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17525276/"
] |
74,348,990 | <p>I have a table that contains the columns name age and Dept. I am new to report builder and wanted to know if there is a way possible to create dynamic tables based on distinct departments in the base table</p>
<p>Below is the base data</p>
<p><a href="https://i.stack.imgur.com/nGn6o.png" rel="nofollow noreferrer"><i... | [
{
"answer_id": 74349270,
"author": "Caladan",
"author_id": 17641423,
"author_profile": "https://Stackoverflow.com/users/17641423",
"pm_score": 2,
"selected": true,
"text": "const inventory = {\n \"userID\": {\n \"inventory\": [\"testOne\"]\n }\n}\n\nconst item = \"test\"\nconst user... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74348990",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16144034/"
] |
74,349,047 | <p>I can't write to firestore. It's working for Storage and Realtime Database, but not for firestore, can you suggest where the issue might be?</p>
<p><strong>firebase.js</strong></p>
<pre><code>import { getFirestore } from "firebase/firestore";
const firebaseConfig = {
...
};
// Initialize Firebase
const... | [
{
"answer_id": 74352428,
"author": "Christian Paul Andaya",
"author_id": 19229284,
"author_profile": "https://Stackoverflow.com/users/19229284",
"pm_score": 0,
"selected": false,
"text": "export const CheckoutForm = async (uid) => {\n console.log(\"object 1\")\n try {\n const ... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349047",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19277463/"
] |
74,349,104 | <pre><code>data = [['Tom', '5-123g'], ['Max', '6-745.0d'], ['Bob', '5-900.0e'], ['Ben', '2-345',], ['Eva', '9-712.x']]
df = pd.DataFrame(data, columns=['Person', 'Action'])
</code></pre>
<p>I want to shorten the "Action" column to a length of 5. My current df has two columns:</p>
<pre><code>['Person'] and ['A... | [
{
"answer_id": 74352428,
"author": "Christian Paul Andaya",
"author_id": 19229284,
"author_profile": "https://Stackoverflow.com/users/19229284",
"pm_score": 0,
"selected": false,
"text": "export const CheckoutForm = async (uid) => {\n console.log(\"object 1\")\n try {\n const ... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349104",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19526103/"
] |
74,349,107 | <p>I've been trying to create a simple component with a styled checkbox and a corresponding label. The values (strings) of all selected checkboxes should be stored in an array. This works well with plain html checkboxes:</p>
<pre><code>
<template>
<div>
<div class="mt-6">
<div... | [
{
"answer_id": 74349381,
"author": "Nikola Pavicevic",
"author_id": 11989189,
"author_profile": "https://Stackoverflow.com/users/11989189",
"pm_score": 2,
"selected": false,
"text": "const { ref } = Vue\nconst app = Vue.createApp({\n setup() {\n const status = ref([{label: 'EVO', sta... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349107",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1973005/"
] |
74,349,110 | <p><a href="https://permalink.geldersarchief.nl/8A0A3B746F8147888ADF8FCA559F119B" rel="nofollow noreferrer">https://permalink.geldersarchief.nl/8A0A3B746F8147888ADF8FCA559F119B</a></p>
<p>this archive has 500 images i want to download and perform OCR on. I have already found this code online that downloads some images,... | [
{
"answer_id": 74349381,
"author": "Nikola Pavicevic",
"author_id": 11989189,
"author_profile": "https://Stackoverflow.com/users/11989189",
"pm_score": 2,
"selected": false,
"text": "const { ref } = Vue\nconst app = Vue.createApp({\n setup() {\n const status = ref([{label: 'EVO', sta... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349110",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20441625/"
] |
74,349,111 | <p>i want to handle the probable errors of <code>mysql db</code>. in my case, i have <code>users</code> table that has 7 columns. column <code>email</code> and <code>username</code> values should be unique and i set that for them. but in my sign up form, when users enter and submit their account infos, their entered us... | [
{
"answer_id": 74349381,
"author": "Nikola Pavicevic",
"author_id": 11989189,
"author_profile": "https://Stackoverflow.com/users/11989189",
"pm_score": 2,
"selected": false,
"text": "const { ref } = Vue\nconst app = Vue.createApp({\n setup() {\n const status = ref([{label: 'EVO', sta... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349111",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18526209/"
] |
74,349,143 | <p>Many of our build pipelines include a "command line" task that is used to create a "setup.exe" from the contents of the build output folder ("\agent_work\nn\<strong>s</strong>\..."). The location of this folder is accessed via the build variable <code>$(system.defaultworkingdirectory)</... | [
{
"answer_id": 74361967,
"author": "Andrew Stephens",
"author_id": 981831,
"author_profile": "https://Stackoverflow.com/users/981831",
"pm_score": 0,
"selected": false,
"text": "\\[agent]\\_work\\35\\s\\...\\x64\\release\\\n $(Build.ArtifactStagingDirectory) \\[agent]\\_work\\35\\a\\\n [... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349143",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/981831/"
] |
74,349,144 | <p>I need to perform some action inside a catch block then <em>throw the same exception I got</em>:</p>
<pre class="lang-cpp prettyprint-override"><code>#include <string>
#include <iostream>
class AbstractError {
public:
virtual std::string toString() const = 0;
};
class SomeConcreteError : public Abst... | [
{
"answer_id": 74349200,
"author": "Ted Lyngmo",
"author_id": 7582247,
"author_profile": "https://Stackoverflow.com/users/7582247",
"pm_score": 4,
"selected": true,
"text": "e throw e;\n throw;\n"
},
{
"answer_id": 74349220,
"author": "Useless",
"author_id": 212858,
"... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349144",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3357352/"
] |
74,349,242 | <p>I have a data frame with one variable, x. I want to create a new variable y which is equal to 1 when x decreases by 2 from its previous value and equal to 0 otherwise. Then I want to create a variable z which holds the value of x when y was last equal to 1. I want the initial value of z to be 0. I haven't been able ... | [
{
"answer_id": 74349357,
"author": "sindri_baldur",
"author_id": 4552295,
"author_profile": "https://Stackoverflow.com/users/4552295",
"pm_score": 1,
"selected": false,
"text": "df$y = 0L\ndf$y[-1] = (diff(df$x) == -2L)\ndf$z = data.table::nafill(ifelse(df$y == 1L, df$x, NA), \"l... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349242",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20441342/"
] |
74,349,290 | <p>Thanks to help from stackoverflow, I arrived at the command below. But <code>"match a single character not present in the set"</code> does not work as I expect. The first capture <code>([^"][^\n,]*)</code>should stop at <code>",</code> or <code>"\n</code> , but currently only stops at <code>... | [
{
"answer_id": 74349357,
"author": "sindri_baldur",
"author_id": 4552295,
"author_profile": "https://Stackoverflow.com/users/4552295",
"pm_score": 1,
"selected": false,
"text": "df$y = 0L\ndf$y[-1] = (diff(df$x) == -2L)\ndf$z = data.table::nafill(ifelse(df$y == 1L, df$x, NA), \"l... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349290",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19017877/"
] |
74,349,303 | <p>We have an app developed using IONIC CORDOVA. When I am trying to upload app on the play store then it gives an error
"Apps targeting Android 12 and higher are required to specify an explicit value for android:exported"</p>
<p>I am using cordova-android: 8.0.0</p>
<p>If I am using cordova-android:10.1.0 th... | [
{
"answer_id": 74430793,
"author": "Mathieu",
"author_id": 20500007,
"author_profile": "https://Stackoverflow.com/users/20500007",
"pm_score": 1,
"selected": false,
"text": "<activity\n android:name=\".MainActivity\"\n android:exported=\"true\">\n </activity>... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349303",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7051774/"
] |
74,349,333 | <p>I have a 2D array I created using this,</p>
<pre><code>import numpy as np
arr = np.arange(4)
arr_2d = arr.reshape(2,2)
</code></pre>
<p>The array looks like this</p>
<pre><code>print(arr_2d)
[[0, 1],
[2, 3]]
</code></pre>
<p>I am trying to get the location of each entry in <code>arr_2d</code> as an x, y coordin... | [
{
"answer_id": 74349511,
"author": "John",
"author_id": 4380147,
"author_profile": "https://Stackoverflow.com/users/4380147",
"pm_score": 0,
"selected": false,
"text": "import numpy as np\n\narr = np.arange(4)\narr_2d = arr.reshape(2,2) \n\narr_2d[1][0] = 5 # to illustrate a point\n\npr... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349333",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12100655/"
] |
74,349,373 | <p>I'm trying to use delegated properties in Kotlin to provide some type safety to application preferences that are persisted to a non-typed store. The store is semanitcally a bit like some type of <code>Map<String,Any></code>, although it doesn't implement that specific class.</p>
<p>The problem i have is that i... | [
{
"answer_id": 74349511,
"author": "John",
"author_id": 4380147,
"author_profile": "https://Stackoverflow.com/users/4380147",
"pm_score": 0,
"selected": false,
"text": "import numpy as np\n\narr = np.arange(4)\narr_2d = arr.reshape(2,2) \n\narr_2d[1][0] = 5 # to illustrate a point\n\npr... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349373",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/352740/"
] |
74,349,408 | <p>I would like the appBar title of my Scaffold to display the total number of items (length) in a Firebase Query at launch, but it keeps returning <code>Instance of 'Future<int>'</code>. How can I fix this?</p>
<p>Here's my code:</p>
<pre><code>Query itemList = FirebaseFirestore.instance
.collection('simp... | [
{
"answer_id": 74349508,
"author": "VincentDR",
"author_id": 19540575,
"author_profile": "https://Stackoverflow.com/users/19540575",
"pm_score": 2,
"selected": false,
"text": "AppBar(\n title: FutureBuilder<String>(\n future: itemCount(), \n builder: (BuildContext ... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349408",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6188976/"
] |
74,349,425 | <p>I am trying to get bug to work, but am having no luck, the parts marked as abstract need to stay that way seeing as it is specified as such in the question I am trying to answer.</p>
<pre><code> abstract class Worker
{
protected string name;
protected int ID;
protected abstract int exp... | [
{
"answer_id": 74349498,
"author": "L01NL",
"author_id": 686023,
"author_profile": "https://Stackoverflow.com/users/686023",
"pm_score": 0,
"selected": false,
"text": "Worker Labourer Labourer labourer = new Labourer(); new Worker() Worker class Labourer : Worker \n{\n public Labourer(... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349425",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20377406/"
] |
74,349,459 | <p>I am writing a code to get the p-value in Python.</p>
<pre><code>def adfuller_test(GDP):
result=adfuller(GDP)
labels = ['ADF Test Statistic','p-value','#Lags Used','Number of Observations']
for value,label in zip(result,labels):
print(label+' : '+str(value) )
if result[1] <= 0.05:
... | [
{
"answer_id": 74349498,
"author": "L01NL",
"author_id": 686023,
"author_profile": "https://Stackoverflow.com/users/686023",
"pm_score": 0,
"selected": false,
"text": "Worker Labourer Labourer labourer = new Labourer(); new Worker() Worker class Labourer : Worker \n{\n public Labourer(... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349459",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14787592/"
] |
74,349,470 | <p>I'm trying to write a function which will free a dynamically allocated string by sending the address of the string (char*) to the function. (Sending char**)</p>
<p>I have tried doing it like this:</p>
<pre><code>void dstring_delete(DString* stringToDelete)
{
// Precondition: stringToDelete is not NULL
asser... | [
{
"answer_id": 74350279,
"author": "Ian Abbott",
"author_id": 5264491,
"author_profile": "https://Stackoverflow.com/users/5264491",
"pm_score": 1,
"selected": false,
"text": "str1 dstring_delete(&str1);\n assert(str1 == NULL);\n dstring_delete void dstring_delete(DString* stringTo... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349470",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20397507/"
] |
74,349,488 | <p>So, i have a list of objcets in an array stored in the databse. I am trying to display the object at the last index position using map function. It keeps displaying all the objects in the array,but i only want to show the last object. I will appreciate any help.</p>
<pre><code>import React, { Component } from 'react... | [
{
"answer_id": 74350279,
"author": "Ian Abbott",
"author_id": 5264491,
"author_profile": "https://Stackoverflow.com/users/5264491",
"pm_score": 1,
"selected": false,
"text": "str1 dstring_delete(&str1);\n assert(str1 == NULL);\n dstring_delete void dstring_delete(DString* stringTo... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349488",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18705872/"
] |
74,349,505 | <p>i have a custom package with a custom content element. The data (header + bodytext) of the custom element is stored in tt_content. This content element now needs a connection to a record of tt_address. Therefore i extendet tt_content with a field named address_uid.</p>
<p>My idea is to load all records (respectively... | [
{
"answer_id": 74350279,
"author": "Ian Abbott",
"author_id": 5264491,
"author_profile": "https://Stackoverflow.com/users/5264491",
"pm_score": 1,
"selected": false,
"text": "str1 dstring_delete(&str1);\n assert(str1 == NULL);\n dstring_delete void dstring_delete(DString* stringTo... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349505",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15648489/"
] |
74,349,519 | <p>I'm new to python and pandas. I have a data set with the columns age, sex, bmi, children, smoker, region, charges. I want to write a query to count all the smokers that answered "yes" based on their region. the regions can only be northwest, northeast, southwest, southeast.</p>
<p>I have tried several grou... | [
{
"answer_id": 74350279,
"author": "Ian Abbott",
"author_id": 5264491,
"author_profile": "https://Stackoverflow.com/users/5264491",
"pm_score": 1,
"selected": false,
"text": "str1 dstring_delete(&str1);\n assert(str1 == NULL);\n dstring_delete void dstring_delete(DString* stringTo... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349519",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20441929/"
] |
74,349,523 | <p>Is there a way to create a table inside a Quarto document without applying the doc's theme to the HTML table.</p>
<p>Usually I use <code>as_raw_html()</code> to avoid the Quarto style. But in my current use-case, my table contains a custom ggplot which is removed when I use <code>as_raw_html()</code>.</p>
<p>I've tr... | [
{
"answer_id": 74350279,
"author": "Ian Abbott",
"author_id": 5264491,
"author_profile": "https://Stackoverflow.com/users/5264491",
"pm_score": 1,
"selected": false,
"text": "str1 dstring_delete(&str1);\n assert(str1 == NULL);\n dstring_delete void dstring_delete(DString* stringTo... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349523",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13679911/"
] |
74,349,552 | <p>Im trying to build a program that does stock-analys.</p>
<p>I have a file that contains a string (the company name) followed by a lot of values.
I want my function to open the txt file and read trough it until it find the given variable name e.x "Apple", and then it should return a dictonary of the 30 next... | [
{
"answer_id": 74350279,
"author": "Ian Abbott",
"author_id": 5264491,
"author_profile": "https://Stackoverflow.com/users/5264491",
"pm_score": 1,
"selected": false,
"text": "str1 dstring_delete(&str1);\n assert(str1 == NULL);\n dstring_delete void dstring_delete(DString* stringTo... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349552",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20119030/"
] |
74,349,626 | <p>I have an issue with my popup form in my note-taking project. I have a popup form that shows up if user wants to edit a note, and that popup should already have the contents of the note they chose to edit. The form is showing the correct contents, but also I noticed that when I click on "Edit", it takes tw... | [
{
"answer_id": 74351296,
"author": "marzelin",
"author_id": 5664434,
"author_profile": "https://Stackoverflow.com/users/5664434",
"pm_score": 2,
"selected": false,
"text": "changeNotes noteToEdit Edit Edit"
},
{
"answer_id": 74360592,
"author": "01nowicj",
"author_id": 17... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349626",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17965573/"
] |
74,349,630 | <p>I want to bring the menu to the center, but I still do not know how to do it.
O yeah, I use actions and TextButton to put it</p>
<p><a href="https://i.stack.imgur.com/fXiXE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fXiXE.png" alt="enter image description here" /></a></p>
<p>I have tried to p... | [
{
"answer_id": 74351296,
"author": "marzelin",
"author_id": 5664434,
"author_profile": "https://Stackoverflow.com/users/5664434",
"pm_score": 2,
"selected": false,
"text": "changeNotes noteToEdit Edit Edit"
},
{
"answer_id": 74360592,
"author": "01nowicj",
"author_id": 17... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349630",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19875840/"
] |
74,349,631 | <p>See:
<a href="https://www.oreilly.com/library/view/mastering-perl/9780596527242/ch02.html" rel="nofollow noreferrer">https://www.oreilly.com/library/view/mastering-perl/9780596527242/ch02.html</a></p>
<p>I'm having some trouble getting the perl Global Match Anchors \G to work with my input file proved below with my ... | [
{
"answer_id": 74353957,
"author": "ikegami",
"author_id": 589924,
"author_profile": "https://Stackoverflow.com/users/589924",
"pm_score": 2,
"selected": false,
"text": "$ perl -Mv5.14 -e'$_ = \"abc\"; /./g; /x/g; say $& if /./g;'\na\n /c $ perl -Mv5.14 -e'$_ = \"abc\"; /./gc; /x/... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349631",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11384455/"
] |
74,349,638 | <p>I am trying to make a Discord bot and one of the features is a welcoming from my bot using on_member_join. This is the event:</p>
<pre><code>@bot.event
async def on_member_join(member, self):
embed = discord.Embed(colour=discord.Colour(0x95efcc), description=f"Welcome to Rebellions server! You are the{len(l... | [
{
"answer_id": 74350418,
"author": "Wari",
"author_id": 15479314,
"author_profile": "https://Stackoverflow.com/users/15479314",
"pm_score": 2,
"selected": false,
"text": "async def on_member_join(member, self): self async def on_member_join(member): @client.event @bot.event @commands.Cog... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349638",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20177656/"
] |
74,349,643 | <p>I need to get the DNS server(s) from my network, I tried using:</p>
<pre class="lang-yaml prettyprint-override"><code>- hosts: localhost
gather_facts: no
tasks:
- name: check resolv.conf exists
stat:
path: /etc/resolv.conf
register: resolv_conf
- name: check nameservers list in resol... | [
{
"answer_id": 74350418,
"author": "Wari",
"author_id": 15479314,
"author_profile": "https://Stackoverflow.com/users/15479314",
"pm_score": 2,
"selected": false,
"text": "async def on_member_join(member, self): self async def on_member_join(member): @client.event @bot.event @commands.Cog... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349643",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7135687/"
] |
74,349,666 | <p>I am trying to output</p>
<pre><code>Grace was planning a dream vacation to Paris.
Grace was especially looking forward to trying the local
cuisine, including stinky soup and bananas.
Grace will have to practice the language quietly to
make it easier to jump with people.
Grace has a long list of sights to see, inc... | [
{
"answer_id": 74349768,
"author": "Nishesh Tyagi",
"author_id": 19539370,
"author_profile": "https://Stackoverflow.com/users/19539370",
"pm_score": -1,
"selected": false,
"text": "print( , name + \"was planning a dream vacation to \" ,place +\".\",name+ \"was especially looking forward ... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349666",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20441979/"
] |
74,349,671 | <p>Could someone help me with the last step of a query in a Django view please.</p>
<p>I have two tables.</p>
<pre><code>class Item(models.Model):
class Meta:
verbose_name_plural = 'Items'
name = models.CharField(max_length=30, null=True, blank=True)
def __str__(self):
return self.name
c... | [
{
"answer_id": 74349768,
"author": "Nishesh Tyagi",
"author_id": 19539370,
"author_profile": "https://Stackoverflow.com/users/19539370",
"pm_score": -1,
"selected": false,
"text": "print( , name + \"was planning a dream vacation to \" ,place +\".\",name+ \"was especially looking forward ... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349671",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19585980/"
] |
74,349,677 | <p>When I try to set the page to the default value from refresh function, it doesn't trigger the useEffect hook. But if I run the refresh function 2nd time it works fine. And this code also works fine for other values like 2, 3, 4, 5......</p>
<pre class="lang-js prettyprint-override"><code> const [goal, setGoal] = us... | [
{
"answer_id": 74349944,
"author": "JSEvgeny",
"author_id": 6131368,
"author_profile": "https://Stackoverflow.com/users/6131368",
"pm_score": 0,
"selected": false,
"text": "const [counter, setCounter] = useState(0)\n\nconst refresh = () => setCounter(counter + 1)\n useEffect"
},
{
... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349677",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11240893/"
] |
74,349,702 | <p>I am SQL native struggling with flux syntax (philosophy?) once again. Here is what I am trying to do: plot values of a certain measurement as a ratio of their historical average (say over the past month).</p>
<p>Here is as far as I have gotten:</p>
<pre><code>from(bucket: "secret_bucket")
|> range(sta... | [
{
"answer_id": 74359015,
"author": "Munin",
"author_id": 18488955,
"author_profile": "https://Stackoverflow.com/users/18488955",
"pm_score": 0,
"selected": false,
"text": "t1 = from(bucket: \"secret_bucket\")\n |> range(start: v.timeRangeStart, stop:v.timeRangeStop)\n |> filter(fn: (r)... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349702",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9819342/"
] |
74,349,703 | <p>I need an algorithm to quickly determine wether given 2D polygon arbitrarily translated intersects given rounded rectangle.</p>
<p>We're given a polygon with N vertices and dimensions of the rounded rectangle (lenghts of sides and radius of corners).
We would like to answer many question of type does the polygon wit... | [
{
"answer_id": 74350182,
"author": "Nelfeal",
"author_id": 3854570,
"author_profile": "https://Stackoverflow.com/users/3854570",
"pm_score": 1,
"selected": false,
"text": "x1 x2 y1 y2 x1 < x2 y1 < y2 R (x1, y1+R) (x1, y2-R) (x2, y1+R) (x2, y2-R) (x1+R, y1) (x1+R, y2) (x2-R, y1) (x2-R, y2... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349703",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1782685/"
] |
74,349,728 | <p>Clickhouse recently released the new <code>DELETE</code> query, that allows you to quickly mark data as deleted (<a href="https://clickhouse.com/docs/en/sql-reference/statements/delete/" rel="nofollow noreferrer">https://clickhouse.com/docs/en/sql-reference/statements/delete/</a>).
The actual data deletion is done i... | [
{
"answer_id": 74475199,
"author": "Slach",
"author_id": 1204665,
"author_profile": "https://Stackoverflow.com/users/1204665",
"pm_score": 1,
"selected": false,
"text": "ALTER TABLE ... DELETE WHERE ... SELECT * FROM system.muations WHERE is_done=0"
},
{
"answer_id": 74518371,
... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349728",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1279019/"
] |
74,349,759 | <p>I have this expression:</p>
<pre><code>echo '{"foo":"bar","boo":"moo"}' | jq -r '"\(.foo)|\(.boo)"'
bar|moo
</code></pre>
<p>Now, imagine that the filter is long, so I would like to break it into separate lines for readability while still producing the same output, c... | [
{
"answer_id": 74349824,
"author": "pmf",
"author_id": 2158479,
"author_profile": "https://Stackoverflow.com/users/2158479",
"pm_score": 3,
"selected": true,
"text": "+ echo '{\"foo\":\"bar\",\"boo\":\"moo\"}' | jq -r '\n \"\\(.foo)|\" +\n \"\\(.boo)\"\n'\n bar|moo\n"
},
{
"ans... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349759",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1739713/"
] |
74,349,761 | <p>can someone maybe tell me a better way to loop through a df in Pyspark in my specific case. I am new to spark, so sorry for the question.</p>
<p>What I am doing is selecting the value of the id column of the df where the song_name is null. I append these to a list and get the track_ids for these values. With these t... | [
{
"answer_id": 74349824,
"author": "pmf",
"author_id": 2158479,
"author_profile": "https://Stackoverflow.com/users/2158479",
"pm_score": 3,
"selected": true,
"text": "+ echo '{\"foo\":\"bar\",\"boo\":\"moo\"}' | jq -r '\n \"\\(.foo)|\" +\n \"\\(.boo)\"\n'\n bar|moo\n"
},
{
"ans... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349761",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20172897/"
] |
74,349,763 | <h2>Background</h2>
<p>I have a personal project that is an elixir desktop application for PC Windows. It works pretty well, but now I want to give it an icon.</p>
<p>This is usually done in the following module:</p>
<pre><code>defmodule WebInterface.Application do
# See https://hexdocs.pm/elixir/Application.html
#... | [
{
"answer_id": 74361898,
"author": "VZ.",
"author_id": 15275,
"author_profile": "https://Stackoverflow.com/users/15275",
"pm_score": 1,
"selected": false,
"text": "wxTopLevelWindow::SetIcons()"
}
] | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349763",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1337392/"
] |
74,349,766 | <p>I have an array, and I want to insert a new element inside it, shifting all other elements to the right:</p>
<pre><code>my @a = (2, 5, 4, 8, 1);
# insert 42 into position no. 2
</code></pre>
<p>Result expected:</p>
<pre><code>(2, 5, 42, 4, 8, 1);
</code></pre>
| [
{
"answer_id": 74349853,
"author": "Steffen Ullrich",
"author_id": 3081018,
"author_profile": "https://Stackoverflow.com/users/3081018",
"pm_score": 5,
"selected": true,
"text": "my @a = (2, 5, 4, 8, 1);\nsplice(@a, 2, 0, 42); # -> (2, 5, 42, 4, 8, 1)\n splice ARRAY or EXPR,OFFSET,LENG... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349766",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/187141/"
] |
74,349,790 | <p>I am using serverless for creating and deploying my lambda functions. I am using <code>Node.js - HTTP API</code> template from serverless. I have created few lambda functions and deployed them using command <code>sls deploy</code>.
The functions were deployed successfully and I am able to query lambda function resp... | [
{
"answer_id": 74401403,
"author": "Kaneki21",
"author_id": 19514458,
"author_profile": "https://Stackoverflow.com/users/19514458",
"pm_score": 0,
"selected": false,
"text": "CORS Access-Control-Allow-Headers"
},
{
"answer_id": 74406370,
"author": "pgrzesik",
"author_id":... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349790",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18468228/"
] |
74,349,792 | <p>I am writing a program rock-paper-scissors and I have a problem with a loop while which I solved with another loop if but I still wonder why it doesn't work(line 19, 71, 104; or just in functions game, game2, game3). I also want to ask if I can write this program better or use something more advance to write it shor... | [
{
"answer_id": 74350029,
"author": "BokiX",
"author_id": 16843389,
"author_profile": "https://Stackoverflow.com/users/16843389",
"pm_score": -1,
"selected": false,
"text": "import random\n\noptions = [\"rock\", \"paper\", \"scissors\"]\nyour_score = 0\ncomputer_score = 0\nmax_score = 3\n... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349792",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19720755/"
] |
74,349,795 | <p>I created an Azure Cognitive Search using a Cosmos DB SQL API database. I created the index and the indexer. My Cosmos DB database is refreshed daily. Hence, I created the indexer in my azure search to be refreshed on schedule. The problem I have now is my index. The index is duplicated and retrieves duplicate items... | [
{
"answer_id": 74350029,
"author": "BokiX",
"author_id": 16843389,
"author_profile": "https://Stackoverflow.com/users/16843389",
"pm_score": -1,
"selected": false,
"text": "import random\n\noptions = [\"rock\", \"paper\", \"scissors\"]\nyour_score = 0\ncomputer_score = 0\nmax_score = 3\n... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349795",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4788608/"
] |
74,349,828 | <p>I'd like to recode certain items in my data frame, those which contain an even number (N2, N4, N6, E2, etc.)
For each value of these selected columns I'd like to apply <code>abs(x-6)</code> (see my function). Then I need an additional 2 columns with the means of items of the same category: mean(N) and mean(E) for ea... | [
{
"answer_id": 74350029,
"author": "BokiX",
"author_id": 16843389,
"author_profile": "https://Stackoverflow.com/users/16843389",
"pm_score": -1,
"selected": false,
"text": "import random\n\noptions = [\"rock\", \"paper\", \"scissors\"]\nyour_score = 0\ncomputer_score = 0\nmax_score = 3\n... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349828",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20229686/"
] |
74,349,844 | <p>Lets say I have text file containing n integers :</p>
<pre><code>1
1
2
3
2
4
3
1
5
6
3
5
2
6
</code></pre>
<p>How to program a function to print those integers without repeating them?
My output should be :</p>
<pre><code>1
2
3
4
5
6
</code></pre>
<p>Note : Output should not be a text file.<br />
Note2 : File contain... | [
{
"answer_id": 74349895,
"author": "Visrut",
"author_id": 15063341,
"author_profile": "https://Stackoverflow.com/users/15063341",
"pm_score": 0,
"selected": false,
"text": "set set([1, 1, 2, 2, 3]) = {1, 2, 3}\n"
},
{
"answer_id": 74350025,
"author": "Bhargav",
"author_id... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349844",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17321772/"
] |
74,349,846 | <p>I have a dataframe such as:</p>
<pre><code>Groups Name Value
G1 BLOC_Homo_sapiens 100
G1 BLOC_Chimpenzee 99
G1 BLOC_Bonobo 80
G1 Canis_lupus 20
G1 Danio_rerio 10
G2 BLOC_Homo_sapiens 30
G2 BLOC_Bonobo 29
G2 Mus_musculus 28
G2 Cu... | [
{
"answer_id": 74349899,
"author": "mozway",
"author_id": 16343464,
"author_profile": "https://Stackoverflow.com/users/16343464",
"pm_score": 3,
"selected": true,
"text": "m = df['Name'].str.contains('BLOC')\n\ndf['diff_length'] = (df.groupby('Groups')['Value']\n .t... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349846",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12559770/"
] |
74,349,852 | <p>My table structure is roughly as described <a href="https://stackoverflow.com/q/74339151/4070848">in this post</a>:</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>name</th>
<th style="text-align: center;">processed</th>
<th style="text-align: center;">processing</th>
<th>updated</th>
<t... | [
{
"answer_id": 74349899,
"author": "mozway",
"author_id": 16343464,
"author_profile": "https://Stackoverflow.com/users/16343464",
"pm_score": 3,
"selected": true,
"text": "m = df['Name'].str.contains('BLOC')\n\ndf['diff_length'] = (df.groupby('Groups')['Value']\n .t... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349852",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4070848/"
] |
74,349,860 | <p>I have a 32bit Software written in C# who Communicates with many different devices.
Because of memory problems i upgraded to a 64bit System, no big Deal for the C# Software itself.
But for some of the implemented devices i had to change the way of implementation, it worked for all expect for one!
There i have a DLL ... | [
{
"answer_id": 74349899,
"author": "mozway",
"author_id": 16343464,
"author_profile": "https://Stackoverflow.com/users/16343464",
"pm_score": 3,
"selected": true,
"text": "m = df['Name'].str.contains('BLOC')\n\ndf['diff_length'] = (df.groupby('Groups')['Value']\n .t... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349860",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20441954/"
] |
74,349,871 | <p>I created a C# code for logging error codes.</p>
<p>I hardcoded the error codes into a class <code>RecordId</code> as <code>static int</code>s.</p>
<pre><code>public class RecordId
{
public static int UnknownCommand = 100;
public static int SoftwareVersion = 101;
public static int Wa... | [
{
"answer_id": 74350001,
"author": "Dmitry Bychenko",
"author_id": 2319407,
"author_profile": "https://Stackoverflow.com/users/2319407",
"pm_score": 1,
"selected": false,
"text": "// Let's have class being static if you don't want to create instances\npublic static class RecordId\n{\n ... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349871",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20396240/"
] |
74,349,884 | <p>I have this simple grid:</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-css lang-css prettyprint-override"><code>.outGrid {
display: grid;
grid-gap: 40px;
grid-template-columns: repeat(3, 1fr);
}
.item ... | [
{
"answer_id": 74350001,
"author": "Dmitry Bychenko",
"author_id": 2319407,
"author_profile": "https://Stackoverflow.com/users/2319407",
"pm_score": 1,
"selected": false,
"text": "// Let's have class being static if you don't want to create instances\npublic static class RecordId\n{\n ... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349884",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8720421/"
] |
74,349,889 | <p>hi i want to fire a scroll tag in all pages of my website except homepage with regular expressions in tag manager.
in this question homepage url means "site.com" and not means "site.com/home.html"
thanks for helping.</p>
<p>trying regex in tag manager</p>
| [
{
"answer_id": 74350001,
"author": "Dmitry Bychenko",
"author_id": 2319407,
"author_profile": "https://Stackoverflow.com/users/2319407",
"pm_score": 1,
"selected": false,
"text": "// Let's have class being static if you don't want to create instances\npublic static class RecordId\n{\n ... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349889",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11025738/"
] |
74,349,898 | <p>I got the result of a query, and want to join it with a mockup table to fill the rows up to a certain number. this is an example where the query has two rows as result, but i always want that to fill it up to 5 (see column <em>slot</em>)</p>
<pre><code>SELECT * FROM foo WHERE …
</code></pre>
<div class="s-table-con... | [
{
"answer_id": 74350009,
"author": "The Impaler",
"author_id": 6436191,
"author_profile": "https://Stackoverflow.com/users/6436191",
"pm_score": 2,
"selected": false,
"text": "with recursive g (n) as (select 1 union all select n + 1 from g where n < 5)\nselect g.n as slot, x.foo, x.bar\n... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349898",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/330658/"
] |
74,349,908 | <p>I would like to correct values in a df column based on results from another one.
This first line gives me the correct version of km based on another df named 'correction'.</p>
<pre><code>df['km_correct'] = df['task_object'].map(correction.set_index('task_object')['km_correct'])
</code></pre>
<p>Then I want to replac... | [
{
"answer_id": 74350009,
"author": "The Impaler",
"author_id": 6436191,
"author_profile": "https://Stackoverflow.com/users/6436191",
"pm_score": 2,
"selected": false,
"text": "with recursive g (n) as (select 1 union all select n + 1 from g where n < 5)\nselect g.n as slot, x.foo, x.bar\n... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349908",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17748067/"
] |
74,349,913 | <p>After using value_counts in Pandas
I want to reset the index
but the first column's name is replace with 'index'
and every columns' name got pushed to the right</p>
<pre><code>df = df[df['type']=='food']['fruit'].value_counts()
df = df.reset_index()
df
index fruit
0 apple 120
1 grape 110
2 orange 30
</code><... | [
{
"answer_id": 74350009,
"author": "The Impaler",
"author_id": 6436191,
"author_profile": "https://Stackoverflow.com/users/6436191",
"pm_score": 2,
"selected": false,
"text": "with recursive g (n) as (select 1 union all select n + 1 from g where n < 5)\nselect g.n as slot, x.foo, x.bar\n... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349913",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20423918/"
] |
74,349,927 | <h1>Any Idea whats the best way of getting this xml file into a data frame format in R. It can be any format tbl, data.table...</h1>
<p>The xml file is under this link</p>
<p><a href="https://www.ictax.admin.ch/extern/api/download/2619327/ea428026a27f772d57efbbcdc56bff62/kursliste_2022.zip" rel="nofollow noreferrer">ht... | [
{
"answer_id": 74350009,
"author": "The Impaler",
"author_id": 6436191,
"author_profile": "https://Stackoverflow.com/users/6436191",
"pm_score": 2,
"selected": false,
"text": "with recursive g (n) as (select 1 union all select n + 1 from g where n < 5)\nselect g.n as slot, x.foo, x.bar\n... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349927",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19616974/"
] |
74,349,955 | <p>I am trying to change the hours in my <code>React</code> app using the <code>setHours</code> method:</p>
<pre class="lang-js prettyprint-override"><code>function App() {
let currHour = new Date().setHours(15);
return (
<div>
<h1>{currHour}</h1>
</div>
);
}
</code>... | [
{
"answer_id": 74350002,
"author": "Zeke Hernandez",
"author_id": 6014489,
"author_profile": "https://Stackoverflow.com/users/6014489",
"pm_score": 1,
"selected": false,
"text": "currHour Date toString 15 currHour.getHours() currHour new Date().setHours(15) App ref"
},
{
"answer_... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349955",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11409898/"
] |
74,349,977 | <p>I'm using Prismic and NextJS for the first time.</p>
<p>What I'm trying to is make it so when the user goes to the base url for the page localhost:3000/ in dev something will load. /About and /Pricing are working fine the base url doesn't work.</p>
<pre><code>import { GetStaticPaths, GetStaticProps } from 'next'
imp... | [
{
"answer_id": 74350455,
"author": "Marcel Dz",
"author_id": 12186851,
"author_profile": "https://Stackoverflow.com/users/12186851",
"pm_score": 1,
"selected": false,
"text": "dev production constants.js export const baseurl = process.env.NODE_ENV === \"production\"\n ? process.env.NE... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74349977",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/315684/"
] |
74,350,037 | <p>I'm a Bash newbie, and I'm puzzling through a Bash script where I see this:</p>
<pre><code>while [ $# -ge 2 ]
if [ "x$1" = "x-a" ]; then
echo "STR_A = $2" >>tmpFile.txt
...do more stuff...
elif [ "x$1" = "x-b" ]; then
echo "STR_B = $2"... | [
{
"answer_id": 74350455,
"author": "Marcel Dz",
"author_id": 12186851,
"author_profile": "https://Stackoverflow.com/users/12186851",
"pm_score": 1,
"selected": false,
"text": "dev production constants.js export const baseurl = process.env.NODE_ENV === \"production\"\n ? process.env.NE... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74350037",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4040743/"
] |
74,350,044 | <p>I have a worksheet that I need to save with the active sheet name, a cell and the date.</p>
<pre><code>Sub PrintToPDF()
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:="P:\Estimating Misc\EXPERIMENTS\" + ActiveSheet.Name + " & "RANGE("F18:J18... | [
{
"answer_id": 74350455,
"author": "Marcel Dz",
"author_id": 12186851,
"author_profile": "https://Stackoverflow.com/users/12186851",
"pm_score": 1,
"selected": false,
"text": "dev production constants.js export const baseurl = process.env.NODE_ENV === \"production\"\n ? process.env.NE... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74350044",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20409014/"
] |
74,350,054 | <p>I have a long string and I want to break that long string into 128 words of pair of arrays. for example.
a string has 500 words.
then the final output should be an array of 3 element</p>
<p>element has the first 128 words,
the second element has the next 128 words,
and the third element should have the rest of the w... | [
{
"answer_id": 74350582,
"author": "jessica-98",
"author_id": 20261328,
"author_profile": "https://Stackoverflow.com/users/20261328",
"pm_score": 2,
"selected": true,
"text": "const string = \"hello world hello world hello world \"\nconst words = string.split(\" \")\n\n\nfunction sliceIn... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74350054",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5577670/"
] |
74,350,059 | <p>How do you remove all characters except the array of float values and sepparators(,)?</p>
<p><code><Color (r=0.65, g=0.54, b=0.43)></code></p>
<p>Into this: 0.65, 0.54, 0.43</p>
| [
{
"answer_id": 74350090,
"author": "I'mahdi",
"author_id": 1740577,
"author_profile": "https://Stackoverflow.com/users/1740577",
"pm_score": 0,
"selected": false,
"text": "regex re.findall str.join ', ' >>> import re\n>>> ', '.join(re.findall(\"\\d+\\.\\d+\", \"<Color (r=0.65, g=0.54, b=... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74350059",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11473424/"
] |
74,350,061 | <p>I got a vector <code>A <- c("Tom; Jerry", "Lisa; Marc")</code>
and try to identity the number of occurrences of every name.</p>
<p>I already used the code:
<code>sort(table(unlist(strsplit(A, ""))), decreasing = TRUE)</code></p>
<p>However, this code is only able to create output lik... | [
{
"answer_id": 74350090,
"author": "I'mahdi",
"author_id": 1740577,
"author_profile": "https://Stackoverflow.com/users/1740577",
"pm_score": 0,
"selected": false,
"text": "regex re.findall str.join ', ' >>> import re\n>>> ', '.join(re.findall(\"\\d+\\.\\d+\", \"<Color (r=0.65, g=0.54, b=... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74350061",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20331774/"
] |
74,350,066 | <p>I am looking for a method to create an array of numbers to label groups, based on the value of the 'number' column. If it's possible?</p>
<p>With this abbreviated example DF:</p>
<pre><code>number = [nan,nan,1,nan,nan,nan,2,nan,nan,3,nan,nan,nan,nan,nan,4,nan,nan]
df = pd.DataFrame(columns=['number'])
df = pd.DataFr... | [
{
"answer_id": 74350090,
"author": "I'mahdi",
"author_id": 1740577,
"author_profile": "https://Stackoverflow.com/users/1740577",
"pm_score": 0,
"selected": false,
"text": "regex re.findall str.join ', ' >>> import re\n>>> ', '.join(re.findall(\"\\d+\\.\\d+\", \"<Color (r=0.65, g=0.54, b=... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74350066",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3316115/"
] |
74,350,079 | <p>How to make = 2(there are two "the")</p>
<pre><code>import re
text = "there are a lot of the cats"
o = re.findall("the", text)
print(o)
def text(word):
count = 0
for word in text:
if "ou" in text:
count += 1
return count
print(count)
print(i... | [
{
"answer_id": 74350272,
"author": "BokiX",
"author_id": 16843389,
"author_profile": "https://Stackoverflow.com/users/16843389",
"pm_score": -1,
"selected": false,
"text": "text = input(\"Your text: \")\nwords_in_text = {}\nfor word in text.lower().split(\" \"):\n if word in words_in_... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74350079",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20331691/"
] |
74,350,089 | <p>I have an <code>array("https", "www", "stackoverflow", "com")</code></p>
<pre><code>$search_array = array("https", "www", "stackoverflow", "com");
for ($i=0; $i < count($search_array); $i++) {
if (
$search_array[$i] == n... | [
{
"answer_id": 74350221,
"author": "nevada_scout",
"author_id": 492298,
"author_profile": "https://Stackoverflow.com/users/492298",
"pm_score": 1,
"selected": false,
"text": "echo $i unset() && || <?php\n$search_array = array(\"https\", \"www\", \"stackoverflow\", \"com\");\n$result_arra... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74350089",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9498503/"
] |
74,350,122 | <p>I run subprocess in jupyter to get the core path.
I have to go one folder up and then call pwd</p>
<p>Running:</p>
<pre><code>import subprocess
mypath=subprocess.run("(cd .. && pwd)")
</code></pre>
<p>leads to a "No such file or directory: '(cd .. && pwd)' error. I guess the cd calls ... | [
{
"answer_id": 74350288,
"author": "Alberto Garcia",
"author_id": 15647384,
"author_profile": "https://Stackoverflow.com/users/15647384",
"pm_score": 1,
"selected": false,
"text": "shell = True subprocess.run subprocess.run(\"cd .. && pwd\", shell = True)\n"
},
{
"answer_id": 743... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74350122",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6510273/"
] |
74,350,130 | <p>I am working on a React project and facing two problems.</p>
<ol>
<li>I have created an input field where I insert a value via a popover, but after that value is input, I am not able to add any more text to the input field.
I have shown this with two images below
<a href="https://i.stack.imgur.com/4mqFI.jpg" rel="no... | [
{
"answer_id": 74350289,
"author": "Dishonered",
"author_id": 6642927,
"author_profile": "https://Stackoverflow.com/users/6642927",
"pm_score": 1,
"selected": false,
"text": " const AddPersontoSearchBar=(val)=>{\n setValue(Value + ',' + val.name)\n setAnchorEl(null)\n }\n"
},
... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74350130",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19447089/"
] |
74,350,151 | <p>I am developing an app for a set-top box and for debugging purposes, I would like to intercept the network traffic coming out from the box. I don't have an option in the setup box to set up a proxy address. If there was an option to set up a proxy, I could hook it to Charles and intercept and modify the request on H... | [
{
"answer_id": 74350289,
"author": "Dishonered",
"author_id": 6642927,
"author_profile": "https://Stackoverflow.com/users/6642927",
"pm_score": 1,
"selected": false,
"text": " const AddPersontoSearchBar=(val)=>{\n setValue(Value + ',' + val.name)\n setAnchorEl(null)\n }\n"
},
... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74350151",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/553218/"
] |
74,350,156 | <p>If I don't give this program a voice command within aprox 3 seconds after "listeng..." is being prompted, I get the "UnboundLocalError" mentioned in the title.</p>
<p>Looking for any advice on how to get the program to wait for my next voice command without shutting down. Sorry if stupid question... | [
{
"answer_id": 74350373,
"author": "Tyler Bury",
"author_id": 19739725,
"author_profile": "https://Stackoverflow.com/users/19739725",
"pm_score": 0,
"selected": false,
"text": "Ex: \n\ndef take_command():\n try:\n with sr.Microphone() as source:\n print('listening...... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74350156",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20442179/"
] |
74,350,194 | <p>So i have list contains with 1 string.</p>
<blockquote>
<p>biner_pass = ['00001111000000000000111111111111<br />
00001111111111111111000011111111 11111111111100000000000000000000<br />
11111111111111110000111111111111']</p>
</blockquote>
<p>all i want is to <strong>remove the space</strong> and <strong>join all t... | [
{
"answer_id": 74350229,
"author": "I'mahdi",
"author_id": 1740577,
"author_profile": "https://Stackoverflow.com/users/1740577",
"pm_score": 1,
"selected": false,
"text": "replace biner_pass = ['0000111100000000000011111111111100001111111111111111000011111111 1111111111110000000000000000... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74350194",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19908082/"
] |
74,350,213 | <p>I am looping through entryIds stored in a dataframe (loaded from a csv file) and accessing the messages by dispatching win32com.client to access Outlook MAPI and save email attachments to a local directory using the below code. I also am storing the attachment name, path, and entryId in a new dataframe for later ana... | [
{
"answer_id": 74351403,
"author": "Eugene Astafiev",
"author_id": 1603351,
"author_profile": "https://Stackoverflow.com/users/1603351",
"pm_score": 0,
"selected": false,
"text": "outlook = win32com.client.Dispatch(\"Outlook.Application\").GetNamespace(\"MAPI\")\n\nfor email in emailData... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74350213",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14140211/"
] |
74,350,234 | <p>The following question was asked in my last interview (yesterday), and I'm trying to solve it since then (couldn't solve it in the interview).</p>
<p>Sorry for any grammar mistakes or any logical mistakes, I don't have the question, it was written by memory:</p>
<blockquote>
<p>You are given a number in a string for... | [
{
"answer_id": 74357546,
"author": "Matt Clarke",
"author_id": 95469,
"author_profile": "https://Stackoverflow.com/users/95469",
"pm_score": -1,
"selected": false,
"text": "public String solve(String input)\n {\n String result = \"\";\n int i = 0;\n while (i < inp... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74350234",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12769096/"
] |
74,350,240 | <p>i just made a problem which should return if a number "isHappy" or not. A number is happy if it meets some criteria:</p>
<p>A happy number is a number defined by the following process:</p>
<p>-Starting with any positive integer, replace the number by the sum of the squares of its digits.
-Repeat the proces... | [
{
"answer_id": 74357546,
"author": "Matt Clarke",
"author_id": 95469,
"author_profile": "https://Stackoverflow.com/users/95469",
"pm_score": -1,
"selected": false,
"text": "public String solve(String input)\n {\n String result = \"\";\n int i = 0;\n while (i < inp... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74350240",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20167423/"
] |
74,350,248 | <p>I have a list where its elements are Timestamps in the form of</p>
<pre><code>Timestamp(seconds=..., nanoseconds=...)
</code></pre>
<p>so I got</p>
<pre><code>List myarr = [Timestamp(seconds=..., nanoseconds=...),Timestamp(seconds=..., nanoseconds=...),Timestamp(seconds=..., nanoseconds=...)]
</code></pre>
<p>How ca... | [
{
"answer_id": 74357546,
"author": "Matt Clarke",
"author_id": 95469,
"author_profile": "https://Stackoverflow.com/users/95469",
"pm_score": -1,
"selected": false,
"text": "public String solve(String input)\n {\n String result = \"\";\n int i = 0;\n while (i < inp... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74350248",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12917683/"
] |
74,350,256 | <p>My angular app is hosted on prod server on this url:</p>
<pre><code>myserver/myapp
</code></pre>
<p>However on localhost its on default</p>
<pre><code>localhost:4200
</code></pre>
<p>The landing page is</p>
<pre><code>"/mainpage" //(myserver/myapp/mainpage, or localhost:4200/mainpage)
</code></pre>
<p>I ne... | [
{
"answer_id": 74357546,
"author": "Matt Clarke",
"author_id": 95469,
"author_profile": "https://Stackoverflow.com/users/95469",
"pm_score": -1,
"selected": false,
"text": "public String solve(String input)\n {\n String result = \"\";\n int i = 0;\n while (i < inp... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74350256",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1578893/"
] |
74,350,271 | <p>I have a function to check if the user is a staff:</p>
<pre class="lang-py prettyprint-override"><code>class VerificateUser():
def allowed_user(request):
if request.user.is_staff:
return True
</code></pre>
<p>In my template, I’m going to show this section only for staff users, but this is not... | [
{
"answer_id": 74357546,
"author": "Matt Clarke",
"author_id": 95469,
"author_profile": "https://Stackoverflow.com/users/95469",
"pm_score": -1,
"selected": false,
"text": "public String solve(String input)\n {\n String result = \"\";\n int i = 0;\n while (i < inp... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74350271",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17841947/"
] |
74,350,277 | <p>Is there any reason to use <code>if</code> to check if method exists, before calling await</p>
<pre><code>if (someObject.save){
await someObject.save();
}
</code></pre>
<p>rather than using nullish coallescence diectly with <code>await</code></p>
<pre><code> await someObject.save?.();
</code></pre>
<p>Is second co... | [
{
"answer_id": 74350339,
"author": "ControlAltDel",
"author_id": 1291492,
"author_profile": "https://Stackoverflow.com/users/1291492",
"pm_score": 0,
"selected": false,
"text": "?."
},
{
"answer_id": 74350362,
"author": "Majed Badawi",
"author_id": 7486313,
"author_pr... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74350277",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15461/"
] |
74,350,312 | <p>I have a batch file which gets its own short pathname (to eliminate spaces, which gcc doesn't like) for use in subsequent commands:</p>
<pre><code>set base=%~d0%~sp0
</code></pre>
<p>This works fine for most cases; for example, if the batch file is located in C:\Program Files, the value of %base% will be C:\PROGRA~1... | [
{
"answer_id": 74350352,
"author": "Ben Voigt",
"author_id": 103167,
"author_profile": "https://Stackoverflow.com/users/103167",
"pm_score": 2,
"selected": false,
"text": "set \"base=%~d0%~sp0\"\n"
},
{
"answer_id": 74420121,
"author": "jeb",
"author_id": 463115,
"aut... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74350312",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1636349/"
] |
74,350,315 | <p>I need to find the average for the scores M1 and E1 for every name in the list and want to add another key: value pair called average : (M1+E1)/2. How do i add more key: value pairs under 2002 and 2008 ?</p>
<pre><code>gradebook = {
2002: [
{"Name" : "John"},
{"M1" :... | [
{
"answer_id": 74350544,
"author": "Omer Dagry",
"author_id": 15010874,
"author_profile": "https://Stackoverflow.com/users/15010874",
"pm_score": 1,
"selected": false,
"text": "gradebook = {\n 2002: [\n {\"Name\": \"John\"},\n {\"M1\": 87},\n {\"E1\": 10},\n ... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74350315",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20073604/"
] |
74,350,321 | <p>I created an agent called Technician its a population and it has the variable capacity in boolean. The variable belongs to one agent (agent 0). In my main i have a button that changes its color if it is clicked on. The code i wrote for the Button in Fill color is.</p>
<pre><code>technician.capacity==true? yellowGree... | [
{
"answer_id": 74350544,
"author": "Omer Dagry",
"author_id": 15010874,
"author_profile": "https://Stackoverflow.com/users/15010874",
"pm_score": 1,
"selected": false,
"text": "gradebook = {\n 2002: [\n {\"Name\": \"John\"},\n {\"M1\": 87},\n {\"E1\": 10},\n ... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74350321",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20442353/"
] |
74,350,368 | <p>I am trying to use a library but a submit button would be rendered outside of the form automatically (because body of the library's component is rendered as a sibling of the footer where the submit button should go). Is there a way to bind to this form so that the button that is outside of the form can trigger the f... | [
{
"answer_id": 74350544,
"author": "Omer Dagry",
"author_id": 15010874,
"author_profile": "https://Stackoverflow.com/users/15010874",
"pm_score": 1,
"selected": false,
"text": "gradebook = {\n 2002: [\n {\"Name\": \"John\"},\n {\"M1\": 87},\n {\"E1\": 10},\n ... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74350368",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5570385/"
] |
74,350,369 | <p>I am automating the building of a document based on a set of inputs. I started with Google's example here: <a href="https://developers.google.com/apps-script/samples/automations/aggregate-document-content" rel="nofollow noreferrer">https://developers.google.com/apps-script/samples/automations/aggregate-document-cont... | [
{
"answer_id": 74350665,
"author": "Cooper",
"author_id": 7215091,
"author_profile": "https://Stackoverflow.com/users/7215091",
"pm_score": 0,
"selected": false,
"text": "function settingGlyphType() {\n var body = DocumentApp.getActiveDocument().getBody();\n body.appendListItem(\"Item ... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74350369",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7817587/"
] |
74,350,392 | <p><a href="https://i.stack.imgur.com/wDq0D.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wDq0D.png" alt="Horners method" /></a></p>
<p>Hello, everyone. My current university assignment is to represent <a href="https://en.wikipedia.org/wiki/Horner%27s_method" rel="nofollow noreferrer">Horner's meth... | [
{
"answer_id": 74351151,
"author": "Alexander Ivanchenko",
"author_id": 17949945,
"author_profile": "https://Stackoverflow.com/users/17949945",
"pm_score": 1,
"selected": true,
"text": "0 n a.length - 1 public static double evalHornerRec(double[] a, double x) {\n \n return horner(a... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74350392",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14170108/"
] |
74,350,409 | <p>I have a multidimensional data structure for tracking different characteristics of files I am comparing and merging data for. The structure is set up as such:</p>
<pre><code>$cumulative{$slice} = {
DATA => $data,
META => $got_meta,
RECOVER => $recover,
DISPO => $dispo,
DIR ... | [
{
"answer_id": 74351151,
"author": "Alexander Ivanchenko",
"author_id": 17949945,
"author_profile": "https://Stackoverflow.com/users/17949945",
"pm_score": 1,
"selected": true,
"text": "0 n a.length - 1 public static double evalHornerRec(double[] a, double x) {\n \n return horner(a... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74350409",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8695634/"
] |
74,350,411 | <p>I have tried below regular expression to validate the number with following criteria</p>
<p><code>/^\d{3,10}(\.\d{2})?$/</code></p>
<p>a, number should be minimum 3 , maximum 10 (including .) digits and it may contain . and two decimal point</p>
<p>Examples</p>
<p><strong>valid numbers</strong></p>
<p>123</p>
<p>123... | [
{
"answer_id": 74353151,
"author": "The fourth bird",
"author_id": 5424988,
"author_profile": "https://Stackoverflow.com/users/5424988",
"pm_score": 3,
"selected": true,
"text": "^(?![.\\d]{11,}$)\\d{3,10}(?:\\.\\d\\d)?$\n ^ (?![.\\d]{11}$) \\d{3,10} (?:\\.\\d\\d)? . $"
},
{
"ans... | 2022/11/07 | [
"https://Stackoverflow.com/questions/74350411",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6727459/"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.