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,935,546
How to hide button in Desktop Compose<p>I am developing an app with <a href="https://www.jetbrains.com/lp/compose-mpp/" rel="nofollow noreferrer">Desktop Compose Multi-Platform</a>.<br /> I need to hide the button when it has been clicked. Please see below code:</p> <pre><code>OutlinedButton( onClick = { ...
<p>Any view modifications in Compose are done using state variables.</p> <p>If you need the view to be completely removed, you can do it like this:</p> <pre><code>var isButtonVisible by remember { mutableStateOf(true) } if (isButtonVisible) { OutlinedButton( onClick = { // Perform an operation ...
How to hide button in Desktop Compose
android-jetpack-compose|compose-desktop|jetbrains-compose
0
269
1
71,936,611
71,936,611
1
true
2022-04-20T07:12:18.357Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to hide button in Desktop Compose<p>I am developing an app with <a href="https://www.jetbrains.com/lp/compose-mpp/" rel="nofollow noreferrer">Desktop Com...
71,936,532
Can I create an instance manually when I have to use Hilt as dependency injection?<p>I use Hilt as dependency injection in my project.</p> <p>The <code>ObjectModule</code> module provides the instance of <code>MediaRecorder</code>, so I can use it in both <code>SoundViewModel</code> and <code>HandleMeter</code>.</p> <p...
<ol> <li><p>You can create the instance manually and you can also get that from your Dependency injection. There is no difference as both will return a new instance.</p> </li> <li><p>No, the instance is not recreated by Dependency injection when you do <code>mRecorder = MediaRecorder()</code>. You actually lose refere...
Can I create an instance manually when I have to use Hilt as dependency injection?
android|kotlin|dagger-hilt
0
270
1
71,937,414
71,937,414
1
true
2022-04-20T08:35:55.440Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can I create an instance manually when I have to use Hilt as dependency injection?<p>I use Hilt as dependency injection in my project.</p> <p>The <code>Objec...
71,937,841
Auto populated form fields django<p>I am working on my blog application and I added comment section now I want to auto populate two fields in forms.But i am getting error <strong>NOT NULL constraint failed: MainSite_comment.user_id</strong>. <br/> <strong>Models.py</strong></p> <pre><code>class Comment(models.Model): ...
<p>You should call the <code>form_valid</code> method, otherwise setting the user there makes no sense, so:</p> <pre><code>from django.contrib.auth.mixins import LoginRequiredMixin from django.urls import reverse_lazy class PostDetailView(LoginRequiredMixin, FormMixin, DetailView): model = Post form_class = Co...
Auto populated form fields django
django|django-views|django-forms
0
35
1
71,938,011
71,938,011
1
true
2022-04-20T10:11:54.303Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Auto populated form fields django<p>I am working on my blog application and I added comment section now I want to auto populate two fields in forms.But i am ...
71,938,057
Mongo DB - Difficulty Updating Multiple within a given document structure<p>I've got an application with a Mongo database that has documents stored with a structure something like this:</p> <pre><code>{ &quot;_id&quot; : ..., &quot;order_no&quot;: 12345, &quot;results&quot;: [ { &quot;a&...
<pre><code>db.collection.update({ &quot;results.a&quot;: &quot;customer&quot;, &quot;results.b&quot;: &quot;name&quot;, &quot;results.result&quot;: &quot;John Doe&quot; }, { &quot;$set&quot;: { &quot;results.$.a&quot;: &quot;customer&quot;, &quot;results.$.b&quot;: &quot;name&quot;, &quot;results.$....
Mongo DB - Difficulty Updating Multiple within a given document structure
mongodb
0
22
1
71,938,386
71,938,386
1
true
2022-04-20T10:27:38.983Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Mongo DB - Difficulty Updating Multiple within a given document structure<p>I've got an application with a Mongo database that has documents stored with a st...
71,938,001
Redux: Unable to send action Data to a Store<p>I started using redux and read the document for sending action data to the store. I tried doing it but nothing is happening.</p> <p>What is supposed to happen is when they press <strong>PLAY</strong> on the screen <strong>BookViewScreen.js</strong> a bottom media panel sho...
<p>So here <a href="https://github.com/ownsupernoob2/audiod/blob/master/src/screens/BookViewScreen.js#L93" rel="nofollow noreferrer">https://github.com/ownsupernoob2/audiod/blob/master/src/screens/BookViewScreen.js#L93</a> you're calling the action as if it was a normal function. But it doesn't work like that in redux....
Redux: Unable to send action Data to a Store
react-native|redux|react-redux
0
32
1
71,938,434
71,938,434
1
true
2022-04-20T10:23:19.523Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Redux: Unable to send action Data to a Store<p>I started using redux and read the document for sending action data to the store. I tried doing it but nothing...
71,939,212
jest testcase failing in react<p>Below code is working properly.</p> <pre><code>let token:any=''; token = localStorage.getItem(&quot;okta-token-storage&quot;); const bearerToken= &quot;Bearer &quot;+JSON.stringify(token.accessToken.accessToken); const handleAction = async () =&gt; { if (link.current.href) {...
<p><code>localStorage.getItem</code> returns null if the item does not exist, so check if it exists first.</p> <pre class="lang-js prettyprint-override"><code>const token = localStorage.getItem(&quot;okta-token-storage&quot;); if (token) { const bearerToken= &quot;Bearer &quot; + JSON.stringify(token.accessToken.acc...
jest testcase failing in react
javascript|reactjs|unit-testing|jestjs
0
25
1
71,939,266
71,939,266
1
true
2022-04-20T11:57:38.737Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: jest testcase failing in react<p>Below code is working properly.</p> <pre><code>let token:any=''; token = localStorage.getItem(&quot;okta-token-storage&qu...
71,939,273
QUERY if word exists in one of two columns<p><code>&quot;SELECT G, H, I, J WHERE AM = &quot;&quot;ROMARIO&quot;&quot; OR AN = &quot;&quot;ROMARIO&quot;&quot; AND J = &quot;&quot;IN&quot;&quot; AND G = &quot;&quot;TERCEIRO&quot;&quot;&quot;</code></p> <p>I'm trying to query in google sheets the word <code>ROMARIO</code>...
<p>Add parentheses</p> <pre><code>=&quot;SELECT G, H, I, J WHERE (AM = 'ROMARIO' OR AN = 'ROMARIO') AND J = 'IN' AND G = 'TERCEIRO'&quot; </code></pre>
QUERY if word exists in one of two columns
google-sheets
0
31
1
71,939,495
71,939,495
1
true
2022-04-20T12:01:01.207Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: QUERY if word exists in one of two columns<p><code>&quot;SELECT G, H, I, J WHERE AM = &quot;&quot;ROMARIO&quot;&quot; OR AN = &quot;&quot;ROMARIO&quot;&quot;...
71,939,877
Don't have option to choose XML as source in AWS Glue<p>I am trying to learn AWS Glue. I have an XML in S3 that I need to use as the source.</p> <p>However, I don't have an option to choose <code>XML</code> as the data format. Why?</p> <p>These are my only options: <a href="https://i.stack.imgur.com/mk2yq.png" rel="nof...
<p>The UI interface of Glue Studio does not <a href="https://docs.aws.amazon.com/glue/latest/ug/edit-jobs-source-s3-files.html" rel="nofollow noreferrer">support XML</a> yet. You would have to edit the script manually to read XML files.</p>
Don't have option to choose XML as source in AWS Glue
amazon-web-services|aws-glue
0
29
1
71,940,961
71,940,961
1
true
2022-04-20T12:43:37.123Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Don't have option to choose XML as source in AWS Glue<p>I am trying to learn AWS Glue. I have an XML in S3 that I need to use as the source.</p> <p>However, ...
71,939,142
Using or_comm in Coq<p>I want to prove the following theorem:</p> <pre><code>Theorem T14 : forall s t u, S u s t &lt;-&gt; S u t s. </code></pre> <p>Where <code>S</code> is defined like this:</p> <pre><code>Definition S u s t := forall v, ((ObS u v) &lt;-&gt; (ObS v s \/ ObS v t)). </code></pre> <p>The first tactic...
<p>This can be done using generalized rewriting.</p> <ol> <li><p><code>Require Setoid.</code></p> </li> <li><p>Use <code>setoid_rewrite</code> because you are rewriting under a binder (<code>forall v</code>). (Without binders, <code>rewrite</code> would be sufficient).</p> </li> </ol> <p>It works out-of-the-box in this...
Using or_comm in Coq
coq
0
29
1
71,941,212
71,941,212
1
true
2022-04-20T11:52:19.403Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Using or_comm in Coq<p>I want to prove the following theorem:</p> <pre><code>Theorem T14 : forall s t u, S u s t &lt;-&gt; S u t s. </code></pre> <p>Where ...
71,934,589
Binary-Search-Tree's remove function doesn't work for 2 child nodes<p>I'm learning about Binary Search Trees and Recursion. I'm able to get expected results with leaf and single child nodes. However, whenever I try to delete a node with 2 child nodes but am not receiving the expected result. When deleting the rootNode ...
<p>Figured it out. I had two lines of code swapped. I tried to delete the right-child's left-most node before I updated the root node.</p> <pre><code>public void DeleteNodeHelper(Node node) { if (node != null) { // 0 child? unlink the node from its parent if (node.Left == null &amp;&amp; node.Ri...
Binary-Search-Tree's remove function doesn't work for 2 child nodes
c#|recursion|binary-search-tree
0
35
1
71,942,148
71,942,148
1
true
2022-04-20T05:35:19.637Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Binary-Search-Tree's remove function doesn't work for 2 child nodes<p>I'm learning about Binary Search Trees and Recursion. I'm able to get expected results ...
71,942,950
Getting warning when forgiving null through Nulllable.Value property on value type<p>I've tried to reproduce a null-forgiving code applied to a value type, but it does not generate any warning: <a href="https://dotnetfiddle.net/6857RA" rel="nofollow noreferrer">dotnetfiddle.net</a>. In actual code, I'm getting a warnin...
<p>compiler is warning you that you can reach that line with t == null. Does FatalError return? I assume it throws but the compiler doesnt know that</p> <p>do</p> <pre><code>if (!t.HasValue) { FatalError(0x80A0400, GetTokenSpan()); } else{ r = new Ast.ContStmt(t.Value); } </code></pre>
Getting warning when forgiving null through Nulllable.Value property on value type
c#|.net-core
0
29
2
71,943,215
71,943,215
1
true
2022-04-20T16:11:34.130Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Getting warning when forgiving null through Nulllable.Value property on value type<p>I've tried to reproduce a null-forgiving code applied to a value type, b...
71,943,111
Design Pattern for successive method calls with previous method's output as input<p>Is there an appropriate design pattern for when you have to plug the output of a function as the input to the next one? See the example below</p> <pre><code>public static void main(String[] args) { A a = computeA(); B b = comput...
<p>It is the pipeline pattern. There are lots of materials online about it, here is one potential resource:</p> <p><a href="https://java-design-patterns.com/patterns/pipeline/" rel="nofollow noreferrer">https://java-design-patterns.com/patterns/pipeline/</a></p>
Design Pattern for successive method calls with previous method's output as input
java|design-patterns
0
32
1
71,943,271
71,943,271
1
true
2022-04-20T16:24:32.800Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Design Pattern for successive method calls with previous method's output as input<p>Is there an appropriate design pattern for when you have to plug the outp...
71,943,830
Unable to build app after reanimated 2 installation in react native<p>I just ran into issues with reanimated 2 (2.7.0) while trying to build react native for ios with the following errors:</p> <pre><code> ERROR TypeError: Cannot add new property '__reanimatedHostObjectRef' This error is located at: in AnimatedCompon...
<p>Related issue here: <a href="https://github.com/software-mansion/react-native-reanimated/issues/1517" rel="nofollow noreferrer">https://github.com/software-mansion/react-native-reanimated/issues/1517</a></p> <p>Did you try to deep copy the object/array of objects using JSON.parse(JSON.stringify(items)) as mentioned ...
Unable to build app after reanimated 2 installation in react native
react-native|react-native-reanimated-v2
0
524
1
71,943,909
71,943,909
1
true
2022-04-20T17:27:41.747Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Unable to build app after reanimated 2 installation in react native<p>I just ran into issues with reanimated 2 (2.7.0) while trying to build react native for...
71,943,278
How to make the email input stay on the same page so that user does not have to enter the email again?<p>I implemented the reset password feature using AWS Amplify. Initially, I created two forms one for <code>forgotPassword</code> that accepts usernames, and <code>forgotPasswordSubmit</code> to change the password. Fo...
<p>An option you have to achieve this is by using a piece of state that determines when they have submitted the form then change the fields being presented when that piece of state has been updated after calling <code>forgotPassword</code> when entering their email. This would use the same route and change what is bein...
How to make the email input stay on the same page so that user does not have to enter the email again?
reactjs|next.js|aws-amplify
0
34
1
71,944,537
71,944,537
1
true
2022-04-20T16:37:36.407Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to make the email input stay on the same page so that user does not have to enter the email again?<p>I implemented the reset password feature using AWS A...
71,944,532
Give me a hint about Pyton3 print( if ... else)<p>Can you please give me a proper link to read or explain how does this code in Python3 work?</p> <pre><code>print(&quot;NO&quot; if (n := int(input())) &amp; (n - 1) else &quot;YES&quot;) </code></pre> <p>As far as I understood it checks whether given integer n is equal ...
<p>Evaluating the code from the outside in, the <code>print()</code> call will print out either <code>&quot;NO&quot;</code> or <code>&quot;YES&quot;</code> based on the <a href="https://docs.python.org/3/reference/expressions.html#conditional-expressions" rel="nofollow noreferrer">conditional expression</a> (also calle...
Give me a hint about Pyton3 print( if ... else)
python-3.x
0
34
2
71,944,790
71,944,790
1
true
2022-04-20T18:28:01.810Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Give me a hint about Pyton3 print( if ... else)<p>Can you please give me a proper link to read or explain how does this code in Python3 work?</p> <pre><code>...
71,944,830
How to show numeric, alphanumeric and character from a given string in Oracle SQL<p>I want to show,</p> <ol> <li><em>OraCleG</em></li> <li><em>10</em></li> <li><em>@#$%</em></li> </ol> <p>from the string <strong>&quot;OraCle@10#$G%&quot;</strong> in three different rows using oracle SQL code.</p>
<p>Using regular expressions might be one option:</p> <pre><code>SQL&gt; with test (col) as 2 (select 'OraCle@10#$G%' from dual) 3 select regexp_replace(col, '[^[:alpha:]]') letters, 4 regexp_replace(col, '[^[:digit:]]') digits, 5 regexp_replace(col, '[[:alnum:]]') the_rest 6 from test ...
How to show numeric, alphanumeric and character from a given string in Oracle SQL
sql|oracle19c
0
33
1
71,944,903
71,944,903
1
true
2022-04-20T18:53:38.123Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to show numeric, alphanumeric and character from a given string in Oracle SQL<p>I want to show,</p> <ol> <li><em>OraCleG</em></li> <li><em>10</em></li> <...
71,941,069
Species scores not available as result of metaMDS<p>I am conducting an ordination analysis in R and I'm having trouble dealing with the results of the function metaMDS, from vegan. More specifically, I'm not able to get species scores from the metaMDS result. I found a similar question here <a href="https://stackoverfl...
<p>If you want to have species scores, you must supply information on species. Dissimilarities do not have any information on species, and therefore they won't work. You have two obvious (and documented) alternatives:</p> <ol> <li>Supply a data matrix to <code>metaMDS</code> and it will calculate the dissimilarities, a...
Species scores not available as result of metaMDS
r|vegan
0
545
1
71,944,946
71,944,946
1
true
2022-04-20T14:00:42.453Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Species scores not available as result of metaMDS<p>I am conducting an ordination analysis in R and I'm having trouble dealing with the results of the functi...
71,945,428
Understanding nature of parameters of sklearn.metrics.classification_report<p>I came across following piece of code:</p> <pre><code>from sklearn.metrics import classification_report y_true = [2,1,1,1] y_pred = [False,True,False,True] print(classification_report(y_true, y_pred)) precision recall f1-sco...
<p>In python, <code>True=1</code> and <code>False=0</code>.<br /> So,</p> <pre><code>y_pred = [False,True,False,True] </code></pre> <p>means the same as</p> <pre><code>y_pred = [0,1,0,1] </code></pre> <p>This means, this code will yield exactly the same results as your code:</p> <pre><code>y_true = [2,1,1,1] y_pred = [...
Understanding nature of parameters of sklearn.metrics.classification_report
python|machine-learning|scikit-learn
0
27
1
71,945,717
71,945,717
1
true
2022-04-20T19:49:32.113Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Understanding nature of parameters of sklearn.metrics.classification_report<p>I came across following piece of code:</p> <pre><code>from sklearn.metrics impo...
71,945,937
How to merge two columns with the same names from two different data frames and compare and print the ones that are similar<p>I currently have this code:</p> <pre><code>install.packages(c(&quot;httr&quot;, &quot;jsonlite&quot;, &quot;tidyverse&quot;)) library(httr) library(jsonlite) library(tidyverse) res1&lt;-GET(&qu...
<p>I think you're just looking for an <code>inner_join</code></p> <pre class="lang-r prettyprint-override"><code>us100 %&gt;% inner_join(uk100, by = &quot;id&quot;) %&gt;% as_tibble() #&gt; # A tibble: 16 x 21 #&gt; artistName.x id name.x releaseDate.x kind.x artistId.x artistUrl.x #&gt; &lt;chr&gt; ...
How to merge two columns with the same names from two different data frames and compare and print the ones that are similar
r
0
26
1
71,946,229
71,946,229
1
true
2022-04-20T20:38:57.510Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to merge two columns with the same names from two different data frames and compare and print the ones that are similar<p>I currently have this code:</p>...
71,921,644
Parse error with a simple CSV import into Clickhouse<p>I have an extremely simple CSV I'm trying to import into clickhouse with no success. The create table statement is:</p> <pre class="lang-sql prettyprint-override"><code>CREATE TABLE staging.EloLBK ( `Month` DateTime64(3), `1958` Int32, `1959` Int32, ...
<p>You can tell ClickHouse to do a best effort guess by passing the option <code>date_time_input_format='best_effort'</code>, for example:</p> <pre><code>INSERT INTO EloLBK SELECT * FROM file('EloLBK/*.csv', 'CSVWithNames', '&quot;Month&quot; datetime64, &quot;1958&quot; integer, &quot;1959&quot; integer, &quot;1960&qu...
Parse error with a simple CSV import into Clickhouse
csv|clickhouse
0
273
2
71,947,174
71,947,174
1
true
2022-04-19T08:11:59.123Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Parse error with a simple CSV import into Clickhouse<p>I have an extremely simple CSV I'm trying to import into clickhouse with no success. The create table ...
71,946,696
Flutter: How to convert Json to model class in dart<p>I tried to convert json below to dart class with many online converters also. But when i implemented that code dose not work and give me some error.</p> <p><strong>json:</strong></p> <pre><code>{ &quot;sections&quot;: [ { &quot;id&quot;: &q...
<p>You can covert it using this <a href="https://quicktype.io/" rel="nofollow noreferrer">website</a> , I use it always and it works fine This is you json code after been converted to a <strong>dart class</strong> :</p> <pre><code>import 'dart:convert'; ModelClass modelClassFromJson(String str) =&gt; ModelClass.fromJs...
Flutter: How to convert Json to model class in dart
json|flutter|dart
0
780
2
71,947,471
71,947,471
1
true
2022-04-20T22:07:24.203Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Flutter: How to convert Json to model class in dart<p>I tried to convert json below to dart class with many online converters also. But when i implemented th...
71,945,617
Does this use of the require_GET decorated add value?<p>I was reading this page on <a href="https://adamj.eu/tech/2022/01/18/how-to-add-a-favicon-to-your-django-site/" rel="nofollow noreferrer">how to add a favicon</a> to a Django website. In this article, the following code is presented to serve a favicon from the pro...
<p><strong>It's certainly not going to hurt, but it definitely isn't necessary</strong>. In your case, your <code>favicon()</code> method only serves one function and will only ever execute in one way. Therefore, the decorator is pretty much entirely superfluous.</p> <p>The author likely just put it there because they ...
Does this use of the require_GET decorated add value?
django|get|decorator
0
32
1
71,948,461
71,948,461
1
true
2022-04-20T20:08:27.550Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Does this use of the require_GET decorated add value?<p>I was reading this page on <a href="https://adamj.eu/tech/2022/01/18/how-to-add-a-favicon-to-your-dja...
71,948,298
error not nulled flutter function help me<pre><code>Expanded constroiBotoes ({String? caracterDaTecla, Color corTecla = Colors.white, Function? onPress}){ return Expanded( child: ElevatedButton( child: Text(caracterDaTecla!), style: ElevatedButton.styleFrom( textStyle: TextStyle( ...
<p>Use the <code>VoidCallback</code> type that is used at the <code>onPressed</code> argument of the <code>ElevatedButton</code>.</p> <pre><code>Expanded constroiBotoes({ String? caracterDaTecla, Color corTecla = Colors.white, VoidCallback? onPressed, // &lt;---- HERE }){ return Expanded( c...
error not nulled flutter function help me
flutter|dart
0
22
1
71,948,730
71,948,730
1
true
2022-04-21T02:40:45.103Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: error not nulled flutter function help me<pre><code>Expanded constroiBotoes ({String? caracterDaTecla, Color corTecla = Colors.white, Function? onPress}){ ...
71,949,212
How to Pass multiple arguments with values to executable via Python3?<p>I am trying to run a windows executable via python3 and have below code snippet. The arguments can be of the form <code>key-value</code> pair but its possible that few arguments may not have value like <code>arg1</code> below. <code>arg2</code> nee...
<p>Apparently, the program you are running expects to receive an argument and its value as separate strings (which makes a lot of sense). You can do something like</p> <pre><code>if phase_of_moon() == 'waxing gibbous': arg2 = ['--arg2', data.filepath] else: arg2 = [] x = Popen([output_path, '--arg1', *arg2, '--...
How to Pass multiple arguments with values to executable via Python3?
python|python-3.x|subprocess|popen
0
32
1
71,949,331
71,949,331
1
true
2022-04-21T05:09:54.937Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to Pass multiple arguments with values to executable via Python3?<p>I am trying to run a windows executable via python3 and have below code snippet. The ...
71,940,530
Call executable on IIS 10 with exit code -1073741819<p>I want to call an executable file from a web application hosted within IIS 10.</p> <p>When I run my application locally with IIS Express everything works fine, but after deploying on the production server, I only get the exit code -1073741819.</p> <p>On the product...
<p>-1073741819 is <code>0xC0000005</code>, that means <strong>ERROR_ACCESS_DENIED</strong>. IIS doesn't have permission to call the .exe file.</p> <blockquote> <p>I gave full rights for the user of the application pool in the folder</p> </blockquote> <p>I don't know how you do. But it is better to add <code>IIS APPPOOL...
Call executable on IIS 10 with exit code -1073741819
web|iis|executable
0
35
1
71,949,390
71,949,390
1
true
2022-04-20T13:26:07.130Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Call executable on IIS 10 with exit code -1073741819<p>I want to call an executable file from a web application hosted within IIS 10.</p> <p>When I run my ap...
71,947,686
How can I modify ANTLR4 grammar such that left association of operator can be supported?<p>I want to support the following input as it is with a provided grammar.</p> <p>This does not work</p> <pre><code>with [{id: 1},{id: 2}] as a return a[0].id, a[1].id </code></pre> <p>It works if we change it to be:</p> <pre><code>...
<p>Change:</p> <pre><code>oC_StringListNullOperatorExpression : oC_PropertyOrLabelsExpression ( oC_StringOperatorExpression | oC_ListOperatorExpression | oC_NullOperatorExpression )* ; </code></pre> <p>into:</p> <pr...
How can I modify ANTLR4 grammar such that left association of operator can be supported?
antlr4
0
30
1
71,949,592
71,949,592
1
true
2022-04-21T00:41:39.467Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I modify ANTLR4 grammar such that left association of operator can be supported?<p>I want to support the following input as it is with a provided gra...
71,950,096
Fill both numerical and character columns, conditional on the previous and next value being equal<p>Please note that my question is different from <a href="https://stackoverflow.com/questions/37648980/r-fill-down-multiple-columns">this one</a>:</p> <p>In the following data, I would like to fill both numerical and chara...
<p>Using <code>dplyr</code>:</p> <pre><code>library(dplyr) dat2 |&gt; mutate(type = as.character(type)) |&gt; mutate(across(2:4, ~ ifelse(is.na(.) &amp; lag(areacode) == lead(areacode) &amp; lag(type) == lead(type), lag(.), .))) zipcode areacode...
Fill both numerical and character columns, conditional on the previous and next value being equal
r|interpolation|na
0
35
1
71,950,272
71,950,272
1
true
2022-04-21T06:54:33.040Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Fill both numerical and character columns, conditional on the previous and next value being equal<p>Please note that my question is different from <a href="h...
71,949,905
Reconstructing, filling the gaps in .csv using for line in, and .append in loop<p>Pls help im tired. cant see why how to make it work.</p> <p>Problem to solve: a .csv file has to have suposedly 1sec data like:</p> <pre><code>time,open,high,low,close,Extremum,Fib 1,Fib 2,Fib 3,l100 2022-04-03 02:00:00,3.294,3.294,3.294,...
<p>Looks like you can just read in the data, and use <code>asfreq</code>:</p> <pre class="lang-py prettyprint-override"><code> # instead of read_clipboard, you'd read it with pd.read_csv df = pd.read_clipboard(sep=',', parse_dates = ['time']) df.set_index('time').asfreq(freq='1S').ffill() open ...
Reconstructing, filling the gaps in .csv using for line in, and .append in loop
python|pandas|dataframe|csv|append
0
29
1
71,950,281
71,950,281
1
true
2022-04-21T06:36:06.350Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Reconstructing, filling the gaps in .csv using for line in, and .append in loop<p>Pls help im tired. cant see why how to make it work.</p> <p>Problem to solv...
71,951,756
How do I deploy a contained SQL Server database from Visual Studio / SQL Server Data Tools?<p>When creating a database project, in Visual Studio with SQL Server Data Tools, how do I define the database Containment Type property (or in fact, any other database-level property)?</p> <p>When I look at the properties of the...
<p>Right click your Database Project and Select Properties. On the Project Settings Pane, click the <kbd>Database Settings...</kbd> button. Then go to the Miscellaneous pane. There is an option &quot;Containment&quot; and set this to &quot;Partial&quot;.</p> <p><a href="https://i.stack.imgur.com/nr7pP.png" rel="nofollo...
How do I deploy a contained SQL Server database from Visual Studio / SQL Server Data Tools?
sql-server|visual-studio|sql-server-data-tools
0
30
1
71,951,929
71,951,929
1
true
2022-04-21T09:06:15.740Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I deploy a contained SQL Server database from Visual Studio / SQL Server Data Tools?<p>When creating a database project, in Visual Studio with SQL Ser...
71,951,664
PHP var_dump() in xdebug ignores __debugInfo() magical method<p>Xdebug seems to ignore PHP magic method <code>__debugInfo()</code> in user defined classes when using <code>var_dump()</code>.</p> <p>This is especially unhandy when injecting dependencies (with dependencies, with dependencies...).</p> <p>Is there a settin...
<p>Xdebug's philosophy is to show data as it exists in objects, to aid debugging. Having all the properties shown, and not just the ones that <code>__debugInfo()</code> returns follows this convention.</p> <p>There is a <a href="https://bugs.xdebug.org/view.php?id=1777#c5735" rel="nofollow noreferrer">workaround for st...
PHP var_dump() in xdebug ignores __debugInfo() magical method
php|xdebug
0
34
1
71,952,346
71,952,346
1
true
2022-04-21T08:59:47.157Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: PHP var_dump() in xdebug ignores __debugInfo() magical method<p>Xdebug seems to ignore PHP magic method <code>__debugInfo()</code> in user defined classes wh...
71,954,000
C# - Create placeholder properties dynamically based on SortOrder of other properties<p>using C# I want to create below table output (see sreenshot) where the columns with red background color need to be added dynamically.</p> <p>Output: <a href="https://i.stack.imgur.com/WlaHX.png" rel="nofollow noreferrer"><img src="...
<p>To generate place holder attributes for all order-values you could do something like this:</p> <pre><code>var attributesByOrder = myAttributes.ToDictionary(a =&gt; a.Order, a =&gt; a); var maxOrder = myAttributes.Max(a =&gt; a.Order); var attributesAndPlaceholders = Enumerable.Range(1, maxOrder).Select(i =&gt; ...
C# - Create placeholder properties dynamically based on SortOrder of other properties
c#
0
27
1
71,954,155
71,954,155
1
true
2022-04-21T11:53:06.580Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: C# - Create placeholder properties dynamically based on SortOrder of other properties<p>using C# I want to create below table output (see sreenshot) where th...
71,945,767
Trigger Angular app logic after Firebase notifications registration and device token<p>I'm looking to implement this logic in my Angular 13 Ionic 6 app: Upon app start, obtain device token. With the device token, I do some logic (query the DB to see if this device is known or new) and based on the results - route to a ...
<p>thanks for your reporting I suggest you use BehaviorSubject to solve the issue. try this.</p> <ol> <li>inside FBNotificationService.ts file</li> </ol> <pre><code>onFCMTokenChanged: BehaviorSubject&lt;string&gt; = new BehaviorSubject(&quot;&quot;); PushNotifications.addListener('registration', (token: Token) =&gt; { ...
Trigger Angular app logic after Firebase notifications registration and device token
angular|rxjs|firebase-notifications
0
35
1
71,954,680
71,954,680
1
true
2022-04-20T20:23:00.750Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Trigger Angular app logic after Firebase notifications registration and device token<p>I'm looking to implement this logic in my Angular 13 Ionic 6 app: Upon...
71,950,533
ffmpeg: New text after a few seconds without having both texts at the same time for one frame<p><a href="https://stackoverflow.com/questions/17623676/text-on-video-ffmpeg">This</a> answer was very usefull for me to learn how to include texts in a video using ffmepg. Now at one position of the video I want to always sho...
<p>Use the &quot;t&gt;=t0 AND t&lt;t1&quot; logic&quot;:</p> <pre><code>enable='gte(t,0)*gt(t,5)' enable='gte(t,5)*gt(t,10)' </code></pre> <p>Alternately, if your video is cfr (constant frame rate), then use frame index instead. For example, if fps=30, t=5 -&gt; n=150 and t=10 -&gt; n=300. Accordingly,</p> <pre><code>e...
ffmpeg: New text after a few seconds without having both texts at the same time for one frame
ffmpeg
0
16
1
71,954,999
71,954,999
1
true
2022-04-21T07:32:01.997Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: ffmpeg: New text after a few seconds without having both texts at the same time for one frame<p><a href="https://stackoverflow.com/questions/17623676/text-on...
71,954,383
PyQt5 is QTimer running in separate thread and is it blocking?<p>I'm having an app which uses a database. I want to set a timer to launch a function which will modify the db periodically. But I want to be sure that it is blocking, so no read-write operations with db until this function would finish.</p> <p>My QTimer is...
<p>QTimer is always running in the thread it was created and started, but that doesn't matter, as it wouldn't change the resulting behavior of the <code>timeout</code> connected functions even if it was executed in another thread.</p> <p>What always matters is the thread in which the slot/function is, and as long as <c...
PyQt5 is QTimer running in separate thread and is it blocking?
pyqt5
0
27
1
71,955,010
71,955,010
1
true
2022-04-21T12:20:44.253Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: PyQt5 is QTimer running in separate thread and is it blocking?<p>I'm having an app which uses a database. I want to set a timer to launch a function which wi...
71,938,835
How to override series level markerSettings from SfCartesianChart()?<p>I have a use case where I have multiple Spline charts in the same picture (see image). As you can see in the image, I need to show a flag marker only in the center curve, but not on the adjacent graphs. I have implemented similar behavior in the ima...
<p>I suggest you use the onTrackballPositionChanging callback to hide the trackball marker for the specific series 1st and 3rd. In this callback you can get or set the x and y position for each marker, here we have set the marker x and y position value as double.infinity when the series index is 0 and 2 otherwise it is...
How to override series level markerSettings from SfCartesianChart()?
flutter|syncfusion
0
264
1
71,955,207
71,955,207
1
true
2022-04-20T11:28:05.667Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to override series level markerSettings from SfCartesianChart()?<p>I have a use case where I have multiple Spline charts in the same picture (see image)....
71,951,528
Matlab str2func calling a mex file and getting input variable error<p>I have a mex-function specialRationalMap_00001.mexw64, that can be called without problems</p> <pre><code>vm = specialRationalMap_00001(vm,amplitude); </code></pre> <p>If I am trying to use the function name and str2func</p> <pre><code>f_str = 'speci...
<p>Dont forget to actually pass the input arguments. Either do</p> <pre><code>fz = str2func(strcat('@(vm,amplitude)', f_str, '(vm,amplitude)')); </code></pre> <p>But better, you can just do:</p> <pre><code>fz = str2func(f_str); </code></pre>
Matlab str2func calling a mex file and getting input variable error
matlab
0
32
1
71,957,637
71,957,637
1
true
2022-04-21T08:50:27.467Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Matlab str2func calling a mex file and getting input variable error<p>I have a mex-function specialRationalMap_00001.mexw64, that can be called without probl...
71,955,540
Reorder A Dataframe Rows So All Columns Values Match Otherwise Add Nan<p>I have a data frame that looks like this:</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>Col1</th> <th>Cl2</th> <th>C3</th> </tr> </thead> <tbody> <tr> <td>12/31/2018</td> <td>9/30/2018</td> <td>11/30/2018</td> </tr> ...
<p>You can set the column to index then add a dummy column</p> <pre class="lang-py prettyprint-override"><code>for df in [df1, df2, df3]: df.set_index(df.columns[0], inplace=True) df[df.index.name] = 1 </code></pre> <pre><code>print(df1) Col1 Col1 2018-12-31 1 2019-01-31 1 2019-02-28 1 ...
Reorder A Dataframe Rows So All Columns Values Match Otherwise Add Nan
python|pandas|dataframe
0
31
1
71,958,937
71,958,937
1
true
2022-04-21T13:42:33.703Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Reorder A Dataframe Rows So All Columns Values Match Otherwise Add Nan<p>I have a data frame that looks like this:</p> <div class="s-table-container"> <table...
71,958,954
R: How to get column names for columns that contain a certain word AND their associated index number?<p>I want to create a list of column names that contain the word &quot;arrest&quot; AND their associated index number. I do not want all the columns, so I DO NOT want to subset the arrest columns into a new data frame. ...
<p>Hacky as a one-liner because I really dislike use <code>&lt;-</code> inside a function call, but this should work:</p> <pre><code>setNames( nm = matches &lt;- grep(&quot;arrest&quot;, colnames(x2009_2014)), colnames(x2009_2014)[matches] ) </code></pre> <p>Reproducible example:</p> <pre><code>setNames(nm = x &lt;...
R: How to get column names for columns that contain a certain word AND their associated index number?
r
0
32
1
71,959,098
71,959,098
1
true
2022-04-21T18:00:56.040Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: R: How to get column names for columns that contain a certain word AND their associated index number?<p>I want to create a list of column names that contain ...
71,959,261
C# Webbrowser fill in login page programmatically<p>I have a login form I wanna fill programmatically in C# I have a webbrowser and I did it this way, but it doesn't fill the form.</p> <pre><code>&lt;div&gt; &lt;label class=&quot;control-label&quot; for=&quot;Login&quot;&gt;Login&lt;/label&gt; &lt;input class=&...
<p>For both queries, you should be doing</p> <pre><code>webBrowser1.Document.GetElementById(&quot;elementid&quot;).SetAttribute(&quot;value&quot;, &quot;something&quot;); </code></pre> <p>The only difference is that in <code>SetAttribute</code> I'm passing the first argument as <code>&quot;value&quot;</code> instead of...
C# Webbrowser fill in login page programmatically
javascript|c#|html|webbrowser-control
0
28
1
71,959,345
71,959,345
1
true
2022-04-21T18:26:18.267Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: C# Webbrowser fill in login page programmatically<p>I have a login form I wanna fill programmatically in C# I have a webbrowser and I did it this way, but it...
71,959,930
filter Published Date of modules in Powershell<p>I'm trying to filter powershell modules between two dates but my outcome is empty, this is my code:</p> <pre><code>$startDate = (Get-Date) $endDate = (Get-Date).AddYears(-1) Find-Module Microsoft* | Select-Object -Property Name, PublishedDate | Where-Object { (...
<p>Your logic is backwards, try this:</p> <pre><code>$startDate = (Get-Date).AddYears(-1) $endDate = (Get-Date) Find-Module Microsoft* | Select-Object -Property Name, PublishedDate | Where-Object { ( $_.PublishedDate -ge $startDate ) -and ( $_.PublishedDate -lt $endDate ) } </code></pre> <p>You <em>wer...
filter Published Date of modules in Powershell
powershell
0
32
1
71,959,944
71,959,944
1
true
2022-04-21T19:25:54.043Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: filter Published Date of modules in Powershell<p>I'm trying to filter powershell modules between two dates but my outcome is empty, this is my code:</p> <pre...
71,959,945
How to invoke Docker application when new file in Storage account<p>I'm not experienced in Azure but have successfully created a Container Registry, and pushed my Docker image to my registry, with my compiled software within the image.</p> <p>I want the custom software (<em>call it myapp.exe</em>) to be invoked if ther...
<p>There are many ways to achieve what you want without polling storage all the time. Here are a couple of solutions:</p> <p>Create a Logic App that will be triggered by a new file in the storage account. The Logic App can deploy your image in Azure Container Instance passing the file name as a startup value. The Logic...
How to invoke Docker application when new file in Storage account
azure|azure-devops
0
31
1
71,960,495
71,960,495
1
true
2022-04-21T19:27:34.033Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to invoke Docker application when new file in Storage account<p>I'm not experienced in Azure but have successfully created a Container Registry, and push...
71,958,170
Set specific colour scales for groups<p>For the data below I would like to add colours so that <code>ID</code> within <code>p__Firmicutes </code> have a red scale, <code>ID</code> within <code>p__Bacteroidetes </code> have a blue scale, and <code>ID</code> within <code>p__Proteobacteria</code> have a green scale. How c...
<p>One approach to achieve your desired result would be to first assign colors by <code>Phyla</code>. In a second step group by <code>Phyla</code> and use e.g. <code>colorspace::lighten</code> to lighten the chosen colors to get a color scale for each <code>Phyla</code> which requires some data wrangling.</p> <pre clas...
Set specific colour scales for groups
r|ggplot2
0
29
1
71,960,826
71,960,826
1
true
2022-04-21T16:55:42.673Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Set specific colour scales for groups<p>For the data below I would like to add colours so that <code>ID</code> within <code>p__Firmicutes </code> have a red ...
71,961,249
django html: how to center the login form?<p>my login form is not looking good, it's too wide. how to make it smaller and center in the middle of the page?</p> <p><a href="https://i.stack.imgur.com/1OBlr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1OBlr.png" alt="enter image description here" /><...
<p>This is a styling issue for css.</p> <p>You already have a css file referred to in your template (css/style.css), so you can add a style like the following to it. This will apply the style only to the form with the class form-signin:</p> <pre><code>form.form-signin { max-width: 64ch; margin: auto; } </code><...
django html: how to center the login form?
html|django
0
28
1
71,961,488
71,961,488
1
true
2022-04-21T21:48:09.263Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: django html: how to center the login form?<p>my login form is not looking good, it's too wide. how to make it smaller and center in the middle of the page?</...
71,961,451
set initalValues in nested dynamic form | Antd<p>I've created the sandbox below hoping someone can help me.</p> <p><a href="https://codesandbox.io/s/suspicious-leaf-cijswt?file=/src/App.js" rel="nofollow noreferrer">https://codesandbox.io/s/suspicious-leaf-cijswt?file=/src/App.js</a></p> <p>What I need to do is basical...
<p>Use <code>initialValues</code> prop in <code>Form</code> to initialize fields. Since you named your FormList as <code>users</code>. You can set the values like this:</p> <pre><code>initialValues={{ users: ingredients }} </code></pre> <p>Now your field looks like this:</p> <pre><code>&lt;Form.Item {...restField} ...
set initalValues in nested dynamic form | Antd
reactjs|antd
0
274
1
71,961,943
71,961,943
1
true
2022-04-21T22:14:48.917Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: set initalValues in nested dynamic form | Antd<p>I've created the sandbox below hoping someone can help me.</p> <p><a href="https://codesandbox.io/s/suspicio...
71,960,769
Cannot seem to query time series containers with the new GridDB Python Client?<p>Querying collection containers works fine, but querying any sort of time series container -- even just a simple select * -- causes a Segmentation Fault.</p> <p>Here is what my Dockerfile looks like:</p> <pre><code>FROM centos:7 RUN yum -y...
<p>Lookin at the docker file, the issue maybe because both Python 3.6 and Python 3.10 are installed. Python 3.6 is used for building but Python 3.10 is used instead for running the sample, as follows:</p> <ul> <li>You install Python 3.10 : build python from source code. Then you install pandas with Python 3.10.</li> <l...
Cannot seem to query time series containers with the new GridDB Python Client?
python|numpy|griddb
0
26
1
71,962,132
71,962,132
1
true
2022-04-21T20:55:14.763Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Cannot seem to query time series containers with the new GridDB Python Client?<p>Querying collection containers works fine, but querying any sort of time ser...
71,960,137
MongoDB query: delete entry if any nested object within object has value for key<p>Say I have the following entry:</p> <pre class="lang-json prettyprint-override"><code>{ name: 'Bob', a: { 02910143: { val: 10 }, 101B70BB: { val: 20 }, 7A6C86F1: { val: 10 }, } } </code></pre> <p>Note that the keys for ...
<p>You can use <code>$arrayToObject</code> to convert <code>a</code> into an array of k-v tuple first. Then use <code>$filter</code> to remove the value not equal to 10. Finally convert back to original form using <code>$arrayToObject</code></p> <pre class="lang-js prettyprint-override"><code>db.collection.aggregate([ ...
MongoDB query: delete entry if any nested object within object has value for key
mongodb|mongodb-query
0
33
1
71,962,226
71,962,226
1
true
2022-04-21T19:47:01.270Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: MongoDB query: delete entry if any nested object within object has value for key<p>Say I have the following entry:</p> <pre class="lang-json prettyprint-over...
71,960,590
Row shrinks container size Flutter<p>I build the following gesture detector</p> <pre><code>GestureDetector( child: Container( height: 9.h, decoration: BoxDecoration( color: Colors.black, shape: BoxShape.circle, boxShadow: [ BoxShadow( color: Colors.grey.withOpacity(0.8), ...
<p>check it out below code. I have wrapped it inside a Row. Specified height and width of the container You can also wrap GestureDetector With Expanded inside Row.</p> <pre><code>import 'package:flutter/material.dart'; void main() =&gt; runApp(MyApp()); class MyApp extends StatelessWidget { @override Widget build...
Row shrinks container size Flutter
flutter|user-interface
0
27
1
71,962,487
71,962,487
1
true
2022-04-21T20:35:18.267Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Row shrinks container size Flutter<p>I build the following gesture detector</p> <pre><code>GestureDetector( child: Container( height: 9.h, decoration...
71,960,324
Reduce space between Tabbar and Listtile<p><a href="https://i.stack.imgur.com/Y2Pp0.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Y2Pp0.jpg" alt="Reduce space between Tabbar and Listtile " /></a></p> <p>I want to reduce the space between <code>Tabbar</code> and <code>listtile</code>. I wrote them i...
<p>try padding: EdgeInsets.zero inside ListView.separated, not inside ListTile</p>
Reduce space between Tabbar and Listtile
flutter|flutter-layout
0
21
1
71,962,798
71,962,798
1
true
2022-04-21T20:05:27.067Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Reduce space between Tabbar and Listtile<p><a href="https://i.stack.imgur.com/Y2Pp0.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Y2Pp0....
71,961,214
Why can't I patch a class from a different file for my unit test?<p>I have a file called <code>some.py</code>:</p> <pre><code>from dataclasses import dataclass from some_folder.some_reader import SomeReader class SomeClass: def __init__(self, url): self.reader = SomeReader(url) </code></pre> <p>and <code>s...
<p>See <a href="https://docs.python.org/3/library/unittest.mock.html#where-to-patch" rel="nofollow noreferrer">Where to patch</a></p> <p><code>some.py</code>:</p> <pre class="lang-py prettyprint-override"><code>from some_folder.some_reader import SomeReader class SomeClass: def __init__(self, url): self.r...
Why can't I patch a class from a different file for my unit test?
python|unit-testing|mocking|python-unittest|python-mock
0
28
1
71,962,810
71,962,810
1
true
2022-04-21T21:45:23.897Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why can't I patch a class from a different file for my unit test?<p>I have a file called <code>some.py</code>:</p> <pre><code>from dataclasses import datacla...
71,962,767
Transform connector fails in the Anypoint CloudHub<p>I have a transform action which has the logic like below</p> <pre><code>%dw 2.0 import * from dw::util::Coercions output application/json --- { &quot;quoteId&quot; : vars.setQuoteOppRecIds.Id, &quot;productCode&quot; : payload.ServiceTypeCode, &quot;axSequen...
<p>The DataWeave package <code>dw::util::Coercions</code> used in the script <a href="https://docs.mulesoft.com/dataweave/2.4/dw-coercions" rel="nofollow noreferrer">was added to Mule since Mule 4.4.0.</a> You are probably deploying in CloudHub to an earlier version of Mule that doesn't support it. Re deploy the applic...
Transform connector fails in the Anypoint CloudHub
mule|mule-studio|mulesoft|mule4|mule-connector
0
22
1
71,962,982
71,962,982
1
true
2022-04-22T02:18:53.747Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Transform connector fails in the Anypoint CloudHub<p>I have a transform action which has the logic like below</p> <pre><code>%dw 2.0 import * from dw::util::...
71,963,078
Regex to find numbers that are not in a phrase<p>If I have e.g. this string:</p> <pre class="lang-none prettyprint-override"><code>Beschreibung Menge VK-Preis MwSt% Betrag Schadenbewertunginkl.Restwertermittlung 1 25,00€ 19 25,00€ Rechnungsbetragexcl.MwSt.: 25,00€ MwSt.(19%): 4,75€ Rechnungsbetragincl.MwSt.: 123.029,75...
<p>You could try the following pattern.</p> <pre><code>\b\d+(?:(?:\.|,)\d{3})*(?:(?:\.|,)\d{2})\b(?!\W\d) </code></pre> <p>The main thing is <code>(?!\W\d)</code> at the end which ensures that after your amount you will not have a construct of 1 non-word character followed by 1 digit.</p> <p>Example: <a href="https://r...
Regex to find numbers that are not in a phrase
python-3.x|regex
0
32
1
71,963,291
71,963,291
1
true
2022-04-22T03:12:55.537Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Regex to find numbers that are not in a phrase<p>If I have e.g. this string:</p> <pre class="lang-none prettyprint-override"><code>Beschreibung Menge VK-Prei...
71,963,268
how to get a section to flex in a column<p>I'm working on media queries, I'm trying to go from a tablet view to a desktop view. I can only get one or the other right, not both.</p> <p><a href="https://imgur.com/gallery/qcFtB8F" rel="nofollow noreferrer">https://imgur.com/gallery/qcFtB8F</a> The first image is supposed...
<p>I think the media queries are overlapping, to prevent them from overlapping try this way</p> <pre><code>@media (min-width: 768px) and (max-width: 987px) </code></pre>
how to get a section to flex in a column
html|css
0
22
1
71,963,314
71,963,314
1
true
2022-04-22T03:46:25.200Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to get a section to flex in a column<p>I'm working on media queries, I'm trying to go from a tablet view to a desktop view. I can only get one or the oth...
71,963,347
How to Find the Cube Vector coord (X, Y, Z) of an Index number?<p>I can convert a Coordinate into an Index like so:</p> <pre><code>index = z + y * maxZ + x * maxY * maxZ </code></pre> <p>So for instance, I have a cube of 4x8x4... But my brain, isn't connecting how to convert it back. I want to take a given 'Index' and ...
<p>For <code>index = z + y * maxZ + x * maxY * maxZ</code>, you get <code>(x, y, z) = (index / maxY / maxZ, (index / maxZ) % maxY, index % maxZ)</code>.</p>
How to Find the Cube Vector coord (X, Y, Z) of an Index number?
c#|vector|mathematical-optimization|game-development
0
35
1
71,963,561
71,963,561
1
true
2022-04-22T04:03:01.253Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to Find the Cube Vector coord (X, Y, Z) of an Index number?<p>I can convert a Coordinate into an Index like so:</p> <pre><code>index = z + y * maxZ + x *...
71,964,270
Flutter how can i hide bottomnavbar in specific screens?<p>I have a bottom navbar but in some pages i want to hide it. How can i make it ? For example i want to see appbar in HomeScreen but i dont want see it on search screen. My code is like :</p> <pre><code>Scaffold( backgroundColor: _selectedIndex == 0 ? Color...
<p>Simple wrap _navBarItems with Visibility widget:</p> <pre><code>//class variable bool _isVisible = true;//default true Scaffold( backgroundColor: _selectedIndex == 0 ? Colors.transparent : Colors.white, extendBodyBehindAppBar: _selectedIndex == 0 ? true : false, bottomNavigationBar: Visibility( visible...
Flutter how can i hide bottomnavbar in specific screens?
android|ios|flutter|dart|mobile
0
32
1
71,964,367
71,964,367
1
true
2022-04-22T06:25:21.810Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Flutter how can i hide bottomnavbar in specific screens?<p>I have a bottom navbar but in some pages i want to hide it. How can i make it ? For example i want...
71,964,682
Python humanfriendly stop printing "and"<p>Pythons humanfriendly library prints in the format &quot;1 day, 6 hours and 19 minutes&quot;, is there a way to stop it from printing the &quot;and&quot; word?</p> <p>So I want it to print &quot;1 day, 6 hours, 19 minutes&quot;</p>
<p>From the documentation, you can't do that natively with the library.</p> <p>You could simply replace the &quot;and&quot; yourself though.</p> <pre><code>&gt;&gt;&gt; &quot;1 day, 6 hours and 19 minutes&quot;.replace(&quot; and &quot;, &quot;, &quot;) '1 day, 6 hours, 19 minutes' </code></pre>
Python humanfriendly stop printing "and"
python-3.x|datetime
0
27
1
71,964,789
71,964,789
1
true
2022-04-22T07:04:15.230Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python humanfriendly stop printing "and"<p>Pythons humanfriendly library prints in the format &quot;1 day, 6 hours and 19 minutes&quot;, is there a way to st...
71,937,966
power BI All approve columns counts<p>I have these data</p> <pre><code>create table #data (MilesID INT, Milestone varchar(50), Sataus varchar(50)) insert into #data values (101 ,'Done All 20','A-approved completed'), (101 ,'Done All 20','CA-approved completed'), (101 ,'Done All 20','DC-approved completed'), (102 ,'wel...
<p>Please try this one:</p> <pre><code>Measure = DISTINCTCOUNT(Data[MilesID]) - CALCULATE(DISTINCTCOUNT(Data[MilesID]), NOT(CONTAINSSTRING(Data[Status],&quot;approved&quot;))) </code></pre> <p>Three steps to find the answer:</p> <ol> <li>find how many distinct MilesID in this Data table.</li> <li>find how many distinct...
power BI All approve columns counts
powerbi|dax|reporting|powerbi-desktop
0
33
1
71,965,267
71,965,267
1
true
2022-04-20T10:20:25.737Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: power BI All approve columns counts<p>I have these data</p> <pre><code>create table #data (MilesID INT, Milestone varchar(50), Sataus varchar(50)) insert int...
71,958,995
Authorizing with Google APIs using a service account<p>I'm trying to access some google groups from the google-api using nodeJS and a service account file. I can't find a code sample that works quite like this. I've put together some code that seems to be working, but I keep getting an error 400 - Bad Request from the ...
<p>A 400 error is not an authorization/authentication issue, but instead is a client request issue. According to the <a href="https://developers.google.com/admin-sdk/directory/reference/rest/v1/groups/list#query-parameters" rel="nofollow noreferrer">official documentation</a>, there are some query parameters required f...
Authorizing with Google APIs using a service account
node.js|google-api
0
535
1
71,965,845
71,965,845
1
true
2022-04-21T18:05:33Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Authorizing with Google APIs using a service account<p>I'm trying to access some google groups from the google-api using nodeJS and a service account file. I...
71,965,779
Can I consume a ConfigMap value in arbitrary places in YAML?<p>In Azure Kubernetes Service, my goal is to configure both staging and production k8 clusters with a common YAML file, with critical values &amp; environment variables parameterized from a ConfigMap.</p> <p>I can set container environment variables easily us...
<p>No you cant with vanilla k8's manifests. ConfigMaps are just resources that get mounted into the container when it starts. Either as env variables or as a file. You cant access a config map at deployment time.</p> <p>I suggest looking into <a href="https://helm.sh/" rel="nofollow noreferrer">helm</a> that can do thi...
Can I consume a ConfigMap value in arbitrary places in YAML?
kubernetes|azure-aks|configmap
0
32
1
71,966,077
71,966,077
1
true
2022-04-22T08:36:56.853Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can I consume a ConfigMap value in arbitrary places in YAML?<p>In Azure Kubernetes Service, my goal is to configure both staging and production k8 clusters w...
71,960,868
Updating boxplot when choosing rows<p>I need to allow users to choose particular rows in a data frame and generate a boxplot.</p> <p>My implementation does not allow me to update a boxplot when I choose rows. Can somebody please point out what I do wrong? I am interested in only one column which is ['Phase'].</p> <p>He...
<p>I am inexperienced with Dash, but from the example in the official reference, I would guess that the reason is that the value of the active cell is not being retrieved. I found an example of updating a graph by clicking on a data table, so I used that as a basic form to create the code with appropriate sample data. ...
Updating boxplot when choosing rows
python|plotly|plotly-dash
0
31
1
71,966,303
71,966,303
1
true
2022-04-21T21:06:01.680Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Updating boxplot when choosing rows<p>I need to allow users to choose particular rows in a data frame and generate a boxplot.</p> <p>My implementation does n...
71,965,664
Angular - How to only show/be able to click the next screen button after making several selections<p>I have a screen where a user can make a selection of different options out of a table of several, but they have to at least choose 3 before they can move on but I'm completely lost on how to implement this or really wha...
<p>That's the purpose of form controls.</p> <p>You can hack it a bit to suit your needs :</p> <pre class="lang-js prettyprint-override"><code> control = new FormControl([], [ Validators.minLength(3), Validators.maxLength(3), Validators.required ]) </code></pre> <pre class="lang-html prettyprint-override"><cod...
Angular - How to only show/be able to click the next screen button after making several selections
angular|typescript
0
20
1
71,966,419
71,966,419
1
true
2022-04-22T08:29:15.100Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Angular - How to only show/be able to click the next screen button after making several selections<p>I have a screen where a user can make a selection of dif...
71,966,434
Powershell | Show Tomcat-Restart-Process as a progress bar<p>There are four Tomcat services. I would like to restart it and display the status as a progress bar. Stopping 4 times and starting 4 times would be a total of 8 steps. I've tried the following, but unfortunately it doesn't give the expected result. I have no ...
<p>Why first a loop to stop the services and then another loop to start them up again?<br /> There is also a <a href="https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/restart-service" rel="nofollow noreferrer">Restart-Service</a> cmdlet that stops and then starts a service, so with tha...
Powershell | Show Tomcat-Restart-Process as a progress bar
powershell|progress-bar
0
28
1
71,966,661
71,966,661
1
true
2022-04-22T09:26:43.603Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Powershell | Show Tomcat-Restart-Process as a progress bar<p>There are four Tomcat services. I would like to restart it and display the status as a progress ...
71,965,681
Simulating first come first serve agent distribution<p>I currently have agents of type patient seizing an exam room when it becomes available, then, to mimic a first come first serve system where different healthcare practitioners see the patient, I have utilized a SelectOutputIn and 4 SelectOutputOut blocks correspond...
<p>It is correct. If all probabilities are zero, AnyLogic seems to pick the last option. To address your issue, we need to add a condition for when all practitioners are busy. So you will have 3 possible outcomes as follows:</p> <pre><code>Surgeons.idle() + Fellows.idle() + Residents.idle() + Physios.idle() == 0 ? 0.25...
Simulating first come first serve agent distribution
anylogic
0
23
1
71,966,705
71,966,705
1
true
2022-04-22T08:30:41.537Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Simulating first come first serve agent distribution<p>I currently have agents of type patient seizing an exam room when it becomes available, then, to mimic...
71,966,492
Ingress - Connection refused<p>I know that they are tons of similar problem but after I have read all of them I am not able to figure it out... :/</p> <p><strong>First of all I am not using minikube, I am using kubernetes docker desktop.</strong></p> <p>I have simple express.js server like:</p> <pre><code>app.get('/tes...
<p>The problem is DNS. With your local /etc/hosts you are pointing to localhost instead to the IP of your Kubernetes host.</p>
Ingress - Connection refused
express|kubernetes|kubernetes-ingress
0
280
2
71,966,877
71,966,877
1
true
2022-04-22T09:30:43.093Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Ingress - Connection refused<p>I know that they are tons of similar problem but after I have read all of them I am not able to figure it out... :/</p> <p><st...
71,967,743
Fill rows of a data frame by group in R<p>I would like to transform this data frame:</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>id</th> <th>date</th> <th>X</th> </tr> </thead> <tbody> <tr> <td>001</td> <td>2022-04-12</td> <td>dsf</td> </tr> <tr> <td>001</td> <td>2022-04-13</td> <td>df<...
<p>You can use <code>tidyr::complete</code> to create a sequence of dates for each <code>id</code> from the minimum date value to the maximum.</p> <pre><code>library(dplyr) library(tidyr) df %&gt;% mutate(date = as.Date(date)) %&gt;% complete(id, date = seq(min(date), max(date), 'days')) # A tibble: 15 × 3 # ...
Fill rows of a data frame by group in R
r|dataframe|fill
0
33
1
71,967,805
71,967,805
1
true
2022-04-22T11:05:12.333Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Fill rows of a data frame by group in R<p>I would like to transform this data frame:</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr>...
71,956,431
SQL executeUpdate() seems to commit data, but that is not the case. How can I find my error?<p>I curently work on few SQL queries (MSSQL 2O14), but only &quot;SELECT&quot; query works with executeQuery(). I had use execute() and executeUpdate() on &quot;INSERT INTO&quot; and &quot;UPDATE&quot; queries, but whereas it l...
<p>Try to commit the transaction manually through the Connection object ,hope it helps.</p>
SQL executeUpdate() seems to commit data, but that is not the case. How can I find my error?
java|sql
0
33
1
71,968,066
71,968,066
1
true
2022-04-21T14:44:03.663Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: SQL executeUpdate() seems to commit data, but that is not the case. How can I find my error?<p>I curently work on few SQL queries (MSSQL 2O14), but only &quo...
71,968,287
Should not be capturing when there is a hotcontrol - Unity<p>I am pretty new to Unity and C#. I already know python, so C# was quite easy to grasp, but now I have a problem. I am not able to run this code. It is is causing an error to appear. I checked the code many times but couldn't find the issue. Here is the code:<...
<p>The issue is here:</p> <pre><code> rb2D.AddForce(new Vector2(moveHorizontal * moveSpeed), ForceMode2D.Impulse); </code></pre> <p>Vector2's take 2 floats as input. To fix it, you have to do this</p> <pre><code>new Vector2(moveHorizontal * moveSpeed, moveVertical * moveSpeed) </code></pre> <p>You forgot to define the ...
Should not be capturing when there is a hotcontrol - Unity
c#|unity3d
0
3,592
1
71,968,445
71,968,445
1
true
2022-04-22T11:51:09.880Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Should not be capturing when there is a hotcontrol - Unity<p>I am pretty new to Unity and C#. I already know python, so C# was quite easy to grasp, but now I...
71,968,786
Sending client a NodeJS object with some undefined property values<p>I'm running a PostgreSQL query:</p> <pre><code>'SELECT * FROM table' </code></pre> <p>On my server side, I'm trying to generate a JSON object of the below format, but some of the column# values are set to 'undefined' because the row.value# is undefine...
<p>You can use a ternary operator (<code>? :</code>) like this:</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>const row = { value2: "Praveen", value6: "Kumar", value8: ...
Sending client a NodeJS object with some undefined property values
javascript|sql|node.js|json|postgresql
0
20
2
71,968,815
71,968,815
1
true
2022-04-22T12:31:02.270Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Sending client a NodeJS object with some undefined property values<p>I'm running a PostgreSQL query:</p> <pre><code>'SELECT * FROM table' </code></pre> <p>On...
71,938,650
Changing the time scale of a matplotlib graph in a real-time fashion<p>I'm making a real-time application that graphs <a href="https://i.stack.imgur.com/740M3.png" rel="nofollow noreferrer">sensor data in a real-time fashion</a>.</p> <p>The data is saved to a .csv file and graphed using matplotlib in the following fash...
<p>Found a solution to this problem. The key is to use the ticker FuncFormatter-subclass to customize the ticks in the x-axis in the following way:</p> <pre><code>formatter = matplotlib.ticker.FuncFormatter(lambda s, x: time.strftime('%H:%M',time.gmtime(s // 60))) self.ax.xaxis.set_major_formatter(mticker.FuncForma...
Changing the time scale of a matplotlib graph in a real-time fashion
python|matplotlib|real-time|sensors
0
32
1
71,968,916
71,968,916
1
true
2022-04-20T11:13:56.617Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Changing the time scale of a matplotlib graph in a real-time fashion<p>I'm making a real-time application that graphs <a href="https://i.stack.imgur.com/740M...
71,965,187
MongoDB aggregate for daily won/lost games, $cond is always false<p>I'm doing a couple of <code>$match</code>'s and <code>$unwind</code>'s and end up with a collection of documents looking like this:</p> <pre class="lang-json prettyprint-override"><code>{ _id:249776348, StartGameTime:1615789789, team:0, winner:0 } </co...
<p>How about simply comparing the <code>team</code> and <code>winner</code> value? For won case, if <code>team</code> == <code>winner</code>, then count + 1, else count + 0. Vise versa for lost, but the condition become <code>team</code> != <code>winner</code></p> <pre class="lang-js prettyprint-override"><code>db.coll...
MongoDB aggregate for daily won/lost games, $cond is always false
mongodb|mongodb-query|aggregation-framework
0
33
1
71,969,229
71,969,229
1
true
2022-04-22T07:47:30.333Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: MongoDB aggregate for daily won/lost games, $cond is always false<p>I'm doing a couple of <code>$match</code>'s and <code>$unwind</code>'s and end up with a ...
71,969,151
The problem with passing callback functions, writes an error props.me is not a function, I can only show part of the code<p>There is a parent and a child (component) I want to get the values ​​from the child to the parent, I throw the functions themselves into the component, in the child I wrote the return target of th...
<p>Since the props.me is not passed to every component, you just have to check if it's passed as function :</p> <pre><code> const handleChange = (e) =&gt; { props.de?.(e.target.value); props.me?.(e.target.value); props.ye?.(e.target.value); } </code></pre>
The problem with passing callback functions, writes an error props.me is not a function, I can only show part of the code
javascript|reactjs|react-native
0
17
1
71,969,943
71,969,943
1
true
2022-04-22T12:58:43.800Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: The problem with passing callback functions, writes an error props.me is not a function, I can only show part of the code<p>There is a parent and a child (co...
71,969,560
Spring Integration Fetch SQL Data after the Flow starts<p>Have an integration flow which polls a JMS queue and for each message, using a field from the message data need to fire a SELECT query and then split the results from it for further processing.</p> <p>How do I run a SELECT query in the mid of the flow using Java...
<p>The <code>JdbcOutboundGateway</code> is the correct way to solve your task. It does not require the poller. That's endpoint which is going to call this <code>JdbcOutboundGateway</code> expects the poller. Just because the input channel is a <code>QueueChannel</code> in your case. Not sure why would one need a queue ...
Spring Integration Fetch SQL Data after the Flow starts
spring-integration
0
22
1
71,970,136
71,970,136
1
true
2022-04-22T13:29:13.317Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Spring Integration Fetch SQL Data after the Flow starts<p>Have an integration flow which polls a JMS queue and for each message, using a field from the messa...
71,962,373
How to make default of parent function run if not specified in a wrapper function<p>I am writing a wrapper function where I am linking multiple steps of a pipeline. I would like to make it so the user can input multiple options where the value would be input if present, and the default of the paernt function otherwise....
<p>Your code isn't particularly clear and has many errors so it is hard to see exactly what you're trying to do - for example you aren't returning the numbers you calculate anywhere so the output of your wrapper function will always be NULL.</p> <p>I think what you're trying to do can be solved by using <code>base::do....
How to make default of parent function run if not specified in a wrapper function
r|function|parameters|wrapper|default
0
22
1
71,970,731
71,970,731
1
true
2022-04-22T01:03:34.893Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to make default of parent function run if not specified in a wrapper function<p>I am writing a wrapper function where I am linking multiple steps of a pi...
71,960,948
How to replicate a function for a nested list<p>I have a nested list (datalist) which I'd like to repeat the following function for. Within datalist are multiple dataframes (e.g., A-F).</p> <p>After doing the following for the nested dataframe &quot;A&quot;, I'd like to run it for the other nested dataframes (B-F):</p...
<p>Its not clear what structure your data is or what exactly you're trying to achieve, but if you're just asking how to write a function that can be applied to each element of the list then it would be something like as follows.</p> <p><strong>Note: you might have to change this depending on the structure of your data ...
How to replicate a function for a nested list
r|function|loops
0
31
1
71,970,928
71,970,928
1
true
2022-04-21T21:13:09.923Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to replicate a function for a nested list<p>I have a nested list (datalist) which I'd like to repeat the following function for. Within datalist are mult...
71,967,874
How can i change Rdd to Vectors.dense pyspark<p><strong>Im new to pyspark</strong> I need to change my rdd :</p> <pre><code>tfidf.collect() output: [('fuel', 0.06190145817054232), ('months', 0.03095072908527116), ('lasting', 0.03095072908527116), ('noticeably', 0.03095072908527116), ('gravitational', 0.061901458170...
<p>Use RDD's <code>map</code></p> <pre class="lang-py prettyprint-override"><code>from pyspark.ml.linalg import Vectors tfidf.map(lambda x: (x[0], Vectors.dense(x[1]))).collect() [('fuel', DenseVector([0.0619])), ('months', DenseVector([0.031])), ('lasting', DenseVector([0.031])), ('noticeably', DenseVector([0.031]...
How can i change Rdd to Vectors.dense pyspark
python|pyspark
0
21
1
71,971,937
71,971,937
1
true
2022-04-22T11:15:44.347Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can i change Rdd to Vectors.dense pyspark<p><strong>Im new to pyspark</strong> I need to change my rdd :</p> <pre><code>tfidf.collect() output: [('fuel',...
71,972,038
CASE statement in the WHERE clause, with further conditioning after THEN<p>I have a table of invoices and one of contracts that invoices are linked to. However, not every invoice is linked to a contract. I want to return all invoices linked to contracts which are within a timeframe (Starting before 2021-03-01), and als...
<p>maybe a simple left join like this can help you in filtering</p> <pre><code>select I.* from Invoice I left outer join Contract C -- left join gets even the NULL contractid invoices on C.ContractID= I.ContractID where C.[Contract Start Timestamp] IS NULL OR C.[Contract Start Timestamp]&lt; '2021-03-01' </code><...
CASE statement in the WHERE clause, with further conditioning after THEN
sql|sql-server
0
27
1
71,972,120
71,972,120
1
true
2022-04-22T16:37:33.460Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: CASE statement in the WHERE clause, with further conditioning after THEN<p>I have a table of invoices and one of contracts that invoices are linked to. Howev...
71,972,211
Accessing a field from a model linked to another model with get_context_data()<p>I have the following models in my Django app:</p> <ul> <li>Model <code>User</code></li> </ul> <pre><code>class User(AbstractBaseUser, PermissionsMixin): username = models.CharField('username', max_length=30, blank=True) email = mod...
<p>Since you are using <code>.all()</code> you then need to loop through the Queryset. If you need to get the <code>header_row</code> field you would need to do loop through the results first. You can do this in the view or in the template.</p> <p>In the template:</p> <pre><code>{% for supplement in supplements %} {...
Accessing a field from a model linked to another model with get_context_data()
python|django
0
28
1
71,972,415
71,972,415
1
true
2022-04-22T16:53:26.087Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Accessing a field from a model linked to another model with get_context_data()<p>I have the following models in my Django app:</p> <ul> <li>Model <code>User<...
71,969,473
Error with Symfony The option "constraints" does not exist<p>Symfony question, I'm just starting to learn it. The user uploads a file with data that I want to submit to the form for validation in the form of an array (key-value). I call the method to build the form, pass an array there and try to check, for example, th...
<p>The <code>constraints</code> option is part of <code>ValidatorExtension</code> and it is not part of core form extensions. You can use it like following</p> <pre><code>$validator = Validation::createValidator(); $formFactory = Forms::createFormFactoryBuilder() -&gt;addExtension(new ValidatorExtension($valida...
Error with Symfony The option "constraints" does not exist
php|symfony
0
267
3
71,972,536
71,972,536
1
true
2022-04-22T13:21:52.437Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Error with Symfony The option "constraints" does not exist<p>Symfony question, I'm just starting to learn it. The user uploads a file with data that I want t...
71,972,964
Serial Comunnication between Java and Arduino<p>I'm writing a code to send and receive data using the serial port of an arduino, for that I'm using the <a href="https://github.com/Fazecast/jSerialComm" rel="nofollow noreferrer">jserialcomm</a> library. For sending and receiving data, I'm using a DataListener of the lib...
<p>You can listen for multiple events by OR'ing these together:</p> <pre class="lang-java prettyprint-override"><code>return SerialPort.LISTENING_EVENT_DATA_WRITTEN | SerialPort.LISTENING_EVENT_DATA_RECEIVED; </code></pre> <hr /> <p><strong>How this works:</strong></p> <p>Assume <code>LISTENING_EVENT_DATA_WRITTEN</code...
Serial Comunnication between Java and Arduino
java|arduino|serial-port
0
35
1
71,973,071
71,973,071
1
true
2022-04-22T18:06:02.380Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Serial Comunnication between Java and Arduino<p>I'm writing a code to send and receive data using the serial port of an arduino, for that I'm using the <a hr...
71,971,880
Why I get this ts error when I want to add custom style to my image component?<p>I want to add my own style else I want to add an css image object. But I get this err:</p> <pre><code>No overload matches this call. Overload 1 of 2, '(props: ImageProps | Readonly&lt;ImageProps&gt;): Image', gave the following error. ...
<p>You must use <a href="https://reactnative.dev/docs/image-style-props" rel="nofollow noreferrer">ImageStyle</a> from react-native since the Image components can has props that Views doesn't</p> <pre><code>export interface IImageSlider { ImageStyle?: StyleProp&lt;ImageStyle&gt;; } </code></pre>
Why I get this ts error when I want to add custom style to my image component?
reactjs|typescript|react-native
0
284
1
71,973,116
71,973,116
1
true
2022-04-22T16:26:24.407Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why I get this ts error when I want to add custom style to my image component?<p>I want to add my own style else I want to add an css image object. But I get...
71,973,200
Have okta authorization enabled app user login automatically to another okta authorized app<p>I have two okta authorized apps in the system. If a user that is logged in to one app is presented with link to another, the ask is that the user should be seamlessly logged in automatically to the 2nd app without prompting fo...
<p>Yes, it's possible, as long as you browser is capable to share 3rd party cookies. After you log into your first app, you should have an Okta session cookie which will allow you to SSO into your second app, assuming both of them are configured to do Okta SSO</p>
Have okta authorization enabled app user login automatically to another okta authorized app
okta
0
31
1
71,973,446
71,973,446
1
true
2022-04-22T18:30:26.130Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Have okta authorization enabled app user login automatically to another okta authorized app<p>I have two okta authorized apps in the system. If a user that i...
71,973,335
Increment time only for the given timestamps while retaining the dates<p><a href="https://i.stack.imgur.com/GmGTT.png" rel="nofollow noreferrer">Here is the picture of the table</a></p> <p>I want to increment the startTime by 30 minutes without changing the dates.</p> <p>This is what I tried but it gives me the type mi...
<p>Add an <code>interval</code></p> <pre><code>UPDATE Meeting SET starttime = starttime + interval '30 minutes' WHERE purpose = 'Staff'; </code></pre>
Increment time only for the given timestamps while retaining the dates
sql|postgresql
0
22
1
71,973,467
71,973,467
1
true
2022-04-22T18:43:50.353Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Increment time only for the given timestamps while retaining the dates<p><a href="https://i.stack.imgur.com/GmGTT.png" rel="nofollow noreferrer">Here is the ...
71,968,855
In which model to put a function that returns all active / inactive venues of the user?<p><strong>User Model:</strong></p> <pre><code>&lt;?php namespace App\Models; use Illuminate\Contracts\Auth\MustVerifyEmail; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Foundation\Auth\User as Authenticata...
<p>add relations to the user model</p> <pre><code> public function venues() { return $this-&gt;hasMany(Venue::class); } public function activeVenues() { return $this-&gt;hasMany(Venue::class)-&gt;where('active',true); } public function inActiveVenues() { return $...
In which model to put a function that returns all active / inactive venues of the user?
php|laravel|eloquent|laravel-7
0
31
1
71,973,777
71,973,777
1
true
2022-04-22T12:36:53.743Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: In which model to put a function that returns all active / inactive venues of the user?<p><strong>User Model:</strong></p> <pre><code>&lt;?php namespace App...
71,972,858
Stack toast notification from bottom up - css / reactjs<p>I'm making a toast notification and trying to implement position options.</p> <p>My problem is that when I position the toast at the bottom, then add another, the new one appears at the original position, replacing the first one, and the first one is moved down,...
<p>Here is a simplified solution.</p> <pre><code>import { useState } from &quot;react&quot;; import &quot;./styles.css&quot;; export default function App() { const [toasts, setToasts] = useState([]); const btnClicked = () =&gt; { console.log(&quot;btnClicked&quot;); setToasts([...toasts, { id: toasts.leng...
Stack toast notification from bottom up - css / reactjs
javascript|css|reactjs
0
281
1
71,973,981
71,973,981
1
true
2022-04-22T17:55:21.433Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Stack toast notification from bottom up - css / reactjs<p>I'm making a toast notification and trying to implement position options.</p> <p>My problem is that...
71,974,079
MySQL using MIN with other attributes to match<p>This is likely a very simple solution, but I just have no clue. I know I probably have to use GROUP BY, but I don't know what comes after that. Anyway, the code below should output an item that has the lowest available quantity, and show the itemID and name of item that ...
<p>You have two options:</p> <pre><code> SELECT ItemID, Inventory_Name, AvailableQuantity FROM Inventory ORDER BY AvailableQuantity ASC LIMIT 1; </code></pre> <p>But this doesn't handle ties, so you could use a subquery:</p> <pre><code>SELECT ItemID, Inventory_Name, AvailableQua...
MySQL using MIN with other attributes to match
mysql
0
14
1
71,974,184
71,974,184
1
true
2022-04-22T20:08:22.877Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: MySQL using MIN with other attributes to match<p>This is likely a very simple solution, but I just have no clue. I know I probably have to use GROUP BY, but ...
71,974,893
Why not appear on my Github profile contributions a commit after i copy my folder local and switch branch?<p>I make React project and save github.</p> <p>I divide my project different bigger stage.</p> <p>When i arrived an bigger stage i copy my local folder also and continue from that point.</p> <p>I also copy my git ...
<p>From github's FAQ: <a href="https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/viewing-contributions-on-your-profile#what-counts-as-a-contribution" rel="nofollow noreferrer">What counts as a contribution</a>:</p> <blockquote> <p>On ...
Why not appear on my Github profile contributions a commit after i copy my folder local and switch branch?
git|github
0
26
1
71,974,921
71,974,921
1
true
2022-04-22T21:36:23.653Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why not appear on my Github profile contributions a commit after i copy my folder local and switch branch?<p>I make React project and save github.</p> <p>I d...
71,959,838
apply ResNet on CIFAR10 after resizing (pyTorch)<p>Given a pre-trained ResNet152, in trying to calculate predictions bench-marks using some common datasets (using PyTorch), and the first RGB dataset that came to mind was CIFAR10. The thing is that CIFAR10 data is <code>3x32x32</code> and ResNet expects <code>3x224x224<...
<p>Yes, you need to resize input images to the size <code>3x224x224</code>. By doing so, after a normal training procedure, you should achieve outstanding results on CIFAR-10 (like 96% on the test-set).</p> <p>I guess the main problem is that you're using a network that is pre-trained on higher resolution images (resne...
apply ResNet on CIFAR10 after resizing (pyTorch)
deep-learning|pytorch|dataset|resnet
0
275
2
71,975,251
71,975,251
1
true
2022-04-21T19:16:42.890Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: apply ResNet on CIFAR10 after resizing (pyTorch)<p>Given a pre-trained ResNet152, in trying to calculate predictions bench-marks using some common datasets (...
71,943,902
$geoWithin return document located outside the polygon queried<p>I've recently came across this behaviour that I cannot explain. <code>$geowithin</code> return documents outside the polygon queried.</p> <p>To illustrate my problem, I've made a <a href="https://mongoplayground.net/p/hIZPcWqNrEd" rel="nofollow noreferrer...
<blockquote> <p>all located outside the polygon</p> </blockquote> <p>Except they are not - two of them are outside and one is inside.</p> <p>It's easier to see if you draw the other polygon (as you did) and see two of the three points inside and the third one (correctly) outside.</p>
$geoWithin return document located outside the polygon queried
mongodb|mongodb-query|aggregation-framework
0
34
1
71,975,441
71,975,441
1
true
2022-04-20T17:33:16.167Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: $geoWithin return document located outside the polygon queried<p>I've recently came across this behaviour that I cannot explain. <code>$geowithin</code> retu...
71,932,850
Delete user account in firebase<p>i have a flutter application where users have an email and password (accounts) and i want to give the user the option to delete their account if they want to, the problem is with my code sometimes only the authentication gets deleted and other times it delete the info and authenticatio...
<p>i found a solution!! here is the code that worked</p> <pre><code>onPressed: () async { bool step1 = true ; bool step2 = false ; bool step3 = false ; bool step4 = false ; while(true){ ...
Delete user account in firebase
firebase|flutter|google-cloud-firestore|firebase-authentication
0
769
2
71,975,717
71,975,717
1
true
2022-04-20T00:39:42.307Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Delete user account in firebase<p>i have a flutter application where users have an email and password (accounts) and i want to give the user the option to de...
71,971,153
How to do a POST request in a service-worker?<p>I'm trying to send a POST request to the back-end whenever a client click on a Push notification (front-end side), so I know the client have received the notification.</p> <p>To send request from my front-end to my back-end I have the following system :</p> <p>Alerte.js:<...
<p>Service Workers can use the browser's built-in <a href="https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch" rel="nofollow noreferrer"><code>fetch()</code></a>:</p> <pre class="lang-js prettyprint-override"><code>self.addEventListener(&quot;notificationclick&quot;, (e) =&gt; { let req = { ...
How to do a POST request in a service-worker?
javascript|node.js|vue.js|post|workbox
0
272
1
71,975,933
71,975,933
1
true
2022-04-22T15:25:29.040Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to do a POST request in a service-worker?<p>I'm trying to send a POST request to the back-end whenever a client click on a Push notification (front-end s...
71,973,198
How to restrict drawables only shown inside canvas?<p>I have a canvas positioned on the right side of the screen. To the left are some buttons. If x values of some drawbles are negative, they are drawn on the left side, outside of the canvas. How can I avoid it?</p> <pre><code>Row { Button(onClick = { }) { ...
<p>By default, all Compose views do not clip their content outside the boundaries.</p> <p>You can add <a href="https://developer.android.com/reference/kotlin/androidx/compose/ui/draw/package-summary#(androidx.compose.ui.Modifier).clipToBounds()" rel="nofollow noreferrer"><code>Modifier.clipToBounds</code></a> when you ...
How to restrict drawables only shown inside canvas?
android-jetpack-compose
0
35
1
71,976,640
71,976,640
1
true
2022-04-22T18:30:16.373Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to restrict drawables only shown inside canvas?<p>I have a canvas positioned on the right side of the screen. To the left are some buttons. If x values...
71,975,004
Stack Widget not working inside GridView.builder()<p>I am trying to make the following design:</p> <p><a href="https://i.stack.imgur.com/snxef.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/snxef.png" alt="enter image description here" /></a></p> <p>I am using Firebase as my backend as a service, an...
<p>I have try this without Stack also, refer below code hope its help to you. add some changes in my code with your code like image and text add below design code inside <a href="https://api.flutter.dev/flutter/widgets/GridView-class.html" rel="nofollow noreferrer"><strong><code>GridView.builder()</code></strong></a></...
Stack Widget not working inside GridView.builder()
flutter|gridview|widget|stack|flutter-web
0
274
1
71,976,662
71,976,662
1
true
2022-04-22T21:48:58.720Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Stack Widget not working inside GridView.builder()<p>I am trying to make the following design:</p> <p><a href="https://i.stack.imgur.com/snxef.png" rel="nofo...
71,975,888
Rollify Gem User has_many polls/roles and Poll has many answerers and only one admin<p>Trying to creating a poll app with a User has_many polls/roles but the Poll has many answerers and only one admin.</p> <p>user.rb</p> <pre><code>class User &lt; ApplicationRecord rolify has_many :polls, dependent: :destroy, throu...
<p>You have run into a classic missconception caused by confusing semantics of <code>belongs_to</code> vs <code>has_one</code>.</p> <p>A <code>belongs_to</code> places the foreign key column on <em>this</em> models table. When you use <code>belongs_to :admin</code> Rails assumes that the you have <code>polls.admin_id</...
Rollify Gem User has_many polls/roles and Poll has many answerers and only one admin
ruby-on-rails|rolify|ruby-on-rails-7
0
33
1
71,976,962
71,976,962
1
true
2022-04-23T00:29:49.487Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Rollify Gem User has_many polls/roles and Poll has many answerers and only one admin<p>Trying to creating a poll app with a User has_many polls/roles but the...
71,948,820
What is the difference in the user defined in Dockerfile and docker-compose file?<p>I have a Dockerfile as below:</p> <pre><code>FROM jenkins/jenkins:latest USER root RUN whoami USER jenkins RUN whoami </code></pre> <p>and this docker-compose file</p> <pre><code>version: '2' services: test: build: cont...
<p>The <code>user</code> config in the docker-compose file will overwrite the user used to execute the command in your container. If you omit it, it will use the last <code>USER</code> set in your Dockerfile. If you have neither, it should default to root.</p> <p>Note that your <code>whoami</code> commands are run at b...
What is the difference in the user defined in Dockerfile and docker-compose file?
docker|docker-compose|dockerfile
0
31
1
71,977,088
71,977,088
1
true
2022-04-21T04:04:41.217Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What is the difference in the user defined in Dockerfile and docker-compose file?<p>I have a Dockerfile as below:</p> <pre><code>FROM jenkins/jenkins:latest ...
71,977,274
DataFrame has two features how to add a row to split them<p>I have a DataFrame that contains a column called <code>feature</code> that can have more than one of them as illustrated in the image below <code>row 3 &amp; 4</code>. How do a add a row to the DataFrame that splits the two features: <a href="https://i.stack.i...
<p>You can try split the column value by <code>,</code> then explode on <code>feature</code> column.</p> <pre class="lang-py prettyprint-override"><code>df['feature'] = df['feature'].str.split(', ') # If there is not always a space after comma, use `apply` #df['feature'] = df['feature'].apply(lambda feature: list(map...
DataFrame has two features how to add a row to split them
python|pandas|dataframe
0
33
3
71,977,364
71,977,364
1
true
2022-04-23T06:03:33.420Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: DataFrame has two features how to add a row to split them<p>I have a DataFrame that contains a column called <code>feature</code> that can have more than one...
71,976,394
ignore classname in `naming-convention`<p>I am using tailwind and react, and eslint.</p> <p>I have the current configuration</p> <pre><code> &quot;@typescript-eslint/naming-convention&quot;: [ &quot;error&quot;, { &quot;selector&quot;: &quot;default&quot;, &quot;format...
<p>To ignore everything inside a <code>classNames</code> call, you’d need something similar to the <code>indent</code> rule’s <code>ignoredNodes</code> that has access to the AST but I couldn’t find a similar option for <code>@typescript-eslint/naming-convention</code>.</p> <p>A workaround would be to follow the docume...
ignore classname in `naming-convention`
typescript|eslint|typescript-eslint
0
289
1
71,977,463
71,977,463
1
true
2022-04-23T02:39:51.260Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: ignore classname in `naming-convention`<p>I am using tailwind and react, and eslint.</p> <p>I have the current configuration</p> <pre><code> &quot;@ty...
71,977,480
Sharing Xcode Project Manually and Data Security<p>I need to share my Xcode project manually with a customer support representative through email. My concern is that I do not know if my project contains any sensitive information that no third party should see.</p> <p>My credentials and provisioning profile are all set ...
<p>Your certificate and provisioning profiles are not stored in the directory of the project, they are stored on the keychain and in a separate folder, respectively. All that is stored in the project are the identifiers.</p> <p>Unless you have sensitive information in the source code, it is generally safe to share the ...
Sharing Xcode Project Manually and Data Security
ios|xcode|xcode13.3.1
0
35
1
71,977,499
71,977,499
1
true
2022-04-23T06:42:05.683Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Sharing Xcode Project Manually and Data Security<p>I need to share my Xcode project manually with a customer support representative through email. My concern...
71,970,507
Trying to get 'QS' frequency in pandas for a datetime64[ns] gives attribute error<p>I am working with an external data source and I am trying to get Quaterstart(QS) frequency for a particular data field. I am providing a dummy data and code below.</p> <pre><code>import pandas as pd df = pd.DataFrame(data=[['2022-01-01'...
<p>Your syntax is incorrect, try like this instead:</p> <pre class="lang-py prettyprint-override"><code>df[&quot;quater_open_dt&quot;] = df[&quot;open_dt&quot;].dt.to_period(&quot;Q&quot;).dt.start_time </code></pre> <pre class="lang-py prettyprint-override"><code>print(df) # Output open_dt d2 x quater_o...
Trying to get 'QS' frequency in pandas for a datetime64[ns] gives attribute error
python|pandas|dataframe|datetime|datetimeoffset
0
34
1
71,977,719
71,977,719
1
true
2022-04-22T14:36:44.090Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Trying to get 'QS' frequency in pandas for a datetime64[ns] gives attribute error<p>I am working with an external data source and I am trying to get Quaterst...
71,975,254
JPA query works in postgres but retuns some null fields in API<p>I have defined this function in my repository , it works fine in my database as I tested it and all the fields contains values.</p> <pre><code>@Query(value=&quot;SELECT employee_id,\n&quot; + &quot;SUM(january) as january,SUM(february) as febr...
<ol> <li><p>you have a typo in as septebmer</p> </li> <li><p>the December is missing at all</p> </li> </ol>
JPA query works in postgres but retuns some null fields in API
sql|postgresql|spring-boot|jpa
0
30
1
71,977,726
71,977,726
1
true
2022-04-22T22:26:20.403Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: JPA query works in postgres but retuns some null fields in API<p>I have defined this function in my repository , it works fine in my database as I tested it ...
71,979,191
Extracting positive elements with indices in Python<p>I have a matrix, <code>N</code>. I would like to extract positive elements with their indices. The desired output is attached.</p> <pre><code>import numpy as np from numpy import nan N=np.array([[ nan, 9.65984145e-08, nan, ...
<p>If we need them separately in two separate arrays, we can get values by Boolean mask <code>N &gt;= 0</code> and then by transposing <code>np.where</code> array as:</p> <pre><code>values = N[N &gt;= 0] # [9.65984145e-08 4.88443157e-09 1.46664353e-09 1.37404097e-08 6.18065590e-11 7.82145990e-10 3.98567195e-09 3.723900...
Extracting positive elements with indices in Python
python|numpy
0
26
2
71,979,296
71,979,296
1
true
2022-04-23T11:24:57.810Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Extracting positive elements with indices in Python<p>I have a matrix, <code>N</code>. I would like to extract positive elements with their indices. The desi...
71,979,569
process.on('unhandledRejection') is not logging error<p>In my server.js file i'm trying to log errors and not cause them to crash the app, this is the code im using</p> <pre><code>const server = app.listen(3000, () =&gt; console.log('Server Up and running') ); process.on('unhandledRejection', (err, promise) =&gt; ...
<p>I suppose you know <a href="https://stackoverflow.com/questions/55359658/uncaught-exception-and-unhandled-promise-rejections#:%7E:text=Uncaught%20Exception%20is%20when%20you,fail%20to%20catch%20a%20Promise.">the difference</a> between <code>Unhandled Rejection</code> and <code>Uncaught Exception</code>.</p> <blockqu...
process.on('unhandledRejection') is not logging error
node.js|express
0
263
1
71,979,672
71,979,672
1
true
2022-04-23T12:21:34.493Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: process.on('unhandledRejection') is not logging error<p>In my server.js file i'm trying to log errors and not cause them to crash the app, this is the code i...