qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
74,402,769
<p>a program that will iterates over each number in a the list then the if statement will check whether the iteration/number is greater than 15 then the loop will stop, otherwise the number from the list will be printed. List = [1, 4, 7, 8, 15, 20, 35, 45, 55]</p> <pre><code>List = [1, 4, 7, 8, 15, 20, 35, 45, 55] for ...
[ { "answer_id": 74402858, "author": "Hasan", "author_id": 5571471, "author_profile": "https://Stackoverflow.com/users/5571471", "pm_score": -1, "selected": false, "text": "elif check List = [1, 4, 7, 8, 15, 20, 35, 45, 55]\nfor i in List:\n if i >= 15:\n break\n elif i > 1:\n...
2022/11/11
[ "https://Stackoverflow.com/questions/74402769", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
74,402,777
<p>I have a <code>long</code> timestamp that is milliseconds since Epoch.</p> <p>I am calling a third-party API that takes a <code>TemporalAccessor</code>.</p> <p>How do I get one from the other?</p> <p>Is <code>Instant.ofEpochMilli(timestamp)</code> sufficiently correct, given epoch is UTC?</p>
[ { "answer_id": 74402945, "author": "xlm", "author_id": 885922, "author_profile": "https://Stackoverflow.com/users/885922", "pm_score": 3, "selected": true, "text": "long Instant.ofEpochMilli Instant TemporalAccessor Instant" }, { "answer_id": 74403122, "author": "Vihung", ...
2022/11/11
[ "https://Stackoverflow.com/questions/74402777", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15452/" ]
74,402,780
<h1>Context:</h1> <p>I'm currently coding a bot on Discord. The bot has a server class within it (with none of the fancy websockets and http requests) and a client class that serves as a bridge between the user and the server. The instance of the client class manages sending log messages to its corresponding user, upda...
[ { "answer_id": 74403053, "author": "Stepan Filonov", "author_id": 8363510, "author_profile": "https://Stackoverflow.com/users/8363510", "pm_score": 0, "selected": false, "text": "async def foo():\n if lock_exists():\n return\n async with lock(ttl=5): # lock is alive for 5 s...
2022/11/11
[ "https://Stackoverflow.com/questions/74402780", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17191838/" ]
74,402,826
<p>Please excuse my noobness regarding this language, I am very much a beginner. I've been tasked with creating a Quiz Maker and I'm stuck on how I am supposed to put some of my class elements into a List. The reason I need to put these into a list is because I don't want to handle each user inputted answer separately,...
[ { "answer_id": 74403053, "author": "Stepan Filonov", "author_id": 8363510, "author_profile": "https://Stackoverflow.com/users/8363510", "pm_score": 0, "selected": false, "text": "async def foo():\n if lock_exists():\n return\n async with lock(ttl=5): # lock is alive for 5 s...
2022/11/11
[ "https://Stackoverflow.com/questions/74402826", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18231242/" ]
74,402,846
<p>I want to shorten the if conditions. Is there any alternative other than switch case?</p> <pre><code> public void check(String name){ String parentFolder = &quot;&quot;; if(name.matches(&quot;birds&quot;)) parentFolder = birdPFUuid; if (name.matches(&quot;dogs&quot;)) ...
[ { "answer_id": 74403137, "author": "Syed Asad Manzoor", "author_id": 20477563, "author_profile": "https://Stackoverflow.com/users/20477563", "pm_score": 1, "selected": false, "text": "((condition == value)?'expr1':'expr2')\n expr1 expr2 String parentFolder = \"\";\nparentFolder = (((name...
2022/11/11
[ "https://Stackoverflow.com/questions/74402846", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19672397/" ]
74,402,881
<p>I have a view that needs to be displayed with a slanted corner on one side. I've already done it when the view has a background color like this:</p> <p><a href="https://i.stack.imgur.com/TbMh0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TbMh0.png" alt="enter image description here" /></a></p> ...
[ { "answer_id": 74426395, "author": "David Mempin", "author_id": 9629494, "author_profile": "https://Stackoverflow.com/users/9629494", "pm_score": 1, "selected": true, "text": "let borderLayer = CAShapeLayer()\nborderLayer.path = path.cgPath\nborderLayer.lineWidth = 2\nborderLayer.strokeC...
2022/11/11
[ "https://Stackoverflow.com/questions/74402881", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9629494/" ]
74,402,886
<p>I have a dataframe and in one of the columns i have quite a lot of missing data, i tried to impute these values but as there is so much that is missing it doesn't do a very good job. The column in question here has a value given for roughly every 5 years, normally i would just delete it but i want to see if i can sa...
[ { "answer_id": 74426395, "author": "David Mempin", "author_id": 9629494, "author_profile": "https://Stackoverflow.com/users/9629494", "pm_score": 1, "selected": true, "text": "let borderLayer = CAShapeLayer()\nborderLayer.path = path.cgPath\nborderLayer.lineWidth = 2\nborderLayer.strokeC...
2022/11/11
[ "https://Stackoverflow.com/questions/74402886", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18338223/" ]
74,402,901
<p>I have a very simple expression below. I am checking each character of a password to ensure it has at least one of the below special characters. However, Flake8 registers the example as bad. How can I address this within Flake8?</p> <p>W605 invalid escape sequence '!'</p> <p>W605 invalid escape sequence '$'</p> <p>W...
[ { "answer_id": 74426395, "author": "David Mempin", "author_id": 9629494, "author_profile": "https://Stackoverflow.com/users/9629494", "pm_score": 1, "selected": true, "text": "let borderLayer = CAShapeLayer()\nborderLayer.path = path.cgPath\nborderLayer.lineWidth = 2\nborderLayer.strokeC...
2022/11/11
[ "https://Stackoverflow.com/questions/74402901", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16178069/" ]
74,402,927
<p>I'm trying to achive an hard try in google sheet.</p> <p>Let's start from what I right now, the A structure in the image.</p> <p>What I would like to achieve using functions like =QUERY, is the B or C (whatever is fine for me) structore.</p> <p><a href="https://i.stack.imgur.com/FxF58.png" rel="nofollow noreferrer">...
[ { "answer_id": 74426395, "author": "David Mempin", "author_id": 9629494, "author_profile": "https://Stackoverflow.com/users/9629494", "pm_score": 1, "selected": true, "text": "let borderLayer = CAShapeLayer()\nborderLayer.path = path.cgPath\nborderLayer.lineWidth = 2\nborderLayer.strokeC...
2022/11/11
[ "https://Stackoverflow.com/questions/74402927", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20477986/" ]
74,402,985
<p>My problem:</p> <p>I have 2 defined records</p> <ul> <li>CreateObjectRequest</li> <li>UpdateObjectRequest</li> </ul> <p>that must be verified by an utility method.</p> <p>As those 2 objects have the same fields, the same verify method can be applied on both types.<br /> Right now I'm just overloading by using 2 meth...
[ { "answer_id": 74403117, "author": "OH GOD SPIDERS", "author_id": 6073886, "author_profile": "https://Stackoverflow.com/users/6073886", "pm_score": 1, "selected": false, "text": "public abstract class ObjectRequest {\n CustomObject a;\n CustomObject b;\n\n}\n public class CreateObj...
2022/11/11
[ "https://Stackoverflow.com/questions/74402985", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19896324/" ]
74,403,002
<p>In haskell one can make an infinite list with</p> <pre class="lang-hs prettyprint-override"><code>f = let ones = &quot;ones&quot;:ones in ones </code></pre> <p>Is there a way to do this in google sheets?</p> <p>I tried searching, but I only could find examples of infinite scrolling in google sheets, not infinite...
[ { "answer_id": 74403117, "author": "OH GOD SPIDERS", "author_id": 6073886, "author_profile": "https://Stackoverflow.com/users/6073886", "pm_score": 1, "selected": false, "text": "public abstract class ObjectRequest {\n CustomObject a;\n CustomObject b;\n\n}\n public class CreateObj...
2022/11/11
[ "https://Stackoverflow.com/questions/74403002", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17749920/" ]
74,403,065
<p>Suppose a PostgreSQL table, <code>articles</code>, contains two nullable String columns of <code>name</code> and <code>alt_name</code>. Now, I want to find records (rows) in the table that have</p> <ul> <li>a <strong>combination of</strong> String <code>name</code> and <code>alt_name</code> matches another combinati...
[ { "answer_id": 74403811, "author": "Mitko Keckaroski", "author_id": 12041280, "author_profile": "https://Stackoverflow.com/users/12041280", "pm_score": 1, "selected": false, "text": "SELECT * FROM articles a\ncross join articles b \nwhere \n(ARRAY[COALESCE(a.name,''),COALESCE(a.al...
2022/11/11
[ "https://Stackoverflow.com/questions/74403065", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3577922/" ]
74,403,086
<p>I need to sum a range of cells across rows, but I need to be able to specify the amount with a variable.</p> <p>For example. If i write 5 in cell B1, I want to sum range A1:A5. If i write 10 in cell B1, I want to sum range A1:A10. If i write 20 in cell B1, I want to sum range A1:A20.</p> <p>And so on.</p> <p>Does an...
[ { "answer_id": 74403141, "author": "Martín", "author_id": 20363318, "author_profile": "https://Stackoverflow.com/users/20363318", "pm_score": 1, "selected": false, "text": "INDIRECT =SUM(INDIRECT(\"A1:A\"&B1))\n" }, { "answer_id": 74403301, "author": "Ping", "author_id": ...
2022/11/11
[ "https://Stackoverflow.com/questions/74403086", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16290932/" ]
74,403,097
<pre><code> #define OLED_RESET -1 Adafruit_SSD1306 display(OLED_RESET); char buff[10]=&quot;hola&quot;; char buff2[10]=&quot;&quot;; int cnt=0; int b=0; int alpha=1; void setup() { display.begin(SSD1306_SWITCHCAPVCC, 0x3C); display.clearDisplay(); display.setTextColor(WHITE); Serial.begin(9600); } voi...
[ { "answer_id": 74403141, "author": "Martín", "author_id": 20363318, "author_profile": "https://Stackoverflow.com/users/20363318", "pm_score": 1, "selected": false, "text": "INDIRECT =SUM(INDIRECT(\"A1:A\"&B1))\n" }, { "answer_id": 74403301, "author": "Ping", "author_id": ...
2022/11/11
[ "https://Stackoverflow.com/questions/74403097", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19503639/" ]
74,403,142
<p>So, I got my Dopdown for Languages, I want to make a href if I press on &quot;English&quot;, how can I do that?</p> <pre><code> &lt;div class=&quot;nav-wrapper&quot;&gt; &lt;div class=&quot;sl-nav&quot;&gt; Sprache: &lt;ul&gt; ...
[ { "answer_id": 74403167, "author": "Henryc17", "author_id": 14595300, "author_profile": "https://Stackoverflow.com/users/14595300", "pm_score": 0, "selected": false, "text": "<a> <li><i class=\"sl-flag flag-usa\"><div id=\"germany\"></div></i><a href=\"the link u want to put\">English</a...
2022/11/11
[ "https://Stackoverflow.com/questions/74403142", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20302661/" ]
74,403,155
<p>I can't seem to find a way to intentionally yield or throw an error in a stream in such a way that can be used by an AsyncValue widget in the tree (using Riverpod for State Management).</p> <pre><code>class AsyncValueWidget&lt;T&gt; extends StatelessWidget { AsyncValueWidget( {Key? key, required this....
[ { "answer_id": 74403167, "author": "Henryc17", "author_id": 14595300, "author_profile": "https://Stackoverflow.com/users/14595300", "pm_score": 0, "selected": false, "text": "<a> <li><i class=\"sl-flag flag-usa\"><div id=\"germany\"></div></i><a href=\"the link u want to put\">English</a...
2022/11/11
[ "https://Stackoverflow.com/questions/74403155", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13873955/" ]
74,403,181
<p>I have a pandas dataframe <code>df</code> that I built using 3 levels of columns, as follows:</p> <pre><code> a1 a2 a3 b1 b2 b1 b3 b1 b4 c1 c2 c1 c2 c1 c2 c1 c2 c1 c2 c1 c2 ... (data) ... </code></pre> <p>Note that each <code>a</code> column may have ...
[ { "answer_id": 74403413, "author": "fsimonjetz", "author_id": 15873043, "author_profile": "https://Stackoverflow.com/users/15873043", "pm_score": 3, "selected": true, "text": "slice None df.loc[:, (slice(None), slice(None), \"c2\")]\n pd.IndexSlice : idx = pd.IndexSlice\ndf.loc[:, idx[:,...
2022/11/11
[ "https://Stackoverflow.com/questions/74403181", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1028138/" ]
74,403,187
<p>I want the image in my site to completely change when the browser is resized. I've been using media-queries, but I can't seem to get it right. Any thoughts/tips? The thing is I have tried the display trick with media query but its not working</p> <p>I did this, but it's not working even when I am lowering the viewpo...
[ { "answer_id": 74403413, "author": "fsimonjetz", "author_id": 15873043, "author_profile": "https://Stackoverflow.com/users/15873043", "pm_score": 3, "selected": true, "text": "slice None df.loc[:, (slice(None), slice(None), \"c2\")]\n pd.IndexSlice : idx = pd.IndexSlice\ndf.loc[:, idx[:,...
2022/11/11
[ "https://Stackoverflow.com/questions/74403187", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20477983/" ]
74,403,200
<p>There are multiple parts of Compose that deal with environment variables in one sense or another. So how do I pass Environment variables in Compose ( docker-compose )</p> <p>According to the documentation If you have multiple environment variables, you can substitute them by adding them to a default environment var...
[ { "answer_id": 74403413, "author": "fsimonjetz", "author_id": 15873043, "author_profile": "https://Stackoverflow.com/users/15873043", "pm_score": 3, "selected": true, "text": "slice None df.loc[:, (slice(None), slice(None), \"c2\")]\n pd.IndexSlice : idx = pd.IndexSlice\ndf.loc[:, idx[:,...
2022/11/11
[ "https://Stackoverflow.com/questions/74403200", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14447569/" ]
74,403,222
<p>I'am quite new to F#, and was solving some basic exercises when i stumbled upon this function</p> <ol> <li>Give the (most general) types of g1 and g2 and describe what each of these two functions computes. Your description for each function should focus on what it computes, rather than on individual computation step...
[ { "answer_id": 74403413, "author": "fsimonjetz", "author_id": 15873043, "author_profile": "https://Stackoverflow.com/users/15873043", "pm_score": 3, "selected": true, "text": "slice None df.loc[:, (slice(None), slice(None), \"c2\")]\n pd.IndexSlice : idx = pd.IndexSlice\ndf.loc[:, idx[:,...
2022/11/11
[ "https://Stackoverflow.com/questions/74403222", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20478173/" ]
74,403,229
<p>I am trying to replace multiple categorical variables from a dataframe with a set of values.</p> <p>I tried the following codes:</p> <pre><code>data['Gender'] = data['Gender'].replace(to_replace={&quot;male&quot;,&quot;M&quot;,&quot;m&quot;,&quot;female&quot;,&quot;f&quot;,&quot;F&quot;}, value={&quot;Male&quot;,&qu...
[ { "answer_id": 74403413, "author": "fsimonjetz", "author_id": 15873043, "author_profile": "https://Stackoverflow.com/users/15873043", "pm_score": 3, "selected": true, "text": "slice None df.loc[:, (slice(None), slice(None), \"c2\")]\n pd.IndexSlice : idx = pd.IndexSlice\ndf.loc[:, idx[:,...
2022/11/11
[ "https://Stackoverflow.com/questions/74403229", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20478096/" ]
74,403,249
<p>I'm using this command to compare two files and print out lines in which $1 is different:</p> <p><code>awk -F, 'NR==FNR {exclude[$1];next} !($1 in exclude)' old.list new.list &gt; changes.list</code></p> <p>the files I'm working with have been sorted numerically with -n</p> <p>old.list:</p> <pre><code>30606,10,57561...
[ { "answer_id": 74403594, "author": "dawg", "author_id": 298607, "author_profile": "https://Stackoverflow.com/users/298607", "pm_score": 3, "selected": true, "text": "sort head awk -F, 'FNR==NR{seen[$1]; next} !($1 in seen)' old new | sort -nr | head -n1\n30690,10,87,0.021\n awk -F, 'FNR=...
2022/11/11
[ "https://Stackoverflow.com/questions/74403249", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1444848/" ]
74,403,270
<p>I've built a view that has scroll view of horizontal type with HStack for macOS app. Is there a way to circle those items using keyboard arrows?</p> <p>(I see that ListView has a default behavior but for other custom view types there are none)</p> <p><a href="https://share.cleanshot.com/BwEn6x" rel="nofollow norefer...
[ { "answer_id": 74403594, "author": "dawg", "author_id": 298607, "author_profile": "https://Stackoverflow.com/users/298607", "pm_score": 3, "selected": true, "text": "sort head awk -F, 'FNR==NR{seen[$1]; next} !($1 in seen)' old new | sort -nr | head -n1\n30690,10,87,0.021\n awk -F, 'FNR=...
2022/11/11
[ "https://Stackoverflow.com/questions/74403270", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4150758/" ]
74,403,285
<p>I need to have modifed_at fields in my Django project. A field that updates every time a row updates in the database, despite where the update comes from: through calling <code>.save()</code> or through <code>queryset.update()</code> or even when updates happen in the database directly and not from the Django app.</...
[ { "answer_id": 74403428, "author": "kwamito", "author_id": 19922269, "author_profile": "https://Stackoverflow.com/users/19922269", "pm_score": -1, "selected": false, "text": "auto_now created_at = models.DateTimeField(auto_now_add=True, verbose_name=_(\"created_at\")) updated_at = models...
2022/11/11
[ "https://Stackoverflow.com/questions/74403285", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3310179/" ]
74,403,293
<p>I want to create a function to find the lowest value within a set of numbers, but I do not wish to use the Math.min(); method. Below is my code I have constructed:</p> <pre><code>function min(arr) { var lowest = arr.sort((x, y) =&gt; x - y); return lowest[0]; } </code></pre> <p>but 'arr.sort' is not a functi...
[ { "answer_id": 74403375, "author": "mplungjan", "author_id": 295783, "author_profile": "https://Stackoverflow.com/users/295783", "pm_score": 1, "selected": false, "text": "const min = arr => arr.sort((a, b) => b - a).pop();\n\n\nconsole.log(min([7,6,8,99,100]))\nconsole.log(min([1000,999...
2022/11/11
[ "https://Stackoverflow.com/questions/74403293", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20181987/" ]
74,403,326
<p>I'm trying to set up a Functions class that will handle functions for my NN projects. I've figured out I'd like the list of functions to be somewhat flexible (easily add, or remove functions used).</p> <p>I've created a list of functions, defined a bunch of lambda functions, added a method that adds all the function...
[ { "answer_id": 74403435, "author": "Temba", "author_id": 3593621, "author_profile": "https://Stackoverflow.com/users/3593621", "pm_score": 3, "selected": true, "text": "add_function __init__ number_of_functions self class Functions:\n f0 = identity = lambda self, x: x\n f1 = linear...
2022/11/11
[ "https://Stackoverflow.com/questions/74403326", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18218285/" ]
74,403,337
<p>The __index of the table originally set a meta table, and the actual access is to the function under this meta table.</p> <p><code>setmetatable(flatTbl, {__index = metaTbl}</code></p> <p>I want to access the function of the same name of the meta table when the field of the table is not accessible, but I have used tw...
[ { "answer_id": 74404137, "author": "Piglet", "author_id": 2858170, "author_profile": "https://Stackoverflow.com/users/2858170", "pm_score": 1, "selected": false, "text": "local meta = { myFunc = function () print(\"metatable here\") end }\nmeta.__index = meta\n\nlocal a = setmetatable({}...
2022/11/11
[ "https://Stackoverflow.com/questions/74403337", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20128147/" ]
74,403,352
<p>I am trying to use Python to automate a number of work processes that primarily take place in an online content management system, and to access the CMS, I need to be logged into my work profile on Chrome. While I could sign in once Chromedriver is open, I would have to approve the login on my authenticator each tim...
[ { "answer_id": 74404137, "author": "Piglet", "author_id": 2858170, "author_profile": "https://Stackoverflow.com/users/2858170", "pm_score": 1, "selected": false, "text": "local meta = { myFunc = function () print(\"metatable here\") end }\nmeta.__index = meta\n\nlocal a = setmetatable({}...
2022/11/11
[ "https://Stackoverflow.com/questions/74403352", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20476541/" ]
74,403,355
<p>Folks, I am new to Next.js 13.</p> <p>I have created a project using Next.js 13 and playing around with the new <code>app</code> directory.</p> <p>I am trying to apply styling using Tailwind CSS. I have followed the Next.js documentation below:</p> <p><a href="https://beta.nextjs.org/docs/styling/tailwind-css" rel="...
[ { "answer_id": 74404137, "author": "Piglet", "author_id": 2858170, "author_profile": "https://Stackoverflow.com/users/2858170", "pm_score": 1, "selected": false, "text": "local meta = { myFunc = function () print(\"metatable here\") end }\nmeta.__index = meta\n\nlocal a = setmetatable({}...
2022/11/11
[ "https://Stackoverflow.com/questions/74403355", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9409877/" ]
74,403,374
<p>my code looks like this:</p> <pre><code>library(tidyverse) df &lt;- read.table(header=TRUE, text=' subject sex control q1 q2 1 M 7.9 1 1 2 F 6.3 2 3 3 F 9.5 3 1 4 M 11.5 7 6 ') df %&gt;% mutate_all(~case_when( . == 1 ~ 7, ...
[ { "answer_id": 74403451, "author": "Tim Biegeleisen", "author_id": 1863229, "author_profile": "https://Stackoverflow.com/users/1863229", "pm_score": 0, "selected": false, "text": "ifelse() lapply() cols <- c(\"q1\", \"q2\") # or whatever columns you want\ndf[cols] <- lapply(df[cols], fu...
2022/11/11
[ "https://Stackoverflow.com/questions/74403374", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2032712/" ]
74,403,387
<ul> <li>I pull data from multiple excel and write it back to an aggregated excel file</li> </ul> <p>so I have a list of tuples and each tuple consists of two values like this:</p> <pre><code>tuple = (entity-ID, debitor-name) list = [tuple1, tuple2, ..., tupleN] </code></pre> <p>So it can happen that there are multiple...
[ { "answer_id": 74403451, "author": "Tim Biegeleisen", "author_id": 1863229, "author_profile": "https://Stackoverflow.com/users/1863229", "pm_score": 0, "selected": false, "text": "ifelse() lapply() cols <- c(\"q1\", \"q2\") # or whatever columns you want\ndf[cols] <- lapply(df[cols], fu...
2022/11/11
[ "https://Stackoverflow.com/questions/74403387", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16965070/" ]
74,403,390
<p>Print elements from object. Ex.</p> <pre><code>const emps = { &quot;Jacobs&quot;: [&quot;Emiel&quot;, &quot;Svjetlana&quot;, &quot;Ivanna&quot;], &quot;Ivanna&quot;: [&quot;Michael&quot;, &quot;Lawson&quot;], &quot;Emiel&quot;: [&quot;John&quot;, &quot;Ruby&quot;], &quot;Lawson&quot;: [], &qu...
[ { "answer_id": 74403451, "author": "Tim Biegeleisen", "author_id": 1863229, "author_profile": "https://Stackoverflow.com/users/1863229", "pm_score": 0, "selected": false, "text": "ifelse() lapply() cols <- c(\"q1\", \"q2\") # or whatever columns you want\ndf[cols] <- lapply(df[cols], fu...
2022/11/11
[ "https://Stackoverflow.com/questions/74403390", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20478139/" ]
74,403,397
<p>I have a dataframe like below</p> <pre><code>+--+--+-----------+ | a| b| date| +--+--+-----------+ | 1| 2| 01/01/2022| | 2| 3| 01/01/2021| | 3| 4| 12/20/2021| +--+--+-----------+ </code></pre> <p>I have tried the code below but it keeps showing the 01/01/2022 date even though 30/12/2021 is not greater than 01/...
[ { "answer_id": 74403666, "author": "import random", "author_id": 2280890, "author_profile": "https://Stackoverflow.com/users/2280890", "pm_score": 1, "selected": false, "text": "01/01/2022 30/12/2021 0 3 import datetime\n\ns1 = \"30/12/2021\"\ns2 = \"01/01/2022\"\nprint(s1 < s2) # False...
2022/11/11
[ "https://Stackoverflow.com/questions/74403397", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9390633/" ]
74,403,400
<pre><code>### created arrays $cell = [System.Collections.ArrayList]@() $filepath = [System.Collections.ArrayList]@() $index = $cell.IndexOf($_) ### this code pulls values from excel spread sheet as well as that files name and path Get-ChildItem C:\UserS\chaos\OneDrive\Documents\working\srs\dynamic* | ForEach-Object ...
[ { "answer_id": 74403666, "author": "import random", "author_id": 2280890, "author_profile": "https://Stackoverflow.com/users/2280890", "pm_score": 1, "selected": false, "text": "01/01/2022 30/12/2021 0 3 import datetime\n\ns1 = \"30/12/2021\"\ns2 = \"01/01/2022\"\nprint(s1 < s2) # False...
2022/11/11
[ "https://Stackoverflow.com/questions/74403400", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19678866/" ]
74,403,448
<p>I have the following vectors:</p> <pre><code>v1 &lt;- c(&quot;R&quot;, &quot;H&quot;, &quot;K&quot;) # * (asterisk sign) v2 &lt;- c(&quot;D&quot;, &quot;E&quot;) # + (plus sign) v3 &lt;- c(&quot;A&quot;) # - (minus sign) </code></pre> <p>Given another string, I'd like to count how many characters b...
[ { "answer_id": 74403666, "author": "import random", "author_id": 2280890, "author_profile": "https://Stackoverflow.com/users/2280890", "pm_score": 1, "selected": false, "text": "01/01/2022 30/12/2021 0 3 import datetime\n\ns1 = \"30/12/2021\"\ns2 = \"01/01/2022\"\nprint(s1 < s2) # False...
2022/11/11
[ "https://Stackoverflow.com/questions/74403448", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8391698/" ]
74,403,459
<p>I have some client-side validation against a input type number which</p> <ul> <li>Will accept any number 0 through 99 with 2 decimal places</li> <li>And the values of the decimals must be .00, .25, .33, .5, .67, .75</li> </ul> <p>I've tried with 2 digit length validation but how can I validate specific list of decim...
[ { "answer_id": 74403666, "author": "import random", "author_id": 2280890, "author_profile": "https://Stackoverflow.com/users/2280890", "pm_score": 1, "selected": false, "text": "01/01/2022 30/12/2021 0 3 import datetime\n\ns1 = \"30/12/2021\"\ns2 = \"01/01/2022\"\nprint(s1 < s2) # False...
2022/11/11
[ "https://Stackoverflow.com/questions/74403459", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5789013/" ]
74,403,461
<p>I've tried several methods, especially all listed here:</p> <ul> <li><p><a href="https://stackoverflow.com/questions/29884654/button-that-refreshes-the-page-on-click">Button that refreshes the page on click</a></p> </li> <li><p><a href="https://stackoverflow.com/questions/2573979/force-page-reload-with-html-anchors-...
[ { "answer_id": 74404054, "author": "Medrupaloscil", "author_id": 5127494, "author_profile": "https://Stackoverflow.com/users/5127494", "pm_score": 2, "selected": false, "text": "window.location.reload(true)" }, { "answer_id": 74404099, "author": "Cazlo", "author_id": 1974...
2022/11/11
[ "https://Stackoverflow.com/questions/74403461", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1388921/" ]
74,403,510
<p>I am trying to build a simple video game engine using C#. This is a long time project, which I only want to do out of interest. For the beginning I wanted to implement a math library for linear algebra. I am just a hobby programmer and I am unsure how to make my code as maintainable as possible in the long term. The...
[ { "answer_id": 74404054, "author": "Medrupaloscil", "author_id": 5127494, "author_profile": "https://Stackoverflow.com/users/5127494", "pm_score": 2, "selected": false, "text": "window.location.reload(true)" }, { "answer_id": 74404099, "author": "Cazlo", "author_id": 1974...
2022/11/11
[ "https://Stackoverflow.com/questions/74403510", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20477878/" ]
74,403,513
<p>How to sync an action of many microservices and return a single response to the client that takes into consideration each microservice's response?</p> <p>I'm making a social network application (like Facebook) with microservices, for learning purposes. I've divided the app into following microservices, each will hav...
[ { "answer_id": 74403815, "author": "Bohdan Stupak", "author_id": 11306392, "author_profile": "https://Stackoverflow.com/users/11306392", "pm_score": 0, "selected": false, "text": "UsernameUpdated" } ]
2022/11/11
[ "https://Stackoverflow.com/questions/74403513", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8455324/" ]
74,403,545
<p>Basically the title. Is there a relatively fast way to modify all, or a bunch of elements of a vector by a given value, for eg. 1? If not, is there some other datatype that would perform this kind of an operation better?</p> <p>I have implemented a for loop that basically adds 1 to every element of a vector. Is ther...
[ { "answer_id": 74403762, "author": "Lasersköld", "author_id": 3748275, "author_profile": "https://Stackoverflow.com/users/3748275", "pm_score": 0, "selected": false, "text": "-O3 for (auto &x: vec) {\n x .. something\n}\n" } ]
2022/11/11
[ "https://Stackoverflow.com/questions/74403545", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16400339/" ]
74,403,548
<p>I have a string that contains an &lt;img&gt;, I need to get the content of the &quot;alt&quot; attribute using regex</p> <p><code>\&lt;p\&gt;this is text\&lt;img src=&quot;https://storage.googleapis.com/staging-grapedata-task-helpful-resource-files-967a/e83759c9-85c8-4b22-b3b7-f3ab76d97f30/0c5185b7-0afd-4bca-882b-b2...
[ { "answer_id": 74403616, "author": "Vincent Flotron", "author_id": 20436111, "author_profile": "https://Stackoverflow.com/users/20436111", "pm_score": 0, "selected": false, "text": "(?<=alt=\")[^\"]*(?=\")\n" }, { "answer_id": 74403653, "author": "pcenta", "author_id": 13...
2022/11/11
[ "https://Stackoverflow.com/questions/74403548", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19772161/" ]
74,403,580
<p>I have a dataset (df1) with a column that contains Remaining_points for each owner</p> <p>Df1:</p> <pre><code>Id Owner Remaining_points 00001 John 18 00008 Paul 34 00011 Alba 52 00004 Martha 67 </code></pre> <p>And another one with different id’s that contains points Df2</p> <pre><code>Id ...
[ { "answer_id": 74403970, "author": "tacoman", "author_id": 10043323, "author_profile": "https://Stackoverflow.com/users/10043323", "pm_score": 2, "selected": false, "text": "df1 <- data.frame(ID = c(\"00001\", \"00008\", \"00011\", \"00004\"),\n Owner = c(\"John\", \"Pau...
2022/11/11
[ "https://Stackoverflow.com/questions/74403580", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11351821/" ]
74,403,581
<p>I'm trying to split a column <code>Class</code> into multiple columns and change column names based on that.</p> <pre><code> ID Name Class 0 12 John A 1 13 Mark A 2 14 Tony B 3 15 Marcus C 4 16 Phill D 5 17 Jack A </code></p...
[ { "answer_id": 74403818, "author": "Philip09", "author_id": 13397545, "author_profile": "https://Stackoverflow.com/users/13397545", "pm_score": 1, "selected": false, "text": "#define a function to see if matched value\ndef new_column_val(row, value, column):\n \n if row[column] == ...
2022/11/11
[ "https://Stackoverflow.com/questions/74403581", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16197819/" ]
74,403,589
<p>There's a request where we need to pick the person with the lowest amount of tasks assigned from each group. Like this:</p> <p>A new task is received. Group A has 10 employees. Employee ABC has the lowest amount of tasks assigned out of the 10, therefore ABC will be assigned to this newly received task.</p> <p>My ta...
[ { "answer_id": 74403818, "author": "Philip09", "author_id": 13397545, "author_profile": "https://Stackoverflow.com/users/13397545", "pm_score": 1, "selected": false, "text": "#define a function to see if matched value\ndef new_column_val(row, value, column):\n \n if row[column] == ...
2022/11/11
[ "https://Stackoverflow.com/questions/74403589", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13552281/" ]
74,403,606
<p>I'm having trouble saving the return output from my getLastMatchData() function outside of the function itself. Tried a bunch of different things but to no result. Any help would be very appreciated!</p> <pre><code>import fetch from &quot;node-fetch&quot;; const premier_League_Id = '39' const tottenhamId = '47' c...
[ { "answer_id": 74403818, "author": "Philip09", "author_id": 13397545, "author_profile": "https://Stackoverflow.com/users/13397545", "pm_score": 1, "selected": false, "text": "#define a function to see if matched value\ndef new_column_val(row, value, column):\n \n if row[column] == ...
2022/11/11
[ "https://Stackoverflow.com/questions/74403606", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14628674/" ]
74,403,613
<p>I'm trying to come up with a SP that creates a certain task, appended by year, for a generic approach. I can create the tasks outside, alone, with the $$ marks, but I can't do it inside JS SP like this:</p> <pre><code>CREATE OR REPLACE PROCEDURE create_exec_tasks_by_year_range() RETURNS varchar LANGUAGE JAVASCRIPT E...
[ { "answer_id": 74403818, "author": "Philip09", "author_id": 13397545, "author_profile": "https://Stackoverflow.com/users/13397545", "pm_score": 1, "selected": false, "text": "#define a function to see if matched value\ndef new_column_val(row, value, column):\n \n if row[column] == ...
2022/11/11
[ "https://Stackoverflow.com/questions/74403613", "https://Stackoverflow.com", "https://Stackoverflow.com/users/250371/" ]
74,403,620
<p>I have a Google CloudRun Service, that is can be accessed either by the CloudRun URL or by a custom domain via a Load Balancer in the Google Cloud.</p> <p>Now I am trying to setup some kind of access control, so that the Service which run the Development Stage can only be accessed by logged-in developers.</p> <p>So ...
[ { "answer_id": 74407158, "author": "Justin Mahood", "author_id": 20480651, "author_profile": "https://Stackoverflow.com/users/20480651", "pm_score": 2, "selected": false, "text": "gcloud gcloud beta run services proxy [your-service]" } ]
2022/11/11
[ "https://Stackoverflow.com/questions/74403620", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14771706/" ]
74,403,648
<p>I'm currently working on a project, which includes a website, built and run by Django. On this website, I'm trying to load data through fast API and try to load this data through JavaScript and the Fetch API. But I always get instead of the Data provided through the API, an [object Promise]. I've tried many differen...
[ { "answer_id": 74407158, "author": "Justin Mahood", "author_id": 20480651, "author_profile": "https://Stackoverflow.com/users/20480651", "pm_score": 2, "selected": false, "text": "gcloud gcloud beta run services proxy [your-service]" } ]
2022/11/11
[ "https://Stackoverflow.com/questions/74403648", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20478256/" ]
74,403,673
<p>How can i render the data value in a h1 element? i have created a simple function its work is to just console random meme name and that function works fine but i want that that random name which iam consoling display in a h1 element in my web page so how can i do that? i want that when i click the button that random...
[ { "answer_id": 74403834, "author": "Foxy", "author_id": 20450170, "author_profile": "https://Stackoverflow.com/users/20450170", "pm_score": 2, "selected": true, "text": "import React, {useState} from 'react'\nimport Card from './Card'\nimport memesData from './memesData';\nimport './Main...
2022/11/11
[ "https://Stackoverflow.com/questions/74403673", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
74,403,679
<p>I'm trying to use the makefile on windows, it seems not to be very common to use Makefile on Windows, so I followed some steps installing MingW, which is used for compilation, but when running make, this error occurred:</p> <pre><code> mkdir -p ./obj/ The command syntax is incorrect. Makefile:30: recipe f...
[ { "answer_id": 74403974, "author": "the busybee", "author_id": 11294831, "author_profile": "https://Stackoverflow.com/users/11294831", "pm_score": 0, "selected": false, "text": "'\\t' ' '" }, { "answer_id": 74404126, "author": "MadScientist", "author_id": 939557, "aut...
2022/11/11
[ "https://Stackoverflow.com/questions/74403679", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16468283/" ]
74,403,684
<p>since the last update of the Logicmonitor provider in Terraform we're struggling with a sorting isse.</p> <p>In LogicMonitor the properties of a device are a name-value pair, and they are presented alfabetically by name. Also in API requests the result is alphabetical. So far nothing fancy.</p> <p>But... We build o...
[ { "answer_id": 74403974, "author": "the busybee", "author_id": 11294831, "author_profile": "https://Stackoverflow.com/users/11294831", "pm_score": 0, "selected": false, "text": "'\\t' ' '" }, { "answer_id": 74404126, "author": "MadScientist", "author_id": 939557, "aut...
2022/11/11
[ "https://Stackoverflow.com/questions/74403684", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20478378/" ]
74,403,690
<p>How can I allow a non-root user to run 'docker exec' ?</p> <p>For example, I would like to allow a user to execute the following command without him obtaining root permissions to the whole system: <code>docker exec -it containerName /bin/bash</code></p> <p>This command would allow him to get inside his 'working envi...
[ { "answer_id": 74404320, "author": "Damiano", "author_id": 11268685, "author_profile": "https://Stackoverflow.com/users/11268685", "pm_score": 0, "selected": false, "text": "visudo studentxx ALL=NOPASSWD:/bin/docker exec -it containerName /bin/bash\n sudo docker exec -it containerName /b...
2022/11/11
[ "https://Stackoverflow.com/questions/74403690", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11268685/" ]
74,403,713
<p>I have the following directory:</p> <ul> <li>IoT [Folder] <ul> <li>DC [Folder] <ul> <li>main.py</li> <li>config.ini</li> </ul> </li> </ul> </li> </ul> <p>inside <code>main.py</code> I have:</p> <pre><code>config.read('config.ini') </code></pre> <p>which works perfect if I run my python script after doing <code>cd .....
[ { "answer_id": 74404320, "author": "Damiano", "author_id": 11268685, "author_profile": "https://Stackoverflow.com/users/11268685", "pm_score": 0, "selected": false, "text": "visudo studentxx ALL=NOPASSWD:/bin/docker exec -it containerName /bin/bash\n sudo docker exec -it containerName /b...
2022/11/11
[ "https://Stackoverflow.com/questions/74403713", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20470733/" ]
74,403,721
<p>I have the following Pandas DataFrame:</p> <pre><code>ID CAT 1 A 1 B 1 A 2 A 2 B 2 A 1 B 1 A </code></pre> <p>I'd like to have a table that indicates the number of occurance per CAT values for each ID in different columns like this:</p> <pre><code>ID CAT_A_NUM CAT_B_NUM 1 3 2 2 2 1 </code><...
[ { "answer_id": 74403930, "author": "Bushmaster", "author_id": 15415267, "author_profile": "https://Stackoverflow.com/users/15415267", "pm_score": 3, "selected": true, "text": "df=pd.DataFrame(data={'ID':[1,1,1,2,2,2,1,1],'CAT':['A','B','A','A','B','A','B','A']})\nfinal = pd.crosstab(df['...
2022/11/11
[ "https://Stackoverflow.com/questions/74403721", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4495790/" ]
74,403,748
<p>We have a scenario where we need to migrate more than a 100 projects that are in one ADO organization to another ADO organization.</p> <p>Is there way how to do perform this migration org to org?</p> <p>We have tried using the Azure migration devops tool by installing it in DEV test lab in A tenant and installed the...
[ { "answer_id": 74403930, "author": "Bushmaster", "author_id": 15415267, "author_profile": "https://Stackoverflow.com/users/15415267", "pm_score": 3, "selected": true, "text": "df=pd.DataFrame(data={'ID':[1,1,1,2,2,2,1,1],'CAT':['A','B','A','A','B','A','B','A']})\nfinal = pd.crosstab(df['...
2022/11/11
[ "https://Stackoverflow.com/questions/74403748", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20478414/" ]
74,403,756
<p>I have created a tibble consisting of 6 columns containing 6 different variables that will be input for a user defined function. I am new to r, and I don't know how to connect the tibble with user defined function. Please help.</p> <p>I have replaced the complex user defined function with simple <code>user_defined_f...
[ { "answer_id": 74403958, "author": "Josh White", "author_id": 20289207, "author_profile": "https://Stackoverflow.com/users/20289207", "pm_score": 3, "selected": true, "text": "rgb_val to = 20 rgb_grid %>% \n bind_cols(setNames(user_defined_function(.), \"new_col\"))\n\n# A tibble: 729 ×...
2022/11/11
[ "https://Stackoverflow.com/questions/74403756", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20427544/" ]
74,403,784
<p>A <code>Collector</code> has three generic types:</p> <pre><code>public interface Collector&lt;T, A, R&gt; </code></pre> <p>With <code>A</code> being <em>the mutable accumulation type of the reduction operation (often hidden as an implementation detail)</em>.</p> <p>If I want to create my custom collector, I need to...
[ { "answer_id": 74403914, "author": "Silvio Mayolo", "author_id": 2288659, "author_profile": "https://Stackoverflow.com/users/2288659", "pm_score": 2, "selected": false, "text": "Collector Collectors.reducing public static <T> Collector<T,?,T> reducing(T identity, BinaryOperator<T> op)\n ...
2022/11/11
[ "https://Stackoverflow.com/questions/74403784", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7424948/" ]
74,403,798
<p>I'm trying to print out the multiplication table using js. Is there a cleaner way to do this than with nested for loops? I was thinking of reduce as an alternative. Any onther ideas out there? ;)</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet...
[ { "answer_id": 74403914, "author": "Silvio Mayolo", "author_id": 2288659, "author_profile": "https://Stackoverflow.com/users/2288659", "pm_score": 2, "selected": false, "text": "Collector Collectors.reducing public static <T> Collector<T,?,T> reducing(T identity, BinaryOperator<T> op)\n ...
2022/11/11
[ "https://Stackoverflow.com/questions/74403798", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19895948/" ]
74,403,825
<p>Sorry I'm struggling with something that should be simple.</p> <p>I have table &quot;Risks_For_Task_1&quot;:</p> <pre><code>+--------------+-------------+--------------+ | RiskName | Mitigation | RiskLevel | +--------------+-------------+--------------+ | Risk A | Mitigate#1 | Medium | | Risk B ...
[ { "answer_id": 74403901, "author": "WandererAboveTheSea", "author_id": 9680817, "author_profile": "https://Stackoverflow.com/users/9680817", "pm_score": 0, "selected": false, "text": "Union All TaskID" }, { "answer_id": 74403964, "author": "MT0", "author_id": 1509264, ...
2022/11/11
[ "https://Stackoverflow.com/questions/74403825", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13709246/" ]
74,403,887
<p>What I've generated so far..... [<img src="https://i.stack.imgur.com/0G8j5.jpg" alt="What i've generated so far(https://i.stack.imgur.com/0G8j5.jpg)" /></p> <p>VERSUS</p> <p>What needs to be recreated [<img src="https://i.stack.imgur.com/kVmZx.png" alt="the original plot(https://i.stack.imgur.com/kVmZx.png)" /></p> ...
[ { "answer_id": 74403901, "author": "WandererAboveTheSea", "author_id": 9680817, "author_profile": "https://Stackoverflow.com/users/9680817", "pm_score": 0, "selected": false, "text": "Union All TaskID" }, { "answer_id": 74403964, "author": "MT0", "author_id": 1509264, ...
2022/11/11
[ "https://Stackoverflow.com/questions/74403887", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20075726/" ]
74,403,919
<p>I have a problem with sorting function.</p> <p>I have following struct:</p> <pre><code>struct Object { int value, height; Object(int v, int h) { this-&gt;value = v; this-&gt;height = h; } }; </code></pre> <p>I am storing vector of this objects: <code>std::vector&lt;Object&gt; v</code></p>...
[ { "answer_id": 74404000, "author": "Jarod42", "author_id": 2684539, "author_profile": "https://Stackoverflow.com/users/2684539", "pm_score": 3, "selected": true, "text": "std::sort(v.begin(), v.end(), [ & ](const Object& lhs, const Object& rhs) {\n return std::make_pair(lhs.height > i...
2022/11/11
[ "https://Stackoverflow.com/questions/74403919", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19809278/" ]
74,403,955
<p>I have a table like this in SQL Server:</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>ID</th> <th>Rank</th> <th>Tag</th> <th>Name</th> <th>Size</th> <th>Seq</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>1</td> <td></td> <td>One</td> <td>14</td> <td>7</td> </tr> <tr> <td>2</td> <td>2<...
[ { "answer_id": 74404328, "author": "DannySlor", "author_id": 19174570, "author_profile": "https://Stackoverflow.com/users/19174570", "pm_score": 1, "selected": false, "text": "select min(tag) as tag\n ,string_agg(name, ', ') as name\n ,sum(size) ...
2022/11/11
[ "https://Stackoverflow.com/questions/74403955", "https://Stackoverflow.com", "https://Stackoverflow.com/users/822381/" ]
74,403,962
<p>I am writing a rest api method. I have to get a zip file, then read the data in that file and write it to the database. But I have to achieve this without writing or extracting the zip file in the local. So I can't use the file path. How can I access the file?</p> <p>I tried to directly convert the file to inputstre...
[ { "answer_id": 74404328, "author": "DannySlor", "author_id": 19174570, "author_profile": "https://Stackoverflow.com/users/19174570", "pm_score": 1, "selected": false, "text": "select min(tag) as tag\n ,string_agg(name, ', ') as name\n ,sum(size) ...
2022/11/11
[ "https://Stackoverflow.com/questions/74403962", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19767957/" ]
74,403,978
<pre><code>class ModelCreateView(CreateView): model = Message fields=['message'] template_name = &quot;page.html&quot; succes_url = reverse='page' </code></pre> <p>No URL to redirect to. Either provide a url or define a get_absolute_url method on the Model. this is error but if i put get absolut...
[ { "answer_id": 74404328, "author": "DannySlor", "author_id": 19174570, "author_profile": "https://Stackoverflow.com/users/19174570", "pm_score": 1, "selected": false, "text": "select min(tag) as tag\n ,string_agg(name, ', ') as name\n ,sum(size) ...
2022/11/11
[ "https://Stackoverflow.com/questions/74403978", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17916939/" ]
74,404,059
<p><a href="https://i.stack.imgur.com/3kV1H.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3kV1H.png" alt="enter image description here" /></a></p> <p>The Current dimension size is set to 32 characters. Is there any way to increase this using H5PY?</p> <p>I am having a problem where the values in my...
[ { "answer_id": 74404328, "author": "DannySlor", "author_id": 19174570, "author_profile": "https://Stackoverflow.com/users/19174570", "pm_score": 1, "selected": false, "text": "select min(tag) as tag\n ,string_agg(name, ', ') as name\n ,sum(size) ...
2022/11/11
[ "https://Stackoverflow.com/questions/74404059", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19401660/" ]
74,404,092
<p><a href="https://i.stack.imgur.com/TRf7O.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TRf7O.png" alt="enter image description here" /></a></p> <p>Compose - removeProperty(variables('Message')['Appointment'],'CustomerInfo')</p> <p><a href="https://i.stack.imgur.com/GZ2vJ.png" rel="nofollow noref...
[ { "answer_id": 74406452, "author": "RithwikBojja", "author_id": 17623802, "author_profile": "https://Stackoverflow.com/users/17623802", "pm_score": 0, "selected": false, "text": "removeproperty(variables('emo')['appointment'],'customerInfo') removeproperty(variables('emo'),'appointment')...
2022/11/11
[ "https://Stackoverflow.com/questions/74404092", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7581658/" ]
74,404,106
<p>I have been looking through some legacy code and found this little snippet:</p> <pre><code>std::vector&lt;int&gt;** grid = new std::vector&lt;int&gt;*[10]; for (int k = 0; k &lt; 10; k++) grid[k] = new std::vector&lt;int&gt;[10]; </code></pre> <p>And then later on, the original developer is calling this command...
[ { "answer_id": 74404284, "author": "Ben", "author_id": 9177735, "author_profile": "https://Stackoverflow.com/users/9177735", "pm_score": 1, "selected": false, "text": "grid[] -> contains 10 pointers which each point to an array of vector pointers\ngrid[][] -> contains 10 pointers to ...
2022/11/11
[ "https://Stackoverflow.com/questions/74404106", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14182500/" ]
74,404,109
<p>If I have following print statements:</p> <pre class="lang-py prettyprint-override"><code>print(&quot;#&quot;*80) print(f&quot;##{'':.^76}##&quot;) print(f&quot;##{'Hello World':.^76}##&quot;) print(f&quot;##{'':.^76}##&quot;) print(&quot;#&quot;*80) </code></pre> <p>I will get a nice border around my &quot;Hello Wo...
[ { "answer_id": 74404284, "author": "Ben", "author_id": 9177735, "author_profile": "https://Stackoverflow.com/users/9177735", "pm_score": 1, "selected": false, "text": "grid[] -> contains 10 pointers which each point to an array of vector pointers\ngrid[][] -> contains 10 pointers to ...
2022/11/11
[ "https://Stackoverflow.com/questions/74404109", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10985257/" ]
74,404,117
<p>when add this code, the app runs as suposed to, but when i reload the app, it stops rendering as it should and give me a full blanck page</p> <pre><code> &lt;/div&gt; &lt;div className=&quot;chat__body&quot;&gt; {messages.map((message) =&gt; ( &lt;p className={`chat__message ${true &amp;&amp...
[ { "answer_id": 74404284, "author": "Ben", "author_id": 9177735, "author_profile": "https://Stackoverflow.com/users/9177735", "pm_score": 1, "selected": false, "text": "grid[] -> contains 10 pointers which each point to an array of vector pointers\ngrid[][] -> contains 10 pointers to ...
2022/11/11
[ "https://Stackoverflow.com/questions/74404117", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20418013/" ]
74,404,118
<p>I can't run or debug start a Flutter project in Android Emulator. Even if android emulator works normally, when I run the project the editor always gives me this error:</p> <pre><code> Running Gradle task 'assembleDebug'... Exception in thread &quot;main&quot; java.util.zip.ZipException: zip END header not found ...
[ { "answer_id": 74404206, "author": "CidQu", "author_id": 14755443, "author_profile": "https://Stackoverflow.com/users/14755443", "pm_score": 0, "selected": false, "text": "cd ~\nrm -rf .gradle\n" } ]
2022/11/11
[ "https://Stackoverflow.com/questions/74404118", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13654126/" ]
74,404,150
<p>My GCP cloud SQL has SSL enabled. With that, my client will require the server CA cert, client cert and key to connect to the database. The client is configured to retrieve the certs and key from Secret Manager.</p> <p>I am deploying my setup using Terraform. Once the SQL instance is created, it needs to output the ...
[ { "answer_id": 74404206, "author": "CidQu", "author_id": 14755443, "author_profile": "https://Stackoverflow.com/users/14755443", "pm_score": 0, "selected": false, "text": "cd ~\nrm -rf .gradle\n" } ]
2022/11/11
[ "https://Stackoverflow.com/questions/74404150", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20478658/" ]
74,404,167
<p>I made a regex to extract values from a templated string. The regex is working smooth on websites like regexr.com but it's failing when I try to run in shell.</p> <p>As example, let's use those lines:</p> <blockquote> <p>[2022-11-11T12:07:00.789Z] &quot;GET /check?subject=johnbegucci HTTP/1.1&quot; 200 - &quot;-&quo...
[ { "answer_id": 74404306, "author": "anubhava", "author_id": 548225, "author_profile": "https://Stackoverflow.com/users/548225", "pm_score": 2, "selected": false, "text": "awk awk -v FPAT='\\\\[[^]]*]|\"[^\"]*\"|\\\\S+' '\n{\n for (i=1; i<=NF; ++i) print NR \":\" i \"::\"$i\n}' file.log...
2022/11/11
[ "https://Stackoverflow.com/questions/74404167", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13764824/" ]
74,404,178
<p>I'm new at python. I struggle how to count how many people have died from each country. I use pandas dataframe. 0 - means that person died, 1 - survived. I have ~2000rows. Maybe it is not enough info, but I dont know how to solve this and from what exactly to start...</p> <pre><code>df['survived'] = df['survived'].r...
[ { "answer_id": 74404251, "author": "bichanna", "author_id": 17558100, "author_profile": "https://Stackoverflow.com/users/17558100", "pm_score": 1, "selected": true, "text": "counts = {}\n\nfor i in range(len(survived_list)):\n try:\n counts[countries_list[i]] += survived_list[i...
2022/11/11
[ "https://Stackoverflow.com/questions/74404178", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20478626/" ]
74,404,207
<p>I have a pandas dataframe below,</p> <pre><code>data = {'Team': ['Riders', 'Riders', 'Devils', 'Devils', 'Kings', 'kings', 'Kings', 'Kings', 'Riders', 'Royals', 'Royals', 'Riders'], 'Rank': [1, 2, 2, 3, 3,4 ,1 ,1,2 , 4,1,2], 'Year': [2014,2015,2014,2015,2014,2015,2016,2017,2016,2014,2015,2017], 'Points':...
[ { "answer_id": 74404251, "author": "bichanna", "author_id": 17558100, "author_profile": "https://Stackoverflow.com/users/17558100", "pm_score": 1, "selected": true, "text": "counts = {}\n\nfor i in range(len(survived_list)):\n try:\n counts[countries_list[i]] += survived_list[i...
2022/11/11
[ "https://Stackoverflow.com/questions/74404207", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14076103/" ]
74,404,227
<p>In Google Sheets I have the following formula:</p> <pre><code>=IF(REGEXMATCH(B1;&quot;offers&quot;);&quot;spring&quot;;0) </code></pre> <p>If the cell B1 contains the text &quot;offers&quot; the output will be &quot;spring&quot;, otherwise the output will be &quot;0&quot;. This works fine but now I want the formular...
[ { "answer_id": 74404251, "author": "bichanna", "author_id": 17558100, "author_profile": "https://Stackoverflow.com/users/17558100", "pm_score": 1, "selected": true, "text": "counts = {}\n\nfor i in range(len(survived_list)):\n try:\n counts[countries_list[i]] += survived_list[i...
2022/11/11
[ "https://Stackoverflow.com/questions/74404227", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20478666/" ]
74,404,244
<p>I have a problem to make migration with relationship.</p> <p>case :</p> <ul> <li>1 Department will have many Employees</li> <li>1 Employee belongTo 1 Department</li> <li>1 Department will have one manager (from employees table)</li> </ul> <p>Here is my migration</p> <pre><code>Schema::create('departments', function ...
[ { "answer_id": 74404655, "author": "Delano van londen", "author_id": 19923550, "author_profile": "https://Stackoverflow.com/users/19923550", "pm_score": -1, "selected": false, "text": "Schema::create('departments', function (Blueprint $table) {\n $table->increments(\"id\")->unsign...
2022/11/11
[ "https://Stackoverflow.com/questions/74404244", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17482687/" ]
74,404,261
<p>I have a list of strings called words such that</p> <pre><code>words = ['house', 'garden', 'kitchen', 'balloon', 'home', 'park', 'affair', 'kite', 'hello', 'portrait', 'angel', 'surfing'] </code></pre> <p>I have to find the most occurring letter in every position the strings, example, let's find the most occurring f...
[ { "answer_id": 74404655, "author": "Delano van londen", "author_id": 19923550, "author_profile": "https://Stackoverflow.com/users/19923550", "pm_score": -1, "selected": false, "text": "Schema::create('departments', function (Blueprint $table) {\n $table->increments(\"id\")->unsign...
2022/11/11
[ "https://Stackoverflow.com/questions/74404261", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18943770/" ]
74,404,271
<p>I have read almost all similar topics but haven't found a working solution for my case. Sorry for posting similar question again.</p> <p>Let's imagine I have two strings:</p> <pre><code>String string1 = &quot;this is my string &quot;; String string2 = &quot;this is not my string that I want&quot;; </code></pre> <p>...
[ { "answer_id": 74404636, "author": "Amir MB", "author_id": 7098758, "author_profile": "https://Stackoverflow.com/users/7098758", "pm_score": 1, "selected": false, "text": "public static void main(String[] args) {\n String string1 = \"this is my string \";\n String string2 = \"this...
2022/11/11
[ "https://Stackoverflow.com/questions/74404271", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11830541/" ]
74,404,354
<p>My schema in MongoDB looks like this:</p> <pre><code>{ &quot;_id&quot;: &quot;be9e9198-86ab-456e-97e1-f1039cb07b59&quot;, &quot;isDeleted&quot;: false, &quot;user&quot;: { &quot;name&quot;: &quot;john2&quot;, &quot;surname&quot;: &quot;doe2&quot;, &quot;email&quot;: &quot;123.abcd@gmail.com&quot;, ...
[ { "answer_id": 74404636, "author": "Amir MB", "author_id": 7098758, "author_profile": "https://Stackoverflow.com/users/7098758", "pm_score": 1, "selected": false, "text": "public static void main(String[] args) {\n String string1 = \"this is my string \";\n String string2 = \"this...
2022/11/11
[ "https://Stackoverflow.com/questions/74404354", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13349539/" ]
74,404,358
<p>I'm trying to find the remainder of each number in a list that is equal to one, but the problem is I get an index error</p> <p>Here I compare the current item in the list to the next one:</p> <pre><code>numbers = [1,2,3,4,5,6] sorted_number = sorted(numbers) for index, num in enumerate(sorted_number): if sorte...
[ { "answer_id": 74404397, "author": "jprebys", "author_id": 3268228, "author_profile": "https://Stackoverflow.com/users/3268228", "pm_score": 3, "selected": true, "text": "sorted_number sorted_number[index + 1] for index, num in enumerate(sorted_number[:-1]):\n if sorted_number[index +...
2022/11/11
[ "https://Stackoverflow.com/questions/74404358", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1020623/" ]
74,404,371
<p>So I'm querying something like the following, however, some of my rows are NULL and I want the query to replace the values where NULL to a specific different value in the same row:</p> <pre><code>SELECT * FROM table &gt;&gt;&gt; table &quot;ID&quot; &quot;First Name&quot; &quot;Last Name&quot; &quot;D...
[ { "answer_id": 74404397, "author": "jprebys", "author_id": 3268228, "author_profile": "https://Stackoverflow.com/users/3268228", "pm_score": 3, "selected": true, "text": "sorted_number sorted_number[index + 1] for index, num in enumerate(sorted_number[:-1]):\n if sorted_number[index +...
2022/11/11
[ "https://Stackoverflow.com/questions/74404371", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13675684/" ]
74,404,392
<p>For example java code</p> <pre><code>public abstract class BindingElement&lt;T extends ViewDataBinding&gt; { T binding; abstract public T createBinding(LayoutInflater inflater, ViewGroup parent); public BindingElement(ViewGroup parent) { binding = createBinding(LayoutInflater.from(parent.getCo...
[ { "answer_id": 74404500, "author": "Steyrix", "author_id": 7221362, "author_profile": "https://Stackoverflow.com/users/7221362", "pm_score": 0, "selected": false, "text": "abstract class BindingElement<T: ViewDataBinding> {\n\n val binding: T\n\n abstract fun createBinding(LayoutIn...
2022/11/11
[ "https://Stackoverflow.com/questions/74404392", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14335049/" ]
74,404,411
<p>I want to create a folder and write a file in real external storage (real extern sd card). I can write to the internal storage, the external storage, but not to the external sd card (I mean the external storage card you put into a cell phone for more space to store images, videos, ...). The path of the external sd-c...
[ { "answer_id": 74404500, "author": "Steyrix", "author_id": 7221362, "author_profile": "https://Stackoverflow.com/users/7221362", "pm_score": 0, "selected": false, "text": "abstract class BindingElement<T: ViewDataBinding> {\n\n val binding: T\n\n abstract fun createBinding(LayoutIn...
2022/11/11
[ "https://Stackoverflow.com/questions/74404411", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17060353/" ]
74,404,422
<p>Hello I'm trying out CSS transition property, and I'm having some trouble, when I hover the main tag, the images transitions into their respective positions which I have given, but as soon as I remove the cursor, the images disappear in an instant, without the transition property which I have set, it works just fine...
[ { "answer_id": 74404822, "author": "Moussa Bistami", "author_id": 15628525, "author_profile": "https://Stackoverflow.com/users/15628525", "pm_score": 1, "selected": false, "text": "* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\nmain {\n width: 900px;\n height: 600px;...
2022/11/11
[ "https://Stackoverflow.com/questions/74404422", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12138807/" ]
74,404,424
<p>I'm setting up a new development environment (moved from Windows 7 to Lubuntu), and now I'm trying to set up a React app on it for the first time. Well, second. <code>create-react-app</code> worked, but I like to do things by hand. I finally have <code>webpack</code> and <code>webpack-dev-server</code> working, but ...
[ { "answer_id": 74404822, "author": "Moussa Bistami", "author_id": 15628525, "author_profile": "https://Stackoverflow.com/users/15628525", "pm_score": 1, "selected": false, "text": "* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\nmain {\n width: 900px;\n height: 600px;...
2022/11/11
[ "https://Stackoverflow.com/questions/74404424", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17950927/" ]
74,404,427
<p><strong>EDIT:</strong></p> <p>Thank you guys for all your input, I'm not sure if the case is resolved but it seems so.</p> <p>In my former Data preparation function I have shuffled the training sequences, which resulted in LSTM predicting an average. I was browsing the internet and I have found by accident that othe...
[ { "answer_id": 74404822, "author": "Moussa Bistami", "author_id": 15628525, "author_profile": "https://Stackoverflow.com/users/15628525", "pm_score": 1, "selected": false, "text": "* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\nmain {\n width: 900px;\n height: 600px;...
2022/11/11
[ "https://Stackoverflow.com/questions/74404427", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19797660/" ]
74,404,433
<p>I am VERY new to rust, and really programming in general. I am writing a rust program that will detect idle and print out the time since the last input. I am using the winapi crate. The code below returns between 0ns and 31ms, regardless of how long it's been since I pressed a key or moved the mouse. It never gets h...
[ { "answer_id": 74407016, "author": "shy45", "author_id": 20313707, "author_profile": "https://Stackoverflow.com/users/20313707", "pm_score": 1, "selected": false, "text": "#include <windows.h>\n\nint main() {\n LASTINPUTINFO lii;\n lii.cbSize = sizeof(LASTINPUTINFO);\n\n for (...
2022/11/11
[ "https://Stackoverflow.com/questions/74404433", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14357420/" ]
74,404,471
<p>So, I don't know how can I print elements of such a list.</p> <pre><code>list&lt;int&gt;* a; a = new list&lt;int&gt;(4); a[0].push_back(1); a[0].push_back(3); a[2].push_back(5); a[2].push_back(7); cout &lt;&lt; a[0].front() &lt;&lt; '\n'; cout &lt;&lt; a[1].back() &lt;&lt; '\n'; </code></pre> <p>Firstly, I tried to...
[ { "answer_id": 74404551, "author": "Cory Kramer", "author_id": 2296458, "author_profile": "https://Stackoverflow.com/users/2296458", "pm_score": 0, "selected": false, "text": "std::vector new new[] #include <iostream>\n#include <list>\n#include <vector>\n\nint main() {\n std::vector<s...
2022/11/11
[ "https://Stackoverflow.com/questions/74404471", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16327378/" ]
74,404,516
<p>I'm having troubles returning errors on my server. when running on localhost - everything works fine, custom errors are returning great to the client. After deploying to a host (Heroku, Render etc...) the valid requests are working as expected, but when error is occuring - Im receiving 500 instead of the custom erro...
[ { "answer_id": 74404551, "author": "Cory Kramer", "author_id": 2296458, "author_profile": "https://Stackoverflow.com/users/2296458", "pm_score": 0, "selected": false, "text": "std::vector new new[] #include <iostream>\n#include <list>\n#include <vector>\n\nint main() {\n std::vector<s...
2022/11/11
[ "https://Stackoverflow.com/questions/74404516", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15092986/" ]
74,404,527
<p>I'm trying to make a crossword in google sheets, and would like the clue numbers to be as far up in the top left of the cell as possible. Using the normal alignment buttons puts in in the corner, but still further away from the cell edge than I like. Is there way to specify the margins within a cell between text and...
[ { "answer_id": 74404551, "author": "Cory Kramer", "author_id": 2296458, "author_profile": "https://Stackoverflow.com/users/2296458", "pm_score": 0, "selected": false, "text": "std::vector new new[] #include <iostream>\n#include <list>\n#include <vector>\n\nint main() {\n std::vector<s...
2022/11/11
[ "https://Stackoverflow.com/questions/74404527", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20037532/" ]
74,404,561
<p>I have two tables, <code>table_A</code> and <code>table_B</code>. I want to do a left join on both tables so that each record in table_A is matched with a record in table_B using the date as a key. However some dates in A will be missing in B and vice-versa. So my goal is to join A and B using the closest earlier da...
[ { "answer_id": 74404795, "author": "p3consulting", "author_id": 4956336, "author_profile": "https://Stackoverflow.com/users/4956336", "pm_score": 0, "selected": false, "text": "SELECT product_id, dat_1, dat_2 FROM (\n SELECT t1.product_id, t1.dat as dat_1, t2.dat as dat_2,\n ro...
2022/11/11
[ "https://Stackoverflow.com/questions/74404561", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13034428/" ]
74,404,562
<p>I'm a beginner trying to get this while loop so that the println table reads 2.00 15.000010, however it consistently stops on 1.9999993.</p> <pre><code>float weight = 60 ; float height01 = 1.20 ; float height02 = 2.00 ; while( height01 &lt; height02 ) { float BMI = ( weight / (height01 * height01) ) ; print...
[ { "answer_id": 74404631, "author": "jtryon", "author_id": 17950927, "author_profile": "https://Stackoverflow.com/users/17950927", "pm_score": -1, "selected": false, "text": "while(height01 <= height02) {\n...\n}\n" }, { "answer_id": 74404941, "author": "Rogue", "author_id...
2022/11/11
[ "https://Stackoverflow.com/questions/74404562", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13830594/" ]
74,404,584
<pre><code>#include&lt;stdio.h&gt; int main() { char main[]=&quot;Structured Programming&quot;; char copy[30]; for (int i = 0; main[i] !='\0' ; i++) { copy[i]=main[i]; } printf(&quot;%s&quot;,copy); } </code></pre> <p>In the above problem this just should print <code>Structured Programmi...
[ { "answer_id": 74404725, "author": "cooleck", "author_id": 10371918, "author_profile": "https://Stackoverflow.com/users/10371918", "pm_score": 0, "selected": false, "text": "printf '\\0'" }, { "answer_id": 74404840, "author": "Paul Lynch", "author_id": 18146287, "auth...
2022/11/11
[ "https://Stackoverflow.com/questions/74404584", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12545665/" ]
74,404,595
<p>I have a csv file with dates as characters in the following format: 202211, 202210, 202209 etc.</p> <p>I tried using</p> <pre><code>xdate&lt;- as.Date(&quot;202211&quot;, format=&quot;%Y%m&quot;) xdate </code></pre> <p>but the output I get is <code>NA</code></p> <p>This works if the format would be 20221111</p> <pre...
[ { "answer_id": 74404724, "author": "Jilber Urbina", "author_id": 1315767, "author_profile": "https://Stackoverflow.com/users/1315767", "pm_score": 3, "selected": true, "text": "as.Date xdate<- as.Date(paste0(\"202211\", \"01\"), format=\"%Y%m%d\")\n xdate\n[1] \"2022-11-01\"\n" }, ...
2022/11/11
[ "https://Stackoverflow.com/questions/74404595", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20478946/" ]
74,404,604
<p>I need help with an assignment for school. I've only been doing SQL for 2 months and can't figure this out. My teacher gave me some hints about using self joins. The database has 3 more tables, but I don't think they are needed here.</p> <p>The assignment is to write a query that will help hotel staff find double bo...
[ { "answer_id": 74404724, "author": "Jilber Urbina", "author_id": 1315767, "author_profile": "https://Stackoverflow.com/users/1315767", "pm_score": 3, "selected": true, "text": "as.Date xdate<- as.Date(paste0(\"202211\", \"01\"), format=\"%Y%m%d\")\n xdate\n[1] \"2022-11-01\"\n" }, ...
2022/11/11
[ "https://Stackoverflow.com/questions/74404604", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20478970/" ]
74,404,613
<p>I'm new to React 18 and Suspense. Nearly all of my previous web development was done in asp.net mvc. I want to click a button on a form, pass the form input values to a web api HttpGet method with the [FromQuery] attribute, and render the return into a div.</p> <p>If I were doing this in asp.net mvc, I would wire up...
[ { "answer_id": 74405346, "author": "Zaeem Khaliq", "author_id": 11660035, "author_profile": "https://Stackoverflow.com/users/11660035", "pm_score": 1, "selected": false, "text": "useQuery MySearchResults MySearchComponent enabled useQuery const {data} = useQuery(['myquery', props.myEnum,...
2022/11/11
[ "https://Stackoverflow.com/questions/74404613", "https://Stackoverflow.com", "https://Stackoverflow.com/users/303305/" ]
74,404,615
<p>I am trying to write some stuff into the HTML document multiple times. It's the same lines of code I want to write out. Basically copy itself.</p> <pre><code> var a = &quot;asd&quot;; let added = document.createElement(&quot;div&quot;); let addedP = document.createElement(&quot;p&quot;) addedP.innerText = a; added...
[ { "answer_id": 74404643, "author": "Quentin", "author_id": 19068, "author_profile": "https://Stackoverflow.com/users/19068", "pm_score": 2, "selected": false, "text": "append createElement cloneNode" }, { "answer_id": 74404926, "author": "SnNeposis", "author_id": 20347565...
2022/11/11
[ "https://Stackoverflow.com/questions/74404615", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20419896/" ]
74,404,616
<p>I am new to regex module and learning a simple case to extract key and values from a simple dictionary.</p> <p><strong>the dictionary can not contain nested dicts and any lists, but may have simple tuples</strong></p> <h1>MWE</h1> <pre class="lang-py prettyprint-override"><code>import re # note: the dictionary are ...
[ { "answer_id": 74404823, "author": "trincot", "author_id": 5459839, "author_profile": "https://Stackoverflow.com/users/5459839", "pm_score": 3, "selected": true, "text": "ast.literal_eval import ast\n# ...\nout = ast.literal_eval(d)\n print(out.items())\n findall regexp = r\"([^{\\s][^:]...
2022/11/11
[ "https://Stackoverflow.com/questions/74404616", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19853940/" ]
74,404,619
<p>I have a very large database that looks like this. For cntext, the <code>data</code> appartains to different companies with their related CEOs (<code>ID</code>) and the different years each CEO was in charge</p> <pre><code>ID &lt;- c(1,1,1,1,1,1,3,3,3,5,5,4,4,4,4,4,4,4) C &lt;- c('a','a','a','a','a','a','b','b','b',...
[ { "answer_id": 74405747, "author": "Limey", "author_id": 13434871, "author_profile": "https://Stackoverflow.com/users/13434871", "pm_score": 0, "selected": false, "text": "df1 %>% \n arrange(C, ID, fyear) %>% \n group_by(C, ID) %>% \n mutate(\n fyear3=rowSums(list(sapply(1:3, funct...
2022/11/11
[ "https://Stackoverflow.com/questions/74404619", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19335534/" ]
74,404,627
<p>I have Invoices with many Invoice Line Items. Invoice line items point to a specific item. When creating or updating an Invoice, I'd like to validate that there is not more than 1 invoice line item with the same Item (Item ID). I am using accepts nested attributes and nested forms.</p> <p>I know about <code>validate...
[ { "answer_id": 74405747, "author": "Limey", "author_id": 13434871, "author_profile": "https://Stackoverflow.com/users/13434871", "pm_score": 0, "selected": false, "text": "df1 %>% \n arrange(C, ID, fyear) %>% \n group_by(C, ID) %>% \n mutate(\n fyear3=rowSums(list(sapply(1:3, funct...
2022/11/11
[ "https://Stackoverflow.com/questions/74404627", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3390279/" ]