question_id
int64
37.6M
73.2M
input_text
stringlengths
88
52.4k
output_text
stringlengths
37
35.6k
title
stringlengths
15
150
tags
stringlengths
1
107
q_score
int64
-19
397
view_count
int64
3
879k
answer_count
int64
1
21
accepted_answer_id
int64
37.6M
73.8M
answer_id
int64
37.6M
73.8M
a_score
int64
-5
1.29k
is_accepted
bool
1 class
creation_date
stringlengths
20
24
input_text_instruct
stringlengths
251
52.6k
71,390,475
How to check if a channel is joined?<p>I got channel by <code>client.get_entity(id)</code> using id stored locally and I need to check if I am still joined or not. I suspect it might be <code>not Channel.left</code> but I haven't found any docs about the field.</p>
<p>Your assumption about <code>not channel.left</code> is correct. The docs about the field can be found here: <a href="https://core.telegram.org/constructor/channel" rel="nofollow noreferrer">https://core.telegram.org/constructor/channel</a>.</p>
How to check if a channel is joined?
python|telegram|telethon
0
40
1
71,517,973
71,517,973
1
true
2022-03-08T05:36:16.960Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to check if a channel is joined?<p>I got channel by <code>client.get_entity(id)</code> using id stored locally and I need to check if I am still joined o...
71,252,011
User descriptions missing when OpenLDAP used with WebLogic<p>I am using a WebLogic 12.2.1.3 server on Linux. I added an OpenLDAP provider in the security realm. Now I see the list of users and group memberships in WebLogic as defined in LDAP and can login with one of those user cn's and password.</p> <p>So far, so good...
<p>The field is just named &quot;description&quot; for me</p>
User descriptions missing when OpenLDAP used with WebLogic
weblogic12c|openldap
0
17
1
71,523,958
71,523,958
1
true
2022-02-24T12:30:59.823Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: User descriptions missing when OpenLDAP used with WebLogic<p>I am using a WebLogic 12.2.1.3 server on Linux. I added an OpenLDAP provider in the security rea...
71,411,150
How to export a Power Center mapping to SQL statements?<p>Is it always possible to export an Informatica PowerCenter mapping to a sequence of SQL statements? How would we do it? Plus points if we can do it programmatically.</p> <p>My mapping is from a relational database to another relational database.</p>
<p>Well, Informatica actually makes it possible to convert the whole mapping to a INSERT-SELECT statement, as long as some conditions are met.</p> <ul> <li>Most importantly: Pushdown Optimization option must be available (AFAIR it is licenced separately, hence not always available)</li> <li>Session property <code>Pushd...
How to export a Power Center mapping to SQL statements?
sql|informatica-powercenter
0
279
2
71,550,522
71,550,522
1
true
2022-03-09T14:44:26.060Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to export a Power Center mapping to SQL statements?<p>Is it always possible to export an Informatica PowerCenter mapping to a sequence of SQL statements?...
71,372,807
react-hook-forms upload/save to an object at FaunaDB<p>I'm trying to upload/save to an object at FaunaDB. Specifically, I'm trying to upload a string to a jobProfile object:</p> <pre><code>data: { &quot;jobProfile&quot;: { &quot;image&quot;: &quot;&quot; &quot;coverImage&quot;: &quot;&quot; } } </code></pre> ...
<p>In your <code>updateProfileInfo</code> function in <code>fauna.js</code> you should have</p> <pre><code>data: { jobProfile: { image, coverImage } }, </code></pre> <p>not:</p> <pre><code>data: { image, coverImage }, </code></pre>
react-hook-forms upload/save to an object at FaunaDB
javascript|next.js|react-hook-form
0
44
1
71,565,680
71,565,680
1
true
2022-03-06T17:47:05.387Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: react-hook-forms upload/save to an object at FaunaDB<p>I'm trying to upload/save to an object at FaunaDB. Specifically, I'm trying to upload a string to a jo...
71,378,718
eslint no-restricted-syntax selector for private methodDefinition<p>I use eslint on a TypeScript project and have some rule in <strong>no-restricted-syntax config</strong> that check naming for async method, like :</p> <pre class="lang-json prettyprint-override"><code>{ &quot;selector&quot;: &quot;MethodDefinition[va...
<p>So, I found what I was searching for.</p> <p>My answer was in <a href="https://typescript-eslint.io/docs/development/architecture/asts/" rel="nofollow noreferrer">this documentation</a> inside AST Playground part.</p> <p><a href="https://typescript-eslint.io/play/#ts=4.6.2&amp;sourceType=module&amp;showAST=es&amp;co...
eslint no-restricted-syntax selector for private methodDefinition
eslint|abstract-syntax-tree|eslintrc
0
301
1
71,575,669
71,575,669
1
true
2022-03-07T09:11:59.550Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: eslint no-restricted-syntax selector for private methodDefinition<p>I use eslint on a TypeScript project and have some rule in <strong>no-restricted-syntax c...
71,346,102
how many options do we have for data compression in TDengine database?<p>In TDengine database, there is a data compression configuration in /etc/taos/taos.cfg</p> <pre><code># enable/disable compression # comp 2 </code></pre> <p>the default option is 2, so how many options do we have for comp, what is ...
<p>TDengine provides three compression options: no compression, one-stage compression and two-stage compression, corresponding to comp values of 0, 1 and 2 respectively.</p> <p>One-stage compression is carried out according to the type of data. Compression algorithms include delta-delta coding, simple 8B method, zig-za...
how many options do we have for data compression in TDengine database?
tdengine
0
20
1
71,676,769
71,676,769
1
true
2022-03-04T02:53:14.007Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how many options do we have for data compression in TDengine database?<p>In TDengine database, there is a data compression configuration in /etc/taos/taos.cf...
71,331,098
is test data used in Pycaret time series(beta) completely unseen by the model(s)?<p>Post checking official <a href="https://pycaret.readthedocs.io/en/time_series/api/time_series.html" rel="nofollow noreferrer">documentation</a> and <a href="https://nbviewer.org/github/pycaret/pycaret/blob/time_series_beta/time_series_1...
<p>If you notice the cv splits, they do not use the test data at all. So any step such as <code>create_model</code>, <code>tune_model</code>, <code>blend_model</code>, <code>compare_models</code> that use Cross-Validation, will not use the test data at all for training.</p> <p>Once you are happy with the models from th...
is test data used in Pycaret time series(beta) completely unseen by the model(s)?
python|time-series|pycaret
0
528
1
71,735,994
71,735,994
1
true
2022-03-03T01:29:08.180Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: is test data used in Pycaret time series(beta) completely unseen by the model(s)?<p>Post checking official <a href="https://pycaret.readthedocs.io/en/time_se...
71,393,761
The _temp file appears in the AWSAthena editor<p>I created a data catalog using Blueprint in AWSLakeFormation.<br /> Afterwards, I checked the table in Athena and noticed that the _temp〇〇 file was showing up.</p> <p>I would like to remove the _temp○○ file from the AWSAthena editor if possible. I can simply drop the tab...
<p>You can change the user IAM policy and attach the following inline policy to the user or usergroup. This will deny the get table access and the _temp tables will not appear on Athena for those users.</p> <pre><code>{ &quot;Version&quot;: &quot;2012-10-17&quot;, &quot;Statement&quot;: [ { ...
The _temp file appears in the AWSAthena editor
amazon-web-services
0
23
1
71,761,171
71,761,171
1
true
2022-03-08T10:50:24.373Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: The _temp file appears in the AWSAthena editor<p>I created a data catalog using Blueprint in AWSLakeFormation.<br /> Afterwards, I checked the table in Athen...
71,790,316
Gradle Groovy property logical results appear wrong?<p>I have this debug code in <code>root/build.gradle</code>:</p> <pre><code>task copyJenkinsIdea(type: Copy) { onlyIf { project.hasProperty(&quot;isJenkins&quot;) } doLast { println &quot;Do Jenkins-specific setup&quot; println &qu...
<p>Turns out, Groovy can't know that the property being passed in is a boolean. It's doing</p> <pre><code>class java.lang.Boolean &amp;&amp; class java.lang.String true &amp;&amp; &quot;false&quot; </code></pre> <p>Which is, in fact, <code>true</code>.</p>
Gradle Groovy property logical results appear wrong?
android|gradle|groovy
0
22
1
71,790,358
71,790,358
1
true
2022-04-08T00:18:02.463Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Gradle Groovy property logical results appear wrong?<p>I have this debug code in <code>root/build.gradle</code>:</p> <pre><code>task copyJenkinsIdea(type: Co...
71,791,351
Sorting an array by the children attribute in react<p>in my app, I have a map of an array that returns a div with a data-date attribute like so:</p> <pre><code>Note I cannot sort the array here as I don't have any dates to compare them with, only the ID of the element const mappedArray = array.map(el=&gt;{ return (...
<p>is it okay to change the props on DivComponent and move the useGetInfo outside?</p> <pre><code>const mappedArray = array.map(el=&gt;useGetInfo(el.id)) .sort((info1,info2)=&gt;info1.date.toDate()&gt;info2.date.toDate()?1:-1) .map(info=&gt;{ return ( &lt;DivComponent info={info} /&gt; ) }) </code></pre>
Sorting an array by the children attribute in react
javascript|reactjs
0
27
1
71,791,444
71,791,444
1
true
2022-04-08T03:25:48.277Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Sorting an array by the children attribute in react<p>in my app, I have a map of an array that returns a div with a data-date attribute like so:</p> <pre><co...
71,792,331
Create Pyramid with decremental value<p>I'm trying to create a pyramid in c# using a number input. I know how to create a normal pyramid that counts from 1-20 but I can't seem to find what to change on my code to make it.</p> <p>Instead of:</p> <pre><code> 1 2 2 3 3 3 4 4 4 4 </code></pre> <p>I need it...
<p>First, you need to reverse the for loop. So that it starts with rows, loops while greater than zero, and decrements and each iteration</p> <pre><code> for (i = rows; i &gt; 0; i--) </code></pre> <p>This is the main part. But you also need to take care of the spaces. So to do this we now need to keep track of how...
Create Pyramid with decremental value
c#
0
32
2
71,792,540
71,792,540
1
true
2022-04-08T06:07:37.903Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Create Pyramid with decremental value<p>I'm trying to create a pyramid in c# using a number input. I know how to create a normal pyramid that counts from 1-2...
71,793,956
Using basename inside for each gnu Makefile<p>I am wondering how to use <code>basename</code> inside for each? I think maybe the reason basename does not work is that each &quot;$file&quot; is actually a path to a file, not simply a filename.</p> <pre><code>DOCKER_TAG=foobar DOCKER_RUN=docker run -v `pwd`:/root -it --r...
<p>The <code>$(basename)</code> function is evaluated by <code>make</code> <em>before</em> the shell runs the loop. So you are effectively running</p> <pre><code>for file in /path/to/moo.txt /path/to/bar.txt /path/to/baz.txt; do echo ${file}.test ; done </code></pre> <p>The shell's <code>basename</code> command als...
Using basename inside for each gnu Makefile
makefile|gnu-make
0
36
1
71,794,207
71,794,207
1
true
2022-04-08T08:30:37.907Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Using basename inside for each gnu Makefile<p>I am wondering how to use <code>basename</code> inside for each? I think maybe the reason basename does not wor...
71,794,677
Why can't I increase my button width inside flutter buttonbar?<p>I want to increase the width of my buttons so they take the whole screen, but buttonMinWidth isn't working,</p> <p>here is my code:</p> <pre><code>ButtonBar( children: [ TextButton.icon( onPressed: null, icon: const Icon( Icons.r...
<p>Hello Please Check with Below Code Hope it's work for you Let me know if you have any query</p> <pre><code>ButtonBar( alignment: MainAxisAlignment.spaceBetween, children: [ TextButton.icon( onPressed: null, icon: const Icon( Icons.replay, color: Colors....
Why can't I increase my button width inside flutter buttonbar?
flutter|flutter-layout
0
32
1
71,794,766
71,794,766
1
true
2022-04-08T09:30:28.103Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why can't I increase my button width inside flutter buttonbar?<p>I want to increase the width of my buttons so they take the whole screen, but buttonMinWidth...
71,795,059
Quick Sort throws a Stack Overflow error when negative number is included in the array (Dart)<p>I am trying to implement quick sort in dart, The code below works fine When I do not include a negative number. However whenever I include a negative number in the array I get a stack overflow error. I'll be glad if anyone c...
<p>Your bug is not due to the negative value in the array, it could have been any low value and you would have the same problem. The mistake you did was to pass <code>arr.length - 1</code> as the upperbound value in your recursive call to quickSortElements. See below, I put in comment the line that has been corrected:<...
Quick Sort throws a Stack Overflow error when negative number is included in the array (Dart)
dart|data-structures|quicksort
0
35
1
71,796,375
71,796,375
1
true
2022-04-08T09:58:29.493Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Quick Sort throws a Stack Overflow error when negative number is included in the array (Dart)<p>I am trying to implement quick sort in dart, The code below w...
71,794,844
How to inherit and extend xml qweb view in odoo 15?<p>i am trying to extend a Qweb XML view in Odoo 15.</p> <p>Here is what i tried.</p> <p><strong>static.xml</strong></p> <pre><code> &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt; &lt;templates xml:space=&quot;preserve&quot;&gt; &lt...
<p>You need to add web.asset_qweb list into '<strong>assets</strong>' dictionary. Below is an example :</p> <pre><code>'assets': { 'web.assets_qweb':[ 'digital_sign_extend/static/src/xml/digital_sign.xml', ], } </code></pre>
How to inherit and extend xml qweb view in odoo 15?
odoo|odoo-15
0
533
1
71,797,158
71,797,158
1
true
2022-04-08T09:43:07.957Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to inherit and extend xml qweb view in odoo 15?<p>i am trying to extend a Qweb XML view in Odoo 15.</p> <p>Here is what i tried.</p> <p><strong>static.xm...
71,796,776
How to change dynamically the Bootstrap 5.0 popover?<p>In Bootstrap 4.0 it was possible to change the popover content (based on the <code>selector</code>) or to reposition it (using <code>$tip</code> property) dynamically</p> <pre><code>$(&quot;body&quot;).popover({ container: 'body', content: 'loading...', ...
<p>You need to use vanilla JS instead. Get the popover instance in the 'shown' event using <code>bootstrap.Popover.getInstance(myPopoverTrigger)</code> and then you can access <code>_config</code> and <code>tip</code> as needed. For example...</p> <pre><code>var myPopoverTrigger = document.getElementById('myPopover') v...
How to change dynamically the Bootstrap 5.0 popover?
javascript|bootstrap-5|bootstrap-popover
0
262
1
71,797,285
71,797,285
1
true
2022-04-08T12:11:27.443Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to change dynamically the Bootstrap 5.0 popover?<p>In Bootstrap 4.0 it was possible to change the popover content (based on the <code>selector</code>) or...
71,797,186
Path to a file React Native<p>I have a pdf file in <code>/assets/pdfs</code> folder. I'm trying to display it but getting an empy page:</p> <pre><code>import React from 'react'; import { StyleSheet, View, Text } from 'react-native'; import Pdf from 'react-native-pdf'; import MaterialIcon from 'react-native-vector-icons...
<p>These are all the possible ways as stated in the <a href="https://www.npmjs.com/package/react-native-pdf" rel="nofollow noreferrer">docs</a>:</p> <pre><code>// const source = { uri: 'http://samples.leanpub.com/thereactnativebook-sample.pdf', cache: true }; // const source = require('./test.pdf'); // ios only // con...
Path to a file React Native
javascript|react-native
0
36
1
71,797,286
71,797,286
1
true
2022-04-08T12:41:40.193Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Path to a file React Native<p>I have a pdf file in <code>/assets/pdfs</code> folder. I'm trying to display it but getting an empy page:</p> <pre><code>import...
71,797,823
How to find maximums' indexes by row with Numpy?<p>I have np 2d array and want to get indexes of max by row.</p> <p>For example:</p> <pre><code>3 2 1 3 1 0 4 4 1 2 1 0 1 1 2 </code></pre> <p>Maximum by row is <code>[3, 4, 2]</code>. Indexes are <code>[(0,0) (0,3) (1,1) (1,2) (2,4)]</code></p> <p>I tried smth like this<...
<p>After finding <code>max</code> you need set each max as one row then searching in base array like below:</p> <pre><code>&gt;&gt;&gt; a = np.array([[3 ,2 ,1 ,3 ,1],[0, 4 ,4 ,1 ,2],[1, 0, 1, 1, 2]]) &gt;&gt;&gt; np.max(a, axis=1) array([3, 4, 2]) &gt;&gt;&gt; np.max(a, axis=1)[:,None] array([[3], [4], ...
How to find maximums' indexes by row with Numpy?
python|numpy
0
36
1
71,797,919
71,797,919
1
true
2022-04-08T13:23:14.360Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to find maximums' indexes by row with Numpy?<p>I have np 2d array and want to get indexes of max by row.</p> <p>For example:</p> <pre><code>3 2 1 3 1 0 4...
71,798,135
Where does netifaces extract to?<p>I am trying to install the netifaces module and was able to run the <code>tar xvzf netifaces-0.11.0.tar.gz </code> command. It looks like it extracted all the folders it needed too but I dont see them in my download folder or in my site-packages under my python folder which is where I...
<p>you can see what is inside tar.gz. here is a guide <a href="https://www.cyberciti.biz/faq/list-the-contents-of-a-tar-or-targz-file/" rel="nofollow noreferrer">https://www.cyberciti.biz/faq/list-the-contents-of-a-tar-or-targz-file/</a></p> <p>also, didn't you forget about &quot;-&quot; ? <code>tar -xvzf netifaces-0.1...
Where does netifaces extract to?
python|c#|module|python-netifaces
0
33
1
71,798,264
71,798,264
1
true
2022-04-08T13:43:38.413Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Where does netifaces extract to?<p>I am trying to install the netifaces module and was able to run the <code>tar xvzf netifaces-0.11.0.tar.gz </code> command...
71,265,029
How to include SQLite JDBC driver to docker image?<p>I try to create a docker image of an servlet app which uses SQLite database or xml for storing data and tomcat to set the app up. It is defined in the environment variable which type of storage the app uses. When I use xml everything is alright, but when I try to swi...
<ol> <li>extract libsqlitejdbc.so from sqlite-jdbc-3.36.0.3.jar</li> <li>copy libsqlitejdbc.so to /usr/lib</li> </ol> <p>example:</p> <pre><code>RUN unzip -j sqlite-jdbc-*.jar &quot;org/sqlite/native/$(uname -s)/$(uname -m)/libsqlitejdbc.so&quot; RUN mv libsqlitejdbc.so /usr/lib </code></pre>
How to include SQLite JDBC driver to docker image?
java|docker|tomcat
0
261
1
71,798,723
71,798,723
1
true
2022-02-25T11:14:22Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to include SQLite JDBC driver to docker image?<p>I try to create a docker image of an servlet app which uses SQLite database or xml for storing data and ...
71,798,157
Why do tables in postgresql get created in public schema despite a different search path?<p>I am trying to have a specific role have access only to a specific schema.</p> <p>I have schema public, and a schema python. I would like to set the default search_path for a role to schema python:</p> <pre><code>ALTER ROLE user...
<p><code>ALTER ROLE ... SET ...</code> will take effect at next login. For an immediate effect in the current session (only), use <code>SET search_path TO myschema;</code></p>
Why do tables in postgresql get created in public schema despite a different search path?
database|postgresql|schema
0
27
1
71,798,923
71,798,923
1
true
2022-04-08T13:45:17.833Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why do tables in postgresql get created in public schema despite a different search path?<p>I am trying to have a specific role have access only to a specifi...
71,798,099
What do I need to tell clients re. Firewalls in order to ensure our Azure.Storage.Blobs dependent software will work?<p>Our software uses Azure.Core, Azure.Storage.Blobs and Azure.Storage.Common to interact with Azure Blob Storage Accounts held in North Europe (i.e. Ireland)</p> <p>We store files in various containers ...
<p>You can view/download the ip ranges from <a href="https://www.microsoft.com/en-us/download/details.aspx?id=56519" rel="nofollow noreferrer">this link</a>:</p> <blockquote> <p>This file contains the IP address ranges for Public Azure as a whole, each Azure region within Public, and ranges for several Azure Services (...
What do I need to tell clients re. Firewalls in order to ensure our Azure.Storage.Blobs dependent software will work?
azure|azure-blob-storage|.net-4.8
0
22
1
71,799,025
71,799,025
1
true
2022-04-08T13:40:53.013Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What do I need to tell clients re. Firewalls in order to ensure our Azure.Storage.Blobs dependent software will work?<p>Our software uses Azure.Core, Azure.S...
71,797,201
Visual Studio unknown debug icon<p>I was debugging C# in Visual Studio 2017, and debugger stopped on an exception. Some static members can't initialize, and exception is raised in member's class constructor. In Auto window I saw this icon that I have never seen before:</p> <p><a href="https://i.stack.imgur.com/X3yYz.pn...
<p>That means &quot;static member field&quot;. The &quot;1&quot; apparently means &quot;has only one instance&quot;.</p>
Visual Studio unknown debug icon
visual-studio|visual-studio-2017
0
24
1
71,800,177
71,800,177
1
true
2022-04-08T12:42:27.027Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Visual Studio unknown debug icon<p>I was debugging C# in Visual Studio 2017, and debugger stopped on an exception. Some static members can't initialize, and ...
71,800,519
extra entities with nil attributes in Core Data<p>Here is my code. I have extra entities with nil attributes in Core Data. when I delete and run application firstly, I get one saved object with nil attributes fetched from core data.</p> <pre><code>class RepositoryEntity { private var context = (UIApplication.shared.de...
<p>When you write &quot;I get one saved object...&quot;: what object? <code>RepositoryEntity</code>? How do you know you have a saved object, by calling <code>fetchRepositories()</code>? I can only assume it's like that (as opposed to having an empty <code>OwnerEntity</code>).</p> <p>In that case, the problem is that, ...
extra entities with nil attributes in Core Data
ios|swift|core-data
0
28
1
71,800,966
71,800,966
1
true
2022-04-08T16:37:40.127Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: extra entities with nil attributes in Core Data<p>Here is my code. I have extra entities with nil attributes in Core Data. when I delete and run application ...
71,802,179
How to make the div wide enough when I scroll the screen?<p>How should I adjust the CSS for the <code>div class=&quot;breadcrumbs&quot;</code>, if the table is wider than a screen and then background is not till the end. <a href="https://i.stack.imgur.com/bBZPj.png" rel="nofollow noreferrer">screenshot, where is the pr...
<p>The table is overflow the screen .. try to make the table width to 100%</p> <p>Add this inside the head tag:</p> <pre><code>&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, height=device-height, initial-scale=1.0&quot;&gt; </code></pre> <p>Your body: </p> <pre><code>&lt;div class=&quot;myTable&qu...
How to make the div wide enough when I scroll the screen?
css
0
33
1
71,802,329
71,802,329
1
true
2022-04-08T19:19:14.380Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to make the div wide enough when I scroll the screen?<p>How should I adjust the CSS for the <code>div class=&quot;breadcrumbs&quot;</code>, if the table ...
71,804,506
How to draw multiple barcharts in Python with variable categories using subplot?<p>So my input data is two dictionary D1 and D2, it looks like this:</p> <pre><code>D1 = { 'A':{'X1':1, 'X2':2}, 'B':{'X3':3, 'X4':4,'X5':10}, ... 'T':{'X100':30} } </code></pre> <pre><code>D2 = { 'A':{'X1':4, 'X2':2}, 'B':{'X3':13, 'X4':2,...
<p>You can convert the dictionaries to a long form dataframe. And then use seaborn's <code>sns.catplot()</code> to draw a grid of bar plots:</p> <pre class="lang-py prettyprint-override"><code>import matplotlib.pyplot as plt import seaborn as sns import numpy as np import pandas as pd # first, create some test data wi...
How to draw multiple barcharts in Python with variable categories using subplot?
python|matplotlib
0
31
1
71,804,667
71,804,667
1
true
2022-04-09T01:04:12.647Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to draw multiple barcharts in Python with variable categories using subplot?<p>So my input data is two dictionary D1 and D2, it looks like this:</p> <pre...
71,805,491
is this the right method instead using bottom bar navigation<p>I am new to Flutter. As I understand Bottom Bar Navigation is used for quick navigation between the top-level views of an app. but in my situation, I want to use like this which only button PAY can be clicked. <a href="https://i.stack.imgur.com/CS2Gb.png" r...
<p>ya ,The best way is that you can create a container and the button and place it child of bottomNavigationBar so the flutter is automaticaly align it in bottom side</p> <p><code>bottomNavigationBar: Container(child: yourcodeHere),</code></p>
is this the right method instead using bottom bar navigation
flutter
0
27
1
71,805,542
71,805,542
1
true
2022-04-09T05:25:09.290Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: is this the right method instead using bottom bar navigation<p>I am new to Flutter. As I understand Bottom Bar Navigation is used for quick navigation betwee...
71,805,846
Place link on whole table cell with CSS<p>I have a table created with divs only and would like to expand the link in the first cell to the whole cell area. Currently, the link is only placed on the text itself. It is important to keep the vertical alignment of the text in the middle of the cell.</p> <p>How can I make t...
<p>Making your anchor tag become <code>divTableCell</code> that is the easiest way</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-css lang-css prettyprint-override"><code>div.divTable { border: 1px solid #000000;...
Place link on whole table cell with CSS
html|css
0
25
1
71,805,919
71,805,919
1
true
2022-04-09T06:44:38.173Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Place link on whole table cell with CSS<p>I have a table created with divs only and would like to expand the link in the first cell to the whole cell area. C...
71,806,545
Checking conditions with a function django views<p>I am trying to make my code more readable and less verbose. I have this long view, where I have some if and elif statement to check some conditions. What I am trying to do is to write this function into another file (utils.py) and use this function in the views. The vi...
<p>Indeed, if you just call the <code>flight_validator</code> that way, its return value is just ignored.</p> <p>A quick fix could be:</p> <p><code>views.py</code>:</p> <pre class="lang-py prettyprint-override"><code>redirection = flight_validator(request, ata_tacho, etd_tacho, ata, etd, function_type_obj.name, instruc...
Checking conditions with a function django views
python|django
0
29
1
71,806,730
71,806,730
1
true
2022-04-09T08:49:19.610Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Checking conditions with a function django views<p>I am trying to make my code more readable and less verbose. I have this long view, where I have some if an...
71,806,591
TypeError: Cannot read properties of undefined (reading 'has')<p>I want to check if the member is the owner of the server, but I am getting an error. My code:</p> <pre class="lang-js prettyprint-override"><code>const member = message.mentions.users.first(); const reason = args.slice(1).join(' ') || 'No reason s...
<p>A <a href="https://discord.js.org/#/docs/main/stable/class/User" rel="nofollow noreferrer"><code>User</code></a> doesn't have a <code>permissions</code> property.</p> <p>However, <a href="https://discord.js.org/#/docs/main/stable/class/GuildMember?scrollTo=permissions" rel="nofollow noreferrer">a <code>GuildMember</...
TypeError: Cannot read properties of undefined (reading 'has')
node.js|discord|discord.js
0
1,298
1
71,806,743
71,806,743
1
true
2022-04-09T08:59:18.890Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: TypeError: Cannot read properties of undefined (reading 'has')<p>I want to check if the member is the owner of the server, but I am getting an error. My code...
71,799,101
How to query rows by intraday time range in sqlite<p>I have a column that consists of the datetime for each entry in the table. The entries are across many days and across all times. I want to filter only for entries that happened between a certain time period in the day, like between 10am and 1pm. How does one do that...
<p>First, keep the <a href="https://www.sqlite.org/lang_datefunc.html" rel="nofollow noreferrer">sqlite Date and Time Functions doc</a> handy.</p> <p>Something like:</p> <pre><code>WHERE strftime(&quot;%H:%M&quot;,yourdate) between &quot;10:00&quot; and &quot;13:00&quot; </code></pre> <p>should accomplish the task.</p>
How to query rows by intraday time range in sqlite
sqlite|datetime
0
22
1
71,806,883
71,806,883
1
true
2022-04-08T14:52:53.203Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to query rows by intraday time range in sqlite<p>I have a column that consists of the datetime for each entry in the table. The entries are across many d...
71,807,292
Pandas: Fast way to get cols/rows containing na<p>In Pandas we can drop cols/rows by <code>.dropna(how = ..., axis = ...)</code> but is there a way to get an array-like of True/False indicators for each col/row, which would indicate whether a col/row contains <em>na</em> according to <code>how</code> and <code>axis</co...
<p>You can use <a href="https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.isna.html" rel="nofollow noreferrer"><code>isna()</code></a> to replicate the behaviour of <code>dropna</code> without actually removing data. To mimic the <code>'how'</code> and <code>'axis'</code> parameter, you can add <a href="htt...
Pandas: Fast way to get cols/rows containing na
pandas
0
30
1
71,807,893
71,807,893
1
true
2022-04-09T10:40:43.943Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pandas: Fast way to get cols/rows containing na<p>In Pandas we can drop cols/rows by <code>.dropna(how = ..., axis = ...)</code> but is there a way to get an...
71,809,070
JS custom table element missing always 1 row<p>I made a custom TABLE element and it update the amount of rows by the attribute 'rows' but it missing by one row,</p> <p>For example: i set rows='10' the output rows is 9.</p> <p>I know that if i remove the div element i added to the 'TBODY' the problem solved but i want i...
<p>This logic is causing your row appending problem</p> <pre><code>for (let i = 0; i &lt; dataCell.length; i++) { let row = body.childNodes[i]; if (row &amp;&amp; row.tagName === 'TR') { //after the first row added //it goes inside this, so it never call `addRow` (one row is missing from here) ...
JS custom table element missing always 1 row
javascript|html|element|custom-element
0
32
1
71,809,260
71,809,260
1
true
2022-04-09T14:44:28.573Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: JS custom table element missing always 1 row<p>I made a custom TABLE element and it update the amount of rows by the attribute 'rows' but it missing by one r...
71,809,314
Truncate table Dataverse<p>I am trying to truncate a table in Dataverse, so I have installed SQL Server Management studio, selected my database, and ran the query <code>TRUNCATE TABLE tablename</code> However, I get the error:</p> <pre><code>Msg 40000, Level 16, State 1, Line 1 'TRUNCATE' statement​ is not supported. L...
<p>The SQL Connection to Dataverse is read-only</p> <blockquote> <p>The SQL connection provides read-only access to the table data of the target Dataverse environment thereby allowing you to execute SQL queries against the Dataverse data tables.</p> </blockquote> <p><a href="https://docs.microsoft.com/en-us/power-apps/...
Truncate table Dataverse
sql|sql-server|dataverse
0
269
1
71,809,394
71,809,394
1
true
2022-04-09T15:14:14.610Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Truncate table Dataverse<p>I am trying to truncate a table in Dataverse, so I have installed SQL Server Management studio, selected my database, and ran the ...
71,809,888
What causes this failure to pass an object from the main component to a child component in a Vue 3 app?<p>I am working on a Vue 3 app. I have run into a problem working with a component and one of its <code>&lt;User /&gt;</code> subcomponent.</p> <p>In App.vue:</p> <pre><code>&lt;template&gt; &lt;Navbar /&gt; &lt;...
<pre><code>//in Navbar &lt;template&gt; &lt;a class=&quot;navbar-brand&quot; href=&quot;#&quot;&gt;My App&lt;/a&gt; &lt;User :users='usersData' /&gt; &lt;/template&gt; &lt;script&gt; import User from './User.vue' export default { name: 'Navbar', components: { User }, props:['usersData'...
What causes this failure to pass an object from the main component to a child component in a Vue 3 app?
javascript|vue.js
0
29
1
71,809,945
71,809,945
1
true
2022-04-09T16:26:19.137Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What causes this failure to pass an object from the main component to a child component in a Vue 3 app?<p>I am working on a Vue 3 app. I have run into a prob...
71,810,278
How to create from a 2-column DataFrame a DataFrame that counts occurences of 2nd column by 1st column?<p>I have the following 2-column DataFrame:</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th style="text-align: left;">transaction id</th> <th style="text-align: center;">item id</th> </tr>...
<p>Try this:</p> <pre><code>ndf = (df.set_index('transaction id')['item id'] .astype(str) .str.get_dummies() .groupby(level=0).sum()) ndf.T.dot(ndf) </code></pre> <p>Output:</p> <pre><code> 50 52 54 57 50 1 0 1 1 52 0 1 1 0 54 1 1 2 1 57 1 0 1 2 </code></pre>
How to create from a 2-column DataFrame a DataFrame that counts occurences of 2nd column by 1st column?
python|pandas|dataframe
0
36
1
71,810,370
71,810,370
1
true
2022-04-09T17:17:37.473Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to create from a 2-column DataFrame a DataFrame that counts occurences of 2nd column by 1st column?<p>I have the following 2-column DataFrame:</p> <div c...
71,810,838
for every row find the last column with value 1 in binary data frame<p>consider a data frame of binary numbers:</p> <pre><code>import pandas import numpy numpy.random.seed(123) this_df = pandas.DataFrame((numpy.random.random(100) &lt; 1/3).astype(int).reshape(10, 10)) 0 1 2 3 4 5 6 7 8 9 0 0 1 1 0 0...
<p>One option is to reverse the column order, then use <code>idxmax</code>:</p> <pre><code>df['rightmost 1'] = df.loc[:,::-1].idxmax(axis=1) </code></pre> <p>Output:</p> <pre><code> 0 1 2 3 4 5 6 7 8 9 rightmost 1 0 0 1 1 0 0 0 0 0 0 0 2 1 0 0 0 1 0 0 1 1 0 0 7 2 0 0...
for every row find the last column with value 1 in binary data frame
python|python-3.x|pandas|dataframe
0
33
1
71,810,878
71,810,878
1
true
2022-04-09T18:31:28.150Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: for every row find the last column with value 1 in binary data frame<p>consider a data frame of binary numbers:</p> <pre><code>import pandas import numpy nu...
71,810,897
Error returning an array of objects from an Angular function<p>Good afternoon, I have a problem when I want to return an array of objects from an external function.</p> <p>I have declared an Object class with 2 properties, its constructor and one that works where I return an array with more than 50 objects for this exa...
<p>First of all the type for the property <code>arrayData</code> is not of type <strong>Object</strong> which is the class that you're using, so a more proper type would be the same as the one that is returned by the method <code>getData</code>.</p> <p>You can get its return type by using the typescript helper type <co...
Error returning an array of objects from an Angular function
javascript|arrays|angular|typescript|arrayobject
0
259
1
71,811,000
71,811,000
1
true
2022-04-09T18:39:56.963Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Error returning an array of objects from an Angular function<p>Good afternoon, I have a problem when I want to return an array of objects from an external fu...
71,811,271
Colour coding data points<p>I have some data for which I have performed manual K-means clustering using Euclidean distance. I have the final centroids and the clustered points. I have plotted this to a graph however, I am unsure how I could go about colour coding the different points depending on the cluster they belon...
<p>You need to add the cluster information:</p> <pre class="lang-r prettyprint-override"><code>data2$Cluster &lt;- factor(c(1, 1, 1, 2, 2, 1, 2, 3, 3, 2, 3, 2, 2, 3, 3)) df$Cluster &lt;- factor(1:3) </code></pre> <p>Now your plot can be done with:</p> <pre><code>ggplot(data2, aes(X, Y, shape = factor(is.na(E1)))) + g...
Colour coding data points
r|ggplot2|cluster-analysis
0
35
2
71,811,546
71,811,546
1
true
2022-04-09T19:31:40.577Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Colour coding data points<p>I have some data for which I have performed manual K-means clustering using Euclidean distance. I have the final centroids and th...
71,812,270
Expand background jQuery trigger not working<p>The goal is when you click on the image behind the red square, the red square expands to the whole webpage.</p> <p><a href="https://i.stack.imgur.com/pU1ZI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pU1ZI.png" alt="enter image description here" /></...
<p>This is my version of the <a href="https://codepen.io/mankinchi/pen/qBpKaqN" rel="nofollow noreferrer">code</a>.</p> <p>The change is quite small, just this</p> <pre><code>$(&quot;.text-portf&quot;).delay(500).fadeIn(); </code></pre> <p>to this</p> <pre><code>$(&quot;.text-portf&quot;).delay(500).toggle(); </code></...
Expand background jQuery trigger not working
javascript|html|jquery|css
0
36
1
71,812,601
71,812,601
1
true
2022-04-09T22:10:50.187Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Expand background jQuery trigger not working<p>The goal is when you click on the image behind the red square, the red square expands to the whole webpage.</p...
71,812,091
Currency ( SCD table ) and Request table<p>I have two tables and I need to bring in the local currency to the USD value at the time of the reqiest .</p> <pre><code>Table 1 Product request / Request Date / Local Currency 1 01/01/2022 GBP Table 2 Currency source / Currency Target / Effective From...
<p>In Power Query, you can</p> <ul> <li>Read in your Table 2 and buffer it (so it doesn't have to be read for each row in table 1</li> <li>Use the <code>Table.SelectRows</code> method to return the desired output</li> </ul> <pre><code>let Source = Excel.CurrentWorkbook(){[Name=&quot;Table1&quot;]}[Content], So...
Currency ( SCD table ) and Request table
powerbi|dax
0
34
1
71,813,035
71,813,035
1
true
2022-04-09T21:38:26.350Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Currency ( SCD table ) and Request table<p>I have two tables and I need to bring in the local currency to the USD value at the time of the reqiest .</p> <pre...
71,812,934
Divide/Multiply certain rows in a DF by other Df with conditions<p>I got 2 df The first one with the purchase prices by country and year</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>year</th> <th>purchase</th> <th>country</th> </tr> </thead> <tbody> <tr> <td>1999</td> <td>23</td> <td>Can...
<p>You can do <code>reindex</code> and <code>rdiv</code></p> <pre><code>df1['ratio'] = df1['purchase'].rdiv(df2.set_index('year')['price'].reindex(df1['year']).values) df1 Out[316]: year purchase country ratio 0 1999 23 Canada 1.086957 1 2000 24 Canada 1.125000 2 1999 21 China 1....
Divide/Multiply certain rows in a DF by other Df with conditions
python|pandas|dataframe|numpy
0
30
2
71,813,134
71,813,134
1
true
2022-04-10T00:36:28.750Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Divide/Multiply certain rows in a DF by other Df with conditions<p>I got 2 df The first one with the purchase prices by country and year</p> <div class="s-ta...
71,809,804
python mongoenqine querying documents<p>I am querying 2 collections from mongodb. I am querying one collection that has a field called 'quiz_id'. I want to search for the value of this field (e.g. the first quiz_id value is 'M7001'). In the second collection, I want to search for value of the 'quiz_id' (it's a score fr...
<p><code>quiz_chk</code> requires additional iteration:</p> <p><code>[q['quiz_id'] for q in quiz_chk]</code></p> <p>which would make entire code look like that:</p> <pre><code>from mongoengine import * connect('test') class TopicMaths(Document): quiz_id = StringField() class User(Document): username = Stri...
python mongoenqine querying documents
python|mongoengine|flask-mongoengine
0
34
1
71,814,633
71,814,633
1
true
2022-04-09T16:16:43.153Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: python mongoenqine querying documents<p>I am querying 2 collections from mongodb. I am querying one collection that has a field called 'quiz_id'. I want to s...
71,815,102
Capacitor / Ionic Filesystem writeFile to csv<p>I am using Capacitor 3, Filesystem and I'm saving data into a file.</p> <p>Here is the code:</p> <pre><code> writeToCSVFile = async () =&gt; { await Filesystem.writeFile({ path: 'text.csv', data: `0123445544,4556677`, directory: Directory.Documents ...
<p>You have to set the <code>encoding</code> parameter to <code>Encoding.UTF8</code>:</p> <pre class="lang-js prettyprint-override"><code>import { Filesystem, Directory, Encoding } from '@capacitor/filesystem'; writeToCSVFile = async () =&gt; { await Filesystem.writeFile({ path: 'text.csv', data: `0123445544...
Capacitor / Ionic Filesystem writeFile to csv
ionic-framework|capacitor
0
285
1
71,815,129
71,815,129
1
true
2022-04-10T08:56:41.303Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Capacitor / Ionic Filesystem writeFile to csv<p>I am using Capacitor 3, Filesystem and I'm saving data into a file.</p> <p>Here is the code:</p> <pre><code> ...
71,815,316
After searching on a name from db how I can get the searched name listed using python Django<p>I do search for user name from DB, now I want when I select any name and click on add button it shows in the list under the search box.</p> <p>for search code in HTML</p> <pre><code> &lt;form id=&quot;location_form&quot; clas...
<p>You can make a new div using condition on data_list. And iterate over that data_list if it has values. <a href="https://docs.djangoproject.com/en/4.0/ref/templates/builtins/#for" rel="nofollow noreferrer">here</a> is the django docs for it</p>
After searching on a name from db how I can get the searched name listed using python Django
python|django|ajax|list|search
0
32
1
71,815,575
71,815,575
1
true
2022-04-10T09:28:11.807Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: After searching on a name from db how I can get the searched name listed using python Django<p>I do search for user name from DB, now I want when I select an...
71,815,355
NestJS use the content of a API call on another API call and return the content of the last API call<p>I'm trying to use the content from the first API request on another API request but didn't had any success. I need to do the second request only after the first is done.</p> <p>Right now this is what I got so far:</p>...
<p>I think you can use the switchMap operator to achieve the expected result. You might make some small changes to make it fit your needs.</p> <pre><code>@Injectable() export class WeatherService { constructor(private httpService: HttpService) {} getWeather(city: GetWeatherDto): Observable&lt;AxiosResponse&lt;any&g...
NestJS use the content of a API call on another API call and return the content of the last API call
typescript|axios|rxjs|nestjs
0
531
2
71,816,295
71,816,295
1
true
2022-04-10T09:34:24.877Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: NestJS use the content of a API call on another API call and return the content of the last API call<p>I'm trying to use the content from the first API reque...
71,817,770
Trouble understanding path.relative<p>You can see in the code below that the parent-parent folder of p1 is a sibling of p2.</p> <pre class="lang-js prettyprint-override"><code>&gt; p1 = &quot;/Users/Shared/dev/new-slice-script/src/test/dest/src/reducers/testSlice.js&quot; &gt; p2 = &quot;/Users/Shared/dev/new-slice-scr...
<blockquote> <p>So why isn't the final statement <code>'./src/reducers/testSlice.js'</code> (one leading period) instead of <code>'../src/reducers/testSlice.js'</code> (two leading periods)?</p> </blockquote> <p>Because the first argument to <code>path.relative</code> is supposed to be the directory that's to be interp...
Trouble understanding path.relative
node.js
0
23
2
71,818,119
71,818,119
1
true
2022-04-10T14:58:06.933Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Trouble understanding path.relative<p>You can see in the code below that the parent-parent folder of p1 is a sibling of p2.</p> <pre class="lang-js prettypri...
71,820,009
How to make a function asynchronous?<p>Why doesn't the execution of <code>f</code> in the following code happen asynchronously after the <code>main</code> function. I expect it to be scheduled for execution from the event loop. Returning some <code>Future</code> doesn't help either.</p> <pre><code>void f() async { pr...
<p>Marking a function <code>async</code> doesn't make what's going on inside the function async or change how the caller handles it. Any synchronous code inside a function marked <code>async</code> will still be run synchronously until the first async function call is hit.</p> <p>To call <code>print('f')</code> asynchr...
How to make a function asynchronous?
dart|asynchronous
0
24
1
71,820,056
71,820,056
1
true
2022-04-10T19:44:51.197Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to make a function asynchronous?<p>Why doesn't the execution of <code>f</code> in the following code happen asynchronously after the <code>main</code> fu...
71,819,923
Creating a ZxZ table in React/JSX using for loops<p>I'm trying to create a 5x5 table where each cell is a button, using React/JSX. The below throws an error in SandBox:</p> <pre class="lang-js prettyprint-override"><code>import &quot;./styles.css&quot;; import React from &quot;react&quot;; const makeCell = () =&gt; { ...
<p>Codesandbox link: <a href="https://codesandbox.io/s/amazing-frog-c5h6hv?file=/src/App.js" rel="nofollow noreferrer">https://codesandbox.io/s/amazing-frog-c5h6hv?file=/src/App.js</a></p> <pre><code> export default function App() { return ( &lt;Table /&gt; ); } const Table = () =&gt; { return ( &lt;tabl...
Creating a ZxZ table in React/JSX using for loops
javascript|html|reactjs|for-loop|jsx
0
19
1
71,820,063
71,820,063
1
true
2022-04-10T19:33:08.237Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Creating a ZxZ table in React/JSX using for loops<p>I'm trying to create a 5x5 table where each cell is a button, using React/JSX. The below throws an error ...
71,819,983
Event not working on a block added via ajax<p>I use thymeleaf with js.</p> <pre><code>&lt;form class=&quot;row&quot; id=&quot;testamentExecutor&quot;&gt; &lt;div id=&quot;executorsSection&quot; class=&quot;form-row&quot;&gt; &lt;div th:insert=&quot;fragments/executor :: executor&quot; th:remove=&quot;tag&qu...
<p>when you call <code>$(&quot;.delete-executor&quot;).on('click'</code> you are calling it on the currently existing elements.</p> <p>adding another <code>.delete-executor</code> later will not add the event to that new element automatically.</p> <p>but, you can change that to <code>$(&quot;#executorsSection&quot;).on...
Event not working on a block added via ajax
javascript|jquery
0
21
2
71,820,224
71,820,224
1
true
2022-04-10T19:41:45.483Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Event not working on a block added via ajax<p>I use thymeleaf with js.</p> <pre><code>&lt;form class=&quot;row&quot; id=&quot;testamentExecutor&quot;&gt; ...
71,820,255
Modify only array from the state object<p>I have a state object that contains an object and I am trying to add/remove items from it without success:</p> <pre><code>const [currentUser,setCurrentUser]=useState(Object) </code></pre> <p>and the Object looks like:</p> <pre><code>{username:&quot;username&quot;, array:[0,......
<p>You said your state contains an array, but your code shows it contains an Object instead. So to update only the array inside the object, you should do:</p> <p><code>setCurrentUser({...currentUser, array: [...currentUser.array, index]})</code></p>
Modify only array from the state object
reactjs
0
28
1
71,820,593
71,820,593
1
true
2022-04-10T20:19:09.150Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Modify only array from the state object<p>I have a state object that contains an object and I am trying to add/remove items from it without success:</p> <pr...
71,819,399
Angular - *ngIf require click to "change" screen - ApplePayJS (?)<p>I have a strange error when implementing Apple Pay using ApplePayJS.</p> <p>Right after the payment is made, there is a function that connects to the backend. The backend sends a return that everything is fine with the payment.</p> <p>Right after that ...
<p>It may happen if the callback after Apple Pay is executed outside ngZone. If so, Angular would not check changes.</p> <p>To ensure it will refresh the view, you can either :</p> <ul> <li>execute callback code inside a this.ngZone.run(() =&gt; {...})</li> <li>call this.changeDetectorRef.detectChanges() once your proc...
Angular - *ngIf require click to "change" screen - ApplePayJS (?)
angular|applepayjs
0
24
1
71,820,749
71,820,749
1
true
2022-04-10T18:23:53.917Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Angular - *ngIf require click to "change" screen - ApplePayJS (?)<p>I have a strange error when implementing Apple Pay using ApplePayJS.</p> <p>Right after t...
71,820,720
Is it possible to use an enum in place of another if its a subset?<p>Let's say we have two enum lists: A and B. Enum A is a list of clothes, and B is a subset of A.</p> <p>Example</p> <pre><code>enum A //Clothes { hats, pants, shirts, gloves, jacket, boots, skirt, suit, sweater, ...
<p>You can cast between enums.</p> <pre class="lang-cs prettyprint-override"><code>foo[(A)B.hats] </code></pre>
Is it possible to use an enum in place of another if its a subset?
c#|enums
0
36
1
71,820,756
71,820,756
1
true
2022-04-10T21:29:38.967Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is it possible to use an enum in place of another if its a subset?<p>Let's say we have two enum lists: A and B. Enum A is a list of clothes, and B is a subse...
71,820,747
WordPress get product by taxonomy<p>I have created 7 WooCommerce products under 'membership-level' category. Now, to get those products I am using the following code but not working as expected.</p> <pre><code>$args = [ 'post_type' =&gt; 'product', 'tax_query' =&gt; array( array( 'taxonomy' ...
<p>To query products by product category you have to set</p> <ul> <li>taxonomy name: in your case &quot;product_cat&quot;</li> <li>field (p.ex: term_id, slug): in your case slug</li> <li>and term</li> </ul> <p>So try something like that</p> <pre class="lang-php prettyprint-override"><code> $args = [ 'post_type' =&g...
WordPress get product by taxonomy
wordpress
0
34
1
71,820,878
71,820,878
1
true
2022-04-10T21:33:43.123Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: WordPress get product by taxonomy<p>I have created 7 WooCommerce products under 'membership-level' category. Now, to get those products I am using the follow...
71,820,501
Clean way to close splashscreen in kivy after a delay<p>In Kivy, if you have a <code>ScreenManager</code> with multiple screens already added, you can not change screens with the <a href="https://kivy.org/doc/stable/api-kivy.uix.screenmanager.html" rel="nofollow noreferrer">switch_to</a> <em>function</em>, as that also...
<p>You can use the <code>setattr()</code> python built-in. Try replacing:</p> <pre><code>Clock.schedule_once(switch_to_main_screen, 3) </code></pre> <p>with:</p> <pre><code>Clock.schedule_once(lambda dt: setattr(self, 'current', 'main_screen'), 3) </code></pre> <p>See the <a href="https://docs.python.org/3.9/library/fu...
Clean way to close splashscreen in kivy after a delay
python|kivy
0
32
2
71,821,361
71,821,361
1
true
2022-04-10T20:56:09.847Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Clean way to close splashscreen in kivy after a delay<p>In Kivy, if you have a <code>ScreenManager</code> with multiple screens already added, you can not ch...
71,821,461
Understand Kivy order-of-creation, changing root widget results in crash<p>Using a <strong>Screenmanager as the root widget</strong>, I have some simple code to (optionaly) display a Splashscreen, then the Mainscreen. It works fine. But I would like to alter it, so I have a Boxlayout as the root widget insted (so I can...
<p>The problem is that you are doing this in the <code>__init__()</code> method of your <code>MainScreenManager</code>. At that point, the <code>Screens</code> have not yet been created. You can just move that logic into an <code>on_kv_post()</code> method, so that the code is not run until the <code>kv</code> rules ar...
Understand Kivy order-of-creation, changing root widget results in crash
python|kivy|kivy-language
0
30
1
71,821,703
71,821,703
1
true
2022-04-11T00:01:10.557Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Understand Kivy order-of-creation, changing root widget results in crash<p>Using a <strong>Screenmanager as the root widget</strong>, I have some simple code...
71,822,593
uncaught typeerror in class despite setting element<p>So I'm making a basic brute force sudoku solver. I created a class that takes in a board string and use a constructor to set this.board = board parameter passed in</p> <pre><code>export default class SudokuSolver { constructor(board){ this.board = board } </...
<p>You're setting <code>this.board</code> to an array:</p> <pre class="lang-js prettyprint-override"><code>if (cleanedBoard.length === 81){ this.board = cleanedBoard // &lt;= this.board is now an array return true } </code></pre> <p>So the next time you call <code>validBoardFormat()</code> you end up trying to invo...
uncaught typeerror in class despite setting element
javascript
0
22
3
71,822,637
71,822,637
1
true
2022-04-11T04:01:21.460Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: uncaught typeerror in class despite setting element<p>So I'm making a basic brute force sudoku solver. I created a class that takes in a board string and use...
71,822,765
Getting free rooms on a given date range<p>I have 3 models like so: A resort:</p> <pre><code>let resort = { _id: &quot;some id&quot; } </code></pre> <p>Room that corresponds to a resort</p> <pre><code>let room = { _id: &quot;some id&quot;, resort_id: &quot;some resort id&quot;, room_status: &quot;Ongoing&q...
<ol> <li>find all rooms which is Available and could have more than 6 people</li> <li>find booking for step 1 room.</li> <li>keep those rooms do not have booking</li> </ol> <pre><code>db.room.aggregate([ { $match: { no_of_persons_allowed: { $gte: 6 }, room_status: &quot;Available&quot; ...
Getting free rooms on a given date range
mongodb|mongoose
0
31
1
71,823,571
71,823,571
1
true
2022-04-11T04:38:37.543Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Getting free rooms on a given date range<p>I have 3 models like so: A resort:</p> <pre><code>let resort = { _id: &quot;some id&quot; } </code></pre> <p>Ro...
71,823,548
Efficiently insert elements into json array at specific index in Postgres<p>We have an &quot;order_json&quot; column to store and represent the order of all the items referencing that row.</p> <p>Items can be added by clients in specific indexes in json arrays.</p> <p>However, I feel my solution for this is rather awkw...
<p><code>jsonb_insert()</code> can insert an element into an array at any position:</p> <p>The following:</p> <pre><code>with data (order_json) as ( values ('[{&quot;item_id&quot;: 1}, {&quot;item_id&quot;: 2}, {&quot;item_id&quot;: 3}, {&quot;item_id&quot;: 4}]'::jsonb) ) select jsonb_insert(order_json, '{1}', '{&qu...
Efficiently insert elements into json array at specific index in Postgres
json|postgresql
0
28
1
71,823,822
71,823,822
1
true
2022-04-11T06:36:48.433Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Efficiently insert elements into json array at specific index in Postgres<p>We have an &quot;order_json&quot; column to store and represent the order of all ...
71,824,527
How to determine the number of random characters CDK adds to Logical IDs?<p>I'm trying to strip off the random characters from a set of Logical IDs in AWS CDK. (Won't go into too much detail about why as it isn't relevant to the question but the basic reason is so some resources can be retained after stack deletion and...
<p>CDK Logical IDs are suffixed by 8 characters taken from the <a href="https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.Stack.html#protected-allocatewbrlogicalwbridcfnelement" rel="nofollow noreferrer">md5 hash of the construct tree path</a>.</p> <p>The OP's examples all conform to the 8-character pattern. The...
How to determine the number of random characters CDK adds to Logical IDs?
javascript|amazon-cloudformation|aws-cdk|uniqueidentifier
0
276
1
71,824,765
71,824,765
1
true
2022-04-11T08:08:30.700Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to determine the number of random characters CDK adds to Logical IDs?<p>I'm trying to strip off the random characters from a set of Logical IDs in AWS CD...
71,824,919
thins are a little messy in different resolution<p>I have div like this</p> <pre><code> &lt;div class=&quot;row &quot;&gt; &lt;div class=&quot;page-account-box &quot;&gt; &lt;div class=&quot;col-lg-6 col-md-6 mx-auto &quot;&gt; &lt;div class=&quot;account-box&quot;&gt; &lt;div class=&quot;pictur...
<p>You should learn/explore media queries within CSS: <a href="https://drafts.csswg.org/mediaqueries/#width" rel="nofollow noreferrer">https://drafts.csswg.org/mediaqueries/#width</a></p> <p>There are plenty of examples on how to use it:</p> <pre><code>/* here generic css*/ @media (min-width: 1280px) { /* if width is ...
thins are a little messy in different resolution
css|model-view-controller|bootstrap-4
0
25
1
71,825,070
71,825,070
1
true
2022-04-11T08:40:17.923Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: thins are a little messy in different resolution<p>I have div like this</p> <pre><code> &lt;div class=&quot;row &quot;&gt; &lt;div class=&quot;page-account-b...
71,825,526
Include method implementation in the interface in typescript<p>I have an interface which will be implemented by multiple classes:</p> <pre class="lang-js prettyprint-override"><code>interface I { readonly id: string; process(): void; } </code></pre> <p>I would like to be able to pass <code>id</code> through a const...
<p>no it's not possible <a href="https://stackoverflow.com/a/46693398/12219726">see here</a>.</p> <p>you could do something like this however:</p> <pre class="lang-js prettyprint-override"><code>interface IMyInterface { readonly id: string; process(): void; } class ParentClass { id: string; constructor...
Include method implementation in the interface in typescript
typescript
0
29
1
71,825,698
71,825,698
1
true
2022-04-11T09:31:01.020Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Include method implementation in the interface in typescript<p>I have an interface which will be implemented by multiple classes:</p> <pre class="lang-js pre...
71,826,611
PostgreSQL: replace generate_series with an array<p>I have a working SQL code that creates geometries according to numbers generated from a generate_series function:</p> <pre><code> CREATE TEMPORARY TABLE catchments ON COMMIT DROP AS ( SELECT lims, ST_ConcaveHull(the_geom, alpha_factor) AS the_geom_overlap FROM ( ...
<pre><code>FROM unnest(ARRAY[1,2,5,7,8]) AS lims </code></pre> <p>should do it.</p>
PostgreSQL: replace generate_series with an array
postgresql
0
27
1
71,826,931
71,826,931
1
true
2022-04-11T10:57:09.857Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: PostgreSQL: replace generate_series with an array<p>I have a working SQL code that creates geometries according to numbers generated from a generate_series f...
71,827,256
how can i update UI to show "WebRTC data channel" at match section in use by httptoolkit-server?<p><a href="https://i.stack.imgur.com/FFaeU.png" rel="nofollow noreferrer">enter image description here</a>I've installed all httptoolkit-server and also the httptoolkit-ui to capture data and mock it up, i've installed mock...
<p>I'm the developer of HTTP Toolkit. The feature you're looking for does not exist yet.</p> <p>That blog post is just a proposal and an announcement of funding, and the screenshot is only an example mockup of the future UI.</p> <p>This will be available within the new few months (keep an eye on that blog and <a href="...
how can i update UI to show "WebRTC data channel" at match section in use by httptoolkit-server?
webrtc|http-toolkit|mockttp
0
32
1
71,827,406
71,827,406
1
true
2022-04-11T11:45:02.303Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how can i update UI to show "WebRTC data channel" at match section in use by httptoolkit-server?<p><a href="https://i.stack.imgur.com/FFaeU.png" rel="nofollo...
71,827,512
Display divs based on selected option inside the selector with many options<p>I have a <code>#selector</code> selector with a huge number of options. At different times, the number of options can reach several dozen.</p> <p>When the page loads, I display the <code>#a</code> div next to the selector.</p> <p>I need to ma...
<p>It's because of the <code>()</code> you placed after the <code>.onchange</code> take them away, and instead tell the program which function you want to call by placing it there without calling it-</p> <pre><code>document.getElementById(&quot;selector&quot;).onchange = valueNew; </code></pre>
Display divs based on selected option inside the selector with many options
javascript|jquery
0
20
1
71,827,647
71,827,647
1
true
2022-04-11T12:03:23.493Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Display divs based on selected option inside the selector with many options<p>I have a <code>#selector</code> selector with a huge number of options. At diff...
71,824,983
AngularJS, using ng-show breaks select2's layout<p>I'm creating a dynamic page that loads a lot of filters from the server. I want to show those filters only when all server side calls are done. For that, I'm using a simple <code>true/false</code> variable (<code>ng-show=&quot;filtersDone&quot;</code>, 11th row).</p> <...
<p>When ng-show is set to false, the element is not available in the page to be manipulated, because angular hides it using CSS: &quot;display: none !important&quot;</p> <p>So instead of ng-show, you can use a class or style directive to hide the element via the usage of either CSS visibility or opacity rules.</p> <p>T...
AngularJS, using ng-show breaks select2's layout
javascript|angularjs|jquery-select2
0
19
1
71,828,162
71,828,162
1
true
2022-04-11T08:46:30.737Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: AngularJS, using ng-show breaks select2's layout<p>I'm creating a dynamic page that loads a lot of filters from the server. I want to show those filters only...
71,827,949
VS Code Git Lens: Does "Sync changes" sync or push?<p>When I have committed all my changes, git lens in VS Code offers me to &quot;sync changes&quot;. When I hover over the button however, it says &quot;push commits to remote repository&quot;</p> <p><a href="https://i.stack.imgur.com/WLtRn.png" rel="nofollow noreferrer...
<p>You are correct that sync does both a pull and a push, but that specific button only shows what it thinks you need to do. In your case it thinks you are 1 commit ahead so you only need to push. (Note I say &quot;thinks&quot; because there may be commits out on the remote that you haven't fetched yet.) If your branch...
VS Code Git Lens: Does "Sync changes" sync or push?
git|visual-studio-code|gitlens
0
530
1
71,829,857
71,829,857
1
true
2022-04-11T12:35:42.983Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: VS Code Git Lens: Does "Sync changes" sync or push?<p>When I have committed all my changes, git lens in VS Code offers me to &quot;sync changes&quot;. When I...
71,830,306
Why does Android Studio show import... vs. the actual import statements<p>I am new to Android development.</p> <p>At various times I have noticed that the top of a Kotlin file shows <code>import...</code> and I have to click it each time to display the actual import directives.</p> <p>What is that behavior? Why do the...
<p>They're collapsed to reduce clutter so you can focus on the code itself. Most of the time there's no need to deal with the imports directly.</p> <p>You can change this behavior in Settings -&gt; Editor -&gt; General -&gt; Code folding. Disable &quot;Imports&quot; in the &quot;General&quot; section.</p>
Why does Android Studio show import... vs. the actual import statements
android-studio|kotlin
0
25
1
71,830,442
71,830,442
1
true
2022-04-11T15:17:09.377Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why does Android Studio show import... vs. the actual import statements<p>I am new to Android development.</p> <p>At various times I have noticed that the to...
71,830,756
svelte lifecycle functions from caller?<pre><code> new App({ target: document.getElementById('some id') }); </code></pre> <p>We start our app like this in the opening file. On their guides <a href="https://svelte.dev/docs#run-time-svelte" rel="nofollow noreferrer">https://svelte.dev/docs#run-time-svelte</a> th...
<p>Your <code>App</code> component can export a mount function as a prop...</p> <pre class="lang-svelte prettyprint-override"><code>&lt;script&gt; import { onMount } from 'svelte'; export let mount = () =&gt; {}; onMount(() =&gt; { mount(); }); &lt;/script&gt; </code></pre> <p>... and ...
svelte lifecycle functions from caller?
svelte
0
26
1
71,830,833
71,830,833
1
true
2022-04-11T15:50:29.193Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: svelte lifecycle functions from caller?<pre><code> new App({ target: document.getElementById('some id') }); </code></pre> <p>We start our app like th...
71,830,656
All the text appears on the top between divs<p>I want to make the Akita Inu and Cockapoo labels just above <code>box-left</code> divs but instead most of the labels just stacked in the middle between divs. I tried to put two divs in one div like but it didn't work.</p> <p><div class="snippet" data-lang="js" data-hi...
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> </div> </div> </p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-css lang-css prettyprint-ove...
All the text appears on the top between divs
html|css|position|css-float|division
0
28
4
71,830,942
71,830,942
1
true
2022-04-11T15:43:36.943Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: All the text appears on the top between divs<p>I want to make the Akita Inu and Cockapoo labels just above <code>box-left</code> divs but instead most of the...
71,831,006
sum specific values in table postgres<p>So I am new to postgres and having some issues, this is my table: <a href="https://i.stack.imgur.com/Y45Bw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Y45Bw.png" alt="enter image description here" /></a></p> <p>I would like a query to return the table in th...
<p>You need GROUP BY</p> <pre><code>SELECT Area, SUM(sales) AS &quot;sales&quot; FROM myTable GROUP BY area ORDER BY area; </code></pre>
sum specific values in table postgres
postgresql
0
19
1
71,831,215
71,831,215
1
true
2022-04-11T16:09:43.810Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: sum specific values in table postgres<p>So I am new to postgres and having some issues, this is my table: <a href="https://i.stack.imgur.com/Y45Bw.png" rel="...
71,830,887
show aggragated data in admin changelist_view<p>I have an app where I am tracking user searches. The table currently looks like this:</p> <p><a href="https://i.stack.imgur.com/wPvTf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wPvTf.png" alt="enter image description here" /></a></p> <p>What I want...
<p>Instead of creating a new <code>SearchQueryTracker</code> each time on <code>SearchViewFBV</code>, you can use the <code>get_or_create</code> method to retrieve the <code>SearchQueryTracker</code> if it exists, or create it otherwise.</p> <pre class="lang-py prettyprint-override"><code>@login_required def SearchView...
show aggragated data in admin changelist_view
python|django|django-admin
0
33
1
71,831,224
71,831,224
1
true
2022-04-11T16:00:14.840Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: show aggragated data in admin changelist_view<p>I have an app where I am tracking user searches. The table currently looks like this:</p> <p><a href="https:/...
71,831,355
this.onChange is not a function when using ControlValueAccessor in Angular Reactive Form<p>I am using ControlValueAccessor to pass data between a child component and a parent which works as expected but when I initialize the component I get always the error</p> <blockquote> <p>ERROR TypeError: this.onChange is not a fu...
<p><code>registerOnChange</code> method is called after <code>writeValue</code>. In write value you're updating your form.</p> <p>While it's okay to set value for <code>FormControl</code> within <code>writeValue</code> method but it's useless to listen to <code>valueChanges</code> at that point because value comes from...
this.onChange is not a function when using ControlValueAccessor in Angular Reactive Form
angular
0
265
1
71,832,017
71,832,017
1
true
2022-04-11T16:37:12.040Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: this.onChange is not a function when using ControlValueAccessor in Angular Reactive Form<p>I am using ControlValueAccessor to pass data between a child compo...
71,831,308
How to render outputText when inputText is focused or changes value?<p>I am learning Java EE and I a ran into an issue I can't figure out. I have this xhtml:</p> <pre class="lang-html prettyprint-override"><code>&lt;h:form&gt; &lt;fieldset&gt; &lt;legend&gt;Random Number (with execute=&quot;...
<p>Try <code>keyup</code> instead of <code>change</code>. The list of supported events are: <code>blur</code>, <code>change</code>, <code>click</code>, <code>action</code>, <code>dblclick</code>, <code>focus</code>, <code>keydown</code>, <code>keypress</code>, <code>keyup</code>, <code>mousedown</code>, <code>mousemove...
How to render outputText when inputText is focused or changes value?
java|ajax|jsf|jakarta-ee
0
23
1
71,832,133
71,832,133
1
true
2022-04-11T16:33:09.090Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to render outputText when inputText is focused or changes value?<p>I am learning Java EE and I a ran into an issue I can't figure out. I have this xhtml:...
71,833,124
Import default in Vue component not definied in DevTools console<p>Simple data example, constants.js</p> <pre><code>export default { name: &quot;John Smith&quot;, age: 10 }; </code></pre> <p>Import it on the Vue component, which renders correctly. But if I use the DevTools and type <code>c</code> in the console... ...
<p>Modules are not exposed to the global scope (<code>window</code>) when transpiled.</p> <p>If you really want to expose <code>c</code> in DevTools you'd have to do <code>window.c = c</code>; Be careful when referencing window as this will break when rendering server side or prerendering as <code>window</code> does no...
Import default in Vue component not definied in DevTools console
javascript|vue.js|es6-modules
0
26
1
71,833,383
71,833,383
1
true
2022-04-11T19:12:31.683Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Import default in Vue component not definied in DevTools console<p>Simple data example, constants.js</p> <pre><code>export default { name: &quot;John Smith...
71,833,603
Python AttributeError When Attribute is Set<p>I am creating a snake clone using pygame and I am running into a strange problem. I have a class called snake_tile that inherits from the pygame rectangle class with one additional attribute, the direction the tile is moving:</p> <pre><code>import pygame class snake_tile(p...
<p><code>pygame.Rect.move</code> does not change the rectangle object in place: it creates a new object and returns that new instance.</p> <p>Although it plays well with inheritance: i.e. it returns a new instance of any subclass, and not a plain <code>Rect</code>, it won't set the <code>.direction</code> attribute on...
Python AttributeError When Attribute is Set
python|pygame
0
35
1
71,833,858
71,833,858
1
true
2022-04-11T19:56:34.637Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python AttributeError When Attribute is Set<p>I am creating a snake clone using pygame and I am running into a strange problem. I have a class called snake_t...
71,833,739
Changing variable value throughout component when undefined<p>How can i change a variable that is used all throughout a component when it is undefined? For example:</p> <pre><code>&lt;div&gt; &lt;div&gt;{user.name}&lt;div&gt; &lt;div&gt;{user.id}&lt;div&gt; &lt;div&gt; </code></pre> <p>If the state of the user is und...
<p>So you want to conditionally check if your user object contains valid data; a very common situation which can be resolved with an <code>if</code> check.</p> <p>Professionally I like to use the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing_operator" rel="nofol...
Changing variable value throughout component when undefined
reactjs
0
25
2
71,833,867
71,833,867
1
true
2022-04-11T20:09:36.003Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Changing variable value throughout component when undefined<p>How can i change a variable that is used all throughout a component when it is undefined? For e...
71,834,047
SQL "OR" operator not evaluating as expected in php<p>The problem occurs with wo.status = 'in_progress' OR 'ongoing' part executes. If 'in_progress' returns true but 'ongoing' returns false the overall result with be false (i.e. wo.status is neither in_progress or ongoing). The result I'm looking for would be that if e...
<p>You have two problems; first, OR and <code>=</code> do not work together; you are saying</p> <pre><code>wo.status = 'in_progress' OR 'ongoing' </code></pre> <p>This first tests if wo.status is in_progress. If it is, the result is true; if it is not, it checks the second operand of OR, which casts 'ongoing' to a num...
SQL "OR" operator not evaluating as expected in php
mysql|sql|operators
0
24
1
71,834,449
71,834,449
1
true
2022-04-11T20:40:47.823Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: SQL "OR" operator not evaluating as expected in php<p>The problem occurs with wo.status = 'in_progress' OR 'ongoing' part executes. If 'in_progress' returns ...
71,834,394
implementing immutable stack in python<p>Have a question about creating new objects using existing objects in python. Example: I want to implement immutable Stack using python. However, catch here is, whenever I am creating new object, it should be created from existing object: in below example, how can I update push f...
<p>You just need a way to create a new <code>Stack</code> object with a copy of the existing <code>items</code>.</p> <pre><code> def __init__(self, contents=[]): self.items = contents def push(self, item): new_stack = Stack(self.items[:]] new_stack.items.append(item) return new_st...
implementing immutable stack in python
python-3.x|stack|immutable-collections
0
23
1
71,834,760
71,834,760
1
true
2022-04-11T21:15:54.910Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: implementing immutable stack in python<p>Have a question about creating new objects using existing objects in python. Example: I want to implement immutable ...
71,834,684
how to make switches individually marked? Flutter<p>I'm making a list of notifications using switches (there will be fifteen in total), but the way I did they turn them all on and off together, how do I turn them on and off individually? And do they accept refactoring to make the code cleaner? I'm using SwitchListTile....
<p>You need to create variables to hold the switch state for each switch (toggle) - in your case 15 in total.</p> <p>From your sample code with individual values for each switch:</p> <pre class="lang-dart prettyprint-override"><code>class CardButton extends StatefulWidget { const CardButton({Key? key}) : super(key: k...
how to make switches individually marked? Flutter
flutter|dart
0
26
2
71,835,339
71,835,339
1
true
2022-04-11T21:52:14.870Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to make switches individually marked? Flutter<p>I'm making a list of notifications using switches (there will be fifteen in total), but the way I did the...
71,836,229
How can I make an <svg> element scale to a parent element's height?<p>I have an <code>&lt;svg&gt;</code> element within a wrapping element.</p> <p>I want the <code>&lt;svg&gt;</code> to fill the height of the wrapping element, however I cannot seem to get this to work.</p> <p>I have tried the following:</p> <p><div cla...
<p>Here's a viewbox for you, I know it's horrible but you should <a href="https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/viewBox" rel="nofollow noreferrer">read up on it</a>!</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre ...
How can I make an <svg> element scale to a parent element's height?
html|css|svg
0
28
1
71,836,385
71,836,385
1
true
2022-04-12T02:09:47.467Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I make an <svg> element scale to a parent element's height?<p>I have an <code>&lt;svg&gt;</code> element within a wrapping element.</p> <p>I want the...
71,836,369
Where Python's execv implementation is located?<p>I'm trying to find where in CPython's implementation <code>execv</code> is implemented. I've found <a href="https://github.com/python/cpython/commit/e65cce5eec23812d77a54095209c923937cc3c92" rel="nofollow noreferrer">this</a> commit from Guido where he adds it back in 1...
<p>From <code>help(os.execv)</code>:</p> <blockquote> <p>Help on built-in function execv in module posix:</p> </blockquote> <blockquote> <p>execv(path, argv, /) Execute an executable path with arguments, replacing current process.</p> </blockquote> <blockquote> <pre><code>path Path of executable file. argv Tuple or...
Where Python's execv implementation is located?
python|python-3.x
0
32
1
71,836,595
71,836,595
1
true
2022-04-12T02:33:57.210Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Where Python's execv implementation is located?<p>I'm trying to find where in CPython's implementation <code>execv</code> is implemented. I've found <a href=...
71,836,583
How to use pyspark.rdd to combine the data format like ("word", (1, 2))?<p>when using the pyspark to handle with the data, I want to calculate two attributes of a word. For example, the data looks like:</p> <pre><code>(&quot;word1&quot;, (1, 2)) (&quot;word1&quot;, (2, 3)) (&quot;word2&quot;, (3, 4)) (&quot;word2&quot;...
<p>You're almost there</p> <pre class="lang-py prettyprint-override"><code>rdd.reduceByKey(lambda a, b: (a[0] + b[0], a[1] + b[1])).collect() # [('word1', (3, 5)), ('word2', (8, 10))] </code></pre>
How to use pyspark.rdd to combine the data format like ("word", (1, 2))?
python|pyspark|rdd
0
21
1
71,836,656
71,836,656
1
true
2022-04-12T03:06:25.710Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to use pyspark.rdd to combine the data format like ("word", (1, 2))?<p>when using the pyspark to handle with the data, I want to calculate two attributes...
71,836,795
If there are double entries in a dataframe how do I delete both the entries?<p>The idea is not removing one of the duplicate rows but all repeated rows.</p> <p>Data that I Have now</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th style="text-align: left;">Name</th> <th style="text-align: rig...
<p>One option is to use group_by to detect the combinations of variables with duplicates and filter based on group size.</p> <pre class="lang-r prettyprint-override"><code>library(tidyverse) #&gt; Warning: package 'readr' was built under R version 4.1.2 withdups &lt;- data.frame( stringsAsFactors = FALSE, ...
If there are double entries in a dataframe how do I delete both the entries?
r
0
26
2
71,836,839
71,836,839
1
true
2022-04-12T03:39:12.893Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: If there are double entries in a dataframe how do I delete both the entries?<p>The idea is not removing one of the duplicate rows but all repeated rows.</p> ...
71,836,237
Cut the string to particular length and preserve whole words<p>What would be the best way to, given a string <code>$s</code> and character limit $l, cut the <code>$s</code> so that whole words are preserved.</p> <p>Example:</p> <pre><code>$s = 'Hello World.'; $l = 7; function shorten( $a, $b ) { ... } // Function shou...
<p><code>preg_replace</code> will help you here:</p> <pre class="lang-php prettyprint-override"><code>$strings = [ 'Word', 'Length.', 'Hello World.', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', ]; $length = 7; foreach( $strings as $string ){ print $string . ' =&gt; ' . preg_repla...
Cut the string to particular length and preserve whole words
php
0
19
1
71,837,092
71,837,092
1
true
2022-04-12T02:11:00.037Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Cut the string to particular length and preserve whole words<p>What would be the best way to, given a string <code>$s</code> and character limit $l, cut the ...
71,837,208
Searching mongoDB not by primary id<p>I have a notification collection and inside I have documents like this :</p> <pre><code>id: 6253ec60facb2ee68475510e; companyId: 6253asdsad0facb2ee68475510e; workStatus: true id: 6253ec60abcb2ee68475510e; companyId: 6253ec60afva2ee68475510e; workStatus: true </code></pre> <p>I w...
<p>you are using <code>findById</code> and it finds a document by its ID you should use <code>findOne()</code></p> <pre class="lang-js prettyprint-override"><code> const notification = await Notification.findOne({companyId: req.params.companyId}); </code></pre>
Searching mongoDB not by primary id
mongodb
0
27
2
71,837,359
71,837,359
1
true
2022-04-12T04:40:47.633Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Searching mongoDB not by primary id<p>I have a notification collection and inside I have documents like this :</p> <pre><code>id: 6253ec60facb2ee68475510e; c...
71,837,607
Fill null values using information from another column<p>I have the following example dataframe:</p> <pre><code>df = pd.DataFrame({'planet':['Earth','Earth','Mars',np.nan,'Venus','Mars',np.nan,'Venus','Earth',np.nan], 'group':['alpha','alpha','beta','gamma','delta','beta','delta','delta','gamma','beta']}...
<blockquote> <p>if alpha group is from Earth, all individuals in alpha group are from Earth</p> </blockquote> <p>This suggests that one way that you could use is to <code>groupby.transform</code> the <code>first</code> to fill in the missing values:</p> <pre><code>df['planet'] = df.groupby('group')['planet'].transform(...
Fill null values using information from another column
python|pandas|dataframe
0
26
1
71,837,622
71,837,622
1
true
2022-04-12T05:39:38.613Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Fill null values using information from another column<p>I have the following example dataframe:</p> <pre><code>df = pd.DataFrame({'planet':['Earth','Earth',...
71,837,893
Parameter specified as non-null is null: method com.android.build.gradle.internal.dsl.BaseAppModuleExtension.compileSdkVersion<p>I have taken over an ex-employees project and I have been trying to make it run since past two days. However, the error I got today took a complete day but is still unsolvable. I have been ge...
<p>The following fields don't make sense:</p> <pre><code>compileSdkVersion compileSdk minSdkVersion minSdk targetSdkVersion targetSdk </code></pre> <p>I think someone misunderstood the instruction that compileSdkVersion can be replaced with compileSdk. Because you need to put actual numbers there, for example</p> <pre>...
Parameter specified as non-null is null: method com.android.build.gradle.internal.dsl.BaseAppModuleExtension.compileSdkVersion
android|kotlin|gradle
0
803
1
71,838,229
71,838,229
1
true
2022-04-12T06:14:59.550Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Parameter specified as non-null is null: method com.android.build.gradle.internal.dsl.BaseAppModuleExtension.compileSdkVersion<p>I have taken over an ex-empl...
71,837,957
grouping 3 arrays by _id in mongodb aggregate<p>I am using <code>$facet</code> to do several groupings and calculations in an aggregate which I'm planning to build a view with. I have the 3 sections of the groups working independently but now I want to merge all the returned object arrays into a single array by _id.</p...
<pre><code>db.collection.aggregate([ { $project: { result: { $map: { input: { $range: [ 0, { $size: &quot;$vmratings&quot; } ] }, as: &quot;x&quot;, in: { $let: { vars: { id: { $arrayElemAt: [ &quot;$vmratings._id&quot;, &quot;$$x&quot; ] } }, ...
grouping 3 arrays by _id in mongodb aggregate
mongodb
0
28
1
71,838,523
71,838,523
1
true
2022-04-12T06:22:40.120Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: grouping 3 arrays by _id in mongodb aggregate<p>I am using <code>$facet</code> to do several groupings and calculations in an aggregate which I'm planning to...
71,837,555
How to add depedency overriding in FastAPI testing<p>I'm new to FastAPI, I have implemented everything but when it comes to testing the API I can't override a dependency.</p> <p>Here is my code:</p> <p><em><strong>test_controller.py</strong></em></p> <pre><code>import pytest from starlette.testclient import TestClient ...
<p>You're not using the dependency injection system to get the <code>ManagerImp.create_record</code> function, so there is nothing to override.</p> <p>Since you're not using FastAPI's <code>Depends</code> to get your dependency - FastAPI has no way of returning the alternative function.</p> <p>In your case you'll need ...
How to add depedency overriding in FastAPI testing
python|testing|fastapi
0
289
2
71,838,951
71,838,951
1
true
2022-04-12T05:32:56.660Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to add depedency overriding in FastAPI testing<p>I'm new to FastAPI, I have implemented everything but when it comes to testing the API I can't override ...
71,838,992
Discord JS v12 Add Field Issues<pre class="lang-js prettyprint-override"><code>let xp = db.get(`xpchannel_${message.guild.id}`) let wel = db.get(`welchannel_${message.guild.id}`) let px = db.get(`prefix_${message.guild.id}`) let defaultprefix = '.' let disabled = ':white_circle: Disabled' let embed = new Discord.Mess...
<p>You should check if the values of those variables (<code>xp</code> and <code>wel</code>) are truthy. If they are, the channel ID is returned from the database, you can squeeze them beetween <code>&lt;#</code> and <code>&gt;</code>. If the returned value is <code>null</code>, you can simply pass the <code>disabled</c...
Discord JS v12 Add Field Issues
javascript|node.js|discord.js
0
33
1
71,839,264
71,839,264
1
true
2022-04-12T07:56:43.920Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Discord JS v12 Add Field Issues<pre class="lang-js prettyprint-override"><code>let xp = db.get(`xpchannel_${message.guild.id}`) let wel = db.get(`welchannel_...
71,838,506
MapState values in between multiple window streams<p>I have a usecase where i am aggregating values on the same key in multiple streams it looks something like below:</p> <p>Input -&gt; window(15 secs) -&gt; window(1 min) -&gt; window(15 min) -&gt; ... -&gt; out_1 -&gt; out_2 -&gt; out_3</p> <p>In the al...
<p>State is always scoped to the function/operator in which it is used. It cannot be shared with or accessed from other functions/operators. So what you have done is fine.</p>
MapState values in between multiple window streams
apache-flink|flink-streaming
0
26
1
71,839,276
71,839,276
1
true
2022-04-12T07:13:02.050Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: MapState values in between multiple window streams<p>I have a usecase where i am aggregating values on the same key in multiple streams it looks something li...
71,839,569
How do I extract only timestamp and date at my curl script?<p>I have this script that tests my connection and writes down status code. I want to extract date stamp and time on the top of it, every time it runs. Something like this:</p> <pre><code>Date and Time result1 result2 result3 Date and Time result1 result2 resu...
<p>Try this:</p> <pre class="lang-sh prettyprint-override"><code>( echo &quot;• $(date -Is):&quot; while read URL; do curl -o /dev/null --silent --head --write-out &quot; %{http_code} $URL\n&quot; &quot;$URL&quot;; done ) &lt;/home/otto/Desktop/todo | tee &gt;&gt;/home/otto/Desktop/test_results.txt </code></...
How do I extract only timestamp and date at my curl script?
linux|bash|sh
0
24
1
71,840,122
71,840,122
1
true
2022-04-12T08:42:03.677Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I extract only timestamp and date at my curl script?<p>I have this script that tests my connection and writes down status code. I want to extract date...
71,840,221
Filter dataframe using values from a column<p>I have a dataframe containing the employee name, employee email, manager name and manager email. I need to filter this dataframe using all the unique values of the manager email and confirm they also appear in the column employee email, this way making sure they are also in...
<p>IIUC, you can use masks and boolean indexing:</p> <pre><code># is the employee email valid? you can use a different pattern e.g. '@company\.com' m1 = df['Employee E-mail'].str.contains('@').fillna(False) # is the manager email valid? m2 = df['Manager E-mail'].str.contains('@').fillna(False) # is the manager also an ...
Filter dataframe using values from a column
python|pandas|search|filter
0
36
1
71,840,372
71,840,372
1
true
2022-04-12T09:28:55.900Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Filter dataframe using values from a column<p>I have a dataframe containing the employee name, employee email, manager name and manager email. I need to filt...
71,840,557
Call Multiple API endpoint in useEffect React<p>I am having issues with calling useEffect for multiple API endpoints. Only one or the other are loaded.</p> <p>My code:</p> <pre><code> const [values, setValues] = useState({ total: [], outstanding: [] }); useEffect(() =&gt; { DataService.dashboard_total...
<p>A better way doing the same thing by doing this you only updating state only once hence it also re-render the component once and this look more cleaner and try to use <code>try-catch</code></p> <pre><code> React.useEffect(() =&gt; { const fetchDetails = async () =&gt; { try { const resDataService ...
Call Multiple API endpoint in useEffect React
reactjs|react-hooks
0
539
2
71,840,730
71,840,730
1
true
2022-04-12T09:51:03.870Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Call Multiple API endpoint in useEffect React<p>I am having issues with calling useEffect for multiple API endpoints. Only one or the other are loaded.</p> <...
71,842,205
Redux with combined data<p>I'm working with web3 that includes connections to data fetching from smart contracts and other libraries. In the end I created 2 slices</p> <ul> <li>1 smart contract slices that fetches data from smart contracts like the circulating Supply</li> <li>1 slice for prices data</li> </ul> <p>Then ...
<p>For derived values, use a selector.</p> <pre><code>// somewhere export const selectMarketCap = state =&gt; state.market.price * state.contracts.token.circulatingSupply; // in your component const marketCap = useSelector(selectMarketCap); </code></pre>
Redux with combined data
reactjs|redux|react-redux
0
25
1
71,842,734
71,842,734
1
true
2022-04-12T11:54:03.497Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Redux with combined data<p>I'm working with web3 that includes connections to data fetching from smart contracts and other libraries. In the end I created 2 ...
71,844,419
Calculate z-score from another dataframe when meeting conditions in R<p>I have two dataframes:</p> <pre><code>Node1&lt;-c(1, 2, 3, 4, 5, 6, 7) Node1&lt;-c(1, 1, 1, 2, 2, 3) Node2&lt;-c(2, 3, 4, 3, 4, 4) Mean&lt;-c(2, 1, 5, 3, 2, 3) SD&lt;-c(0.1, 0.2, 0.01, 0.2, 0.01, 0.01) df1&lt;-data.frame(Node1, Node2, Mean, SD) df1...
<p>I think you can just do:</p> <pre class="lang-r prettyprint-override"><code>left_join(df1, df2, by = c('Node1', 'Node2')) %&gt;% mutate(z_score = (Mean - value) / SD) #&gt; Node1 Node2 Mean SD value z_score #&gt; 1 1 2 2 0.10 1 10 #&gt; 2 1 3 1 0.20 2 -5 #&gt; 3 1 ...
Calculate z-score from another dataframe when meeting conditions in R
r|dplyr|merge|purrr|split-apply-combine
0
30
1
71,844,562
71,844,562
1
true
2022-04-12T14:25:19.367Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Calculate z-score from another dataframe when meeting conditions in R<p>I have two dataframes:</p> <pre><code>Node1&lt;-c(1, 2, 3, 4, 5, 6, 7) Node1&lt;-c(1,...
71,844,450
phpmyadmin insert a column underneath a column<p>I am creating a seach form. I want a user to be able to choose some kind of yarn, then some kind of wool, then some colour and then a number of balls of yarn. For that I am trying to set up a database in phpmyadmin with columns within columns within columns but I am fail...
<p>My advice would be to create different tables for each. These attributes then can reference others through Foreign Keys You could then have tables:<br /> <strong>Yarn</strong>, <strong>WoolType</strong>, <strong>Color</strong>,</p> <p>Each table will have respected colums, for example:<br /> <strong>Yarn</strong></p...
phpmyadmin insert a column underneath a column
phpmyadmin
0
11
1
71,844,652
71,844,652
1
true
2022-04-12T14:27:02.483Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: phpmyadmin insert a column underneath a column<p>I am creating a seach form. I want a user to be able to choose some kind of yarn, then some kind of wool, th...
71,845,095
Extracting geographic coordinates/numerics from webpage<p>I have some code to try to collect some information from a website:</p> <p>I can connect and read in the HTML data using (thanks to this <a href="https://stackoverflow.com/questions/71842278/extracting-links-from-a-drop-down-menu-using-rvest-rselenium/71843331#7...
<p>This should do it:</p> <pre class="lang-r prettyprint-override"><code>html_full_page %&gt;% html_nodes('.re-GeographicSearchNext-checkboxItem') %&gt;% html_nodes('label') %&gt;% html_attr(&quot;name&quot;) %&gt;% gsub(&quot;geoSearch-&quot;, &quot;&quot;, .) %&gt;% na.omit() # [1] &quot;724,12,15,487,0...
Extracting geographic coordinates/numerics from webpage
r|rvest|rselenium
0
36
1
71,845,273
71,845,273
1
true
2022-04-12T15:10:13.540Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Extracting geographic coordinates/numerics from webpage<p>I have some code to try to collect some information from a website:</p> <p>I can connect and read i...
71,845,375
Mysql Query sum and group by not showing a row with null values<p>I have this query:</p> <pre class="lang-sql prettyprint-override"><code>SELECT Customer, SUM(SoldUnits) AS SoldUnits FROM Uploads WHERE Year = 2021 AND Week = 11 GROUP BY Customer; </code></pre> <p>And Returns me:</p> <div class="s-table-container"> <tab...
<p>Assuming your table does have all customers you want to appear in the report, you could do a conditional summation and remove the <code>WHERE</code> clause:</p> <pre class="lang-sql prettyprint-override"><code>SELECT Customer, SUM(CASE WHEN Year = 2021 AND Week = 11 THEN SoldUnits ELSE 0 END) ...
Mysql Query sum and group by not showing a row with null values
mysql|select|group-by
0
24
1
71,845,407
71,845,407
1
true
2022-04-12T15:28:29.407Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Mysql Query sum and group by not showing a row with null values<p>I have this query:</p> <pre class="lang-sql prettyprint-override"><code>SELECT Customer, SU...