qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
74,592,640
<p>I have a base array like below.</p> <pre><code>const arr1 = [ {id:'1',city:'Sydney',distance:100,yearhalf:'2022_1'}, {id:'2',city:'Melbourne',distance:70,yearhalf:'2022_1'}, {id:'3',city:'Perth',distance:65,yearhalf:'2022_1'}, {id:'4',city:'Sydney',distance:89,yearhalf:'2022_2'}, {id:'5',city:'Melbourne',distance:40...
[ { "answer_id": 74593716, "author": "John Rotenstein", "author_id": 174777, "author_profile": "https://Stackoverflow.com/users/174777", "pm_score": 1, "selected": false, "text": "contend_decode = base64.b64decode(event['body'])\n event['body'] content contend_decode = base64.b64decode(eve...
2022/11/27
[ "https://Stackoverflow.com/questions/74592640", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15781662/" ]
74,592,645
<p>I am studying a Haskell course since I am total beginner. There is a task which I am not able to solve although I tried many times.</p> <p>The task is to determine the most general type of following function:</p> <pre><code>f x _ False = x f _ x y = maybe 42 (g y) x </code></pre> <p>providing we know that <cod...
[ { "answer_id": 74592798, "author": "Willem Van Onsem", "author_id": 67579, "author_profile": "https://Stackoverflow.com/users/67579", "pm_score": 2, "selected": false, "text": "f f :: a -> b -> c -> d\n False Bool c ~ Bool x x a d a ~ d maybe maybe :: f -> (e -> f) -> Maybe e -> f 42 f N...
2022/11/27
[ "https://Stackoverflow.com/questions/74592645", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20616664/" ]
74,592,660
<p>how to select only the parent element with a class?</p> <ul> <li><p>❌ not all elements with a class like it do <code>document.querySelectorAll(&quot;.mycard&quot;)</code></p> </li> <li><p>✅ but only the first parent element with the class,</p> <ul> <li>and this element that we take don't need to have a parent with <...
[ { "answer_id": 74592716, "author": "Michael M.", "author_id": 13376511, "author_profile": "https://Stackoverflow.com/users/13376511", "pm_score": 3, "selected": true, "text": "document.getElementsByClassName .filter() let els = [...document.getElementsByClassName('mycard')];\nels = els.f...
2022/11/27
[ "https://Stackoverflow.com/questions/74592660", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19485937/" ]
74,592,707
<p>I have a data frame with a column called ‘full_name’ that presents two teams, for example: • ‘Man U to win Liverpool to win’ • ‘Liverpool to win Man U to win’ • ‘Chelsea to win Arsenal to win’ <em>And so on…</em></p> <p>I would like to be able to differentiate the teams into North and South, so that if ‘Man U ...
[ { "answer_id": 74592716, "author": "Michael M.", "author_id": 13376511, "author_profile": "https://Stackoverflow.com/users/13376511", "pm_score": 3, "selected": true, "text": "document.getElementsByClassName .filter() let els = [...document.getElementsByClassName('mycard')];\nels = els.f...
2022/11/27
[ "https://Stackoverflow.com/questions/74592707", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12742992/" ]
74,592,710
<p>I need to listen for clicks on <code>&lt;input/&gt;</code> elements. This is my code</p> <pre><code>&lt;script&gt; document.getElementsByClassName(&quot;form-control&quot;).addEventListener(&quot;click&quot;, function(e){ alert(&quot;Listener added&quot;); }); &lt;/script&gt; </code></pre> <p>But I...
[ { "answer_id": 74592797, "author": "eelpcik", "author_id": 20094864, "author_profile": "https://Stackoverflow.com/users/20094864", "pm_score": 0, "selected": false, "text": "document.getElementsByClassName(\"form-control\").forEach(element => {\n element.onclick = event => {\n alert(...
2022/11/27
[ "https://Stackoverflow.com/questions/74592710", "https://Stackoverflow.com", "https://Stackoverflow.com/users/207425/" ]
74,592,719
<p>So I'm Using <code>Getx</code>'s routing in Flutter.</p> <p>I have a Product class that accepts an argument of the type <code>Product</code></p> <pre><code> const Produkt({ required this.product, }); </code></pre> <p>I handle the navigation through GetPages, like:</p> <pre><code> GetPage( name: Produkt.r...
[ { "answer_id": 74592797, "author": "eelpcik", "author_id": 20094864, "author_profile": "https://Stackoverflow.com/users/20094864", "pm_score": 0, "selected": false, "text": "document.getElementsByClassName(\"form-control\").forEach(element => {\n element.onclick = event => {\n alert(...
2022/11/27
[ "https://Stackoverflow.com/questions/74592719", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14775496/" ]
74,592,740
<p>I have a code, but I don't really know python, so I have a problem. I know that the insert isn't right for strings but I don't know how can I insert?</p> <pre><code>original_string = input(&quot;What's yout sentence?&quot;) add_character = input(&quot;What char do you want to add?&quot;) slice = int(input(&quot;What...
[ { "answer_id": 74592797, "author": "eelpcik", "author_id": 20094864, "author_profile": "https://Stackoverflow.com/users/20094864", "pm_score": 0, "selected": false, "text": "document.getElementsByClassName(\"form-control\").forEach(element => {\n element.onclick = event => {\n alert(...
2022/11/27
[ "https://Stackoverflow.com/questions/74592740", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20616770/" ]
74,592,753
<p>What does this type of notation mean?</p> <pre><code> render() { const {isAuth, error} = this.state; document.getElementById(&quot;root&quot;).innerHTML = ` &lt;div style=&quot;color: ${error &amp;&amp; &quot;red&quot;}&quot;&gt; ${isAuth ? &quot;Welcome back!&quot; ...
[ { "answer_id": 74592955, "author": "NerdyGamer", "author_id": 17168449, "author_profile": "https://Stackoverflow.com/users/17168449", "pm_score": 1, "selected": false, "text": "result = '' && 'foo'; // result is assigned \"\" (empty string)\nresult = 2 && 0; // result is assigned ...
2022/11/27
[ "https://Stackoverflow.com/questions/74592753", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19746715/" ]
74,592,759
<p>So here is the code:</p> <pre><code>#include &lt;stdio.h&gt; int main() { char str1[] =&quot;Hello&quot;, str2[20] =&quot;Hi&quot;; char *p =&quot;Hello&quot;, *s =&quot;Hi&quot;; str1 = &quot;Adieu&quot;; return 0; } </code></pre> <p>Now my Book gives this reason</p> <pre><code>error, constant poin...
[ { "answer_id": 74592877, "author": "Haris", "author_id": 20017547, "author_profile": "https://Stackoverflow.com/users/20017547", "pm_score": 0, "selected": false, "text": "str1[] = \"Hello\";\n str2 = str1;\n" }, { "answer_id": 74593119, "author": "Andreas Wenzel", "autho...
2022/11/27
[ "https://Stackoverflow.com/questions/74592759", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18246254/" ]
74,592,782
<p>I am doing some operations on a data.table and getting a result. So far so good. Next, I want the result to also show the sums across some columns, but I can't get that to work.</p> <p>I filter my table by rows where x1=1, and compute a metric by Group1:</p> <pre><code>dt[x1 == 1, .N, by = c(&quot;Group1&quot;)][, ...
[ { "answer_id": 74593271, "author": "r2evans - GO NAVY BEAT ARMY", "author_id": 3358272, "author_profile": "https://Stackoverflow.com/users/3358272", "pm_score": 2, "selected": true, "text": "data.table prettyDT <- function(x, ...) {\n out <- capture.output(data.table:::print.data.table(...
2022/11/27
[ "https://Stackoverflow.com/questions/74592782", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20321217/" ]
74,592,813
<p>I am trying to split the values in the location column to two different x and y columns in a csv file</p> <p>Right now it looks like this:</p> <pre><code>location [60.0, 56.0] [68.0, 74.0] [58.0, 52.0] [63.0, 53.0] [119.0, 79.0] </code></pre> <p>I want it to split the columns and get two different columns an...
[ { "answer_id": 74593271, "author": "r2evans - GO NAVY BEAT ARMY", "author_id": 3358272, "author_profile": "https://Stackoverflow.com/users/3358272", "pm_score": 2, "selected": true, "text": "data.table prettyDT <- function(x, ...) {\n out <- capture.output(data.table:::print.data.table(...
2022/11/27
[ "https://Stackoverflow.com/questions/74592813", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20616784/" ]
74,592,814
<p>My assignment is to create a subprogram that takes in 3 float values in returns the median of those 3 float values as an integer using if statements. I´ve tried a couple of ways to write this if statement but it just gives me a random value back of those 3 values I put in. My code:</p> <pre><code> function Median(...
[ { "answer_id": 74593992, "author": "Jim Rogers", "author_id": 6854407, "author_profile": "https://Stackoverflow.com/users/6854407", "pm_score": 0, "selected": false, "text": "with Ada.Text_IO; use Ada.Text_IO;\nwith Ada.Float_Text_IO; use Ada.Float_Text_IO;\n\nprocedure Main is\n ...
2022/11/27
[ "https://Stackoverflow.com/questions/74592814", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20153118/" ]
74,592,849
<p>I created a favicon from <a href="https://www.favicon.cc" rel="nofollow noreferrer">https://www.favicon.cc</a> and replaced the existing favicon.ico to mine but it didn't change to my favicon.ico and still showing the previous icon</p> <p>Code:</p> <p>link rel=&quot;icon&quot; href=&quot;/favicon.ico&quot;</p> <p>Th...
[ { "answer_id": 74592933, "author": "bc1121", "author_id": 3754348, "author_profile": "https://Stackoverflow.com/users/3754348", "pm_score": -1, "selected": false, "text": "<!DOCTYPE html>\n<html>\n\n<head>\n <link rel=\"icon\" type=\"image/x-icon\" href=\"/favicon.ico\">\n</head>\n\n<bo...
2022/11/27
[ "https://Stackoverflow.com/questions/74592849", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20543349/" ]
74,592,856
<p>I have a custom login page, which once the user logs in, takes him back to the same page, I would like there to be a redirect on the home page in php, I found this redirect php file, how do I modify it to get users to home?</p> <p>I include all files that may be of interest</p> <p>Thanks</p> <p>stm-lms-user-redirect...
[ { "answer_id": 74592933, "author": "bc1121", "author_id": 3754348, "author_profile": "https://Stackoverflow.com/users/3754348", "pm_score": -1, "selected": false, "text": "<!DOCTYPE html>\n<html>\n\n<head>\n <link rel=\"icon\" type=\"image/x-icon\" href=\"/favicon.ico\">\n</head>\n\n<bo...
2022/11/27
[ "https://Stackoverflow.com/questions/74592856", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20584654/" ]
74,592,866
<p>I have a collection of documents such as:</p> <pre class="lang-json prettyprint-override"><code>{ _id: 5, responses: [ { staff: false, timestamp: 1000 }, { staff: true, timestamp: 1500 } ] } </code></pre> <p>I have a function...
[ { "answer_id": 74592933, "author": "bc1121", "author_id": 3754348, "author_profile": "https://Stackoverflow.com/users/3754348", "pm_score": -1, "selected": false, "text": "<!DOCTYPE html>\n<html>\n\n<head>\n <link rel=\"icon\" type=\"image/x-icon\" href=\"/favicon.ico\">\n</head>\n\n<bo...
2022/11/27
[ "https://Stackoverflow.com/questions/74592866", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16025034/" ]
74,592,897
<p>How to convert <code>Ctrl+(any letter)</code> to <code>«Ctrl+(any letter)»</code>?</p> <p>I need like this:</p> <pre><code>Ctrl+T Ctrl+D etc. </code></pre> <p>Convert to:</p> <pre><code>«Ctrl+T» «Ctrl+D» etc. </code></pre> <p>I tried replacing this <code>(Ctrl\+.)</code> with <code>(Ctrl\+[a-zA-Z])</code>, but the r...
[ { "answer_id": 74593117, "author": "alex-dl", "author_id": 14725508, "author_profile": "https://Stackoverflow.com/users/14725508", "pm_score": 3, "selected": true, "text": "(Ctrl\\+[a-zA-Z])\n «\\1»\n" }, { "answer_id": 74607201, "author": "The fourth bird", "author_id": ...
2022/11/27
[ "https://Stackoverflow.com/questions/74592897", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19809589/" ]
74,592,935
<p>I'm building a class that gathers some of the possible JVM opcodes. I found out how to generate DUP2_X2 and DUP_X2 but not DUP2, DUP2_X1, SWAP.</p> <p>Below the code sample in which I starting gathering some of the jvm opcodes :</p> <pre class="lang-java prettyprint-override"><code>public class JvmOpCodes { lon...
[ { "answer_id": 74595360, "author": "boneill", "author_id": 458561, "author_profile": "https://Stackoverflow.com/users/458561", "pm_score": 1, "selected": false, "text": " public static long example(long a) {\n return a = a + 1;\n }\n" }, { "answer_id": 74599924, "autho...
2022/11/27
[ "https://Stackoverflow.com/questions/74592935", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8315843/" ]
74,592,937
<p>I have a :</p> <pre><code>private List&lt;String&gt; nums = new ArrayList&lt;&gt;(); </code></pre> <p>And when I do :</p> <pre><code>nums.get(0) - 1234 nums.get(1) - 5 6 7 8 </code></pre> <p>I want to have in List split like that: 1,2,3,4. How to do this?</p> <p>I tried do regex but i dont know how to format this...
[ { "answer_id": 74595360, "author": "boneill", "author_id": 458561, "author_profile": "https://Stackoverflow.com/users/458561", "pm_score": 1, "selected": false, "text": " public static long example(long a) {\n return a = a + 1;\n }\n" }, { "answer_id": 74599924, "autho...
2022/11/27
[ "https://Stackoverflow.com/questions/74592937", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20234103/" ]
74,592,956
<p>I would like to know why I can not see the ListView content if I put it in Row that is inside Column? Thank you</p> <pre><code>body: Center( child: Column( children: &lt;Widget&gt;[ Row( children: &lt;Widget&gt;[ Flexible( child: ListView( children: [ ...
[ { "answer_id": 74593253, "author": "MendelG", "author_id": 12349734, "author_profile": "https://Stackoverflow.com/users/12349734", "pm_score": 1, "selected": false, "text": "Vertical viewport was given unbounded height.\n shrinkWrap true ListView(\n shrinkWrap: true,\n children: [\n ...
2022/11/27
[ "https://Stackoverflow.com/questions/74592956", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2646810/" ]
74,593,013
<p>I want to run my function which then starts displaying a CSS element, I currently have</p> <p>CSS</p> <pre><code>.popUpNames{ color:white; text-shadow: 1px 1px 1px white; padding:5px; border:black 5px solid; border-radius: 5px; display:block; position: fixed; top: 50%; left: 50%; background-color...
[ { "answer_id": 74593053, "author": "TechStudent10", "author_id": 20616402, "author_profile": "https://Stackoverflow.com/users/20616402", "pm_score": 1, "selected": false, "text": ".popUpNames .show .popUpNames .show .popUpNames.show .popUpNames {\n color: white;\n text-shadow: 1px 1px ...
2022/11/27
[ "https://Stackoverflow.com/questions/74593013", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20466158/" ]
74,593,024
<p>i wanted to make a game where you guess the letter. and add a function that will show you all you incorrect guesses, so i made the list:</p> <pre><code>incorrectguesses = [] </code></pre> <p>and then i made it so it asks the user to guess the letter:</p> <pre><code> while True: guess = input(&quot;what do you th...
[ { "answer_id": 74593067, "author": "John Gordon", "author_id": 494134, "author_profile": "https://Stackoverflow.com/users/494134", "pm_score": 3, "selected": true, "text": "print(print_all_items(incorrectguesses))\n print_all_items() return None None" }, { "answer_id": 74593327, ...
2022/11/27
[ "https://Stackoverflow.com/questions/74593024", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17774550/" ]
74,593,047
<p>With selenium in python, I want to collect data about a user called &quot;Graham&quot; on the website below: <a href="https://github.com/GrahamDumpleton/wrapt/graphs/contributors" rel="nofollow noreferrer">https://github.com/GrahamDumpleton/wrapt/graphs/contributors</a></p> <p>Following the previous question, I loca...
[ { "answer_id": 74593067, "author": "John Gordon", "author_id": 494134, "author_profile": "https://Stackoverflow.com/users/494134", "pm_score": 3, "selected": true, "text": "print(print_all_items(incorrectguesses))\n print_all_items() return None None" }, { "answer_id": 74593327, ...
2022/11/27
[ "https://Stackoverflow.com/questions/74593047", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10295124/" ]
74,593,058
<p>I'm trying to make some project code I have written, more resilient to crashes, except the circumstances of my previous crashes have all been different. So that I do not have to try and account for every single one, I thought I'd try to get my code to either restart, or execute a copy of itself in place of it and th...
[ { "answer_id": 74594067, "author": "tdelaney", "author_id": 642070, "author_profile": "https://Stackoverflow.com/users/642070", "pm_score": 1, "selected": false, "text": "subprocess.call() import multiprocessing as mp\nimport time\n\ndef do_the_things(arg1, arg2):\n print(\"doing the ...
2022/11/27
[ "https://Stackoverflow.com/questions/74593058", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20617007/" ]
74,593,089
<p>I'm getting the following error for my python scraper:</p> <pre><code>import requests import json symbol_id = 'COINBASE_SPOT_BTC_USDT' time_start = '2022-11-20T17:00:00' time_end = '2022-11-21T05:00:00' limit_levels = 100000000 limit = 100000000 url = 'https://rest.coinapi.io/v1/orderbooks/{symbol_id}/history?time...
[ { "answer_id": 74594067, "author": "tdelaney", "author_id": 642070, "author_profile": "https://Stackoverflow.com/users/642070", "pm_score": 1, "selected": false, "text": "subprocess.call() import multiprocessing as mp\nimport time\n\ndef do_the_things(arg1, arg2):\n print(\"doing the ...
2022/11/27
[ "https://Stackoverflow.com/questions/74593089", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20068650/" ]
74,593,111
<p>While the rest of the code is functional, I can't figure out how to average the &quot;Total Purchases&quot; using the &quot;Number of Purchases&quot; to find the &quot;Average Purchase Amount&quot;.</p> <p>--- Query ---</p> <pre><code>SELECT C.CUS_CODE, C.CUS_BALANCE, ROUND(SUM(L.LINE_UNITS * L.LINE_PR...
[ { "answer_id": 74594067, "author": "tdelaney", "author_id": 642070, "author_profile": "https://Stackoverflow.com/users/642070", "pm_score": 1, "selected": false, "text": "subprocess.call() import multiprocessing as mp\nimport time\n\ndef do_the_things(arg1, arg2):\n print(\"doing the ...
2022/11/27
[ "https://Stackoverflow.com/questions/74593111", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20609717/" ]
74,593,121
<p>I want to show in the user interface of the future data in accordance with the design. But in the design, the 1st person should appear in the middle, and the 2nd place person should appear on the left. The third person should be on the far right. how can i show this in list loop. I am sharing my codes with you as an...
[ { "answer_id": 74594067, "author": "tdelaney", "author_id": 642070, "author_profile": "https://Stackoverflow.com/users/642070", "pm_score": 1, "selected": false, "text": "subprocess.call() import multiprocessing as mp\nimport time\n\ndef do_the_things(arg1, arg2):\n print(\"doing the ...
2022/11/27
[ "https://Stackoverflow.com/questions/74593121", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20166709/" ]
74,593,124
<p>I am trying to create a new user in mongodb and looking for <code>existing user</code> but even if a am sending request with new user details it is still showing that <code>User alreadyExists</code></p> <pre><code>export const signUp = async (req, res) =&gt; { const {email, password, username, roomid} = req.body; ...
[ { "answer_id": 74594067, "author": "tdelaney", "author_id": 642070, "author_profile": "https://Stackoverflow.com/users/642070", "pm_score": 1, "selected": false, "text": "subprocess.call() import multiprocessing as mp\nimport time\n\ndef do_the_things(arg1, arg2):\n print(\"doing the ...
2022/11/27
[ "https://Stackoverflow.com/questions/74593124", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17723923/" ]
74,593,151
<pre><code>from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver import ActionChains from selenium.webdriver.common.by import By from time impor...
[ { "answer_id": 74593256, "author": "Prophet", "author_id": 3485434, "author_profile": "https://Stackoverflow.com/users/3485434", "pm_score": 2, "selected": false, "text": "a driver.find_elements(By.TAG_NAME,\"a\")\n driver.find_elements(By.XPATH,\"//a[contains(@href,'https://www.sporting...
2022/11/27
[ "https://Stackoverflow.com/questions/74593151", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18776287/" ]
74,593,203
<p><a href="https://i.stack.imgur.com/ZFVKv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZFVKv.png" alt="image of the code and error" /></a></p> <pre><code>using System; using System.Collections.Generic; using System.Linq; internal class Program { public static bool Aa(int[] a, int k) { ...
[ { "answer_id": 74593336, "author": "Moatasem La Kremed", "author_id": 10444949, "author_profile": "https://Stackoverflow.com/users/10444949", "pm_score": 1, "selected": false, "text": "a.Skip().ToArray();\n" }, { "answer_id": 74594172, "author": "Ruud Helderman", "author_...
2022/11/27
[ "https://Stackoverflow.com/questions/74593203", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15085900/" ]
74,593,208
<p>I've scraped the crypto.com website to get the current prices of crypto coins in DataFrame form, it worked perfectly with pandas, but the 'Prices' values are mixed.</p> <p>here's the output:</p> <pre><code> Name Price 24H CHANGE 0 BBitcoinBTC 16.678,36$1...
[ { "answer_id": 74593336, "author": "Moatasem La Kremed", "author_id": 10444949, "author_profile": "https://Stackoverflow.com/users/10444949", "pm_score": 1, "selected": false, "text": "a.Skip().ToArray();\n" }, { "answer_id": 74594172, "author": "Ruud Helderman", "author_...
2022/11/27
[ "https://Stackoverflow.com/questions/74593208", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20522688/" ]
74,593,211
<p>I added firebase analytics to my project and I'm using analytics in every use case. So in every file, I need to create a firebase analytics instance. like <code>FirebaseAnalytics analytics = FirebaseAnalytics.instance;</code>.</p> <p>So I was thinking what if I use getIt and inject the instance wherever I need in th...
[ { "answer_id": 74593251, "author": "Gwhyyy", "author_id": 18670641, "author_profile": "https://Stackoverflow.com/users/18670641", "pm_score": 1, "selected": false, "text": "instance /// Returns an instance using the default [FirebaseApp].\n static FirebaseAuth get instance {\n Fir...
2022/11/27
[ "https://Stackoverflow.com/questions/74593211", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14029095/" ]
74,593,219
<p>I am having difficulty finding a best practice in C# for 'base' classes.</p> <p>Is it true that base classes should only contain variables/properties that are used by EVERYTHING that inherits it?</p> <p>My example is a property is used by 3 out of the 7 classes that inherit the base class.</p> <pre><code>public clas...
[ { "answer_id": 74593306, "author": "3Dave", "author_id": 135769, "author_profile": "https://Stackoverflow.com/users/135769", "pm_score": 0, "selected": false, "text": "public class UpgradeBase\n{\n\n}\n\npublic class UpgradeToggleable : UpgradeBase\n{\n public bool IsToggleable { get; ...
2022/11/27
[ "https://Stackoverflow.com/questions/74593219", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20617131/" ]
74,593,227
<p>I made a text file with a list of usernames and passwords. My program (in a tkinter page) is supposed to check whether the username and password exists in the file, and then if it doesn't it makes a label that says 'username or password incorrect<a href="https://i.stack.imgur.com/LQRTp.png" rel="nofollow noreferrer"...
[ { "answer_id": 74593381, "author": "RxiPland", "author_id": 15869190, "author_profile": "https://Stackoverflow.com/users/15869190", "pm_score": 0, "selected": false, "text": "def login_incorrect():\n Label(loginPage, text=\"Username or password incorrect.\").place(x=120, y=120)\n #...
2022/11/27
[ "https://Stackoverflow.com/questions/74593227", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17235593/" ]
74,593,315
<p>I have a select that returns a table such as:</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>weekOfTheYear</th> <th>mostRepeatedID</th> </tr> </thead> <tbody> <tr> <td>01</td> <td>a</td> </tr> <tr> <td>01</td> <td>b</td> </tr> <tr> <td>01</td> <td>a</td> </tr> <tr> <td>02</td> <td>b</td...
[ { "answer_id": 74593555, "author": "Barbaros Özhan", "author_id": 5841306, "author_profile": "https://Stackoverflow.com/users/5841306", "pm_score": 1, "selected": true, "text": "mostRepeatedID weekOfTheYear WITH t1 AS\n( \n SELECT weekOfTheYear, mostRepeatedID, COUNT(*) AS cnt\n FROM ...
2022/11/27
[ "https://Stackoverflow.com/questions/74593315", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20490033/" ]
74,593,342
<p>I am trying to override mathjs Bignumber using:</p> <pre class="lang-js prettyprint-override"><code> import * as math from 'mathjs'; export const bgn = (v: number | math.BigNumber) =&gt; { const z = math.bignumber(v) as math.BigNumber; (z as any).toJSON = () =&gt; { return Number(math.larger(100, z) ? math....
[ { "answer_id": 74593594, "author": "Alexander Mills", "author_id": 1223975, "author_profile": "https://Stackoverflow.com/users/1223975", "pm_score": 0, "selected": false, "text": "const math = require('mathjs');\n\nconst bgn = (v) => {\n const z = math.bignumber(v); // as math.BigNumb...
2022/11/27
[ "https://Stackoverflow.com/questions/74593342", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1223975/" ]
74,593,369
<p>I have a text-area with no text inside, if i hit enter the cursor move's to the second row and blinking. I put some code inside to stop it but still nothing the text-area moves down. example:</p> <pre><code> function areaOnkeydown(e) { var code = (e.keyCode ? e.keyCode : e.which); if (code === 13)...
[ { "answer_id": 74594279, "author": "IT goldman", "author_id": 3807365, "author_profile": "https://Stackoverflow.com/users/3807365", "pm_score": 1, "selected": false, "text": "Event.preventDefault() function areaOnkeydown(e) {\n var code = (e.keyCode ? e.keyCode : e.which);\n var value ...
2022/11/27
[ "https://Stackoverflow.com/questions/74593369", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5674804/" ]
74,593,392
<p>I'm trying to center my title so I used <code>white-space: nowrap;</code> so it didn't stack and it appeared in one line but now it won't center. So there is the CSS code for the title and the appearance of it is fine, the only problem is that, instead of appearing centered, it starts from the center, and it keeps g...
[ { "answer_id": 74594279, "author": "IT goldman", "author_id": 3807365, "author_profile": "https://Stackoverflow.com/users/3807365", "pm_score": 1, "selected": false, "text": "Event.preventDefault() function areaOnkeydown(e) {\n var code = (e.keyCode ? e.keyCode : e.which);\n var value ...
2022/11/27
[ "https://Stackoverflow.com/questions/74593392", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16073043/" ]
74,593,414
<p>I get as input times (hh:mm:ss) as float - e.g. 18:52:18 is a float 0.786331018518518.</p> <p>I achieved to calculate the time from a float value with this code:</p> <pre><code>val = 0.786331018518518 hour = int(val*24) minute = int((val*24-hour)*60) seconds = int(((val*24-hour)*60-minute)*60) print(f&quot;{hour}:{m...
[ { "answer_id": 74593437, "author": "azro", "author_id": 7212686, "author_profile": "https://Stackoverflow.com/users/7212686", "pm_score": 3, "selected": true, "text": "datetime.timedelta val = 0.786331018518518\nd = timedelta(days=val)\nprint(d) # 18:52:19\n\nval = d.total_seconds() / 8...
2022/11/27
[ "https://Stackoverflow.com/questions/74593414", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12415855/" ]
74,593,433
<p>I am trying to run the application but this error keeps prompting.</p> <p><strong>Description</strong>:</p> <p>Parameter 0 of constructor in com.clientui.clientui.controller.ClientController required a bean of type 'org.springframework.cloud.openfeign.FeignContext' that could not be found.</p> <p><strong>Action</str...
[ { "answer_id": 74607414, "author": "Joaonic", "author_id": 13856532, "author_profile": "https://Stackoverflow.com/users/13856532", "pm_score": 1, "selected": false, "text": "@ImportAutoConfiguration({FeignAutoConfiguration.class}) import org.springframework.cloud.openfeign.FeignAutoConfi...
2022/11/27
[ "https://Stackoverflow.com/questions/74593433", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19625477/" ]
74,593,442
<p>I am trying to create a notification system that gives custom notifications. Here is my function: <div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>var notificationCount = 0; docu...
[ { "answer_id": 74607414, "author": "Joaonic", "author_id": 13856532, "author_profile": "https://Stackoverflow.com/users/13856532", "pm_score": 1, "selected": false, "text": "@ImportAutoConfiguration({FeignAutoConfiguration.class}) import org.springframework.cloud.openfeign.FeignAutoConfi...
2022/11/27
[ "https://Stackoverflow.com/questions/74593442", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15042008/" ]
74,593,459
<p>I want a list that displays the first element of the sublists I input.</p> <pre><code>def firstelements(w): return [item[0] for item in w] </code></pre> <p>Which works, but when I try doing</p> <pre><code>firstelements([[10,10],[3,5],[]]) </code></pre> <p>there's an error because of the <code>[]</code>. How can ...
[ { "answer_id": 74593476, "author": "Chris", "author_id": 15261315, "author_profile": "https://Stackoverflow.com/users/15261315", "pm_score": 2, "selected": false, "text": "def firstelements(w):\n return [item[0] for item in w if item != []]\n def firstelements(w):\n return [item[0]...
2022/11/27
[ "https://Stackoverflow.com/questions/74593459", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20617137/" ]
74,593,461
<p>Viewing the source code of CPython on GitHub, I saw the method here:<br /> <a href="https://github.com/python/cpython/blob/main/Python/bltinmodule.c" rel="nofollow noreferrer">https://github.com/python/cpython/blob/main/Python/bltinmodule.c</a></p> <p>And more specifically:</p> <pre><code>static PyObject * builtin_s...
[ { "answer_id": 74593624, "author": "chepner", "author_id": 1126841, "author_profile": "https://Stackoverflow.com/users/1126841", "pm_score": 1, "selected": false, "text": "list.sort sorted sorted def sorted(itr, *, key=None):\n newlist = list(itr)\n newlist.sort(key=key)\n retur...
2022/11/27
[ "https://Stackoverflow.com/questions/74593461", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13428065/" ]
74,593,497
<p>I'm using Keycloak version 20.0.1 (also tried on 19.0.0). I have a realm configured and under the Client Scopes -&gt; realm roles -&gt; Mappers I have added the <code>realm_access.roles</code> mapping.</p> <p>For some reasons that I don't understand, the JWT token that I get as a response doesn't contain the Realm R...
[ { "answer_id": 74595089, "author": "Bench Vue", "author_id": 8054998, "author_profile": "https://Stackoverflow.com/users/8054998", "pm_score": 1, "selected": false, "text": "role mapping grant_type = password {\n \"exp\": 1669599866,\n \"iat\": 1669596266,\n \"jti\": \"ad4e3b51-b23e-4...
2022/11/27
[ "https://Stackoverflow.com/questions/74593497", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18215650/" ]
74,593,534
<p>my issue is when I am creating a user in the rails console then it is not created. You can also check the below code:</p> <p><strong>This is my console:</strong></p> <pre class="lang-rb prettyprint-override"><code>Loading development environment (Rails 7.0.4) irb(main):001:0&gt; User.create(name: 'Tom', photo: 'http...
[ { "answer_id": 74595089, "author": "Bench Vue", "author_id": 8054998, "author_profile": "https://Stackoverflow.com/users/8054998", "pm_score": 1, "selected": false, "text": "role mapping grant_type = password {\n \"exp\": 1669599866,\n \"iat\": 1669596266,\n \"jti\": \"ad4e3b51-b23e-4...
2022/11/27
[ "https://Stackoverflow.com/questions/74593534", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15047456/" ]
74,593,566
<p>as in title. I am new in the react and I write simple todoApp. My App.js:</p> <pre><code>const App = () =&gt; { const initTasks = [ {id: 1,text: 'Task1'}, {id: 2,text: &quot;Task2&quot;}, {id: 3,text: &quot;Task3&quot;}] const [tasks, setTasks] = useState(initTasks); const deleteTask = (index) =&gt; { ...
[ { "answer_id": 74593663, "author": "John Li", "author_id": 20436957, "author_profile": "https://Stackoverflow.com/users/20436957", "pm_score": 2, "selected": false, "text": "setTasks console.log(tasks) tasks const deleteTask = (index) =>\n setTasks((prev) => prev.filter((x) => x.id !== ...
2022/11/27
[ "https://Stackoverflow.com/questions/74593566", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14566071/" ]
74,593,569
<p>I am trying to set an attribute for the input tag webelement for the value but actually I am getting this below error</p> <p>Below is the code which I have written for this,</p> <pre><code>'document.getElementsByName('date')[0].setAttribute('value','2022-11-29');' </code></pre> <p>and the below error is getting</p> ...
[ { "answer_id": 74593663, "author": "John Li", "author_id": 20436957, "author_profile": "https://Stackoverflow.com/users/20436957", "pm_score": 2, "selected": false, "text": "setTasks console.log(tasks) tasks const deleteTask = (index) =>\n setTasks((prev) => prev.filter((x) => x.id !== ...
2022/11/27
[ "https://Stackoverflow.com/questions/74593569", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4894253/" ]
74,593,580
<p>Is it possible to filter by how many + signs are in a row in r and also if a certain letter (or word) is in the row?</p> <p>Like for example if I only wanted to filter rows with 2 or more + signs and they also have to include c.</p> <p>Example input:</p> <pre><code>a + b + c a + b a + c a + b + b a + c + c a + ...
[ { "answer_id": 74593663, "author": "John Li", "author_id": 20436957, "author_profile": "https://Stackoverflow.com/users/20436957", "pm_score": 2, "selected": false, "text": "setTasks console.log(tasks) tasks const deleteTask = (index) =>\n setTasks((prev) => prev.filter((x) => x.id !== ...
2022/11/27
[ "https://Stackoverflow.com/questions/74593580", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18564314/" ]
74,593,584
<p>I working on Azure Function App and would like to adding custom messages/traces which can aid in debugging and improving performance. THis is my code I am using:</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-...
[ { "answer_id": 74593663, "author": "John Li", "author_id": 20436957, "author_profile": "https://Stackoverflow.com/users/20436957", "pm_score": 2, "selected": false, "text": "setTasks console.log(tasks) tasks const deleteTask = (index) =>\n setTasks((prev) => prev.filter((x) => x.id !== ...
2022/11/27
[ "https://Stackoverflow.com/questions/74593584", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8400863/" ]
74,593,617
<p>I want to get docker image URL from the user but URLs can't be acceptable with <code>models.URLField()</code> in django.<br>For example, this URL: <code>hub.something.com/nginx:1.21</code>, got an error.<br>How can fix it?</p>
[ { "answer_id": 74594234, "author": "Adrian Kurzeja", "author_id": 8571154, "author_profile": "https://Stackoverflow.com/users/8571154", "pm_score": 2, "selected": false, "text": "from django.core.validators import URLValidator\nfrom django.utils.deconstruct import deconstructible\nfrom d...
2022/11/27
[ "https://Stackoverflow.com/questions/74593617", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12727539/" ]
74,593,625
<p>Input data:</p> <ol> <li>LinearLayout with a couple of views (further &quot;Info&quot;)</li> <li>RecyclerView with pagination</li> </ol> <p>In theory, the objective is easy: make both views scrollable like a single container. In practice, it is ridiculously complicated.</p> <p><strong>Attempt #1: NestedScrollView</s...
[ { "answer_id": 74594234, "author": "Adrian Kurzeja", "author_id": 8571154, "author_profile": "https://Stackoverflow.com/users/8571154", "pm_score": 2, "selected": false, "text": "from django.core.validators import URLValidator\nfrom django.utils.deconstruct import deconstructible\nfrom d...
2022/11/27
[ "https://Stackoverflow.com/questions/74593625", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17088333/" ]
74,593,627
<p>if I had a few async <code>fetch()</code>'s and their respective promises at hand, I seek to implement a function such that the earliest resolution into <code>Response()</code> with a status code 200 would return that very <code>Response</code> and drop everything else to the limbo of garbage collector. On the other...
[ { "answer_id": 74593655, "author": "Bergi", "author_id": 1048572, "author_profile": "https://Stackoverflow.com/users/1048572", "pm_score": 0, "selected": false, "text": "Promise.any Promise.race const urls = […];\nconst fastestResponse = await Promise.any(urls.map(async url => {\n const...
2022/11/27
[ "https://Stackoverflow.com/questions/74593627", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2550808/" ]
74,593,632
<p>I have a list with a custom bullet type: <a href="https://i.stack.imgur.com/ptOES.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ptOES.png" alt="enter image description here" /></a></p> <p>This works exactly how I want. The list item's text wraps without going under the custom bullet, the bullet ...
[ { "answer_id": 74593655, "author": "Bergi", "author_id": 1048572, "author_profile": "https://Stackoverflow.com/users/1048572", "pm_score": 0, "selected": false, "text": "Promise.any Promise.race const urls = […];\nconst fastestResponse = await Promise.any(urls.map(async url => {\n const...
2022/11/27
[ "https://Stackoverflow.com/questions/74593632", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5692730/" ]
74,593,634
<p>Below is my script for import data to mysql:</p> <pre><code>foreach ($file_data as $row) { $sku = $row[$_POST[&quot;sku&quot;]]; $title = $row[$_POST[&quot;title&quot;]]; $slug = $row[$_POST[&quot;title&quot;]]; $product_type = &quot;physical&quot;; $description = $row[$_POST[&quot;descripti...
[ { "answer_id": 74593655, "author": "Bergi", "author_id": 1048572, "author_profile": "https://Stackoverflow.com/users/1048572", "pm_score": 0, "selected": false, "text": "Promise.any Promise.race const urls = […];\nconst fastestResponse = await Promise.any(urls.map(async url => {\n const...
2022/11/27
[ "https://Stackoverflow.com/questions/74593634", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20598729/" ]
74,593,642
<p>I'm trying to write a code that calculates something similar to a geometric sequence.</p> <p><a href="https://i.stack.imgur.com/wOln5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wOln5.png" alt="enter image description here" /></a></p> <p>I thought i did it, but when i looked at the solution, i...
[ { "answer_id": 74593655, "author": "Bergi", "author_id": 1048572, "author_profile": "https://Stackoverflow.com/users/1048572", "pm_score": 0, "selected": false, "text": "Promise.any Promise.race const urls = […];\nconst fastestResponse = await Promise.any(urls.map(async url => {\n const...
2022/11/27
[ "https://Stackoverflow.com/questions/74593642", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14297177/" ]
74,593,644
<p>I am trying to test the hugging face's <code>prithivida/parrot_paraphraser_on_T5</code> model but getting token not found error.</p> <pre><code>from parrot import Parrot import torch import warnings warnings.filterwarnings(&quot;ignore&quot;) parrot = Parrot(model_tag=&quot;prithivida/parrot_paraphraser_on_T5&quot;,...
[ { "answer_id": 74593655, "author": "Bergi", "author_id": 1048572, "author_profile": "https://Stackoverflow.com/users/1048572", "pm_score": 0, "selected": false, "text": "Promise.any Promise.race const urls = […];\nconst fastestResponse = await Promise.any(urls.map(async url => {\n const...
2022/11/27
[ "https://Stackoverflow.com/questions/74593644", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9207531/" ]
74,593,666
<p>I have the below code to cache various partitions and save them in a map then to union them all</p> <p>and i am getting the below error unionByName is not a member of null</p> <pre><code>Var cache_map = Map[String,Dataframe]() for (partition &lt;- partitionlist){ var df_test = spark.read.format(&quot;delta&quot;)....
[ { "answer_id": 74593655, "author": "Bergi", "author_id": 1048572, "author_profile": "https://Stackoverflow.com/users/1048572", "pm_score": 0, "selected": false, "text": "Promise.any Promise.race const urls = […];\nconst fastestResponse = await Promise.any(urls.map(async url => {\n const...
2022/11/27
[ "https://Stackoverflow.com/questions/74593666", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7700324/" ]
74,593,724
<p>I'm trying to create a simple <code>Style</code> for the <code>Header</code> of all the <code>ToggleSwitche</code>s on a given <code>Page</code> (WinUI 3 v1.2 desktop project). I'd really like to use <code>x:Bind</code> for all of my bindings (not <code>Binding</code>). Here's my <code>Page.Resources</code></p> <pre...
[ { "answer_id": 74593655, "author": "Bergi", "author_id": 1048572, "author_profile": "https://Stackoverflow.com/users/1048572", "pm_score": 0, "selected": false, "text": "Promise.any Promise.race const urls = […];\nconst fastestResponse = await Promise.any(urls.map(async url => {\n const...
2022/11/27
[ "https://Stackoverflow.com/questions/74593724", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14062288/" ]
74,593,727
<p>If I run</p> <blockquote> <p>npm run client</p> </blockquote> <p>in my_directory, it will translate to:</p> <blockquote> <p>webpack -w --mode production --config ./webpack.config.js</p> </blockquote> <p>However, if I am in my_directory and I manually type in the above command, I get:</p> <blockquote> <p>zsh: command...
[ { "answer_id": 74593655, "author": "Bergi", "author_id": 1048572, "author_profile": "https://Stackoverflow.com/users/1048572", "pm_score": 0, "selected": false, "text": "Promise.any Promise.race const urls = […];\nconst fastestResponse = await Promise.any(urls.map(async url => {\n const...
2022/11/27
[ "https://Stackoverflow.com/questions/74593727", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20592666/" ]
74,593,738
<p>I'm programming automation to my CI/CD Gitlab to deploy my Azure Functions projects programmatically.</p> <p>But I'm having an issue when I publish a new function to a function app created previously using az cli like the example below:</p> <pre><code>$ func azure functionapp publish $AZURE_APP_NAME ${SLOT_PARAMETER...
[ { "answer_id": 74655052, "author": "Pravallika Kothaveerannagari", "author_id": 19991670, "author_profile": "https://Stackoverflow.com/users/19991670", "pm_score": 1, "selected": false, "text": "SCM_DO_BUILD_DURING_DEPLOYMENT=true az functionapp config appsettings set --name PravuFunctio...
2022/11/27
[ "https://Stackoverflow.com/questions/74593738", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1472606/" ]
74,593,769
<p>I want to build a simple TDEE calculator using Javascript.</p> <p>I want the user to fill in their details in a html form and then pass that info into a Javascript object.</p> <h1>See my HTML code below, where I created the form;</h1> <pre><code>&lt;!DOCTYPE html&gt; &lt;html lang=&quot;en&quot;&gt; &lt;head&gt; ...
[ { "answer_id": 74655052, "author": "Pravallika Kothaveerannagari", "author_id": 19991670, "author_profile": "https://Stackoverflow.com/users/19991670", "pm_score": 1, "selected": false, "text": "SCM_DO_BUILD_DURING_DEPLOYMENT=true az functionapp config appsettings set --name PravuFunctio...
2022/11/27
[ "https://Stackoverflow.com/questions/74593769", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20617557/" ]
74,593,787
<p>I have this GridView markup:</p> <pre><code> &lt;asp:GridView ID=&quot;GridView1&quot; runat=&quot;server&quot; Width =&quot;300px&quot;&gt; &lt;Columns&gt; &lt;asp:BoundField AccessibleHeaderText=&quot;TEXT&quot; HeaderText=&quot;TEXT&quot; /&gt; &lt;/Columns&gt; ...
[ { "answer_id": 74594715, "author": "Albert D. Kallal", "author_id": 10527, "author_profile": "https://Stackoverflow.com/users/10527", "pm_score": 1, "selected": false, "text": " <asp:GridView ID=\"GridView1\" runat=\"server\" CssClass=\"table\" Width=\"20%\">\n\n </asp:Grid...
2022/11/27
[ "https://Stackoverflow.com/questions/74593787", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20465780/" ]
74,593,796
<p>I need your help on the following for Java:</p> <p>I have a List which contains different objects and each objects has three different values (String, int, double).</p> <p>I want to increase the int value by one. How do I access the int value of an object in this list and increase it by 1?</p> <p>Thanks for any help...
[ { "answer_id": 74593851, "author": "bighugedev", "author_id": 17846993, "author_profile": "https://Stackoverflow.com/users/17846993", "pm_score": 0, "selected": false, "text": "list.set() list.get(1).count++;\n count int" }, { "answer_id": 74593902, "author": "CryptoFool", ...
2022/11/27
[ "https://Stackoverflow.com/questions/74593796", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20617620/" ]
74,593,812
<p>I want to split a list into sublist with specific 'if statement' for each sublist. For examle: input:</p> <pre><code>a = [1, 2, 7.9, 3, 4, 3.7, 5, 6, 2.2, 7, 8, 1.2, 5.7] </code></pre> <p>output:</p> <pre><code>b = [[1, 1.2, 2], [2.2, 3, 3.7, 4], [5, 5.7, 6], [7, 7.9, 8]] </code></pre> <p>Values should be grouped by...
[ { "answer_id": 74593983, "author": "Pranav Hosangadi", "author_id": 843953, "author_profile": "https://Stackoverflow.com/users/843953", "pm_score": 2, "selected": true, "text": "dx [[1, 1.2, 2], [2.2, 3], [3.7, 4], [5, 5.7, 6], [7, 7.9, 8]]\n numbers = sorted(a)\n bucket bucket = []\nres...
2022/11/27
[ "https://Stackoverflow.com/questions/74593812", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14620687/" ]
74,593,838
<p>I have a torch tensor (x) of shape [16,3,32,32], 16 images, 3 colour channels 32x32. I'm doing diffusion and need to apply the following formula to the images</p> <p><code>return sqrt_alpha_hat * x + sqrt_one_minus_alpha_hat * error</code></p> <p>Error has the same dimensions as x. This works fine when sqrt_alpha_ha...
[ { "answer_id": 74593983, "author": "Pranav Hosangadi", "author_id": 843953, "author_profile": "https://Stackoverflow.com/users/843953", "pm_score": 2, "selected": true, "text": "dx [[1, 1.2, 2], [2.2, 3], [3.7, 4], [5, 5.7, 6], [7, 7.9, 8]]\n numbers = sorted(a)\n bucket bucket = []\nres...
2022/11/27
[ "https://Stackoverflow.com/questions/74593838", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20617626/" ]
74,593,845
<p>I have dynamically allocated array consisting of a lot of numbers (200 000+) and I have to find out, if (and how many) these numbers are contained in given interval. There can be duplicates and all the numbers are in random order.</p> <p>Example of numbers I get at the beginning:</p> <pre><code>{1,2,3,1484984,489416...
[ { "answer_id": 74594135, "author": "Grolldash", "author_id": 14726548, "author_profile": "https://Stackoverflow.com/users/14726548", "pm_score": 2, "selected": false, "text": " for(int i = 0; i <= arraySize-1; i++){\n if(array[i] <= endOfInterval && array[i] >= startOfInterval)...
2022/11/27
[ "https://Stackoverflow.com/questions/74593845", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14726548/" ]
74,593,893
<p>I have written a PHP library using the PHP 8.0 <code>readonly</code> keyword and then I realised that it would be good to support earlier versions of PHP such as 7.4.</p> <p>I could easily remove the <code>readonly</code> keywords from my code but I don't want to do that -- they were put there for a reason!</p> <p>H...
[ { "answer_id": 74593951, "author": "Martin Zeitler", "author_id": 549372, "author_profile": "https://Stackoverflow.com/users/549372", "pm_score": 1, "selected": false, "text": "readonly" }, { "answer_id": 74594292, "author": "IMSoP", "author_id": 157957, "author_profi...
2022/11/27
[ "https://Stackoverflow.com/questions/74593893", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1291717/" ]
74,593,913
<p>Define a <code>Course</code> base class with attributes <code>number</code> and <code>title</code>. Define a <code>print_info()</code> method that displays the course <code>number</code> and <code>title</code>.</p> <p>Also define a derived class <code>OfferedCourse</code> with the additional attributes <code>instruc...
[ { "answer_id": 74593951, "author": "Martin Zeitler", "author_id": 549372, "author_profile": "https://Stackoverflow.com/users/549372", "pm_score": 1, "selected": false, "text": "readonly" }, { "answer_id": 74594292, "author": "IMSoP", "author_id": 157957, "author_profi...
2022/11/27
[ "https://Stackoverflow.com/questions/74593913", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20617742/" ]
74,593,918
<p>I have a lambda that triggers off an S3 bucket upload (it basically converts a PDF to a dataframe and writes it to a different s3 bucket). Both of these belong to AWS account <em>A</em>. I would like to allow cross-account s3 access to trigger this lambda from another IAM user from account <em>B</em> (<code>Administ...
[ { "answer_id": 74594303, "author": "Pawel Piwosz", "author_id": 20614302, "author_profile": "https://Stackoverflow.com/users/20614302", "pm_score": 0, "selected": false, "text": "session = boto3.Session(\n aws_access_key_id=\"XXXX\",\n aws_secret_access_key=\"XXXX\",\n region_na...
2022/11/27
[ "https://Stackoverflow.com/questions/74593918", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2482149/" ]
74,593,927
<p><strong>Some context :</strong></p> <p>In Godot, one is constantly working with nodes and those nodes' children.</p> <p>Godot has made the design choice of letting the dev manipulate nodes with some sort of <strong>querying</strong> language that often relies on the full path (starting from the root of the current s...
[ { "answer_id": 74594303, "author": "Pawel Piwosz", "author_id": 20614302, "author_profile": "https://Stackoverflow.com/users/20614302", "pm_score": 0, "selected": false, "text": "session = boto3.Session(\n aws_access_key_id=\"XXXX\",\n aws_secret_access_key=\"XXXX\",\n region_na...
2022/11/27
[ "https://Stackoverflow.com/questions/74593927", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9359785/" ]
74,593,928
<p>I can't display object in Vue 3 script setup. I used ref, reactive and standard variables but all scenarios is unsuccessful.</p> <p>I want to reflect the response from the getDetail request to the screen. getDetail is fetching this data asynchronously. I run into a problem in every scenario.</p> <h2>ref() usage</h2>...
[ { "answer_id": 74593967, "author": "yoduh", "author_id": 6225326, "author_profile": "https://Stackoverflow.com/users/6225326", "pm_score": 2, "selected": true, "text": "movie[0]?.original_title\n let movie = ref([\n {\n original_title: ''\n }\n])\n" }, { "answer_id": 7459397...
2022/11/27
[ "https://Stackoverflow.com/questions/74593928", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17806037/" ]
74,593,962
<p>I am a python newbie. I am in the phase of testing my code but I am quite confused why sometimes this works and sometimes it does not. As per my understanding the random.randint(0,13) this means that random numbers from 0 to 12 which is the number of my cards list.</p> <p><strong>Error im geting:</strong></p> <pre><...
[ { "answer_id": 74593979, "author": "Adam Smooch", "author_id": 10761353, "author_profile": "https://Stackoverflow.com/users/10761353", "pm_score": 1, "selected": true, "text": ">>> from random import randint\n>>> randint(0,13)\n3\n>>> randint(0,13)\n1\n>>> randint(0,13)\n10\n>>> randint(...
2022/11/27
[ "https://Stackoverflow.com/questions/74593962", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18126961/" ]
74,594,034
<p>I have two dataframes.</p> <p><strong>Input data</strong></p> <pre><code># First df mainly consists data provided by the user fdf = pd.DataFrame(columns=['user_data'],data=[10,14,1],index=['alpha','beta','gamma']) user_data alpha 10 beta 14 gamma 1 # Second df is basically a default data consistin...
[ { "answer_id": 74593979, "author": "Adam Smooch", "author_id": 10761353, "author_profile": "https://Stackoverflow.com/users/10761353", "pm_score": 1, "selected": true, "text": ">>> from random import randint\n>>> randint(0,13)\n3\n>>> randint(0,13)\n1\n>>> randint(0,13)\n10\n>>> randint(...
2022/11/27
[ "https://Stackoverflow.com/questions/74594034", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11922765/" ]
74,594,053
<p>Hi i was just wondering if anyone can show me how to use an array with mabye a boolean or something to either end restart last function or start from the very beginning of my Ohm's Law Caculator. Here is my code currently. Im kinda on a time crunch so thank you in advance.</p> <pre><code>using System; using System.T...
[ { "answer_id": 74593979, "author": "Adam Smooch", "author_id": 10761353, "author_profile": "https://Stackoverflow.com/users/10761353", "pm_score": 1, "selected": true, "text": ">>> from random import randint\n>>> randint(0,13)\n3\n>>> randint(0,13)\n1\n>>> randint(0,13)\n10\n>>> randint(...
2022/11/27
[ "https://Stackoverflow.com/questions/74594053", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20549538/" ]
74,594,059
<p>I already know how to use <a href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.fillna.html" rel="nofollow noreferrer">fillna()</a> but it fills every empty value with the same indicated value. In this case, I want to fill each empty value with different values, should I use the row nu...
[ { "answer_id": 74593979, "author": "Adam Smooch", "author_id": 10761353, "author_profile": "https://Stackoverflow.com/users/10761353", "pm_score": 1, "selected": true, "text": ">>> from random import randint\n>>> randint(0,13)\n3\n>>> randint(0,13)\n1\n>>> randint(0,13)\n10\n>>> randint(...
2022/11/27
[ "https://Stackoverflow.com/questions/74594059", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20616738/" ]
74,594,062
<p>Here's (what I think is) the correct way to layout a (reflowable) html document. The width is capped relative to the font width, and the margin is auto calculated to be symmetric so that the content is centred.</p> <p>This gives a pleasant reading experience on both ultra-wide and mobile.</p> <p><div class="snippet"...
[ { "answer_id": 74594160, "author": "Carsten Massmann", "author_id": 2610061, "author_profile": "https://Stackoverflow.com/users/2610061", "pm_score": -1, "selected": false, "text": "<ol> <li> ol {\n counter-reset: item;\n padding-left: 0;\n}\nli {\n width:10em;\n text-align:left;\n ...
2022/11/27
[ "https://Stackoverflow.com/questions/74594062", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11998382/" ]
74,594,081
<p>I am making an application that creates a password based on the requirements of the password needed. The requirements are picked through check buttons, so if a check button is on, then the password should contain those values, if the check button is off then the password should not contain that value. All of the che...
[ { "answer_id": 74594160, "author": "Carsten Massmann", "author_id": 2610061, "author_profile": "https://Stackoverflow.com/users/2610061", "pm_score": -1, "selected": false, "text": "<ol> <li> ol {\n counter-reset: item;\n padding-left: 0;\n}\nli {\n width:10em;\n text-align:left;\n ...
2022/11/27
[ "https://Stackoverflow.com/questions/74594081", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14250675/" ]
74,594,097
<pre><code>import java.lang.Math; public class Einleitung { public static void main(String[] args) { double c = 1/8; double e = Math.round(c*100)/100.0; System.out.println(e); } } </code></pre> <p>The output returns a double, whoose decimal places got cut off after the first co...
[ { "answer_id": 74594158, "author": "AterLux", "author_id": 4931630, "author_profile": "https://Stackoverflow.com/users/4931630", "pm_score": -1, "selected": false, "text": " double c = 1/8;\n c double c = 1.0/8; double" }, { "answer_id": 74594431, "author": "rzwitserlo...
2022/11/27
[ "https://Stackoverflow.com/questions/74594097", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20617842/" ]
74,594,131
<p>I want to check the Kubernetes configuration - how many nodes, etc. I tried the following command.</p> <pre><code>kubectl describe cluster error: the server doesn't have a resource type &quot;cluster&quot; </code></pre> <p>BTW, I tried to use the following command to check the AZ of the nodes of the pods. But it ret...
[ { "answer_id": 74594269, "author": "Danny88", "author_id": 20566549, "author_profile": "https://Stackoverflow.com/users/20566549", "pm_score": -1, "selected": false, "text": "kubectl cluster-info\n" }, { "answer_id": 74597475, "author": "Blender Fox", "author_id": 2017590...
2022/11/27
[ "https://Stackoverflow.com/questions/74594131", "https://Stackoverflow.com", "https://Stackoverflow.com/users/825920/" ]
74,594,144
<p>I want to check if values from column B exist in column A, and if yes and equal with the value in that row, create another column D, getting the value from column C (for the A on that row).</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>A</th> <th>B</th> <th>C</th> <th>D</th> </tr> </th...
[ { "answer_id": 74594156, "author": "akrun", "author_id": 3732271, "author_profile": "https://Stackoverflow.com/users/3732271", "pm_score": 2, "selected": false, "text": "match NA NA df1$D <- with(df1, C[match(B, A)])\n > df1\n A B C D\n1 a f 12 55\n2 b a 23 12\n3 c b 33 23\n4 d c 1 ...
2022/11/27
[ "https://Stackoverflow.com/questions/74594144", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19559385/" ]
74,594,151
<p>I'm trying to implement a wrapper class for another class that has a private <code>std::tuple</code> member and enable structured bindings on the wrapper class. Here's the class with the private tuple:</p> <pre class="lang-cpp prettyprint-override"><code>class widget { friend class wrap; std::tuple&lt;int, doubl...
[ { "answer_id": 74594313, "author": "Ryan Haining", "author_id": 1013719, "author_profile": "https://Stackoverflow.com/users/1013719", "pm_score": 3, "selected": true, "text": "auto& [i_ref, d_ref] = wrap(w);\n auto& = wrap& wr = wrap(w);\n auto& auto& [i, d] = std::tuple{1, 1.0};\n prog....
2022/11/27
[ "https://Stackoverflow.com/questions/74594151", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6333988/" ]
74,594,164
<p>Created a simple binary search and I noticed that the usage of <code>mid--</code> vs <code>mid -= 1</code> or <code>mid - 1</code> returned different results and essentially caused the function to fail. I was scanning resources online and based on reading other SO posts, my assumption is that the <code>--</code> and...
[ { "answer_id": 74594313, "author": "Ryan Haining", "author_id": 1013719, "author_profile": "https://Stackoverflow.com/users/1013719", "pm_score": 3, "selected": true, "text": "auto& [i_ref, d_ref] = wrap(w);\n auto& = wrap& wr = wrap(w);\n auto& auto& [i, d] = std::tuple{1, 1.0};\n prog....
2022/11/27
[ "https://Stackoverflow.com/questions/74594164", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10349152/" ]
74,594,185
<p>I have a dataframe that looks like the below (inclusive of the brackets and quotes):</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>ID</th> <th>Interests</th> </tr> </thead> <tbody> <tr> <td>2131</td> <td><code>['music','art','travel']</code></td> </tr> <tr> <td>3213</td> <td><code>[]</...
[ { "answer_id": 74594207, "author": "Tron", "author_id": 9917285, "author_profile": "https://Stackoverflow.com/users/9917285", "pm_score": 0, "selected": false, "text": "df['new_interests'] = df['Interests'].apply(lambda x: temp.append(len(x)))\n" }, { "answer_id": 74594257, "...
2022/11/27
[ "https://Stackoverflow.com/questions/74594185", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20616895/" ]
74,594,203
<p>I have a <code>Container</code> whitch needs to include two <code>TextField</code> where i can insert a product name and description. It is supposed to appear, and take its place, when a <code>FloatingActionButton</code> is pressed. This is actually working till I insert the <code>TextField</code> and I can't unders...
[ { "answer_id": 74594207, "author": "Tron", "author_id": 9917285, "author_profile": "https://Stackoverflow.com/users/9917285", "pm_score": 0, "selected": false, "text": "df['new_interests'] = df['Interests'].apply(lambda x: temp.append(len(x)))\n" }, { "answer_id": 74594257, "...
2022/11/27
[ "https://Stackoverflow.com/questions/74594203", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19450321/" ]
74,594,221
<p>I'm working with a dynamic reactive form that takes a json input and builds out a form. I also wrote a custom date validator to check if a date is older than another given date (the date is passed in to the validator) .. and returns an error when the input date by the user is older than the given date. Because of th...
[ { "answer_id": 74594207, "author": "Tron", "author_id": 9917285, "author_profile": "https://Stackoverflow.com/users/9917285", "pm_score": 0, "selected": false, "text": "df['new_interests'] = df['Interests'].apply(lambda x: temp.append(len(x)))\n" }, { "answer_id": 74594257, "...
2022/11/27
[ "https://Stackoverflow.com/questions/74594221", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5670640/" ]
74,594,222
<p>Have '<strong>TextInputArea</strong>' widget, and want to keep this widget remain on screen (upper part of screen) all the time,</p> <p>Lower part of screen need to be changed as per <strong>BottomNavigationBar</strong> (it has three pages XX,YY,ZZ) is clicked</p> <p>But '<strong>TextInputArea</strong>' is not getti...
[ { "answer_id": 74594207, "author": "Tron", "author_id": 9917285, "author_profile": "https://Stackoverflow.com/users/9917285", "pm_score": 0, "selected": false, "text": "df['new_interests'] = df['Interests'].apply(lambda x: temp.append(len(x)))\n" }, { "answer_id": 74594257, "...
2022/11/27
[ "https://Stackoverflow.com/questions/74594222", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3290584/" ]
74,594,235
<p>I want add PHP-code as text in laravel blade. (Something like adding code in stackoverflow)</p> <p>in blade file I have:</p> <pre><code>{!! nl2br($article-&gt;body_ru) !!} </code></pre> <p>in $article-&gt;body_ru I'm add</p> <pre><code>huijlhgfyuhukik rfthkgjb ftygyjh &lt;code&gt; &lt;?php namespace App\Services; ...
[ { "answer_id": 74594207, "author": "Tron", "author_id": 9917285, "author_profile": "https://Stackoverflow.com/users/9917285", "pm_score": 0, "selected": false, "text": "df['new_interests'] = df['Interests'].apply(lambda x: temp.append(len(x)))\n" }, { "answer_id": 74594257, "...
2022/11/27
[ "https://Stackoverflow.com/questions/74594235", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14841215/" ]
74,594,291
<p>I have a data frame loaded in R and I need to sum one row. The problem is that I've tried to use rowSums() function, but 2 columns are not numeric ones (one is character &quot;Nazwa&quot; and one is boolean &quot;X&quot; at the end of data frame). Is there any option to sum this row without those two columns? So I'd...
[ { "answer_id": 74594207, "author": "Tron", "author_id": 9917285, "author_profile": "https://Stackoverflow.com/users/9917285", "pm_score": 0, "selected": false, "text": "df['new_interests'] = df['Interests'].apply(lambda x: temp.append(len(x)))\n" }, { "answer_id": 74594257, "...
2022/11/27
[ "https://Stackoverflow.com/questions/74594291", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17427031/" ]
74,594,320
<p>`</p> <pre><code>import os import discord from dotenv import load_dotenv from discord.ext import commands from discord import FFmpegPCMAudio load_dotenv(&quot;.env&quot;) TOKEN = os.getenv(&quot;DISCORD_TOKEN&quot;) client = commands.Bot(command_prefix='$') @client.command() async def unvc(ctx): await ctx.gui...
[ { "answer_id": 74594207, "author": "Tron", "author_id": 9917285, "author_profile": "https://Stackoverflow.com/users/9917285", "pm_score": 0, "selected": false, "text": "df['new_interests'] = df['Interests'].apply(lambda x: temp.append(len(x)))\n" }, { "answer_id": 74594257, "...
2022/11/27
[ "https://Stackoverflow.com/questions/74594320", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19568388/" ]
74,594,373
<p>I have a function that accepts a UIColor.</p> <pre><code>func getColor(_ background: UIColor) -&gt; UIColor { switch background { case .white, .systemBrown: return .black case .darkGray: return .lightGray case .black: return .white default: return .label } } </...
[ { "answer_id": 74594478, "author": "Duncan C", "author_id": 205185, "author_profile": "https://Stackoverflow.com/users/205185", "pm_score": 0, "selected": false, "text": "extension UIColor {\n func isSimilarToColor(_ otherColor: UIColor) -> Bool {\n var myRed: CGFloat = 0\n ...
2022/11/27
[ "https://Stackoverflow.com/questions/74594373", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16220404/" ]
74,594,381
<p>I am making an app in Android Studio with Kotlin. With the lateinit variable in the ListFragment throws me an error called:</p> <blockquote> <p>kotlin.uninitializedpropertyaccessexception: lateinit property dbhelper has not been initialized.</p> </blockquote> <p>I know that there is a form to check the lateinit with...
[ { "answer_id": 74595326, "author": "Tenfour04", "author_id": 506796, "author_profile": "https://Stackoverflow.com/users/506796", "pm_score": 2, "selected": true, "text": "lateinit class CochesDBHelper private constructor(\n context: Context\n) : SQLiteOpenHelper(context, DATABASE_NAME...
2022/11/27
[ "https://Stackoverflow.com/questions/74594381", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20347110/" ]
74,594,418
<p>I'm starting to learn about Jetpack Compose. I put together this <a href="https://github.com/4gus71n/TheOneApp" rel="nofollow noreferrer">app</a> where I explore different day-to-day use cases, each of the feature modules within this project is supposed to tackle different scenarios.</p> <p>One of this feature modul...
[ { "answer_id": 74643473, "author": "z.y", "author_id": 19023745, "author_profile": "https://Stackoverflow.com/users/19023745", "pm_score": 2, "selected": false, "text": "PullRefresh Compose/Accompanist Tab/Pager PullRefresh Column(\n modifier = Modifier.padding(it)\n ) {\n\n ...
2022/11/27
[ "https://Stackoverflow.com/questions/74594418", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1403997/" ]
74,594,492
<p>I am running into an issue building the correct data model for the following JSON response.</p> <pre><code>{ &quot;resources&quot;: [ { &quot;courseid&quot;: 4803, &quot;color&quot;: &quot;Blue&quot;, &quot;teeboxtype&quot;: &quot;Championship&quot;, &quot;slope&quot;: 121, &quot;...
[ { "answer_id": 74643473, "author": "z.y", "author_id": 19023745, "author_profile": "https://Stackoverflow.com/users/19023745", "pm_score": 2, "selected": false, "text": "PullRefresh Compose/Accompanist Tab/Pager PullRefresh Column(\n modifier = Modifier.padding(it)\n ) {\n\n ...
2022/11/27
[ "https://Stackoverflow.com/questions/74594492", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20618177/" ]
74,594,520
<p>hello im new to programing with c# and i wanted to re-create an old proyect i made in scratch but with c#</p> <p><img src="https://i.stack.imgur.com/665Os.png" alt="the scratch code" /></p> <p>but i have several problems with the code i wrote.</p> <pre><code>int qny = 4; int ADD = 1; int B = 1; string C = &quot; &qu...
[ { "answer_id": 74594576, "author": "SilicDev", "author_id": 20614914, "author_profile": "https://Stackoverflow.com/users/20614914", "pm_score": 2, "selected": true, "text": "int qny = 4;\nint ADD = 1;\nint B = 1;\nstring C = \" \";\nfor (int i = 0; i < qny; i++)\n{\n int R = qny + ADD...
2022/11/27
[ "https://Stackoverflow.com/questions/74594520", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20618074/" ]
74,594,554
<p>Hi I have some data I want to save it in dataframe after every update. but It always override my previous data. is there any method to keep my previous data save and add new to it.</p> <pre><code>df = pd.DataFrame(columns=['Entry','Middle','Exit']) def function(): entry_value = 178.184 # data comming from server...
[ { "answer_id": 74594630, "author": "Ali", "author_id": 20618350, "author_profile": "https://Stackoverflow.com/users/20618350", "pm_score": 2, "selected": true, "text": "import pandas as pd\n\ndf = pd.DataFrame(columns=['Entry','Middle','Exit'])\ndef function():\n global df\n entry_...
2022/11/27
[ "https://Stackoverflow.com/questions/74594554", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20584885/" ]
74,594,613
<p>I'm struggling with making a function that changes the value of the coordinates if the parameters appropriate.</p> <p>That's what I made:</p> <pre class="lang-py prettyprint-override"><code>class Move: def __init__(self, x, y): self.x = x self.y = y move = Move(5, 5) def obstacle(axis, value,...
[ { "answer_id": 74594630, "author": "Ali", "author_id": 20618350, "author_profile": "https://Stackoverflow.com/users/20618350", "pm_score": 2, "selected": true, "text": "import pandas as pd\n\ndf = pd.DataFrame(columns=['Entry','Middle','Exit'])\ndef function():\n global df\n entry_...
2022/11/27
[ "https://Stackoverflow.com/questions/74594613", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19713151/" ]
74,594,617
<p>I'm trying to get the amount of pieces belonging to a certain Lego set using the Brickset API (<a href="https://brickset.com/article/52664/api-version-3-documentation" rel="nofollow noreferrer">https://brickset.com/article/52664/api-version-3-documentation</a>) When writing the Json string to the console it displays...
[ { "answer_id": 74594630, "author": "Ali", "author_id": 20618350, "author_profile": "https://Stackoverflow.com/users/20618350", "pm_score": 2, "selected": true, "text": "import pandas as pd\n\ndf = pd.DataFrame(columns=['Entry','Middle','Exit'])\ndef function():\n global df\n entry_...
2022/11/27
[ "https://Stackoverflow.com/questions/74594617", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19306325/" ]
74,594,626
<p>I need to display the values of response, but React doest support the data-for HTML-attribute. When i use the template from <a href="https://learn.microsoft.com/en-us/graph/toolkit/components/get" rel="nofollow noreferrer">https://learn.microsoft.com/en-us/graph/toolkit/components/get</a> I get the error: unexpected...
[ { "answer_id": 74594630, "author": "Ali", "author_id": 20618350, "author_profile": "https://Stackoverflow.com/users/20618350", "pm_score": 2, "selected": true, "text": "import pandas as pd\n\ndf = pd.DataFrame(columns=['Entry','Middle','Exit'])\ndef function():\n global df\n entry_...
2022/11/27
[ "https://Stackoverflow.com/questions/74594626", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20618318/" ]
74,594,643
<p>I think I understand why <code>React.StrictMode</code> causes functions <a href="https://stackoverflow.com/questions/50819162/why-is-my-function-being-called-twice-in-react">to be called twice</a>. However, I have a <code>useEffect</code> that loads data from my api:</p> <pre class="lang-js prettyprint-override"><co...
[ { "answer_id": 74594630, "author": "Ali", "author_id": 20618350, "author_profile": "https://Stackoverflow.com/users/20618350", "pm_score": 2, "selected": true, "text": "import pandas as pd\n\ndf = pd.DataFrame(columns=['Entry','Middle','Exit'])\ndef function():\n global df\n entry_...
2022/11/27
[ "https://Stackoverflow.com/questions/74594643", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1061836/" ]
74,594,645
<p>I have a huge list of sublists, each sublist consisting of a tuple and a list of 4 integers.</p> <p>I want to create a list of unique tuples that adds each integer values of the list (keeping the four integers in the list separate).</p> <p>Short Example:</p> <pre><code>[[(30, 40), [4, 7, 7, 1]],[(30, 40), [2, 9, 3, ...
[ { "answer_id": 74594763, "author": "Andrej Kesely", "author_id": 10035985, "author_profile": "https://Stackoverflow.com/users/10035985", "pm_score": 1, "selected": false, "text": "lst = [\n [(30, 40), [4, 7, 7, 1]],\n [(30, 40), [2, 9, 3, 4]],\n [(30, 40), [6, 5, 10, 0]],\n [...
2022/11/27
[ "https://Stackoverflow.com/questions/74594645", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20543467/" ]
74,594,653
<p>I've looked at the merge sort example code, but there's something I don't understand.</p> <pre><code>void mergesort(int left, int right) { if (left &lt; right) { int sorted[LEN]; int mid, p1, p2, idx; mid = (left + right) / 2; mergesort(left, mid); mergesort(mid + 1,...
[ { "answer_id": 74603927, "author": "rcgldr", "author_id": 3282056, "author_profile": "https://Stackoverflow.com/users/3282056", "pm_score": 1, "selected": false, "text": "static int arr[LEN];\nstatic int sorted[LEN];\nvoid mergesort(int left, int right)\n/* ... */\n" } ]
2022/11/27
[ "https://Stackoverflow.com/questions/74594653", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20287503/" ]