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
72,241,123
How to create new dictionaries from nested dictionary?<p>I have a nested dictionary. How do I access them and get the result as follows:</p> <pre><code>dict_lbl = { &quot;lbl1&quot;:{&quot;name&quot;:&quot;label1&quot;,&quot;item1&quot;:&quot;Accounts&quot;, &quot;item2&quot;:&quot;kannagu&quot;, &quot;shortcu...
<p>You can do this in a single nested comprehension to produce a dict of dicts:</p> <pre><code>&gt;&gt;&gt; dict_lbl = { ... &quot;lbl1&quot;:{&quot;name&quot;:&quot;label1&quot;,&quot;item1&quot;:&quot;Accounts&quot;, &quot;item2&quot;:&quot;kannagu&quot;, &quot;shortcut&quot;:&quot;F1&quot;,&quot;printitem&q...
How to create new dictionaries from nested dictionary?
python|python-3.x
1
66
3
72,241,189
72,241,189
1
true
2022-05-14T14:28:20.970Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to create new dictionaries from nested dictionary?<p>I have a nested dictionary. How do I access them and get the result as follows:</p> <pre><code>dict_...
72,241,671
My reverse a string code includes a space at the end of the string<p>I am a beginner of Java, and would like to reverse the character order of a sentence when I input some words as command line arguments.</p> <p>Here is my code. When I input &quot;This is a pen.&quot;, the output should be &quot;.nep a si sihT&quot;. H...
<p>Avoid space at end by adding a if statement which skips last iteration</p> <pre class="lang-java prettyprint-override"><code>public class Reverse { public static void main(String[] args){ for(int i = args.length - 1; i &gt;= 0; i--){ for(int j = args[i].length() - 1; j &gt;= 0; j--){ ...
My reverse a string code includes a space at the end of the string
java
1
66
2
72,241,715
72,241,715
1
true
2022-05-14T15:31:40.067Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: My reverse a string code includes a space at the end of the string<p>I am a beginner of Java, and would like to reverse the character order of a sentence whe...
72,248,430
How to add a special condition for the last element of an array<p>According to the task description, the output should be a new array with all elements of array days that are larger than their previous and next elements (in increments of 1). For example, we have as input</p> <pre><code>[ ]int{3, 2, 4, 3, 7, 9} </code><...
<p>The reason <code>9</code> is populated multiple times is because you're using below <code>if</code> condition inside <code>for</code> loop. Put this <code>if</code> outside of your <code>for</code> loop, then you will get the desired output:</p> <pre><code>if days[len(days)-1] &gt; days[len(days)-2] { arr = ...
How to add a special condition for the last element of an array
arrays|go
1
66
2
72,248,712
72,248,712
1
true
2022-05-15T12:51:57.053Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to add a special condition for the last element of an array<p>According to the task description, the output should be a new array with all elements of ar...
72,250,832
How can one pipe the audio waveform image out of ffmpeg into an image display command/application?<p>These two commands, when used in succession, produce a .png file of the inputted audio waveform.</p> <pre><code>ffmpeg -i audioFile.mp3 -filter_complex &quot;showwavespic=s=640x120&quot; -frames:v 1 imageFile.png qlmana...
<p>To make FFmpeg to output its output to pipe, you need to instruct it explicitly like this:</p> <pre><code>ffmpeg -i audioFile.mp3 -filter_complex &quot;showwavespic=s=640x120&quot; \ -frames:v 1 -c:v png -f image2pipe - </code></pre> <p>Disclaimer: I do not know if <code>qlmanage</code> can accept the piped i...
How can one pipe the audio waveform image out of ffmpeg into an image display command/application?
macos|ffmpeg|pipe
-3
66
1
72,251,171
72,251,171
1
true
2022-05-15T17:52:27.500Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can one pipe the audio waveform image out of ffmpeg into an image display command/application?<p>These two commands, when used in succession, produce a ....
72,250,641
Edit Textbox not working (It is not taking the new data inserted and submitted)<p>I am working on a website where i have some textbox with ReadOnly value as false i.e. it is editable. On page load the original name(value) of the user is loaded from the database which he/she can change/update if there is some mistake in...
<p>Your page load event triggers EACH time.</p> <p>Remember, even for a simple button you place on the web page?</p> <p>EVERY button click, even auto post-back for a drop down list?</p> <p>The PAGE load event triggers first, and EVERY time, and EACH time.</p> <p>So, in your case page load triggers - you load up the tex...
Edit Textbox not working (It is not taking the new data inserted and submitted)
html|css|asp.net|backend
1
66
1
72,253,202
72,253,202
1
true
2022-05-15T17:31:43.320Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Edit Textbox not working (It is not taking the new data inserted and submitted)<p>I am working on a website where i have some textbox with ReadOnly value as ...
72,258,634
Do I need create new simple entity for query without join in jooq?<p>I have some entity that look like that:</p> <pre><code>data class ComplexEntity( private val id: UUID, private val srcSomethingId: UUID, private val dstSomethingId: UUID, private val creationDate: LocalDateTime, private val updatingDate...
<p>JPA entities are a way of modelling your data, similar to <code>CREATE TABLE</code> in SQL. If you normalise things reasonably, indeed, you don't have too many options, both in the form of SQL and in the form of JPA entities.</p> <p>But, for all the wrong reasons, people also <em>project</em> those entities all the ...
Do I need create new simple entity for query without join in jooq?
java|kotlin|jooq
1
66
1
72,264,059
72,264,059
1
true
2022-05-16T11:41:24.103Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Do I need create new simple entity for query without join in jooq?<p>I have some entity that look like that:</p> <pre><code>data class ComplexEntity( priv...
72,266,163
How to translate a column from english to french in a dataframe pandas<p>I want to translate a column [Month] that has values in English (&quot;January&quot;, &quot;February&quot;,&quot;March&quot;, etc) to French (&quot;Janvier&quot;, &quot;Février&quot;, &quot;Mars&quot;, etc) . How can I do that please? Thank You</p...
<p>In the benchmarks that I did in the past, <code>map</code> was quite fast, as it works in a single column. <a href="https://pandas.pydata.org/docs/reference/api/pandas.Series.map.html" rel="nofollow noreferrer">pandas.Series.map</a></p> <p>Something like <code>df['month_EN']=df['month'].map({'Janvier':'January',...}...
How to translate a column from english to french in a dataframe pandas
python|pandas|translate
0
66
2
72,266,228
72,266,228
1
true
2022-05-16T22:11:17.133Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to translate a column from english to french in a dataframe pandas<p>I want to translate a column [Month] that has values in English (&quot;January&quot;...
72,269,361
Trying to covert int array to List using Arrays.asList gives wrong value<p>So I am trying to convert an (primitive) int array to a List,</p> <pre><code> for(int i=0;i&lt;limit;i++) { arr[i]=sc.nextInt(); } List list=Arrays.asList(arr); System.out.print(list...
<p><code>Arrays.asList(arr)</code> does not creates a <code>List&lt;Integer&gt;</code> but a <code>List&lt;int[]&gt;</code> with a single element (your <code>arr</code>). You have to declare your variable as <code>Integer[] arr</code> if you have to use 'Arrays.asList'.</p>
Trying to covert int array to List using Arrays.asList gives wrong value
java
0
66
2
72,269,561
72,269,561
1
true
2022-05-17T06:54:07.417Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Trying to covert int array to List using Arrays.asList gives wrong value<p>So I am trying to convert an (primitive) int array to a List,</p> <pre><code> ...
72,257,524
How to add a column based on the table which the data come from in SSIS?<p>I have two source tables:</p> <ol> <li>Ext_Agreements</li> <li>ABS_Agreements</li> </ol> <p>both have the same columns : &quot;each table have different data this is just an example&quot;</p> <pre><code> ID, START_DATE, ...
<p>If you want to use SSIS, then...</p> <p>In data flow.</p> <p>Create a source based on:</p> <pre><code>select ID, START_DATE, END_DATE --, AGREEMENT_TYPE = 'EXT' from Ext_Agreements </code></pre> <p>Add a derived column and add:</p> <pre><code>AgreementType and set (DT_WSTR, 3) &quot;EXT&quot; </code></pre> <p>Do th...
How to add a column based on the table which the data come from in SSIS?
ssis|data-warehouse|sql-server-data-tools|ssis-2012|sql-data-warehouse
0
66
2
72,275,396
72,275,396
1
true
2022-05-16T10:09:54.930Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to add a column based on the table which the data come from in SSIS?<p>I have two source tables:</p> <ol> <li>Ext_Agreements</li> <li>ABS_Agreements</li>...
72,290,784
Clicking on a Card component should create a new route and display further information<p>I'm new to react-router v6</p> <p>I have 4 components, App, CardList, Card and CardInfo. There is data (an array of objects, each object represents a movie) coming from an API that gets saved in App.js with useState hook.</p> <p>Wi...
<p>your code structure is correct. You just need to use<code>Link</code>, you don't need en external <code>Route</code> component for every card you map. Here is a link for further information. Hope you find it helpful. <a href="https://stackoverflow.com/a/57059249/17715977">https://stackoverflow.com/a/57059249/1771597...
Clicking on a Card component should create a new route and display further information
reactjs|react-router|react-router-dom
1
66
1
72,290,937
72,290,937
1
true
2022-05-18T14:11:51.037Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Clicking on a Card component should create a new route and display further information<p>I'm new to react-router v6</p> <p>I have 4 components, App, CardList...
72,278,635
How to display localStorage value in a table header?<p>I have the following js function that is used to get the saved value of an input field:</p> <pre><code>function getSavedValue(e) { if (!localStorage.getItem(e)) { return &quot;&quot;; } return localStorage.getItem(e); } </code></pre> <p>The foll...
<blockquote> <p>How can I use this function to grab the paymentMonth value and display it in a table column header?: You can try to add an id to the <code>&lt;th&gt;&lt;/th&gt;</code>:</p> </blockquote> <pre><code>&lt;th id=&quot;monthHR_PaymentMonth&quot;&gt;&lt;/th&gt; </code></pre> <p>and then use the following code...
How to display localStorage value in a table header?
javascript|asp.net-core|razor|local-storage|tableheader
0
66
3
72,299,216
72,299,216
1
true
2022-05-17T17:56:23.153Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to display localStorage value in a table header?<p>I have the following js function that is used to get the saved value of an input field:</p> <pre><code...
72,303,175
How to remove empty objects from object by comparing with another object<p>I want to remove all empty objects from another object by comparing it with another. Example of this would be:</p> <p>We have default object like:</p> <pre><code>defaultObj = { a: {}, b: {}, c: { d: {} } }; </code></pre> <p>And targe...
<p>Here is a solution that you can use which recursively iterates an object and removes the empty properties as defined in your use case. Make sure to create a deep copy of the object first (as shown in the example) so that the original does not get manipulated:</p> <p><div class="snippet" data-lang="js" data-hide="fal...
How to remove empty objects from object by comparing with another object
javascript|typescript
0
66
1
72,303,460
72,303,460
1
true
2022-05-19T10:47:16.143Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to remove empty objects from object by comparing with another object<p>I want to remove all empty objects from another object by comparing it with anothe...
72,312,527
How to create a python decorator whose args are the decorated function plus any arbitrary argument(s)<p>I've created decorators that wrap functions before, but in this instance, I don't need to wrap, so I'm guessing I'm using the wrong paradigm, so maybe somebody can help me figure this out and solve my ultimate goal.<...
<p>You need to make a decorator factory. That is, a function you call with arguments that returns a decorator function that gets passed the function to be decorated.</p> <p>A typical way to do that is with nested functions. A function defined within another function can access the variables in the enclosing function's ...
How to create a python decorator whose args are the decorated function plus any arbitrary argument(s)
python|decorator
0
66
1
72,312,652
72,312,652
1
true
2022-05-20T01:02:28.007Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to create a python decorator whose args are the decorated function plus any arbitrary argument(s)<p>I've created decorators that wrap functions before, b...
72,314,175
How to update oracle list column with sequence number<p>Hi I have the oracle data table like that</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th style="text-align: left;">seq_no</th> <th style="text-align: center;">name</th> <th style="text-align: right;">place</th> </tr> </thead> <tbody> ...
<p>If you have a table:</p> <pre class="lang-sql prettyprint-override"><code>CREATE TABLE table_name (seq_no, name, place) AS SELECT 1, 'Rian', 'Us' FROM DUAL UNION ALL SELECT 1, 'Moli', 'Us' FROM DUAL UNION ALL SELECT 1, 'Molina', 'Us' FROM DUAL; </code></pre> <p>and a sequence:</p> <pre class="lang-sql prettyprin...
How to update oracle list column with sequence number
sql|oracle|oracle11g
0
66
2
72,315,905
72,315,905
1
true
2022-05-20T05:58:07.783Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to update oracle list column with sequence number<p>Hi I have the oracle data table like that</p> <div class="s-table-container"> <table class="s-table">...
72,317,275
Mock testing with nested function changes<p>I am adding testing to a pipeline project, code is already written and in production so it cannot be changed to accommodate the tests.</p> <p>In simplest terms, if I have a function like so:</p> <pre><code>def other_foo(): return 1 def foo(): res = other_foo() re...
<p>Use the <code>patch</code> decorator from <code>unitest.mock</code> and patch your module local variable.</p> <pre class="lang-py prettyprint-override"><code>from your.module import foo from unitest.mock import patch @patch('your.module.other_foo') def test_foo(mock_other_foo): mock_other_foo.return_value = 3 ...
Mock testing with nested function changes
python|unit-testing|mocking
1
66
1
72,317,435
72,317,435
1
true
2022-05-20T10:20:25.163Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Mock testing with nested function changes<p>I am adding testing to a pipeline project, code is already written and in production so it cannot be changed to a...
72,316,764
Web font support in MudBlazor<p>I have some adobe web fonts provided by a stylesheet link and I want to add these fonts to a MudTheme so I can use them in my web app.</p> <pre><code>&lt;--link rel=&quot;stylesheet&quot; href=&quot;https://use.typekit.net/gbt1fwk.css&quot;--&gt; </code></pre> <p>Any ideas how to do that...
<p>You can use <code>Style</code> and set <code>font-family</code>. For example:</p> <pre><code>&lt;MudText Typo=&quot;Typo.h3&quot; GutterBottom=&quot;true&quot; Style=&quot;font-family: aktiv-grotesk-extended&quot;&gt;Hello, world!&lt;/MudText&gt; </code></pre>
Web font support in MudBlazor
mudblazor
1
66
1
72,318,221
72,318,221
1
true
2022-05-20T09:41:17.047Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Web font support in MudBlazor<p>I have some adobe web fonts provided by a stylesheet link and I want to add these fonts to a MudTheme so I can use them in my...
72,324,842
Is there a way to run a Java Program when you don't know its name?<p>I'm making a game engine using LWJGL. The developer using it has to be able to use scripts. I decided to just make them use Java because writing an API in another language wasn't something I'm going to have the time nor experience to do. Anyways, I wo...
<p>I dont know If I understood the problem, but I have focused on part of having &quot;script name stored as variable&quot; which sounds to me like a method name. You can invoke method by its name using reflections</p> <pre><code>public class MCAlu { public static void main(String[] args) throws NoSuchMethodExcepti...
Is there a way to run a Java Program when you don't know its name?
java|lwjgl
0
66
2
72,324,950
72,324,950
1
true
2022-05-20T21:15:29.253Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is there a way to run a Java Program when you don't know its name?<p>I'm making a game engine using LWJGL. The developer using it has to be able to use scrip...
72,327,697
How should I map over two arrays without ruining the order of rendered items?<p>I'm trying to create a chat-bot with some additional features like sending and receiving voice audio. I used two different array states for rendering the text messages and audio messages. In the render section, I map over these arrays separ...
<p>It's either sorting (constraints: ~nlogn complexity for each render, need timestamps), or putting them together into the same state array i.e.</p> <pre class="lang-js prettyprint-override"><code>const [allMessages, setAllMessages] = useState([]); ... setAllMessages([...allMessages, {type: &quot;audio&quot;, item: ...
How should I map over two arrays without ruining the order of rendered items?
javascript|arrays|reactjs|json
1
66
2
72,327,861
72,327,861
1
true
2022-05-21T07:54:55.750Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How should I map over two arrays without ruining the order of rendered items?<p>I'm trying to create a chat-bot with some additional features like sending an...
72,330,868
Get only undefined value from my global variable configured with Context<p>I have an React Native app with two pages. On the first page I have a picker from which I need the data from in the second page. I try to use Context for making sate globally available but I didn't get it to work till now because I only get unde...
<p>You also need to define context provider and wrap your app into it.</p> <pre><code>export const RoundContextProvider = ({children}) =&gt; { const stateTuple = useState(false); return &lt;RoundContext.Provider value={stateTuple}&gt;{children}&lt;/RoundContext.Provider&gt;; } </code></pre> <pre><code>&lt;RoundCont...
Get only undefined value from my global variable configured with Context
javascript|reactjs|react-native
1
66
2
72,330,912
72,330,912
1
true
2022-05-21T15:21:08.173Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Get only undefined value from my global variable configured with Context<p>I have an React Native app with two pages. On the first page I have a picker from ...
72,343,431
MySQL count multiple GroupBy<p>I have data like this</p> <pre><code>id otherid name 1 123 banana 2 123 banana 3 123 banana 4 456 grape 5 456 grape 6 789 orange 7 111 banana </code></pre> <p>How can I get output like this: (with MySQL query)</p> <pre><code>name count ban...
<p>Try this:</p> <pre><code>SELECT f.`name`, COUNT(DISTINCT (f.`otherid`)) FROM `fruits` f GROUP BY f.`name` </code></pre>
MySQL count multiple GroupBy
mysql|sql
0
66
4
72,343,736
72,343,736
1
true
2022-05-23T04:59:26.750Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: MySQL count multiple GroupBy<p>I have data like this</p> <pre><code>id otherid name 1 123 banana 2 123 banana 3 123 banana 4 456 ...
72,301,867
Metricbeat doesn't send data to Graylog sidecar<p>I was trying to configure Metricbeat to Graylog sidecar, and it successed. It connects to sidecar but doesn't send any data. How I can fix it?</p> <p>this is my config file</p> <pre class="lang-yaml prettyprint-override"><code># Needed for Graylog fields_under_root: tru...
<p>You need to configure the output. It should point to the Graylog server. Sidecar is just a configuration management tool. You don't send the logs through it, you send them to a beats input on the Graylog server.</p>
Metricbeat doesn't send data to Graylog sidecar
logging|graylog|metricbeat|sidecar|graylog3
0
66
1
72,349,825
72,349,825
1
true
2022-05-19T09:18:48.320Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Metricbeat doesn't send data to Graylog sidecar<p>I was trying to configure Metricbeat to Graylog sidecar, and it successed. It connects to sidecar but doesn...
72,355,572
python download/scrape ssrn papers from list of urls<p>I have a bunch of links that are the exact same except for the id at the end. All I want to do is loop through each link and download the paper as a PDF using the download as PDF button. In an ideal world, the filename would be the title of the paper but if that is...
<p>Try:</p> <pre class="lang-py prettyprint-override"><code>import requests from bs4 import BeautifulSoup urls = [ &quot;https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3860262&quot;, &quot;https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2521007&quot;, &quot;https://papers.ssrn.com/sol3/papers.cfm?...
python download/scrape ssrn papers from list of urls
python|web-scraping
1
66
1
72,355,655
72,355,655
1
true
2022-05-23T22:55:37.437Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: python download/scrape ssrn papers from list of urls<p>I have a bunch of links that are the exact same except for the id at the end. All I want to do is loop...
72,356,504
Overriding "constants" from parent class python<p>I have a simple inheritance setup as follows:</p> <pre><code>class A: CONST_VAR = &quot;aaa&quot; # more code where CONST_VAR does not change # ... class B(A): CONST_VAR = &quot;bbb&quot; # more code where CONST_VAR does not change # ... </code>...
<p>I believe <a href="https://peps.python.org/pep-0008/" rel="nofollow noreferrer">PEP8</a> recommends using capital case for constants, but I usually interpret this as &quot;module-level constants&quot;.</p> <p>On the other hand, this is a class variable and PEP8 doesn't specify the naming for class variables.</p> <p>...
Overriding "constants" from parent class python
python|inheritance|constants|conventions
-1
66
3
72,356,563
72,356,563
1
true
2022-05-24T02:11:33.200Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Overriding "constants" from parent class python<p>I have a simple inheritance setup as follows:</p> <pre><code>class A: CONST_VAR = &quot;aaa&quot; #...
72,369,644
Can Azure Containers use vTPM, Secure Boot and Attestation Mechanisms or is a VM necessary?<p>One of the benefits of containers is to reduce the overhead of creating a hypervisor and VM.</p> <p>Azure supports a virtual Trusted Platform Module (vTPM) per <a href="https://docs.microsoft.com/en-us/azure/virtual-machines/g...
<p>No unfortunately.</p> <p>Use of a vTPM for measured / trusted boot and run time attestation on a virtual machine is possible due to the isolation it has from the host OS. When you watch the boot of a vm, you can see it has its own bootloader and runs seperate from host via a hypervisor. A container on the other hand...
Can Azure Containers use vTPM, Secure Boot and Attestation Mechanisms or is a VM necessary?
azure|containers|tpm
0
66
1
72,373,059
72,373,059
1
true
2022-05-24T21:26:12.690Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can Azure Containers use vTPM, Secure Boot and Attestation Mechanisms or is a VM necessary?<p>One of the benefits of containers is to reduce the overhead of ...
72,372,647
matplotlib.pyplot.tripcolor how to fill triangles with random RGB colors?<p>Say I have a bunch of triangles, I know how to draw them using <code>matplotlib.pyplot.tripcolor</code>, I want to know how to fill the individual triangles with completely random RGB colors from the entire RGB color space (all 16777216 colors)...
<p>It's probably easiest to avoid using <code>tripcolor</code> alltogether, unless you need some of it's specific functionality? You can create your own <code>PolyCollection</code> from the Delauny triangulation, which is a lot more flexible regarding formatting.</p> <pre class="lang-py prettyprint-override"><code>from...
matplotlib.pyplot.tripcolor how to fill triangles with random RGB colors?
python|python-3.x|matplotlib
0
66
2
72,374,638
72,374,638
1
true
2022-05-25T06:05:17.017Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: matplotlib.pyplot.tripcolor how to fill triangles with random RGB colors?<p>Say I have a bunch of triangles, I know how to draw them using <code>matplotlib.p...
72,376,371
Bash script that allows one word as user input<p>Made a script that the user gives a &quot;parameter&quot; and it prints out if it is a file, directory or non of them. This is it :</p> <pre><code> #!/bin/bash read parametros for filename in * do if [ -f &quot;$parametros&quot; ]; then echo &quot;$parametros is a...
<pre><code>#!/bin/bash read parametros if [[ &quot;$parametros&quot; = *[[:space:]]* ]] then echo &quot;wrong input&quot; elif [[ -f &quot;$parametros&quot; ]] then echo &quot;$parametros is a file&quot; elif [[ -d &quot;$parametros&quot; ]] then echo &quot;$parametros is a directory&quot; else echo &quot; Ther...
Bash script that allows one word as user input
linux|bash
0
66
3
72,378,272
72,378,272
1
true
2022-05-25T10:58:49.643Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Bash script that allows one word as user input<p>Made a script that the user gives a &quot;parameter&quot; and it prints out if it is a file, directory or no...
72,799,789
How to map an array of objects in react?<p>I have an array of currencies that I'd like to map out. But I'm not sure how? My app crashes with the code I wrote and returns an empty page with an error: <code>currencyList.map is not a function</code></p> <p>This is what I get when I console.log the fetched data:</p> <pre><...
<p>If you want to get the values,</p> <pre class="lang-js prettyprint-override"><code>Object.values(currencyList) // You can save Object.values(res?.data?.results || {}) into the currencyList too, // e.g. setCurrencyList(Object.values(res?.data?.results || {}) </code></pre> <p>then it will become an array with all th...
How to map an array of objects in react?
javascript|reactjs
0
66
2
72,799,984
72,799,984
1
true
2022-06-29T10:25:10.350Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to map an array of objects in react?<p>I have an array of currencies that I'd like to map out. But I'm not sure how? My app crashes with the code I wrote...
72,801,070
API give data NULL in first Load<p>I get the data from API and when API calls on the first load of the screen so API gets the data but in response, the data shows the null value, and when I click on hot reload it response shows data from API. I don't know what happens with API or response. Please someone help me to und...
<p>It also looks like you are calling initState in your build method. You have to move it out of build method as it is a separate override method.</p>
API give data NULL in first Load
json|flutter|api|flutter-dependencies|flutter-http
0
66
2
72,801,410
72,801,410
1
true
2022-06-29T11:59:32.457Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: API give data NULL in first Load<p>I get the data from API and when API calls on the first load of the screen so API gets the data but in response, the data ...
72,802,799
Is there a way to declare an array variable which accepts a cursor ROWTYPE as its datatype in Postgres?<p>I am facing a problem in PL/pgSQL while trying to convert some procedures from Oracle to Postgres RDBMS. At the original procedure in PL/SQL, one of these procedures has declared within the DECLARE clause: a bounde...
<p>Postgres does not have table variables - and no <code>BULK COLLECT</code> for <a href="https://www.postgresql.org/docs/current/plpgsql-cursors.html" rel="nofollow noreferrer">cursors in PL/pgSQL</a>. You might work with <a href="https://www.postgresql.org/docs/current/sql-createtable.html#id-1.9.3.85.9.3" rel="nofol...
Is there a way to declare an array variable which accepts a cursor ROWTYPE as its datatype in Postgres?
sql|postgresql|oracle|plsql|plpgsql
0
66
1
72,805,847
72,805,847
1
true
2022-06-29T14:07:56.160Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is there a way to declare an array variable which accepts a cursor ROWTYPE as its datatype in Postgres?<p>I am facing a problem in PL/pgSQL while trying to c...
72,806,126
@click ternary operations in Vue.js<p>I'm trying to do the following but it keeps returning <code>[plugin:vite:vue] Unexpected token (1:27)</code> error in Vue.js:</p> <p><code>@click=&quot;selectedFiles.push(file.id); selectedFiles.length &lt; 1 ? isCollapse=false: isCollapse=true&quot;</code></p> <p>Basically when th...
<p>You can actually avoid the ternary entirely.</p> <pre class="lang-js prettyprint-override"><code>isCollapse = selectedFiles.length &gt;= 1 </code></pre> <p>As far as ternary syntax goes spaces on either side of the colon are important.</p> <pre class="lang-js prettyprint-override"><code>selectedFiles.length &lt; 1 ?...
@click ternary operations in Vue.js
javascript|vue.js|vuejs3|vite
0
66
2
72,806,294
72,806,294
1
true
2022-06-29T18:19:23.420Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: @click ternary operations in Vue.js<p>I'm trying to do the following but it keeps returning <code>[plugin:vite:vue] Unexpected token (1:27)</code> error in V...
72,806,527
Plotly: Is there a way to choose which color line takes precedence in a stacked bar chart?<p>I am producing horizontal stacked bar charts via plotly graph objects in python, and have one issue that I can not figure out:</p> <p>The lines at the right side of the positive bar are overridden by a negative line, even when ...
<p>If instead of <code>0</code> you write <code>float('nan')</code> (or <code>math.nan</code> after importing <code>math</code>) you will not get a red line. I've adjusted this for the negative value of &quot;Information&quot; only to demonstrate:</p> <pre class="lang-py prettyprint-override"><code>import plotly.graph_...
Plotly: Is there a way to choose which color line takes precedence in a stacked bar chart?
python|plotly|data-visualization|bar-chart|plotly-python
2
66
1
72,809,413
72,809,413
1
true
2022-06-29T18:59:45.307Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Plotly: Is there a way to choose which color line takes precedence in a stacked bar chart?<p>I am producing horizontal stacked bar charts via plotly graph ob...
72,802,732
Converting a CSR in DER format to PEM format without a private key<p>I have a CSR that I obtained from Okta. Unfortunately, Okta provides the CSR in DER format. I don't have the private key used to generate this CSR, so how would I convert it to PEM format?</p> <p>Is this possible at all?</p>
<p>Yes, you can use OpenSSL to convert the DER formatted CSR to PEM format.</p> <p>To do so, here's an example command-line:</p> <pre><code>openssl req -inform DER -outform PEM -in CSR.der -out CSR.pem </code></pre>
Converting a CSR in DER format to PEM format without a private key
openssl|csr
0
66
1
72,817,070
72,817,070
1
true
2022-06-29T14:02:33.577Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Converting a CSR in DER format to PEM format without a private key<p>I have a CSR that I obtained from Okta. Unfortunately, Okta provides the CSR in DER form...
72,815,637
SVF2 format retrieves missing or incorrect data from Model Derivative on IFC and RVT<p>This question is connected another issue which I've posted before here: <a href="https://stackoverflow.com/questions/72775683/forge-viewer-shows-different-data-from-model-derivative-data-on-ifc-file">Inconsistent data</a>.</p> <p>Whe...
<p>Actually I don't think it's &quot;wrong datas&quot;. With SVF2, the metadata endpoint will provide SVF2 data according to this <a href="https://forge.autodesk.com/blog/model-derivative-svf2-enhancements-part-2-metadata" rel="nofollow noreferrer">SVF2 Metadata</a></p> <p>So I guess it's normal you have some differenc...
SVF2 format retrieves missing or incorrect data from Model Derivative on IFC and RVT
autodesk-forge|autodesk-viewer|autodesk-model-derivative
0
66
1
72,817,870
72,817,870
1
true
2022-06-30T12:14:12.857Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: SVF2 format retrieves missing or incorrect data from Model Derivative on IFC and RVT<p>This question is connected another issue which I've posted before here...
72,822,745
Flink - How to pass custom parameter when submitting Flink job through REST API<p>I need to provide a decrypted password in a Flink job to connect it to redis. But the redis password can only be decrypted on a local machine. So my plan is to decrypt it locally first and then try to pass it to Flink when submitting the ...
<p>They are Java program arguments:</p> <pre><code>public static void main (String[] args) { } </code></pre> <p>You'll have them in the <code>args</code> array. The documentation mentions it in here: <a href="https://nightlies.apache.org/flink/flink-docs-stable/docs/dev/datastream/application_parameters/#from-the-comm...
Flink - How to pass custom parameter when submitting Flink job through REST API
apache-flink|flink-streaming
0
66
1
72,825,392
72,825,392
1
true
2022-06-30T22:45:50.877Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Flink - How to pass custom parameter when submitting Flink job through REST API<p>I need to provide a decrypted password in a Flink job to connect it to redi...
72,817,616
WPF changing Button background temporarily on Click<p>I have a white XAML button in my program, that when I click it should change it's background color to green and then back to white (as a confirmation of it being clicked). I already tried <a href="https://stackoverflow.com/questions/36774397/wpf-button-change-backgr...
<p>You should set the <code>Background</code> property of the <code>Border</code> element in your trigger:</p> <pre><code>&lt;Trigger Property=&quot;IsPressed&quot; Value=&quot;true&quot;&gt; &lt;Setter TargetName=&quot;border&quot; Property=&quot;Background&quot; Value=&quot;Green&quot; /&gt; &lt;/Trigger&gt; </co...
WPF changing Button background temporarily on Click
wpf|xaml|button
1
66
1
72,828,785
72,828,785
1
true
2022-06-30T14:31:20.513Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: WPF changing Button background temporarily on Click<p>I have a white XAML button in my program, that when I click it should change it's background color to g...
72,825,259
session.subscribe throws error when called in onMount<pre><code>&lt;script&gt; import {onMount} from 'svelte'; import {session} from &quot;$app/stores&quot; import {writable} from 'svelte/store'; const store = writable('some value'); let value = null onMount(() =&gt; { // this works // return sto...
<h2>What goes wrong</h2> <p>It seems that you are actually experiencing intended behaviour. Under the <a href="https://kit.svelte.dev/docs/modules#$app-stores" rel="nofollow noreferrer">documentation</a> for <code>$app/stores</code> you will find this:</p> <blockquote> <p>Stores are contextual — they are added to the c...
session.subscribe throws error when called in onMount
sveltekit
0
66
1
72,832,259
72,832,259
1
true
2022-07-01T06:39:20.257Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: session.subscribe throws error when called in onMount<pre><code>&lt;script&gt; import {onMount} from 'svelte'; import {session} from &quot;$app/stores&q...
72,834,275
Using awkward-array with zip/unzip with two different physics objects<p>I'm trying to reproduce parts of the Higgs discovery in the Higgs --&gt; 4 leptons channel with open data and making use of <code>awkward</code>. I can do it when the leptons are the same (e.g. 4 muons) with zip/unzip, but is there a way to do it i...
<p>This could be answered in a variety of ways:</p> <ul> <li>make a union array (mixed data types) of electrons and muons</li> <li>make an array of electrons and muons that are the same type, but have a flag to indicate flavor (electron vs muon)</li> <li>use <a href="https://awkward-array.readthedocs.io/en/latest/_auto...
Using awkward-array with zip/unzip with two different physics objects
python|awkward-array
1
66
1
72,834,871
72,834,871
1
true
2022-07-01T20:19:55.650Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Using awkward-array with zip/unzip with two different physics objects<p>I'm trying to reproduce parts of the Higgs discovery in the Higgs --&gt; 4 leptons ch...
72,836,419
Change Notifier Provider with async function<p>I'm trying to use provider with an async function where I'm changing a value of variable and as soon as the value changes, I want all listeners to be notified.</p> <p>I'm sending a post request and waiting for response in the below async function. I'm waiting for the respo...
<p>A new provider is created in every rebuild</p> <pre><code> body: ChangeNotifierProvider( create: (context) =&gt; UserLoginProvider(), </code></pre> <p>Use the one in the state</p> <pre><code> body: ChangeNotifierProvider( create: (context) =&gt; userLoginProvider, </code></pre>
Change Notifier Provider with async function
flutter|dart
0
66
2
72,836,825
72,836,825
1
true
2022-07-02T04:22:22.460Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Change Notifier Provider with async function<p>I'm trying to use provider with an async function where I'm changing a value of variable and as soon as the va...
72,837,173
Advance timer with batch script<p>I want to make a timer with counts back wards and has three digits.</p> <p>e.g.: (101, 100, 099, 098 . . . , 011, 010, 009, 008, . . . ,002, 001)</p> <p>When the Timer comes to <strong>099</strong> it outputs <strong>98</strong> next instead of <strong>098</strong> and so on. e.g. : <s...
<p><code>set</code> has some substring processing. For example you can echo just the last <code>&lt;n&gt;</code> characters of a string. Using this makes your loop quite trivial. Just add 1000 to the start value and stop when it reaches 1000 instead of 0:</p> <pre><code>@echo off setlocal set sec=1103 :loop echo %sec:...
Advance timer with batch script
batch-file|cmd
0
66
2
72,837,580
72,837,580
1
true
2022-07-02T07:11:26.310Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Advance timer with batch script<p>I want to make a timer with counts back wards and has three digits.</p> <p>e.g.: (101, 100, 099, 098 . . . , 011, 010, 009,...
72,789,266
Arduino PyFirmata: WriteFile failed (PermissionError(13, 'Access is denied.', None, 5)) only when servo motor is connected<p>I have no idea why this is happening but I'll try to explain it as best I can, also sorry if this is a question that's been asked before, I looked around but couldn't really find anything related...
<p>Ok, got it working, this is still so weird.</p> <p>I just bought and tried a different Arduino Nano and everything worked perfectly for whatever reason. The original Nano still works perfectly as long as its not being used with a servo? I have no clue why.</p> <p>Anyways, if you have this issue, just switch out your...
Arduino PyFirmata: WriteFile failed (PermissionError(13, 'Access is denied.', None, 5)) only when servo motor is connected
python|arduino|servo|pyfirmata
0
66
1
72,842,924
72,842,924
1
true
2022-06-28T15:27:42.037Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Arduino PyFirmata: WriteFile failed (PermissionError(13, 'Access is denied.', None, 5)) only when servo motor is connected<p>I have no idea why this is happe...
72,846,284
Error java.util.NoSuchElementException in java<p>I am implementing a program which calculate the area and perimeter of a circle and a rectangle. The radius (of circle), width, height (of rectangle) get from user. The problem is: after I type in the radius parameter, the console pop out the message:</p> <blockquote> <p>...
<ol> <li>Your Scanner should be in the main class and be static you only use one and no need more.</li> <li>Circle and Rectangle have some base methodes which should be outsorced so use an interface or in this case better a abstract class like Geoform as Superclass.</li> <li>And don't close the scanner, it is simply no...
Error java.util.NoSuchElementException in java
java|java.util.scanner
0
66
2
72,847,090
72,847,090
1
true
2022-07-03T11:54:13.340Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Error java.util.NoSuchElementException in java<p>I am implementing a program which calculate the area and perimeter of a circle and a rectangle. The radius (...
72,846,372
Flutter - How to add element inside nested Map?<p>I want to add elements in a map which is already a value of a key inside another Map. I need to add element inside <strong>answers</strong> map.</p> <pre><code>Map myMap = { 'name' : 'Tom', 'answers' : { 1 : 'correct', 2 : 'wrong' } } </code></pre> <p>I hav...
<p>You have to add <code>cast</code> as shown below:</p> <pre><code>(myMap['answers'] as Map).addIf(condition, element, 'correct') </code></pre>
Flutter - How to add element inside nested Map?
flutter|dart
-1
66
1
72,847,147
72,847,147
1
true
2022-07-03T12:08:17.027Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Flutter - How to add element inside nested Map?<p>I want to add elements in a map which is already a value of a key inside another Map. I need to add element...
72,790,532
How to access an item endpoint without login token in apiato php?<p>I have been working on invoice system which I need to add each invoice with a QR generated by a system which when we print invoice as hard copy we can just scan the QR and access the preview page of that invoice (id). I am using apiato and every time I...
<pre><code>Ex: Route::get('invoices', [Controller::class, 'getAllInvoices']) -&gt;name('') -&gt;middleware(['auth:api']); just delete -&gt;middleware(['auth:api']); Route::get('invoices', [Controller::class, 'getAllInvoices']) -&gt;name(''); </code></pre>
How to access an item endpoint without login token in apiato php?
php|laravel|qr-code|apiato
1
66
2
72,852,984
72,852,984
1
true
2022-06-28T17:00:35.190Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to access an item endpoint without login token in apiato php?<p>I have been working on invoice system which I need to add each invoice with a QR generate...
72,771,657
Java SpringBoot: CRUD method returns value before called Service finishes<p>I have several Items that are linked together in ManyToMany relations like this:</p> <p>In Technologies:</p> <pre><code> @ManyToMany(mappedBy = &quot;internalTechnologies&quot;) private List&lt;Project&gt; internalProjects = new ArrayList&lt...
<p>For who ever reads this: I did solve the issue by not solving it:</p> <p>Instead of using the &quot;mappedBy&quot; of the bi-directional relationship, I changed the relationship to be two one-directional manyToMany relations.</p> <p>I then changed the Services to update the corresponding items to contain the link.</...
Java SpringBoot: CRUD method returns value before called Service finishes
java|spring-boot
0
66
1
72,860,372
72,860,372
1
true
2022-06-27T11:54:04.433Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Java SpringBoot: CRUD method returns value before called Service finishes<p>I have several Items that are linked together in ManyToMany relations like this:<...
72,866,431
In Dynamics NAV, what are the variables text@digits in C/AL?<p>I am new to Dynamics Navision, I have not been able to find and answer via web search. In the following few line of C/AL code, could someone please tell me what do <code>@10000000</code>, <code>@10002000</code>, <code>Text[512]</code> and <code>Codeunit 500...
<p>Abc is a variable of type text (same as string) with maximum length of 512 symbols</p> <p>Def is the variable of type Codeunit (same as module or class). It is more like an inatance of the class. 50000 is the unique number of the codeunit object, this is how Nav refers to object.</p> <p>Numbers after @ is internal t...
In Dynamics NAV, what are the variables text@digits in C/AL?
microsoft-dynamics|navision|dynamics-nav
0
66
1
72,867,439
72,867,439
1
true
2022-07-05T08:41:03.273Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: In Dynamics NAV, what are the variables text@digits in C/AL?<p>I am new to Dynamics Navision, I have not been able to find and answer via web search. In the ...
72,871,341
How to get ValidFrom and ValidTo columns from temporal tables in Entity Framework Core?<p>Is there a way to get to ValidFrom and ValidTo columns in temporal tables in EFCore in C#?</p> <p>This is how I initialized temporal table</p> <pre><code>protected override void OnModelCreating(ModelBuilder modelBuilder) {...
<p>The <code>ValidFrom</code> and <code>ValidTo</code> columns aren't part of your model, they are only available as <a href="https://docs.microsoft.com/en-gb/ef/core/modeling/shadow-properties" rel="nofollow noreferrer">shadow properties</a> so if you want to read them, you need to use an anonymous type or, better, a ...
How to get ValidFrom and ValidTo columns from temporal tables in Entity Framework Core?
c#|entity-framework-core|temporal-tables
2
66
1
72,871,695
72,871,695
1
true
2022-07-05T14:43:40.380Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to get ValidFrom and ValidTo columns from temporal tables in Entity Framework Core?<p>Is there a way to get to ValidFrom and ValidTo columns in temporal ...
72,883,076
Not allow same email to register multiple times<p>I would like my newsletter signup to only allow diffrent emails to signup and not allow the same email to sign up multiple times with a message email is allready in use. I cant seem to figure it out any help would be appreciated. The code is below i added the code i tho...
<p>For whatever field you want it to be duplicated you can use <code>unique=True</code> in the definition of the field. Your models has to define something like the following.</p> <pre><code>from django.db import models class Subscriber(models.Model): email = models.EmailField(max_length=255, unique=True) date...
Not allow same email to register multiple times
python|django|django-templates
1
66
3
72,883,762
72,883,762
1
true
2022-07-06T11:47:45.703Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Not allow same email to register multiple times<p>I would like my newsletter signup to only allow diffrent emails to signup and not allow the same email to s...
72,892,645
Perl - transforming one data structure into another<p>I'm trying to convert one data structure into another, using Perl.</p> <pre><code>my $agent_details = $dbh-&gt;selectall_arrayref( &quot;SELECT agent_id, year, type FROM agents ORDER BY agent_id&quot;, { Slice =&gt; {} } ); </code></pre> <p>I end up with the...
<pre><code>my %agents_by_year; for $agent ( @$agents ) { push @{ $agents_by_year{ $agent-&gt;{ year } } }, $agent-&gt;{ agent_id }; } </code></pre>
Perl - transforming one data structure into another
perl|data-structures
-3
66
1
72,892,738
72,892,738
1
true
2022-07-07T05:23:11.823Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Perl - transforming one data structure into another<p>I'm trying to convert one data structure into another, using Perl.</p> <pre><code>my $agent_details = $...
72,893,701
How to check if Azure Service bus in another region is working using Azure Functions?<p>I'm creating a ping function using azure functions that needs to check if a service bus in another region is operating so it can update the status of the whole system (two regions). What is the best way to check the status of the ot...
<p><a href="https://docs.microsoft.com/en-us/dotnet/api/azure.messaging.servicebus.administration.servicebusadministrationclient?view=azure-dotnet" rel="nofollow noreferrer">ServiceBusAdministrationClient</a> from Package 'Azure.Messaging.ServiceBus v7.8.1' can be used.</p> <p><a href="https://docs.microsoft.com/en-us/...
How to check if Azure Service bus in another region is working using Azure Functions?
azure|azureservicebus|azure-monitoring
1
66
1
72,894,098
72,894,098
1
true
2022-07-07T07:17:00.110Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to check if Azure Service bus in another region is working using Azure Functions?<p>I'm creating a ping function using azure functions that needs to chec...
72,894,055
Method to quantize a range of values to keep precision when signficant outliers are present in the data<p>Could you tell me please if there is a suitable quantizing method in the following case (preferrably implemented in python)?</p> <p>There is an input range where majority of values are within +-2 std from mean, whi...
<p>I can think of 2 answers to your question.</p> <ol> <li>You write &quot;huge outlier&quot;. The term outlier suggest that this number does not really fit the data. If you really have evidence that this observation is not representative (say because the measurement device was broken temporarily), then I would omit th...
Method to quantize a range of values to keep precision when signficant outliers are present in the data
python|precision|outliers|quantization|data-transform
0
66
1
72,894,260
72,894,260
1
true
2022-07-07T07:46:01.713Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Method to quantize a range of values to keep precision when signficant outliers are present in the data<p>Could you tell me please if there is a suitable qua...
72,894,374
Add different labels to show totals in stacked bar plot in ggplot R?<p>My question is somewhat similar to this: <a href="https://stackoverflow.com/questions/65201095/how-to-add-text-label-to-show-total-n-in-each-bar-of-stacked-proportion-bars-in">How to add text label to show total n in each bar of stacked proportion b...
<p>You can use your second dataframe <code>df_t</code> in a new <code>geom_text</code> where you could add for example 0.03 to <code>value</code> by specifing the position of your labels. You can use the following code:</p> <pre><code>library(ggplot2) plot.1&lt;- ggplot(df, aes(fill=factor(variable, levels = var_levels...
Add different labels to show totals in stacked bar plot in ggplot R?
r|ggplot2|label|bar-chart|stacked-bar-chart
0
66
1
72,894,517
72,894,517
1
true
2022-07-07T08:11:14.833Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Add different labels to show totals in stacked bar plot in ggplot R?<p>My question is somewhat similar to this: <a href="https://stackoverflow.com/questions/...
72,899,935
Print for Longest common subsequence<p>longestCommonSubsequence is returning the length of LCS. The code works fine. But I am trying to print the value of Subsequence .For below example it should print &quot;acef&quot; .But my code is printing only &quot;ae&quot;.<br /> How to fix it?</p> <p>Here is the complete code <...
<p>Your code to get LCS uses a top down approach and your memo is built from 0,0 and so your answer is at <code>memo[0][0]</code>.</p> <p>In order to get the LCS string from memo you need to traverse from top to bottom. Also use <code>StringBuilder</code> instead of adding it to a String ( it will create a new object e...
Print for Longest common subsequence
java|algorithm|data-structures
-1
66
1
72,900,883
72,900,883
1
true
2022-07-07T14:48:44.637Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Print for Longest common subsequence<p>longestCommonSubsequence is returning the length of LCS. The code works fine. But I am trying to print the value of Su...
72,899,519
Pytest assert if sys. argv == something it will run a function<p>I'm trying to test the main function that if len (sys. argv) &lt; 1 or len (sys. argv) &lt; 4 it will run a function using pytest</p> <p>this is my main fucntion</p> <pre><code>def main(): if len(sys.argv) == 1: print(print_help()) elif le...
<p>My preferred approach is make your <code>main()</code> function take its inputs from a variable instead of from <code>sys.argv</code> directly:</p> <pre><code>def main(args): if len(args) == 1: print(print_help()) elif len(args) == 2 or len(args) == 3: if args[1] == 'help' or args[1] == 'h' o...
Pytest assert if sys. argv == something it will run a function
python|pytest
0
66
2
72,903,050
72,903,050
1
true
2022-07-07T14:21:59.330Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pytest assert if sys. argv == something it will run a function<p>I'm trying to test the main function that if len (sys. argv) &lt; 1 or len (sys. argv) &lt; ...
72,903,262
read file from google drive<p>I have spreadsheet uploaded as csv file in google drive unlocked so users can read from it. This is the link to the csv file: <a href="https://docs.google.com/spreadsheets/d/170235QwbmgQvr0GWmT-8yBsC7Vk6p_dmvYxrZNfsKqk/edit?usp=sharing" rel="nofollow noreferrer">https://docs.google.com/spr...
<p>I would try to publish the sheet as a CSV file (<a href="https://support.google.com/docs/answer/183965?hl=en" rel="nofollow noreferrer">doc</a>), and then read it from there.</p> <p>It seems like your file is already published as a CSV. So, this should work. (Note that the URL ends with <code>/pub?output=csv</code>)...
read file from google drive
r|google-drive-api
0
66
2
72,903,482
72,903,482
1
true
2022-07-07T19:28:41.770Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: read file from google drive<p>I have spreadsheet uploaded as csv file in google drive unlocked so users can read from it. This is the link to the csv file: <...
72,903,749
Argument must not be null, inside dynamic block<p>I am using <code>kubernetes_network_policy</code> resource. I have around ten <code>network_poilicy</code>and each of them are different. One policy has only ingress, another one has only egrees, few of them have both ingress and egress. I am getting below error when ...
<p>Yes, you should be able to put condition on your <code>for_each</code>:</p> <pre><code>for_each = each.value.a == null ? [] : range(length(each.value.a)) </code></pre> <p>or a bit shorter, but more hackish:</p> <pre><code>for_each = try(range(length(each.value.a)), []) </code></pre> <p>You could do other things to ...
Argument must not be null, inside dynamic block
terraform|terraform0.12+|terraform-provider-kubernetes
1
66
1
72,905,497
72,905,497
1
true
2022-07-07T20:17:26.633Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Argument must not be null, inside dynamic block<p>I am using <code>kubernetes_network_policy</code> resource. I have around ten <code>network_poilicy</code>a...
72,905,880
How to align strings in columns using python with custom print format?<p>I want to align string and adjust spacing in a column with the correct custom format I want.</p> <p>My code:</p> <pre class="lang-py prettyprint-override"><code>import time seperator='|'+'-'*33+'|\n' seperator2='|'+'='*33+'|\n' end = '|'+'^'*33+'|...
<p>The following code can be consulted, the logic and procedure are commented, if the task is not limited to something specific like here, it is better to write it more modularly</p> <p>PS: The logic of length and length_total can be rewritten to adjust the spacing between characters</p> <pre><code>import os def alig...
How to align strings in columns using python with custom print format?
python|string
0
66
1
72,906,280
72,906,280
1
true
2022-07-08T01:48:21.477Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to align strings in columns using python with custom print format?<p>I want to align string and adjust spacing in a column with the correct custom format...
72,906,402
Airflow. Lost password in connection with DB in UI<p>There was a problem setting up the connection with db in UI. For example, I set up a connection with UI, set a password. I'm doing a connection test. Successfully. But after I close the UI and try to connect through the DAG, the connection is not established, and whe...
<p>In The UI you can not see the password for security reasons. If you want to know the full connection parameter then you can run :</p> <p><code>airflow connections export connection.yaml</code></p> <p>this would give you a yaml file with all connection and its parameters (including password)</p> <p>if you are using d...
Airflow. Lost password in connection with DB in UI
airflow|database-connection
0
66
1
72,909,970
72,909,970
1
true
2022-07-08T03:41:18.687Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Airflow. Lost password in connection with DB in UI<p>There was a problem setting up the connection with db in UI. For example, I set up a connection with UI,...
72,910,439
Append to a string with characters in a while loop python<p>I'm running into a problem which I cannot solve online- all answers I've found only allow the appending to happen once since it just keeps repeating the same action.</p> <p>For context: If a string isn't 128 lines long- I want to pad it out to reach 128. All p...
<pre class="lang-py prettyprint-override"><code>your_string = &quot;01\n01\n02\n03\n05\n06\n09\n01\n&quot; new_string = your_string + (128 - len(your_string.split())) * &quot;01\n&quot; </code></pre>
Append to a string with characters in a while loop python
python|string|append
1
66
2
72,910,553
72,910,553
1
true
2022-07-08T11:00:37.020Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Append to a string with characters in a while loop python<p>I'm running into a problem which I cannot solve online- all answers I've found only allow the app...
72,889,115
How to update UI in separate thread?<p>I have a WPF view with grid that have two elements in it, RichText and Progressbar. When I'm loading a lot of text to RichText I want to show a loading process (just an animation) to the user. The main idea to hide Richtext control, show Progressbar, start load text, when it finis...
<blockquote> <p>Is there a way to update Progressbar from another thread</p> </blockquote> <p>Short answer: No. A control can only be updated on the thread on which it was originally created.</p> <p>What you can do is to display the <code>ProgressBar</code> in another window that runs on another thread and then close t...
How to update UI in separate thread?
c#|wpf|multithreading|user-interface
-1
66
3
72,911,527
72,911,527
1
true
2022-07-06T19:47:31.217Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to update UI in separate thread?<p>I have a WPF view with grid that have two elements in it, RichText and Progressbar. When I'm loading a lot of text to ...
72,910,739
Vulkan Storage Buffer Memory Mapping<p>I'm refactoring and re-writing the guide made by <a href="https://vkguide.dev/" rel="nofollow noreferrer">VkGuide</a> as to fit my idea of an engine. I'm using <a href="https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator" rel="nofollow noreferrer">VMA</a> to handle m...
<p>Your usage example only ever sets the <em>first</em> SSBO in the buffer, as <code>data</code> is <code>*t_pointer</code> and never changes. Change your code to pass <code>t_pointer</code> directly, change the type of the callback and then you can use it as</p> <pre><code>MemoryMapper::effect_mmap&lt;ObjectData&gt;(a...
Vulkan Storage Buffer Memory Mapping
c++|vulkan|moltenvk
0
66
1
72,911,538
72,911,538
1
true
2022-07-08T11:29:27.897Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Vulkan Storage Buffer Memory Mapping<p>I'm refactoring and re-writing the guide made by <a href="https://vkguide.dev/" rel="nofollow noreferrer">VkGuide</a> ...
72,929,751
How to load a view by default instead of Swagger UI?<p>I'm working on a .NET 6 web api and I've configured the Program.cs to use Swagger UI when in development mode. How can I change this so that I still have access to Swagger UI but by default load the default view?</p> <p>For example, when I run my project, it loads ...
<p>Open your project's priperties (screenshot below -)</p> <p><a href="https://i.stack.imgur.com/WZW0G.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WZW0G.png" alt="Project properties" /></a></p> <p>Under the 'Debug'section, click on 'Open debug launch profiles UI'. This should open the UI shown be...
How to load a view by default instead of Swagger UI?
swagger|asp.net-core-webapi|swagger-ui
0
66
2
72,930,054
72,930,054
1
true
2022-07-10T15:40:23.660Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to load a view by default instead of Swagger UI?<p>I'm working on a .NET 6 web api and I've configured the Program.cs to use Swagger UI when in developme...
72,931,248
Using existing git submodule with ExternalProject_Add in CMake<p>My project is currently using <code>ExternalProject_Add</code> to obtain the source code of an external library. By default <code>ExternalProject_Add</code> downloads data from a URL: is it possible to point it to an existing directory, already downloaded...
<p>Just set the <code>SOURCE_DIR</code> argument without any additional download options.</p> <blockquote> <p>Source directory into which downloaded contents will be unpacked, or for non-URL download methods, the directory in which the repository should be checked out, cloned, etc. If no download method is specified, t...
Using existing git submodule with ExternalProject_Add in CMake
git|cmake
1
66
1
72,931,517
72,931,517
1
true
2022-07-10T19:20:41.550Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Using existing git submodule with ExternalProject_Add in CMake<p>My project is currently using <code>ExternalProject_Add</code> to obtain the source code of ...
72,932,309
Javascript: using a math function to control an output range according to an input range<p>If I know that a ratio of two input variables &quot;a/b&quot; has a range of [1;2] And if I want my output value of &quot;y&quot; to have a range of [ymin;ymax] of my choice, based on the range of &quot;a/b&quot;:</p> <p>Is there...
<p>I'm not sure if there is an existing good algorithm for that, but from your description of the problem I can recommend doing something like that:</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 prettyp...
Javascript: using a math function to control an output range according to an input range
javascript|math|range|algebra
1
66
3
72,932,558
72,932,558
1
true
2022-07-10T22:35:53.070Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Javascript: using a math function to control an output range according to an input range<p>If I know that a ratio of two input variables &quot;a/b&quot; has ...
72,861,197
Where would I fetch Data from my database to update a Chart Using react-chartjs-2?<p>I'm trying to create a Bar Chart with data I'm getting from my database. Getting the data works fine, but updating the chart seems to be a problem. I'm trying to create a bar chart that gets my data, counts how many times each of the w...
<p><code>setChartData</code>/<code>setChartOptions</code> are being called before the fetch request gathering the needed data has finished. Try to move this logic into the success callback of your <code>fetch</code> call.</p>
Where would I fetch Data from my database to update a Chart Using react-chartjs-2?
javascript|reactjs|react-native|react-hooks|react-chartjs
1
66
2
72,941,014
72,941,014
1
true
2022-07-04T19:22:03.027Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Where would I fetch Data from my database to update a Chart Using react-chartjs-2?<p>I'm trying to create a Bar Chart with data I'm getting from my database....
72,941,664
How to safely close another application that has an exit popup without using process.Kill()<p>I have an application that I would like to close from my current C# application. The problem is that the application I want to close has an exit confirmation that requires the user to confirm the closing of the application.</p...
<p>If you have to close the application gently and it displays a confirmation when trying to close it, then you'll have to handle it as well.</p> <p>The actual way to do that depends on what <em>exactly</em> the popup is. If it's a standard dialog, something like the following could suffice:</p> <pre><code>SendMessage(...
How to safely close another application that has an exit popup without using process.Kill()
c#|process|exit|kill
1
66
2
72,941,783
72,941,783
1
true
2022-07-11T16:20:34.853Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to safely close another application that has an exit popup without using process.Kill()<p>I have an application that I would like to close from my curren...
72,942,709
How do I insert HTML boiler plate code in Visual Studio Code on Mac?<p>I started the coding journey and installed VSC suggested during a YouTube tut.</p> <p>It seems that all emmet abbreviations are working except for SHIFT + ! which should give me the below.</p> <pre><code>&lt;DOCTYPE html&gt; &lt;html lang=&quot;en&q...
<p>I couldn't get VSCode to expand <code>!+Tab</code>, but I agree with you that it should have worked.</p> <p>However, I've figured out that you can use <code>html:5+Tab</code> (or just <code>!</code> with the <code>Emmet: Expand Abbreviation</code> command) to get a similar result.</p> <pre><code>&lt;!DOCTYPE html&gt...
How do I insert HTML boiler plate code in Visual Studio Code on Mac?
html
1
66
2
72,942,980
72,942,980
1
true
2022-07-11T17:50:55.367Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I insert HTML boiler plate code in Visual Studio Code on Mac?<p>I started the coding journey and installed VSC suggested during a YouTube tut.</p> <p>...
72,944,235
Plotly: how to add data labels to a Choropleth<p>I have the following <code>Pandas</code> dataframe <code>df</code> that looks as follows:</p> <pre><code>import pandas as pd df = pd.DataFrame({'state' : ['NY', 'CA', 'FL', 'NJ', 'TX', 'CT', 'MA', 'WA', 'IL', 'GA'], 'user_id' : [10000, 3200, 1600, 1200...
<p>You need to also add <code>locationmode=&quot;USA-states&quot;</code> to <code>add_scattergeo</code>:</p> <pre><code>fig = px.choropleth( df, locations='state', locationmode=&quot;USA-states&quot;, scope=&quot;usa&quot;, color='user_id', color_continuous_scale=&quot;blue...
Plotly: how to add data labels to a Choropleth
python|plotly
1
66
1
72,945,454
72,945,454
1
true
2022-07-11T20:20:58.850Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Plotly: how to add data labels to a Choropleth<p>I have the following <code>Pandas</code> dataframe <code>df</code> that looks as follows:</p> <pre><code>imp...
72,936,880
Different activation function based on input<p>I am trying to build a Keras neural network where the activation function at the output layer (conditionally) depends on the inputs. The activation function is quite complicated, so as a simpler example, consider the following:</p> <pre><code>def myactivation(y,x1,x2): ...
<p>You can write a custom layer like shown in <a href="https://keras.io/guides/making_new_layers_and_models_via_subclassing/" rel="nofollow noreferrer">the keras docs</a>. For your application, the key is to use <a href="https://www.tensorflow.org/api_docs/python/tf/where" rel="nofollow noreferrer">tf.where</a> based o...
Different activation function based on input
python|tensorflow|keras|neural-network|activation-function
0
66
1
72,948,503
72,948,503
1
true
2022-07-11T10:10:38.417Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Different activation function based on input<p>I am trying to build a Keras neural network where the activation function at the output layer (conditionally) ...
72,949,559
I have created GenderWidget for male female...want to change colour of selected gender...how to do it on tap<p>I have created gender widget for selecting gender male in BMI app learning, female... here I want to show selected gender with some colour difference...on tap</p> <p>I don't know what I am missing to complete ...
<p>You can use another variable to <code>GenderWidget</code> for selected,</p> <pre class="lang-dart prettyprint-override"><code>class GenderWidget extends StatelessWidget { final VoidCallback onclick; final String title; final IconData icon; final bool isSelected; GenderWidget({ required this.isSelecte...
I have created GenderWidget for male female...want to change colour of selected gender...how to do it on tap
flutter|dart|flutter-layout
0
66
1
72,949,908
72,949,908
1
true
2022-07-12T08:55:46.730Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I have created GenderWidget for male female...want to change colour of selected gender...how to do it on tap<p>I have created gender widget for selecting gen...
72,888,069
Azure Functions with python runtime. H2O Module not available error<p>I am trying to create an Azure python function which uses H20 module. When I tried to test it locally I am getting module not available error even though I have specified it in requirements.txt and it seem to be installed in the virtual env and I am ...
<ol> <li>Created the Azure Python Timer Trigger Function in VS Code.</li> <li>Installed the below dependencies in the VS Code Project terminal:</li> </ol> <pre><code>pip install requests pip install tabulate pip install future </code></pre> <ol start="3"> <li>If any existing or previous versions of H2o is available, un...
Azure Functions with python runtime. H2O Module not available error
python-3.x|azure-functions|h2o
0
66
1
72,961,595
72,961,595
1
true
2022-07-06T18:02:36.197Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Azure Functions with python runtime. H2O Module not available error<p>I am trying to create an Azure python function which uses H20 module. When I tried to t...
72,970,833
React Router Dom v6 with Typescript: no exported member for Location and NavigateFunction<p>I want to pass the function returned by useNavigate and the instance returned by useLocation to another function using Typescript. However, their types: Location and NavigateFunction are not exported members of react-router-dom....
<p>React Router's types are not compatible with Typescript 3.0.1 (which was released <a href="https://devblogs.microsoft.com/typescript/announcing-typescript-3-0/" rel="nofollow noreferrer">4 years ago</a>)</p> <p>You'll need to upgrade to a more modern version of typescript to use types from this library.</p>
React Router Dom v6 with Typescript: no exported member for Location and NavigateFunction
typescript|react-router
0
66
1
72,971,708
72,971,708
1
true
2022-07-13T18:13:49.033Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: React Router Dom v6 with Typescript: no exported member for Location and NavigateFunction<p>I want to pass the function returned by useNavigate and the insta...
72,973,739
3 level nested dictionary to Pandas Dataframe<p>I have a dictionary in the form:</p> <pre><code>dict = {'A1' : {'B1' : {'Average' : 0 , 'Max' : 0, 'Min' : 0}, 'B2' : {'Average' : 0 , 'Max' : 0, 'Min' : 0}, 'B3' : {'Average' : 0 , 'Max' : 0, 'Min' : 0}}, 'A2' : {'B1' : {'Average' ...
<p>Just another way of doing it:</p> <pre><code>df = pd.DataFrame(d).T #choosing d as a name for dict because dict is a keyword Bcols = df.columns df = pd.concat([df[col].apply(pd.Series) for col in df.columns], axis=1) df.columns = pd.MultiIndex.from_product([Bcols, df.columns]).drop_duplicates() df.rename_axis('Regio...
3 level nested dictionary to Pandas Dataframe
python|pandas
1
66
1
72,973,965
72,973,965
1
true
2022-07-13T23:39:23.687Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: 3 level nested dictionary to Pandas Dataframe<p>I have a dictionary in the form:</p> <pre><code>dict = {'A1' : {'B1' : {'Average' : 0 , 'Max' : 0, 'Min' : 0}...
72,977,145
Why the result of this code is duplicated?<p><strong>Why the result is duplicated</strong></p> <p>Hi, I made this code and what I want is Create Union type called family_name it shall have two members first_name and last_name. The two members are array of characters with same size 30. Try to write string in the first m...
<p>The point of the exercise is to show how a <code>union</code> works. The posted code does not do what the assignment asked, and here is the corrected code.</p> <pre><code>#include &lt;stdio.h&gt; #include &lt;string.h&gt; union family_name { char first_name[30]; char last_name[30]; }; int main(void) ...
Why the result of this code is duplicated?
c
1
66
2
72,977,553
72,977,553
1
true
2022-07-14T08:01:08.293Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why the result of this code is duplicated?<p><strong>Why the result is duplicated</strong></p> <p>Hi, I made this code and what I want is Create Union type c...
72,978,697
Flutter bloc 8.x authentication not updating<p>Im experimenting and learning on a small project and im trying to implement an authentication workflow. Ive implemented everything and by printing my steps everything should just work fine. Im wondering why my <code>BlocBuilder</code> isn't going to update. The project is ...
<p>The issue is In your OnTap Function you can call Event like this. I have checked and It's working as expected.</p> <pre><code> TextButton( onPressed: () =&gt; { authBloc.userRepository.signIn(), context.read&lt;AuthBloc&gt;().add(AppLoaded()) ...
Flutter bloc 8.x authentication not updating
flutter|flutter-bloc
0
66
1
72,979,287
72,979,287
1
true
2022-07-14T10:01:12.270Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Flutter bloc 8.x authentication not updating<p>Im experimenting and learning on a small project and im trying to implement an authentication workflow. Ive im...
72,950,577
Nifi Group Content by Given Attributes<p>I am trying to run a script or a custom processor to group data by given attributes every hour. Queue size is up to 30-40k on a single run and it might go up to 200k depending on the case.</p> <ul> <li>MergeContent does not fit since there is no limit on min-max counts.</li> <li...
<p>in <code>nifi.properties</code> there is a parameter that affects batching behavior</p> <pre><code>nifi.queue.swap.threshold=20000 </code></pre> <p>here is my test flow:</p> <pre><code> 1. GenerateFlowFile with &quot;batch size = 50K&quot; 2. ExecuteGroovyScript with script below 3. LogAttrribute (disabled) - just...
Nifi Group Content by Given Attributes
apache-nifi
1
66
1
72,984,297
72,984,297
1
true
2022-07-12T10:09:02.657Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Nifi Group Content by Given Attributes<p>I am trying to run a script or a custom processor to group data by given attributes every hour. Queue size is up to ...
72,989,703
Bootstrap 5 variable card width<p>I am using bootstrap 5 and have a card on a page, it is the only thing on the page.</p> <p>I am fairly new to bootstrap, long time programmer.</p> <p>On a phone the width of the card is great, on a monitor its width is way too wide. What is the best way for the card to be 100% vw on x...
<p>You should be checking out bootstrap grid system to work with the screen sizes. In your code the <code>&lt;div class=&quot;col&quot;&gt;</code> means the col is automatic instead of any specified width. You can use <code>&lt;div class=&quot;col-md-6&quot;&gt;</code>, here <code>md</code> means from medium to highe...
Bootstrap 5 variable card width
width|bootstrap-5|card
0
66
2
72,989,976
72,989,976
1
true
2022-07-15T06:10:40.320Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Bootstrap 5 variable card width<p>I am using bootstrap 5 and have a card on a page, it is the only thing on the page.</p> <p>I am fairly new to bootstrap, lo...
72,985,596
Delete Firestore Documents when we don't need them any more or keeping them better?<p>I am using Firestore for my application and every day thousands of documents are out of date and will not be used. So my question is which one is better, keeping them so they don't have an effect on query performance in the future, or...
<blockquote> <p>So my question is which one is better, keeping them so they don't have an effect on query performance in the future, or deleting them by clients when their job is done.</p> </blockquote> <p>If you keep them, there will be <strong>no</strong> performance issue for future queries. Why? Because the query p...
Delete Firestore Documents when we don't need them any more or keeping them better?
firebase|google-cloud-platform|google-cloud-firestore
0
66
2
72,990,049
72,990,049
1
true
2022-07-14T19:14:50.677Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Delete Firestore Documents when we don't need them any more or keeping them better?<p>I am using Firestore for my application and every day thousands of docu...
72,997,808
How to create an Excel pivot table from a table (ListObject object) via PyWin32?<p>I'm trying to automate Excel report generation in Python and I would really like to create a pivot table from a proper table, which equates to the ListObject object in COM. I used several code chunks I found in the web, and it goes like ...
<p>These are guesses, but try using the table name for <code>SourceData</code>:</p> <pre><code>SourceData='SummaryTable' </code></pre> <p>and an R1C1 reference for the <code>TableDestination</code>, including the sheet name:</p> <pre><code>TableDestination=&quot;'People Summary'!R5C3&quot; </code></pre>
How to create an Excel pivot table from a table (ListObject object) via PyWin32?
python|excel|pivot-table|pywin32|excel-tables
1
66
1
72,997,967
72,997,967
1
true
2022-07-15T17:36:28.027Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to create an Excel pivot table from a table (ListObject object) via PyWin32?<p>I'm trying to automate Excel report generation in Python and I would reall...
73,001,621
CSS Half Circle border with gradient color<p>I have half circle</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-css lang-css prettyprint-override"><code>.progress-semi-circle{ position: relative; display:inline-...
<p>You can do it like below:</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-css lang-css prettyprint-override"><code>.progress-semi-circle { --b: 20px; /* border size */ --a: 64; /* percentage*/ position: ...
CSS Half Circle border with gradient color
css
0
66
3
73,002,897
73,002,897
1
true
2022-07-16T04:54:13.833Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: CSS Half Circle border with gradient color<p>I have half circle</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="...
73,004,009
How to calculate with cummin() until condition is true<p>I want to calculate the minimum value until <code>cond</code> column is true</p> <p>Then recalculate the minimum value starting from the next row where the <code>cond</code> column is true</p> <p>The obtained result is assigned to the <code>expected</code> column...
<p>Calculate the reverse <code>cumsum</code> on <code>cond</code> to identify blocks of rows, then group the column <code>A</code> by these blocks and <code>transform</code> with <code>min</code> to calculate minimum value per block then mask the values and use <code>ffill</code> to propagate last min values in forward...
How to calculate with cummin() until condition is true
python|pandas|dataframe|numpy
2
66
3
73,004,261
73,004,261
1
true
2022-07-16T12:00:13.507Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to calculate with cummin() until condition is true<p>I want to calculate the minimum value until <code>cond</code> column is true</p> <p>Then recalculate...
72,935,846
allow selecting multiple times the same option with react-bootstrap-typeahead<p>I'm looking for a way to select multiple times the same option.</p> <p>Currently here is my code:</p> <pre><code>const [multiSelections, setMultiSelections] = useState&lt;Option[]&gt;(currentSpotSkills); &lt;Typeahead id=&quot;ba...
<p>If you want to select the same option multiple times and have it be distinct from the other instances, you need to differentiate it somehow. The best way to do this is probably to add a temporary, unique identifier to the option (like an <code>id</code>) before you save it to your component state. You could use some...
allow selecting multiple times the same option with react-bootstrap-typeahead
react-bootstrap-typeahead
0
66
1
73,017,322
73,017,322
1
true
2022-07-11T08:45:51.907Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: allow selecting multiple times the same option with react-bootstrap-typeahead<p>I'm looking for a way to select multiple times the same option.</p> <p>Curren...
73,030,335
Configure anonymous access for static file from appsettings.json or startup.cs<p>I am writing an ASP.NET Core 5 app. There is an Azure configuration to prove you own an identity that required you to host an file at this location:</p> <pre><code>https://yoursite.com/.well-known/microsoft-identity-association.json </code...
<p>Thanks to @jeremy-thompson ... here is my solution.</p> <pre><code>[AllowAnonymous] [Route(&quot;.well-known/microsoft-identity-association.json&quot;)] public IActionResult MSIdentityAssoc() { return Json(new { associatedApplications = new[] { new { applicationId = Guid.Parse(&qu...
Configure anonymous access for static file from appsettings.json or startup.cs
asp.net-core|asp.net-identity|appsettings|microsoft-identity-platform
1
66
1
73,030,684
73,030,684
1
true
2022-07-19T02:01:00.380Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Configure anonymous access for static file from appsettings.json or startup.cs<p>I am writing an ASP.NET Core 5 app. There is an Azure configuration to prove...
73,013,885
Bulma: how to make buttons the same size?<p>I'm using Bulma css and would like to make buttons the same size. Currently, each button has different size depending on the button title.<br /> The only options I'm finding is &quot;is-fullwidth&quot;, but that's too big.</p> <p>Anyone can help me?</p>
<p>This is not possible with bulma classes (except for the <code>is-fullwidth</code> one), but you could make your own global class that you can add to buttons. e.g.:</p> <pre class="lang-css prettyprint-override"><code>.button.is-wide { min-width: 250px; } </code></pre>
Bulma: how to make buttons the same size?
html|css|bulma
0
66
2
73,116,065
73,116,065
1
true
2022-07-17T17:22:53.707Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Bulma: how to make buttons the same size?<p>I'm using Bulma css and would like to make buttons the same size. Currently, each button has different size depen...
72,826,064
Power BI error Level in custom Error Handling<p>We have implemented custom error handling in Power Bi component in our angular app from here <a href="https://docs.microsoft.com/en-us/javascript/api/overview/powerbi/override-error-messages" rel="nofollow noreferrer">Docs</a> .Something like this:</p> <pre><code>this.rep...
<p>If you check the IError interface, level is an optional property, it means that some error may not contain error level. to handle such scenarios use else condition, or if you want to handle any specific error use the &quot;message&quot; or &quot;detailedMessage&quot;.</p> <p><strong>Example:</strong></p> <pre><code>...
Power BI error Level in custom Error Handling
angular|powerbi|powerbi-embedded
0
66
1
73,148,234
73,148,234
1
true
2022-07-01T07:53:18.970Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Power BI error Level in custom Error Handling<p>We have implemented custom error handling in Power Bi component in our angular app from here <a href="https:/...
73,008,015
InvalidSelector Error: compound class names not permitted using "FindElementByClass"<p>I am having trouble with code while trying to take the class name. I have tried and run time error 32 is appearing as:</p> <pre><code>InvalidSelector Error: compund class names not permitted </code></pre> <p>Maybe somebody canhelp wi...
<p>You need to take care of a couple of things here:</p> <ul> <li>The <em>classnames</em> of the <code>&lt;span&gt;</code> looks dynamic and and may change sooner or later, even may be next time you access the application afresh.</li> <li>Selenium doesn't permit <a href="https://stackoverflow.com/a/53536022/7429447">co...
InvalidSelector Error: compound class names not permitted using "FindElementByClass"
vba|selenium|selenium-webdriver|classname|invalidselectorexception
1
66
1
73,008,212
73,008,212
1
true
2022-07-16T22:23:54.473Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: InvalidSelector Error: compound class names not permitted using "FindElementByClass"<p>I am having trouble with code while trying to take the class name. I h...
72,863,258
DropMenu record part 2<p><img src="https://i.stack.imgur.com/uNPSX.png" alt="Sheet1" /></p> <p><img src="https://i.stack.imgur.com/zAVwr.png" alt="Sheet2" /></p> <p>I had a <a href="https://stackoverflow.com/questions/72836723/need-help-recording-from-dropdown-list-in-google-sheets">previous post</a> here and got many ...
<p><strong>Try:</strong></p> <pre><code>function onEdit(e) { const ss = e.source; const range = e.range; const row = range.getRow() const col = range.getColumn() const dataSheet = ss.getSheetByName('Data'); var bedNumSource = ss.getActiveSheet().getRange(row + 1,col).getValue(); var destCol = dataSheet...
DropMenu record part 2
google-apps-script|google-sheets
1
66
1
72,864,404
72,864,404
1
true
2022-07-05T01:47:52.510Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: DropMenu record part 2<p><img src="https://i.stack.imgur.com/uNPSX.png" alt="Sheet1" /></p> <p><img src="https://i.stack.imgur.com/zAVwr.png" alt="Sheet2" />...
72,865,567
Puppeteer page.evaluate does not reach the website<p>I had a problem with a long-time loading webpage that is partially solved <a href="https://stackoverflow.com/questions/72821385/page-evaluate-runs-for-hours">here</a>. If I try to reload the page with</p> <pre><code>await page.evaluate(() =&gt; { location.reload(t...
<p>This is not recommended, if it is to reload after a timeout, you can</p> <pre class="lang-js prettyprint-override"><code>try { await page.goto(url, {timeout: 10000}); } catch (e) { console.log(&quot;time out , reload!&quot;); await page.reload(url); await page.evaluate(() =&gt; { ......
Puppeteer page.evaluate does not reach the website
javascript|node.js|puppeteer
0
66
2
72,865,822
72,865,822
1
true
2022-07-05T07:31:31.747Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Puppeteer page.evaluate does not reach the website<p>I had a problem with a long-time loading webpage that is partially solved <a href="https://stackoverflow...
72,953,904
Why does the msvc linker produce such a large exectuable when invoked from the command line?<p>I am using Microsoft (R) Incremental Linker Version 14.16.27041.0 both from the command line and via a Visual Studio project.</p> <p>I am compiling and linking the following well-known program residing in a file called <code>...
<p>It is the /MD compiler(!) option that is responsible for the different sizes.</p> <p>Compiling the above program like so:</p> <pre><code>cl /c /MD HelloWorld.c </code></pre> <p>and linking it in the same way like above:</p> <pre><code>link /OUT:HelloWorld.exe HelloWorld.obj </code></pre> <p>yields the following exec...
Why does the msvc linker produce such a large exectuable when invoked from the command line?
c|visual-studio|linker
0
66
1
72,954,303
72,954,303
1
true
2022-07-12T14:22:37.190Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why does the msvc linker produce such a large exectuable when invoked from the command line?<p>I am using Microsoft (R) Incremental Linker Version 14.16.2704...
72,872,131
matplotlib: fill circular sector between two curves in a polar plot<p>So I have two curves <code>theta1(r)</code> and <code>theta2(r)</code>, where <code>r</code> is uniformly spaced between some two numbers (1 and 330 in this case). How can I fill the radial segment between the two curves?</p> <p>I have considered ada...
<p>One option is to make a <a href="https://matplotlib.org/stable/api/_as_gen/matplotlib.patches.Polygon.html" rel="nofollow noreferrer"><code>Polygon</code></a> of the circular sector</p> <pre class="lang-py prettyprint-override"><code>import matplotlib.pyplot as plt from matplotlib.patches import Polygon import numpy...
matplotlib: fill circular sector between two curves in a polar plot
python|matplotlib|plot|polar-coordinates
-1
66
1
72,897,433
72,897,433
1
true
2022-07-05T15:39:11.227Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: matplotlib: fill circular sector between two curves in a polar plot<p>So I have two curves <code>theta1(r)</code> and <code>theta2(r)</code>, where <code>r</...
72,837,607
Do the dist-info folders inside one dir (made with Pyinstaller) have any purpose?<p>I built an one-dir app with pyinstaller but I found that there are some folder with some module files like License, Metadata, Installer etc. The folders are named as <code>module-version.dist-info</code></p> <p>will it be safe to remove...
<p>You should not remove any of them.</p> <p>While your program may run and function fine without a few of them, you are likely violating some of the OSS licenses you have agreed to if you remove any of them. Also all of the files serve some purpose otherwise the package maintainers would not have included them in the...
Do the dist-info folders inside one dir (made with Pyinstaller) have any purpose?
python|python-3.x|pyinstaller
1
66
1
72,838,178
72,838,178
1
true
2022-07-02T08:25:52.107Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Do the dist-info folders inside one dir (made with Pyinstaller) have any purpose?<p>I built an one-dir app with pyinstaller but I found that there are some f...
73,029,856
Test color with chai-colors plugin<p>I'm trying to add <code>chai-colors</code> plugin to Cypress, from <a href="https://github.com/cypress-io/cypress/issues/2441" rel="nofollow noreferrer">How to install the plugin &quot;Chai Sorted&quot; #2441</a></p> <p>Chris Breiding gives</p> <pre class="lang-js prettyprint-overri...
<p>To use <code>chai-colors</code> inside a <code>.should()</code> you need to pass in the color code itself (not the element)</p> <pre class="lang-js prettyprint-override"><code>import chaiColors from 'chai-colors' chai.use(chaiColors) cy.visit(...) cy.get(selector) .then($el =&gt; $el.css('color')) // get co...
Test color with chai-colors plugin
cypress
4
66
1
73,029,890
73,029,890
1
true
2022-07-19T00:20:22.397Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Test color with chai-colors plugin<p>I'm trying to add <code>chai-colors</code> plugin to Cypress, from <a href="https://github.com/cypress-io/cypress/issues...
72,778,404
Identical SELECT vs DELETE query creates different query plans with vastly different execution time<p>I am trying to speed up a delete query that appears to be very slow when compared to an identical select query:</p> <p>Slow delete query:<br /> <a href="https://explain.depesz.com/s/kkWJ" rel="nofollow noreferrer">http...
<p>I am not exactly sure what triggers the switch of query plan between <code>SELECT</code> and <code>DELETE</code>, but I do know this: the subqueries returning a constant value are actively unhelpful. Use instead:</p> <pre class="lang-sql prettyprint-override"><code>SELECT * FROM processed.token_utxo t WHERE t.out...
Identical SELECT vs DELETE query creates different query plans with vastly different execution time
sql|postgresql|sql-execution-plan|postgresql-performance
2
66
2
72,779,873
72,779,873
1
true
2022-06-27T21:18:42.563Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Identical SELECT vs DELETE query creates different query plans with vastly different execution time<p>I am trying to speed up a delete query that appears to ...
73,022,189
Regex to get an interval with a '/'<p>I have this <code>Descriptions</code></p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>Description</th> </tr> </thead> <tbody> <tr> <td>T2 SMD MOS N/P SI1555 SOT363 700/600mA 20/8V -55/150C Dual 390/850mOHM</td> </tr> <tr> <td>T2 SMD MOS N/P FDS8858CZ SO...
<p>You can use</p> <pre><code>(?&lt;!\S)-?\d+(?:\.\d+)?(?:/-?\d+(?:\.\d+)?)?m?A(?:[DA]C)?(?!\S) </code></pre> <p><strong>Explanation</strong></p> <ul> <li><code>(?&lt;!\S)</code> Assert a whitespace boundary to the left</li> <li><code>-?\d+(?:\.\d+)?</code> Match 1+ digits with an optional decimal part</li> <li><code>(...
Regex to get an interval with a '/'
java|regex
0
66
3
73,022,224
73,022,224
1
true
2022-07-18T12:16:57.840Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Regex to get an interval with a '/'<p>I have this <code>Descriptions</code></p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>Desc...
72,996,840
React UseEffect with empty array dont trigger return function<p>I'm trying to use a return function inside the body of useEffectF, to implement certain logic.</p> <p>But if I have an empty array of dependencies, the returned function is not called</p> <pre><code> useEffect(() =&gt; { // works good console.log(...
<p>Core answer: returning a function from a <code>useEffect</code> means that this function will be called when the component unmounts. Not on first render, as your question seems to suggests.</p> <p>If you want to see it called, you can wrap your root component in the <code>StrictMode</code> component (will only work ...
React UseEffect with empty array dont trigger return function
reactjs|react-hooks|components|use-effect
1
66
1
72,996,908
72,996,908
1
true
2022-07-15T16:09:53.977Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: React UseEffect with empty array dont trigger return function<p>I'm trying to use a return function inside the body of useEffectF, to implement certain logic...
72,922,262
In elasticsearch 8.3.2 mapping, a field set index:false, but it still searchable<p>First create an index named &quot;person&quot; by sending PUT request to <a href="https://127.0.0.1:9200/person/_mapping" rel="nofollow noreferrer">https://127.0.0.1:9200/person/_mapping</a>, and the response body is</p> <pre class="lang...
<p>Usually in the Mapping we have two datastructures for a keyword field: an inverted index (which can be disabled with <code>index: false</code>) and the doc_values (which can be disabled with <code>doc_values: false</code>).</p> <p>The index is a structure that maps values to document id, while doc_values maps doc_id...
In elasticsearch 8.3.2 mapping, a field set index:false, but it still searchable
elasticsearch|indexing|lucene|mapping
2
66
1
72,948,583
72,948,583
1
true
2022-07-09T14:39:24.070Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: In elasticsearch 8.3.2 mapping, a field set index:false, but it still searchable<p>First create an index named &quot;person&quot; by sending PUT request to <...
72,985,465
app in Docker container can't locate csv file in root directory?<p>My app inside a container is trying to open a csv file, <code>os.Open(&quot;file.csv&quot;)</code> , however it cannot locate the csv file inside root directory of my project, it's not being copied over...</p> <p>My project set up, here is the root of m...
<p>the problem is you don't copy the csv file to your docker. when using <code>FROM</code> you change the image you are building so your <code>copy</code> become not relevant. you need to have <code>COPY health-check/ /app</code> after the last <code>FROM</code> (worked when written the line before the EXPOSE).</p>
app in Docker container can't locate csv file in root directory?
docker|dockerfile
0
66
1
72,985,582
72,985,582
1
true
2022-07-14T19:00:03.477Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: app in Docker container can't locate csv file in root directory?<p>My app inside a container is trying to open a csv file, <code>os.Open(&quot;file.csv&quot;...
73,027,642
Flutter : flutter : Unsupported operation: Cannot add to an unmodifiable list<p>I want to program a shopping list app it throws me from line 41 the debug error</p> <blockquote> <p>&quot;UnsupportedError (Unsupported operation: Cannot add to an unmodifiable list)&quot;.</p> </blockquote> <p>Source of the Add Button</p> ...
<p>you can use something like this. creating an &quot;Add&quot; method inside the DataModel</p> <pre><code>void main(){ NumberList list=NumberList([45,64,7]); list.numbers.forEach((e)=&gt;print(e));///45,64,7 list= list.add(5);//adds 5 in here it adds another Int and push into list variable itself list.numb...
Flutter : flutter : Unsupported operation: Cannot add to an unmodifiable list
flutter|dart
0
66
1
73,028,388
73,028,388
1
true
2022-07-18T19:29:05.857Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Flutter : flutter : Unsupported operation: Cannot add to an unmodifiable list<p>I want to program a shopping list app it throws me from line 41 the debug err...
72,780,362
Python regex match a pattern for multiple times<p>I've got a list of strings.</p> <p>input=<code>['XX=BB|3|3|1|1|PLP|KLWE|9999|9999', 'XX=BB|3|3|1|1|2|PLP|KPOK|99999|99999', '999|999|999|9999|999', ....]</code></p> <p>This type <code>'999|999|999|9999|999'</code> remains unchanged.</p> <p>I need to replace <code>9999|9...
<p>You can use</p> <pre class="lang-py prettyprint-override"><code>re.sub(r'(BB(?:\|\d){4,6}\|[^\s|]{3}\|[^\s|]{4}\|)9{2,9}\|9{2,9}(?!\d)', r'\g&lt;1&gt;12|21', text) </code></pre> <p>See the <a href="https://regex101.com/r/w7uGEz/1" rel="nofollow noreferrer">regex demo</a>.</p> <p><em>Details</em>:</p> <ul> <li><code>...
Python regex match a pattern for multiple times
python|regex
1
66
2
72,782,614
72,782,614
1
true
2022-06-28T03:14:42.857Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python regex match a pattern for multiple times<p>I've got a list of strings.</p> <p>input=<code>['XX=BB|3|3|1|1|PLP|KLWE|9999|9999', 'XX=BB|3|3|1|1|2|PLP|KP...
72,828,463
Regexp to cut all text inside the external quotation signs<p>Please help me with adjusting regexp. I need to cut all text inside the external quotation signs. I have text:</p> <pre><code>some text &quot;have &quot;some text&quot; here &quot;that should&quot; be cut&quot; </code></pre> <p>My regexp:</p> <pre><code>some ...
<p>If you want to supported the first level of nested double quotes you can use</p> <pre class="lang-none prettyprint-override"><code>some text &quot;(?&lt;name&gt;[^&quot;]*(?:&quot;[^&quot;]*&quot;[^&quot;]*)*)&quot; </code></pre> <p>See the <a href="https://regex101.com/r/rGE5xT/2" rel="nofollow noreferrer">regex de...
Regexp to cut all text inside the external quotation signs
regex|regex-group|regexp-replace
1
66
3
72,828,484
72,828,484
1
true
2022-07-01T11:17:56.523Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Regexp to cut all text inside the external quotation signs<p>Please help me with adjusting regexp. I need to cut all text inside the external quotation signs...
72,910,108
`from_numpy()` leads to Expected vec.is_mps() to be true, but got false<p>When I try to convert the data (<code>numpy nd array</code>) to a tensor with <code>from_numpy()</code> when using the <code>mps</code> backend with torch.</p> <p>I initiliaze the model as such:</p> <pre><code>device = &quot;mps&quot; if torch.ha...
<p>You would have to first send your model to the mps device, then send your input explicitly to the mps device as well. In code:</p> <pre class="lang-py prettyprint-override"><code>model.to('mps') logits = model(X.to('mps')) </code></pre> <p>Something like this worked for me using torch nightly on M1 pro, using a mode...
`from_numpy()` leads to Expected vec.is_mps() to be true, but got false
python|pytorch|apple-m1
0
66
1
72,987,407
72,987,407
1
true
2022-07-08T10:31:17.323Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: `from_numpy()` leads to Expected vec.is_mps() to be true, but got false<p>When I try to convert the data (<code>numpy nd array</code>) to a tensor with <code...