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,295,995
Python3 cgi.FieldStorage parses file name but not contents between boundary tags<p>I inherited a python3 project where we are trying to parse a 70 MB file with python 3.5.6 . I am using cgi.FieldStorage</p> <p>File (named: paketti.ipk) I'm trying to send:</p> <pre><code>kissakissakissa kissakissakissa kissakissakissa <...
<p>There were more issues at play than I first thought.</p> <p>First, /tmp was coming from tmpfs having maximum size of 120MB.</p> <p>Secondly, my nginx.conf was problematic. I needed to comment out stuff like this to clean it up:</p> <pre><code>#client_body_in_file_only on #proxy_set_header X-FILE ...
Python3 cgi.FieldStorage parses file name but not contents between boundary tags
python|nginx|cgi|python-3.5
0
56
2
72,311,571
72,311,571
0
true
2022-05-18T21:07:03.470Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python3 cgi.FieldStorage parses file name but not contents between boundary tags<p>I inherited a python3 project where we are trying to parse a 70 MB file wi...
72,393,985
How to replenish the bucket list when running the sortable package?<p>I'm exploring ways to visualize a mathematical process (a series of sequential computations) and the sortable package may be the answer, with modifications. The below reproducible code is pulled from the basic examples of how to use sortable found on...
<p>Through these listed StackOverflow posts and solutions, I arrived at the &quot;Working solution&quot; shown at the bottom:</p> <p>Related posts:</p> <p>vladimir_orbucina request at <a href="https://github.com/rstudio/sortable/issues/45" rel="nofollow noreferrer">https://github.com/rstudio/sortable/issues/45</a> and ...
How to replenish the bucket list when running the sortable package?
r|shiny|sortablejs
0
56
1
72,470,938
72,470,938
0
true
2022-05-26T15:07:12.213Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to replenish the bucket list when running the sortable package?<p>I'm exploring ways to visualize a mathematical process (a series of sequential computat...
72,332,907
getting the latest download url and version of a software from a website with powershell<blockquote> <p>I want to take the take the latest version of the software and check with the version that is installed on system if it is newer install the new version .</p> </blockquote> <p>''' $web = Invoke-WebRequest -Uri &quot;...
<p>You can use the Links property to view all retrieved links, then filter it to select only those ending with &quot;msi&quot;</p> <pre><code>(Invoke-WebRequest -Uri &quot;https://www.webex.com/downloads/jabber/jabber-vdi.html&quot;).Links | Where-Object href -like '*msi' | select -First 1 | select -expand href </code>...
getting the latest download url and version of a software from a website with powershell
powershell|url|version|invoke-webrequest
0
56
1
72,333,998
72,333,998
0
true
2022-05-21T20:11:43.970Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: getting the latest download url and version of a software from a website with powershell<blockquote> <p>I want to take the take the latest version of the sof...
72,334,911
What is the most efficient way of indexing Numpy matrices?<p><strong>Question:</strong> What is the most efficient way to implement the equivalent of the following, using Pandas dataframes: <code>temp = df[df.feature] == value]</code> at scale (see below for context re: scale)?</p> <p><strong>Background:</strong> I hav...
<p>This isn't a complete solution to your problem, but I think it will get you where you need to be.</p> <p>Consider the following code:</p> <pre><code>entity_dict = {} entity_idx = 0 arr = np.zeros((num_entities, t_max-240)) for entity, day, feature in df_timeseries[['entity', 'day', 'feature_1']].values: if enti...
What is the most efficient way of indexing Numpy matrices?
python|numpy|performance|indexing
0
56
1
72,335,129
72,335,129
0
true
2022-05-22T04:55:53.397Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What is the most efficient way of indexing Numpy matrices?<p><strong>Question:</strong> What is the most efficient way to implement the equivalent of the fol...
72,365,511
How to rename column inside the function?<p>How to rename column inside the manually created function using variable name as an argument?</p> <p>for instance my data is:</p> <pre><code>df &lt;- data.frame (model = c(&quot;A&quot;,&quot;A&quot;,&quot;A&quot;,&quot;B&quot;,&quot;B&quot;,&quot;B&quot;), ...
<p>Another option:</p> <pre><code>chng &lt;- function(x,var1){ names(x)[match(var1, names(x))] &lt;- 'newname' return(x) } df2 &lt;- chng(df,&quot;model&quot;) df2 </code></pre> <p>Output:</p> <pre><code> newname category sale 1 A z3 1001 2 A f4 1050 3 A c5 -300 4 B ...
How to rename column inside the function?
r|function|loops|dplyr|tidyverse
0
56
2
72,366,142
72,366,142
0
true
2022-05-24T15:23:49.740Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to rename column inside the function?<p>How to rename column inside the manually created function using variable name as an argument?</p> <p>for instance...
72,345,598
Parse JSON file with dynamic fields by java<p>How to parse JSON file with the object, which contains dynamic fields. As an example here: Here is &quot;items&quot;, which has objects with name(&quot;1c68b853-2a07-4409-ad61-8650212f3260&quot;) and body. And it's more then 2 items.</p> <p><div class="snippet" data-lang="j...
<p>You can easily use the <code>Map</code> interface, to store the dynamic parts:</p> <p>Root.java:</p> <pre><code>package com.example.trial.dto; import java.util.HashMap; import java.util.Map; import java.util.UUID; public class Root { public String id; public String code; public String name; public ...
Parse JSON file with dynamic fields by java
java|json
0
56
2
72,346,158
72,346,158
0
true
2022-05-23T08:41:26.040Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Parse JSON file with dynamic fields by java<p>How to parse JSON file with the object, which contains dynamic fields. As an example here: Here is &quot;items&...
72,346,907
how to add another function but different button in html javascript<p>I want to show arraylist in original order when i press the original order button and When i press the alphabetical i want to show the alphabetical order of the books i've only done the original order and I tried doing the same thing when adding the ...
<p>To sort array you can use <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort" rel="nofollow noreferrer"><code>sort()</code></a> function. Check article.</p> <p>Also, to keep original array, you can use it's elements by using <code>[...myArray]</code> approach - in th...
how to add another function but different button in html javascript
javascript|html
-1
56
3
72,347,166
72,347,166
0
true
2022-05-23T10:19:55.360Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to add another function but different button in html javascript<p>I want to show arraylist in original order when i press the original order button and W...
72,317,888
How to use <If> <ElseIf> <Else> in Apache with custom variables?<pre><code>Define FOO &quot;/bar/foo/bar_v1.0.0&quot; &lt;If &quot;${FOO} == '/bar/foo/bar_v1.0.0'&quot;&gt; Define BAR2 &quot;foofoo1&quot; &lt;/If&gt; &lt;ElseIf &quot;${FOO} == '/bar/foo/bar_v2.0.0'&quot;&gt; Define BAR2 &quot;foofoo2&quot; &lt...
<p>Yesterday I also tried to do same tests with Numbers instead of String and had the same result. So, I was confused, disappointed and actually done with it. I've just figured out another way, it's not so beautiful in my view, but I work with what I have. If someone interested here's the code, it gives me exactly what...
How to use <If> <ElseIf> <Else> in Apache with custom variables?
apache|.htaccess|server|configuration|config
1
56
1
72,332,764
72,332,764
0
true
2022-05-20T11:04:40.280Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to use <If> <ElseIf> <Else> in Apache with custom variables?<pre><code>Define FOO &quot;/bar/foo/bar_v1.0.0&quot; &lt;If &quot;${FOO} == '/bar/foo/bar_v...
72,330,066
How to see what rows are missing between two select statements in SQLite?<p>I have a single table view that has a group column and a data column (among other columns). In a particular group, there should be n rows of the same set of text in the same order. However, I'm finding that in some groups, some rows are missi...
<p>You need to take the <code>COUNT</code> of Data column and then find count(Data) is less than Unique number of Group.</p> <p>You can achieve it using below.</p> <pre><code>Select Data,Count(*) from tab Group By Data having Count(*)&lt;(select count(Distinct Grp) from tab); </code></pre> <p>DB Fiddle: <a href="https...
How to see what rows are missing between two select statements in SQLite?
sql|sqlite
-2
56
1
72,330,279
72,330,279
0
true
2022-05-21T13:37:44.860Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to see what rows are missing between two select statements in SQLite?<p>I have a single table view that has a group column and a data column (among other...
72,243,557
How to change current time in audio playback?<p>I am trying to play an audio file with an offset of 10 seconds into the recording:</p> <pre><code>const audio = new Audio('audio.mp3'); audio.currentTime = 10 console.log('currentTime: ' + audio.currentTime) console.log('duration: ' + audio.duration) audio.play(); </code>...
<p>you are missing &quot;n&quot; from currentTime. should be audio.currentTime = 10;</p>
How to change current time in audio playback?
javascript|audio|html5-audio
0
56
1
72,243,648
72,243,648
1
true
2022-05-14T20:10:52.693Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to change current time in audio playback?<p>I am trying to play an audio file with an offset of 10 seconds into the recording:</p> <pre><code>const audio...
72,250,430
try loc a column with list pandas - index not found<p>I have a fixed array e.g. <code>sort_by = [a,b,c,d,e,f]</code>. My dataframe looks like this, I have made <code>Column1</code> my index:</p> <pre><code>Column1 | Column2 | ... d 1 d 2 b 3 a 4 a 5 b ...
<p>Let us try <code>pd.Categorical</code></p> <pre><code>out = df.iloc[pd.Categorical(df.Column1,['a','b','c','d']).argsort()] Out[48]: Column1 Column2 3 a 4 4 a 5 2 b 3 5 b 6 6 c 7 0 d 1 1 d 2 </code></pre>
try loc a column with list pandas - index not found
python|pandas
0
56
4
72,250,512
72,250,512
1
true
2022-05-15T17:03:50.020Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: try loc a column with list pandas - index not found<p>I have a fixed array e.g. <code>sort_by = [a,b,c,d,e,f]</code>. My dataframe looks like this, I have ma...
72,258,784
How to make a static variable in JavaScript like we do in c ? ( to avoid re-initialization of the variable)<p>I watched this video on <a href="https://www.youtube.com/watch?v=cjIswDCKgu0&amp;t=429s" rel="nofollow noreferrer">https://www.youtube.com/watch?v=cjIswDCKgu0&amp;t=429s</a> YouTube;</p> <p>I just wanted to mak...
<p>A good pattern in JS when you want a variable to be <em>private</em> to a function, but yet outside its scope, is to use <em>closures</em> and <strong>IIFE</strong>:</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-cod...
How to make a static variable in JavaScript like we do in c ? ( to avoid re-initialization of the variable)
javascript|performance|optimization|static|debounce
0
56
4
72,259,185
72,259,185
1
true
2022-05-16T11:52:54.560Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to make a static variable in JavaScript like we do in c ? ( to avoid re-initialization of the variable)<p>I watched this video on <a href="https://www.yo...
72,258,776
Excel VBA combine two SUBs<p>Any chance of getting help combining the two below codes?</p> <p>I'll try to educate myself on combining these things as I'm sure it's not that complicated, but for now I'd appreciate any assistance.</p> <pre><code>Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Application....
<p>The line starting with <code>Private Sub</code> or <code>Sub</code> begins the macro, and the line <code>End Sub</code> is the end of the macro.</p> <p>Of the two code blocks you've pasted, the top contains two macros (one <code>Worksheet_SelectionChange</code> and one <code>Worksheet_Change</code>), and the second ...
Excel VBA combine two SUBs
excel|vba
0
56
1
72,259,370
72,259,370
1
true
2022-05-16T11:52:25.153Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Excel VBA combine two SUBs<p>Any chance of getting help combining the two below codes?</p> <p>I'll try to educate myself on combining these things as I'm sur...
72,267,424
Count number of change in values in Pandas column<p>I have a df like this</p> <pre><code>name class date value Andy A 20220101 0 Andy A 20220103 1 Andy A 20220104 0 Bob Z 20221120 0 Bob Z 20221121 0 Bob Z 20221125 0 Bob Z ...
<p>You can try</p> <pre class="lang-py prettyprint-override"><code>out = (df .groupby(['name', 'class']).apply(lambda g: g['value'].shift().bfill().ne(g['value']).sum()/g['date'].nunique()) .round(2) .to_frame('ratio') .reset_index()) </code></pre> <pre><code>print(out) name class rati...
Count number of change in values in Pandas column
python-3.x|pandas|dataframe
1
56
2
72,267,869
72,267,869
1
true
2022-05-17T02:06:06.137Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Count number of change in values in Pandas column<p>I have a df like this</p> <pre><code>name class date value Andy A 20220101 0 Andy ...
72,272,737
Get text from id in html<p>i got the below html code</p> <pre><code>&lt;div class=&quot;SB-marketBox SB-accordion &quot;&gt; &lt;div class=&quot;SB-marketBox-header SB-accordion-header SB-arrowAfter&quot; id=&quot;market_140&quot; onclick=&quot;getMarketAccordian('market_140')&quot;&gt; &lt;div class=&quot;...
<p>Try:</p> <pre class="lang-py prettyprint-override"><code>btn_even = soup.select_one('button:has(span:-soup-contains(&quot;Even&quot;))') btn_odd = soup.select_one('button:has(span:-soup-contains(&quot;Odd&quot;))') print(btn_even[&quot;id&quot;], btn_even.select_one(&quot;.SB-odds&quot;).text) print(btn_odd[&quot;i...
Get text from id in html
python|html|beautifulsoup
1
56
1
72,273,010
72,273,010
1
true
2022-05-17T10:51:26.447Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Get text from id in html<p>i got the below html code</p> <pre><code>&lt;div class=&quot;SB-marketBox SB-accordion &quot;&gt; &lt;div class=&quot;SB-marke...
72,276,751
How to randomly split data in Python<p>I need to create test and train from one set date. I have to split my datatset to create some linear regression. How to do it randomly ?</p> <pre><code>My Target variable: SalePrice train = pd.read_csv(r'C:\Users\pkoni\Desktop\train.csv') target = train['SalePrice'] X, y = train.d...
<p>Not sure I understand fully. If you are just trying to randomly split then this should work:</p> <pre><code>y = train['SalePrice'] X = train.drop('SalePrice', axis=1) X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.5, ...
How to randomly split data in Python
python|pandas|scikit-learn
-2
56
1
72,277,149
72,277,149
1
true
2022-05-17T15:26:10.413Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to randomly split data in Python<p>I need to create test and train from one set date. I have to split my datatset to create some linear regression. How t...
72,280,724
Subquery SQL , get the count of ID's based on the subquery results<p>I have written a sub query like this-</p> <pre><code>Select ID, count(*) as cn from xyz group by 1 </code></pre> <p>Results in an output of-</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>ID</th> <th>cn</th> </tr> </thead...
<p>You can use a case expression within the aggregation like below, untested of course but does this work for you?</p> <pre><code>select Count(case when cn &gt; 10 then 1 end) cn_10, Count(case when cn &lt;= 10 then 1 end) cn_9 from ( select id, Count(*) cn from xyz group by Id )t; </code></pre>
Subquery SQL , get the count of ID's based on the subquery results
sql|subquery
0
56
1
72,280,877
72,280,877
1
true
2022-05-17T21:12:29.133Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Subquery SQL , get the count of ID's based on the subquery results<p>I have written a sub query like this-</p> <pre><code>Select ID, count(*) as cn from xyz ...
72,283,747
React router displays blank page<p>I've made a new subpage for my app and when I try rendering components specifically witout router it all works. But when I add router so I am able to switch between pages by it just displays blank page. Not even my other components.</p> <p>Here is a code of my App.jsx:</p> <pre><code>...
<p><code>react-router-dom@6</code> doesn't export a <code>Switch</code> component. It was replaced by the <code>Routes</code> component. Switch <code>Switch</code> component to <code>Routes</code> component and render the routed components on the <code>element</code> prop.</p> <p>Example:</p> <pre><code>import { Browse...
React router displays blank page
reactjs|react-router
2
56
2
72,283,909
72,283,909
1
true
2022-05-18T05:43:21.817Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: React router displays blank page<p>I've made a new subpage for my app and when I try rendering components specifically witout router it all works. But when I...
72,285,021
TensorFlow image binary classifier not working efficiently after training<p>I am experimenting with a binary classifier on images whether it is a bee or not. I have gathered a dataset of 12,000 images of 6 categories, one of which is bees. So I have a column <em>is_bee</em> with values of <em>&quot;0&quot;</em> and <em...
<p>After removing the <code>softmax</code> function and <code>np.argmax</code>, you should just use the same <code>read_img</code> function that was used during training for predictions and it should be fine.</p>
TensorFlow image binary classifier not working efficiently after training
python|tensorflow|machine-learning|keras|image-classification
2
56
1
72,287,899
72,287,899
1
true
2022-05-18T07:42:58.510Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: TensorFlow image binary classifier not working efficiently after training<p>I am experimenting with a binary classifier on images whether it is a bee or not....
72,287,776
What does "2^>^&1" mean in batch script?<p>I'm just learning batch script. I'm reviewing the <a href="https://github.com/npocmaka/batch.scripts/blob/master/Java/getJavaVersion.bat" rel="nofollow noreferrer">getJavaVersion.bat</a> script on GitHub. I understood what the <code>2^&gt;^&amp;1</code> expression in the follo...
<p>The command <a href="https://stackoverflow.com/q/28749535" title="java -version vs java -fullversion"><code>java -version</code> or <code>java -fullversion</code></a> returns the <a href="https://stackoverflow.com/q/13483443" title="Why does 'java -version' go to stderr?">output at the <em>STDERR</em> stream (handle...
What does "2^>^&1" mean in batch script?
windows|batch-file
0
56
1
72,288,973
72,288,973
1
true
2022-05-18T10:48:08.910Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What does "2^>^&1" mean in batch script?<p>I'm just learning batch script. I'm reviewing the <a href="https://github.com/npocmaka/batch.scripts/blob/master/J...
72,289,574
How to define union type metadata in automapper<p>I'm using <a href="https://github.com/nartc/mapper" rel="nofollow noreferrer">automapper</a> with <a href="https://automapperts.netlify.app/docs/strategies/pojos/" rel="nofollow noreferrer">Pojo strategy</a> I have to define metadata for it, but &quot;postalCode&quot; f...
<p>I asked the same question in github issue and got an answer from the developer of the library:</p> <blockquote> <p>As of the moment, there's no union support for metadata. number | null is still Number in this case. If the source postalCode is null then it will be mapped to null, if the source postalCode is undefine...
How to define union type metadata in automapper
typescript|automapper|mapper
1
56
1
72,290,177
72,290,177
1
true
2022-05-18T12:52:31.517Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to define union type metadata in automapper<p>I'm using <a href="https://github.com/nartc/mapper" rel="nofollow noreferrer">automapper</a> with <a href="...
72,290,998
how to fix org.hibernate.LazyInitializationException and org.hibernate.WrongClassException: with faktor ips<p>I'm trying to add persistence to a faktor ips project that is based on the intro tutorial from <a href="https://www.faktorzehn.org" rel="nofollow noreferrer">https://www.faktorzehn.org</a>. I have a model objec...
<p>Try wrapping the method where you load the <code>Angebot</code> with <code>@Transactional</code> so that there is a session existing when lazy loading the assocation. The exception tells you that you are trying to lazy load the association without a transaction (session) with <code>could not initialize proxy - no Se...
how to fix org.hibernate.LazyInitializationException and org.hibernate.WrongClassException: with faktor ips
hibernate|persistence|faktor-ips
1
56
1
72,292,159
72,292,159
1
true
2022-05-18T14:24:12.617Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to fix org.hibernate.LazyInitializationException and org.hibernate.WrongClassException: with faktor ips<p>I'm trying to add persistence to a faktor ips p...
72,305,362
Neo4j test container: Database name parameter for selecting database is not supported in Bolt Protocol Version 3.0<p>I'm using the Neo4j OGM and currently creating a session factory like this.</p> <pre><code>Configuration config = new Configuration.Builder() .uri(uri) .credentials(userna...
<p>This means the underlying Neo4j Java driver used by OGM is too old, so the OGM version is too old. Because of that, the only Bolt protocol version that both the client and server can understand is version 3, which predates multi-tenancy support in Neo4j (it started with Neo4j version 4 and Bolt protocol 4.0).</p> <p...
Neo4j test container: Database name parameter for selecting database is not supported in Bolt Protocol Version 3.0
neo4j|neo4j-ogm|neo4j-driver|neo4j-bolt
0
56
1
72,305,696
72,305,696
1
true
2022-05-19T13:22:32.650Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Neo4j test container: Database name parameter for selecting database is not supported in Bolt Protocol Version 3.0<p>I'm using the Neo4j OGM and currently cr...
72,299,966
Generate dynamic payload as per nested array item click javascript<p>I have this JSON data:</p> <pre><code>{ &quot;data&quot;: [ { &quot;category&quot;: { &quot;documentId&quot;: &quot;c8kr0cv012vtr8vm3iug&quot;, &quot;title&quot;: &quot;Art&quot; }, &quot;subcategories&quot;: [ { &quot;docum...
<p>If you have the selected tag ids in the array <code>selectedTags</code> and your json as a variable called <code>data</code>:</p> <pre class="lang-js prettyprint-override"><code>const tempDefaultPayload = { data: data.data.map(x =&gt; { &quot;category&quot;: x.category.documentId, &quot;subcategories...
Generate dynamic payload as per nested array item click javascript
javascript|arrays|react-native|arraylist|mapping
0
56
1
72,306,067
72,306,067
1
true
2022-05-19T06:59:49.043Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Generate dynamic payload as per nested array item click javascript<p>I have this JSON data:</p> <pre><code>{ &quot;data&quot;: [ { &quot;category&quot;:...
72,306,477
How to parse floating point number using sscanf<p>This works well, outputting <code>1 3</code></p> <pre><code> std::string s(&quot;driver at 1 3&quot;); int c, d; sscanf( s.c_str(), &quot;%*s %*s %d %d&quot;, &amp...
<p>You have a bug in your format string. You should increase the warning your compiler outputs: <a href="https://godbolt.org/z/Pfd414o45" rel="nofollow noreferrer">https://godbolt.org/z/Pfd414o45</a></p> <pre><code>#include &lt;string&gt; #include &lt;cstdio&gt; #include &lt;iostream&gt; int main() { std::string s...
How to parse floating point number using sscanf
c++
0
56
1
72,306,597
72,306,597
1
true
2022-05-19T14:33:59.257Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to parse floating point number using sscanf<p>This works well, outputting <code>1 3</code></p> <pre><code> std::string s(&quot;driver at 1...
72,314,150
Untar file with subprocess.call is running successfully but with no effect<p>Does anyone know what I am doing wrong with this command:</p> <pre><code>import subprocess subprocess.call('tar -zvxf %s -C %s' % (&quot;file.tar.gz&quot;, '/folder'), shell=True) </code></pre> <p>The code runs without any errors but the file...
<p>If you read the man page, you'll see that the <code>-C</code> parameter is sensitive to order -- it only affects operations that come after it on the command line. So, your file is being unzipped into whatever random directory you happen to be in.</p> <p>You don't need shell for this. Do:</p> <pre><code>import os ...
Untar file with subprocess.call is running successfully but with no effect
python|extract|tar
0
56
1
72,314,188
72,314,188
1
true
2022-05-20T05:55:25.493Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Untar file with subprocess.call is running successfully but with no effect<p>Does anyone know what I am doing wrong with this command:</p> <pre><code>import ...
72,314,679
C error X is not a pointer; did you mean to use '.'<p>I am learning some C, and I have the following code, basically want I would like to do is to increase the size of <code>people</code> array in the for loop, but currently I receive an error. Could you please provide me a fix to my script with a brief explanation?</p...
<p>The error is pretty self-explanatory, given that you know what <code>-&gt;</code> is used for: it is used when the struct (its left operand) is a pointer. It's equivalent to <code>(*pointer_to_struct).</code>. It does not matter what type the right operand of <code>-&gt;</code> got.</p> <p>You have no pointers to st...
C error X is not a pointer; did you mean to use '.'
c
0
56
1
72,314,764
72,314,764
1
true
2022-05-20T06:48:08.940Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: C error X is not a pointer; did you mean to use '.'<p>I am learning some C, and I have the following code, basically want I would like to do is to increase t...
72,314,677
How to update todo item?<p>When clicking on a todo item, an edit window opens, where the user can make changes and save them. I wrote an update function in ChangeNotifier, but when I click on save, an error pops up: This happen because you used a 'BuildCOntext' that does not include the provider of you choice. But the ...
<p>Ok, so if you set your <code>ChangeNotifierProvider</code> in your home, only his child (the HomeScreen) gonna get the <code>ListModel()</code>, that's why in your <code>EditEventBottomSheet</code> the <code>BuildContext</code> doesn't find the <strong>Provider</strong>, but if you want to use it in another Class Wi...
How to update todo item?
flutter|dart
1
56
1
72,315,019
72,315,019
1
true
2022-05-20T06:47:56.800Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to update todo item?<p>When clicking on a todo item, an edit window opens, where the user can make changes and save them. I wrote an update function in C...
72,321,579
How do I set the color of my host name in my bash prompt on macOS Monterey?<p>I have the following line in my <code>.bash_profile</code> file to set up my custom bash prompt;</p> <pre><code>export PS1='\e[0;32m \[`[ $? = 0 ] &amp;&amp; X=2 || X=1; tput setaf $X`\]\h\[`tput sgr0`\]:\w\$ \e[m' </code></pre> <p>but the co...
<p>Number <code>2</code> is dark green, try <code>10</code>(==8+2) :</p> <pre><code>export PS1='\e[0;32m \[`[ $? = 0 ] &amp;&amp; X=10 || X=1; tput setaf $X`\]\h\[`tput sgr0`\]:\w\$ \e[m' </code></pre>
How do I set the color of my host name in my bash prompt on macOS Monterey?
bash
0
56
1
72,322,404
72,322,404
1
true
2022-05-20T15:43:33.867Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I set the color of my host name in my bash prompt on macOS Monterey?<p>I have the following line in my <code>.bash_profile</code> file to set up my cu...
72,325,934
Long table to wide on two columns<p>I would like to widen a long table that has two columns to widen. I've found solutions for converting a long table to wide, but they all take one column and convert it to n columns. I would like to take two columns and convert the table to 2n columns.</p> <p>I used this <a href="http...
<p>for multi columns pivot, it is easier to use <code>case</code> expression</p> <pre><code>select [Date], A1 = max(case when Person = 'A' then Number1 end), B1 = max(case when Person = 'B' then Number1 end), A2 = max(case when Person = 'A' then Number2 end), B2 = max(case when Person = 'B' ...
Long table to wide on two columns
sql|sql-server
0
56
2
72,327,912
72,327,912
1
true
2022-05-21T00:58:15.610Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Long table to wide on two columns<p>I would like to widen a long table that has two columns to widen. I've found solutions for converting a long table to wid...
72,329,079
Need Help resolving npm issues eresolve report<p>Im having issues with doing a simple npm install. I am using angular latest cli version. I have re installed angular, node and npm but it does not seem to resolve these issues.</p> <p>Here is my eresolve-report:</p> <pre><code>While resolving: fsl-angular-task@0.0.0 Foun...
<p>Which <code>npm</code> and <code>node</code> version are you using? I believe that upgrading to a newer node version might solve the problem.</p> <p>This error happens because you are trying to install conflicting packages:</p> <pre><code>@angular/common@&quot;~11.2.14&quot; from the root project // and @angular/com...
Need Help resolving npm issues eresolve report
angular|npm
1
56
1
72,329,150
72,329,150
1
true
2022-05-21T11:21:26.990Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Need Help resolving npm issues eresolve report<p>Im having issues with doing a simple npm install. I am using angular latest cli version. I have re installed...
72,329,175
MariaDB concatenate 2 tables with same number of rows<p>Say I have 2 tables with exactly SAME number of rows, but no other obvious relations:</p> <p>tableA</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>ID</th> <th>items</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>banana</td> </tr> <tr...
<p>try this</p> <pre><code>create table TableA(ID INT, Items varchar(20)); create table TableB(ItemId INT, volume varchar(20)); insert into TableA(Id, items) values (1, 'banana'), (2, 'orange'); insert into TableB(ItemId, volume) values (5550, '50'), (5551, '70'); SELECT A.ID, A.Items, B.ItemId, B.volume FROM ( SE...
MariaDB concatenate 2 tables with same number of rows
sql|mariadb|mariadb-10.6
0
56
2
72,329,319
72,329,319
1
true
2022-05-21T11:34:33.467Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: MariaDB concatenate 2 tables with same number of rows<p>Say I have 2 tables with exactly SAME number of rows, but no other obvious relations:</p> <p>tableA</...
72,332,685
Does mixing impl with generic parameters and without them have any implications?<p>Say, I have the following code:</p> <pre><code>use std::ptr::NonNull; use std::marker::PhantomPinned; use std::pin::Pin; #[derive(Debug)] struct Unmovable { data: Vec&lt;String&gt;, cache: Option&lt;NonNull&lt;String&gt;&gt;, ...
<p>It will be disallowed for type parameters or const generics. But free lifetimes on impl are allowed. They are only disallowed if used in an associated type. The rationale is explained <a href="https://github.com/rust-lang/rust/blob/f001f9301c889101d8a71358b64b96e9707c832b/compiler/rustc_typeck/src/impl_wf_check.rs#L...
Does mixing impl with generic parameters and without them have any implications?
generics|rust
1
56
1
72,333,315
72,333,315
1
true
2022-05-21T19:33:36.997Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Does mixing impl with generic parameters and without them have any implications?<p>Say, I have the following code:</p> <pre><code>use std::ptr::NonNull; use ...
72,334,877
Not able to draw a rectangle in openGl<p>I am trying to draw a sqaure . I have given the co ordinates rightly. But I am not getting a sqaure but a 5 sided polygon as shown in this figure.</p> <p><a href="https://i.stack.imgur.com/FrwzU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FrwzU.png" alt="...
<p>The order of the vertices is wrong. Change the order and draw the vertices either clockwise or counter clockwise:</p> <pre class="lang-cpp prettyprint-override"><code>glBegin(GL_POLYGON); glVertex2f(-249, -249); glVertex2f(-209, -249) glVertex2f(-209, -209); glVertex2f(-249, -209); glEnd(); </code></pre>
Not able to draw a rectangle in openGl
c|opengl|glut
1
56
1
72,335,174
72,335,174
1
true
2022-05-22T04:49:22.257Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Not able to draw a rectangle in openGl<p>I am trying to draw a sqaure . I have given the co ordinates rightly. But I am not getting a sqaure but a 5 sided p...
72,336,253
PHP Array index value<p>I have a simple question that needs to get an element when selecting that reference ID by an input form. I used the following code to do that.</p> <pre><code>$id2=$locationProducts[0]-&gt;inventory_update_stock_details_id; </code></pre> <p>But this code outs only the first element always. AS an ...
<p>I'm not entirely sure what the intended logic is, but I <em><strong>think</strong></em> what you want is to add the InventoryLocationDetails to all InventoryLocationProducts.</p> <p>If that is correct, you could perhaps do something like this:</p> <pre><code> if ($this-&gt;form_validation-&gt;run() == true) { ...
PHP Array index value
php|mysql
0
56
1
72,336,484
72,336,484
1
true
2022-05-22T09:20:53.040Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: PHP Array index value<p>I have a simple question that needs to get an element when selecting that reference ID by an input form. I used the following code to...
72,337,993
Grafana Github authentication - Github returns empty team list<p>I'm trying to configure Grafana to authenticate using Github, but only for members of a certain team. I've configured the <a href="https://grafana.com/docs/grafana/latest/auth/github/" rel="nofollow noreferrer">documentation</a>, but Github returns an emp...
<p>Just figured it out...</p> <p>I had created a GitHub App, not a GitHub <strong>OAuth</strong> App.</p> <p>The devil is in the details</p>
Grafana Github authentication - Github returns empty team list
github|oauth|grafana
1
56
1
72,338,673
72,338,673
1
true
2022-05-22T13:28:09.260Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Grafana Github authentication - Github returns empty team list<p>I'm trying to configure Grafana to authenticate using Github, but only for members of a cert...
72,346,155
Excel VBA Copying 18:00 as 0,750000000003<p>I have two workbooks, one of them is password protected.</p> <pre><code>Sub WorkTime() Dim Employee1 As Workbook Application.ScreenUpdating = False Set Employee1 = Workbooks.Open(Filename:=&quot;J:\Firm\Time\Employee1.xlsx&quot;, Password:=&quot;emp&quot;) MsgBox (E...
<p>That's the <em>numeric</em> time value for 18:00.</p> <p>Apply a time format or use <code>CDate</code> to convert to a true <em>DateTime</em> value. –</p>
Excel VBA Copying 18:00 as 0,750000000003
excel|vba
1
56
1
72,347,674
72,347,674
1
true
2022-05-23T09:24:35.880Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Excel VBA Copying 18:00 as 0,750000000003<p>I have two workbooks, one of them is password protected.</p> <pre><code>Sub WorkTime() Dim Employee1 As Workbook ...
72,347,721
add one column below another one in r<p>I have an issue in adding one column below another column.</p> <p>I have a data like this :</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>Heading 1</th> <th>Heading 2</th> <th>Value</th> </tr> </thead> <tbody> <tr> <td>12</td> <td>34</td> <td>1</td>...
<p>You could do</p> <pre class="lang-r prettyprint-override"><code>data.frame(Heading = c(df$`Heading 1`, df$`Heading 2`), value = rep(df$Value, 2)) #&gt; Heading value #&gt; 1 12 1 #&gt; 2 99 0 #&gt; 3 34 1 #&gt; 4 42 0 </code></pre>
add one column below another one in r
r
0
56
4
72,347,769
72,347,769
1
true
2022-05-23T11:24:07.113Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: add one column below another one in r<p>I have an issue in adding one column below another column.</p> <p>I have a data like this :</p> <div class="s-table-c...
72,349,247
enforce type of Object's Key<p>I'm trying to make a dictionary object that can have only certain keys.</p> <p>I want to limit the keys to the <code>type rate</code>.</p> <pre class="lang-js prettyprint-override"><code>type rate = 60 | 30 | 20 | 15 | 12 | 10 | 6 | 5 | 4 | 3 | 2 | 1; //so i can do this const d = { 60 :...
<p>Try using <code>Partial</code> which makes all keys optional:</p> <pre><code>type rate = 60 | 30 | 20 | 15 | 12 | 10 | 6 | 5 | 4 | 3 | 2 | 1; const d2: Partial&lt;Record&lt;rate, number&gt;&gt; = { 60: 100, 20: 150, }; // no error! </code></pre>
enforce type of Object's Key
typescript
2
56
1
72,349,312
72,349,312
1
true
2022-05-23T13:17:23.430Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: enforce type of Object's Key<p>I'm trying to make a dictionary object that can have only certain keys.</p> <p>I want to limit the keys to the <code>type rate...
72,347,529
How to embed an and operator inside a data.table function?<p>Suppose we start with this dataframe generated by the code immediately beneath:</p> <pre><code>&gt; data1 ID Period Values_1 Values_2 State 1 1 1 5 5 X0 2 1 2 0 2 X1 3 1 3 0 0 X2 4 1...
<p>Perhaps something like this:</p> <pre><code>f &lt;- function(v1,v2,s) { s[cumsum(abs(v1)+abs(v2))==0] &lt;- &quot;END&quot; s } setDT(data1)[order(-Period), State1:=f(Values_1, Values_2, State), by=ID] </code></pre> <p>Output:</p> <pre><code> ID Period Values_1 Values_2 State State1 1: 1 1 5 ...
How to embed an and operator inside a data.table function?
r|data.table
0
56
2
72,350,216
72,350,216
1
true
2022-05-23T11:07:44.097Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to embed an and operator inside a data.table function?<p>Suppose we start with this dataframe generated by the code immediately beneath:</p> <pre><code>&...
72,356,352
How to find a single element in a set that isn't in another using set comprehension<p>I have two sets, set1 and set2... Almost all elements in both sets are the same except for one element.</p> <p>Supporting code is below:</p> <pre><code>set1 = {'dog', 'cat', 'turtle', 'monkey'} set2 = {'dog', 'cat', 'turtle', 'gorilla...
<p>The unique item is the element in the set that's not in the other set. Hence:</p> <pre><code>&gt;&gt;&gt; cat = 'cat' &gt;&gt;&gt; set1 = {'dog', cat, 'turtle', 'monkey'} &gt;&gt;&gt; set2 = {'dog', 'cat', 'turtle', 'gorilla'} &gt;&gt;&gt; {e for e in set2 if e not in set1} {'gorilla'} &gt;&gt;&gt; {e for e in set1...
How to find a single element in a set that isn't in another using set comprehension
python|set
0
56
4
72,356,359
72,356,359
1
true
2022-05-24T01:37:04.617Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to find a single element in a set that isn't in another using set comprehension<p>I have two sets, set1 and set2... Almost all elements in both sets are ...
72,360,519
How to make a function retain its variable value on every recursive call?<p>I have function <code>find_schema_differences(a, b)</code>, which compares two nested dictionaries and returns the difference.</p> <pre><code>def find_schema_differences(master_schema, client_schema): differences = [] for x in master_sc...
<p>I'd reformulate this as a recursive generator function:</p> <pre><code>def find_schema_differences(master_schema, client_schema): for master_key, master_value in master_schema.items(): if master_key not in client_schema: yield (master_key, master_value) elif not isinstance(master_valu...
How to make a function retain its variable value on every recursive call?
python
0
56
3
72,360,688
72,360,688
1
true
2022-05-24T09:32:43.600Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to make a function retain its variable value on every recursive call?<p>I have function <code>find_schema_differences(a, b)</code>, which compares two ne...
72,367,810
how to take a value from nested object in headers<pre><code> headers: { host: 'localhost:3000', connection: 'keep-alive', 'cache-control': 'max-age=0', 'sec-ch-ua': '&quot; Not A;Brand&quot;;v=&quot;99&quot;, &quot;Chromium&quot;;v=&quot;101&quot;, &quot;Google Chrome&quot;;v=&quot;101&quot;', 'sec...
<p>req.headers.connection is a single item. Maybe you're getting confused because the other keys of req.headers have quotes. This should work:</p> <pre><code>return { userAgent: { agent: req.headers[&quot;user-agent&quot;] }, headers: req.headers, }; </code></pre>
how to take a value from nested object in headers
javascript|http-headers|nestjs
0
56
1
72,367,898
72,367,898
1
true
2022-05-24T18:28:36.693Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to take a value from nested object in headers<pre><code> headers: { host: 'localhost:3000', connection: 'keep-alive', 'cache-control': 'max-...
72,367,879
How to stop a queue in NestJs, perform an action and then resume that same queue<p>I’m trying to make the queue of file upload and I’m having a problem, I need to upload the file to s3 bucket in the async function into the queue, but, my queue finalize before the upload file are completed. As can be seeing in the image...
<p>Firstly, it is not possible to use async/await with forEach and as a new array is not needed, it would not be the best option to use the map, instead, choose to use for..of.</p> <p>Your problem is apparently being caused by you doing data processing in a consumer utility hook, try using another process for this task...
How to stop a queue in NestJs, perform an action and then resume that same queue
typescript|file-upload|queue|nestjs
0
56
1
72,368,148
72,368,148
1
true
2022-05-24T18:34:55.587Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to stop a queue in NestJs, perform an action and then resume that same queue<p>I’m trying to make the queue of file upload and I’m having a problem, I ne...
72,372,943
Need idea on how to query dynamo db for specific date range in node<p>Need to design a table in Dynamo DB to get the month-wise data like how many users logged in to the application on a particular time frame as below</p> <ol> <li>Today how many users logged in?</li> <li>Particular month how many users logged in? 3 Pa...
<p>If your user items are small, a single query for users can return ~5,000 items (all your users). If you run this every 10 minutes, your monthly on-demand cost is $0.12.</p> <p>Just query all the users and calculate the metrics on the server, it's not worth the time to design anything more complex.</p>
Need idea on how to query dynamo db for specific date range in node
node.js|aws-lambda|amazon-dynamodb|dynamodb-queries
0
56
1
72,376,546
72,376,546
1
true
2022-05-25T06:39:56.883Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Need idea on how to query dynamo db for specific date range in node<p>Need to design a table in Dynamo DB to get the month-wise data like how many users logg...
72,376,850
I am getting RangeError (index): Invalid value: Valid value range is empty: 0 in my flutter code<p>I am getting <code>RangeError (index): Invalid value: Valid value range is empty: 0</code> The error is pointing to this code below ............................................................................................
<p>Make sure the incoming variables have a value.</p> <pre><code>if (datas['users'].isNotEmpty) { Map userStats = datas['users'][0]; } if (datas['transactions'].isNotEmpty) { Map trxnStats = datas['transactions'][0]; } </code></pre>
I am getting RangeError (index): Invalid value: Valid value range is empty: 0 in my flutter code
flutter
1
56
1
72,377,061
72,377,061
1
true
2022-05-25T11:32:21.913Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I am getting RangeError (index): Invalid value: Valid value range is empty: 0 in my flutter code<p>I am getting <code>RangeError (index): Invalid value: Vali...
72,355,619
AutoLayout animate sliding view out and sliding other views over to take its place<p><em>This is a follow-up question to <a href="https://stackoverflow.com/questions/72221659/uistackview-change-item-spacing-as-stack-view-changes-sizes">this question</a>.</em></p> <p>Following the solution proposed by @DonMag, where the...
<p>I'm not an Apple engineer, so I don't know the ins-and-outs of this, but I've seen it often enough.</p> <p>As a <em>general rule</em> ... when animating constraints we want to allow auto-layout to manage the view hierarchy from a &quot;top down&quot; standpoint.</p> <p>If you change constraints and tell a subview to...
AutoLayout animate sliding view out and sliding other views over to take its place
ios|animation|uiview|autolayout
0
56
1
72,377,526
72,377,526
1
true
2022-05-23T23:04:48.623Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: AutoLayout animate sliding view out and sliding other views over to take its place<p><em>This is a follow-up question to <a href="https://stackoverflow.com/q...
72,379,325
How can I change my DFS maze algorithm to generate more than one path/be not perfect?<p>So far I got an DFS maze algorithm that gets me and perfect maze with one path exactly. I was wondering how I could get more than one path to my end with little change. Should I just randomly remove walls? But the thing is that I do...
<p>To make a maze with multiple solutions, you would want to remove walls that would connect the solution path to a non-solution path. That would then add that non-solution path to the alternate solutions.</p> <p>You might also want to remove some walls between multiple non-solution paths just to make it interesting.</...
How can I change my DFS maze algorithm to generate more than one path/be not perfect?
algorithm|depth-first-search|maze
0
56
1
72,379,656
72,379,656
1
true
2022-05-25T14:18:25.313Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I change my DFS maze algorithm to generate more than one path/be not perfect?<p>So far I got an DFS maze algorithm that gets me and perfect maze with...
72,369,532
Incomplete Sierpinski's Triangle Displaying<p>I am following the textbook <a href="https://natureofcode.com/book/chapter-7-cellular-automata/" rel="nofollow noreferrer">The Nature of code</a>'s Example 7.1. (<em>The original code is written in Java, but since the processing library is functionally identical to p5.js, I...
<p>Based on your logic for computing the next generation, <code>this.cells[0]</code> and <code>this.cells.at(-1)</code> are always undefined, which is rendered as black. You might want to initialize these to 0, and possibly use a wraparound logic for computing their value (i.e. <code>cells[0] = rule(cells.at(-1), cells...
Incomplete Sierpinski's Triangle Displaying
javascript|p5.js|cellular-automata
2
56
1
72,381,340
72,381,340
1
true
2022-05-24T21:13:06.750Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Incomplete Sierpinski's Triangle Displaying<p>I am following the textbook <a href="https://natureofcode.com/book/chapter-7-cellular-automata/" rel="nofollow ...
72,383,835
How to build a query that includes # and @ in Twitter API v2?<p>I'm not very good at interpreting how to build a <code>query=</code> with multiple operators. The below examples of attempts that are invalid for the <a href="https://developer.twitter.com/en/docs/twitter-api/tweets/counts/api-reference/get-tweets-counts-r...
<p>Figured it out. It appears Twitter v2 API requires encoded <code>#</code> (<code>%23</code>), spaces (<code>%20</code>), and <code>@</code> (<code>%40</code>). The below query is valid:</p> <pre><code>https://api.twitter.com/2/tweets/counts/recent?query=%23animals%20OR%20%40animals </code></pre>
How to build a query that includes # and @ in Twitter API v2?
twitter-api-v2
0
56
1
72,384,105
72,384,105
1
true
2022-05-25T20:31:37.957Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to build a query that includes # and @ in Twitter API v2?<p>I'm not very good at interpreting how to build a <code>query=</code> with multiple operators....
72,384,494
How to iterate over window of next N elements for each row in pandas dataframe<p>I have a problem with labeling rows in my dataframe. The idea is that I want to know whether current (iterated) value multiplied by small float is higher than any of next 60 rows in the dataframe.</p> <p>I've already found a solution that ...
<p>In your case check <code>rolling</code></p> <pre><code>df['new'] = df.value.shift(-1).iloc[::-1].rolling(3).max().ge(df.value) Out[56]: 0 True 1 True 2 False 3 False 4 False Name: value, dtype: bool </code></pre>
How to iterate over window of next N elements for each row in pandas dataframe
python|pandas|performance|loops
0
56
1
72,384,584
72,384,584
1
true
2022-05-25T21:46:00.993Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to iterate over window of next N elements for each row in pandas dataframe<p>I have a problem with labeling rows in my dataframe. The idea is that I want...
72,384,550
Python - List of lists - S&P500<p>I am new to python and am looking to analyze the S&amp;P500 by sector. I have assigned symbols to all 11 sectors in the S&amp;P with the first two looking like: Financials = ['AFL', 'AIG', .... 'ZION'] Energy = ['APA', 'BKR', ... 'SLB']</p> <p>I then create a new list (of lists) which...
<p>Perhaps you could use a dictionary</p> <pre><code>sectors = { 'Financials':['AFL', ...], # rest of your lists } </code></pre> <p>Then you can iterate over the whole dict and access both names and data associated with those names</p> <pre><code>for key, value in sectors.items(): print(f'Sector name: {key}...
Python - List of lists - S&P500
python
0
56
2
72,384,588
72,384,588
1
true
2022-05-25T21:53:43.353Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python - List of lists - S&P500<p>I am new to python and am looking to analyze the S&amp;P500 by sector. I have assigned symbols to all 11 sectors in the S&...
72,321,285
Python script... I need to take API Key from the command prompt into Main.py<p>Need help to take an API key from the command prompt and insert it into a particular cell of an excel sheet. I plan to add it into Main.py. but not sure where in the script.</p> <pre><code> API_key = input(&quot;What is the API key? \n&quot;...
<p>The code in your description works. You can do it like this:</p> <pre><code>from openpyxl import Workbook book = Workbook() sheet = book.active API_key = input(&quot;What is the API key? \n&quot;) sheet['A1'] = API_key book.save(&quot;sample.xlsx&quot;) </code></pre>
Python script... I need to take API Key from the command prompt into Main.py
python|excel
0
56
1
72,386,603
72,386,603
1
true
2022-05-20T15:17:33.360Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python script... I need to take API Key from the command prompt into Main.py<p>Need help to take an API key from the command prompt and insert it into a part...
72,385,728
I want to create an if statement in a public sub to open a specific query based on button click<p>I am wanting to consolidate my VBA so it is easier to manage and see rather than duplicating it several times. I would like to then write an if statement inside of the sub that opens the recordset based on the button I cli...
<pre><code>Sub EmailQuery(strQueryName as string) Dim cn As ADODB.Connection Dim rs As ADODB.Recordset Dim strEmail As String Set cn = CurrentProject.Connection Set rs = New ADODB.Recordset rs.Open strQueryName, cn With rs .movelast .movefirst Do While Not .EOF ...
I want to create an if statement in a public sub to open a specific query based on button click
vba|ms-access
0
56
1
72,387,168
72,387,168
1
true
2022-05-26T01:32:02.027Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I want to create an if statement in a public sub to open a specific query based on button click<p>I am wanting to consolidate my VBA so it is easier to manag...
72,390,733
JMeter embedded resources being downloaded when disabled<p>I have recorded a simple get/post test using the Blazemeter chrome plugin and am tweaking it in JMeter to be ready to use. However, the test fails because one of the embedded resources fails to load, which if it was correct, would be understandable.</p> <p>I do...
<ol> <li><p><a href="https://chrome.google.com/webstore/detail/blazemeter-the-continuous/mbopgmdnpcbohhpnfglgohlbhfongabi?hl=en" rel="nofollow noreferrer">JMeter Chrome Extension</a> adds <a href="https://www.blazemeter.com/blog/why-its-so-important-use-jmeters-http-request-defaults" rel="nofollow noreferrer">HTTP Requ...
JMeter embedded resources being downloaded when disabled
jmeter|jmeter-5.0|blazemeter
0
56
1
72,391,025
72,391,025
1
true
2022-05-26T10:59:32.023Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: JMeter embedded resources being downloaded when disabled<p>I have recorded a simple get/post test using the Blazemeter chrome plugin and am tweaking it in JM...
72,390,929
Convert year-month into Date while GroupBy<p>I have column in Dataframe that is PERIOD and it is in format of:</p> <pre><code>PERIOD ACTUAL 202201 343.34 202202 545.33 202203 54 202201 989.2 </code></pre> <p>It means in DMY format 01-01-2022, 01-02-2022, 01-03-2022</p> <p>I am using it inside:</p> <pre><code...
<p>Your question wasn't totally clear as didn't have a workable example but I've had a crack at it here for you with data I made up:</p> <pre><code>import pandas as pd data = {'period':['202201','202201','202201','202201','202202','202202','202203'], 'actuals':[10,20,30,40,50,60,70]} df = pd.DataFrame(data) print...
Convert year-month into Date while GroupBy
python|pandas|dataframe|numpy
0
56
1
72,391,682
72,391,682
1
true
2022-05-26T11:14:28.320Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Convert year-month into Date while GroupBy<p>I have column in Dataframe that is PERIOD and it is in format of:</p> <pre><code>PERIOD ACTUAL 202201 343.34...
72,794,996
VBA WorksheetFunction<p>I have these entries in my VBA instead of using WorksheetFunction as I couldn't work out how to get it to work...</p> <p>If possible, I would love to have at least the first two lines replaced with WorksheetFunction. Any help would be very much appreciated. Thanks in advance!</p> <pre><code>Appl...
<p>Make sure <strong>every</strong> object that is located in a worksheet (like <code>Range</code>, <code>Cells</code>, <code>Rows</code>, <code>Columns</code> etc) are referenced to a worksheet!</p> <p>Therefore using <code>Worksheets(&quot;Handling Units&quot;).Range(&quot;HUNUM01&quot;)</code> is more straight forwa...
VBA WorksheetFunction
excel|vba
1
56
2
72,796,384
72,796,384
1
true
2022-06-29T02:04:49.950Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: VBA WorksheetFunction<p>I have these entries in my VBA instead of using WorksheetFunction as I couldn't work out how to get it to work...</p> <p>If possible,...
72,803,616
Event is not rendering from $store.state Vuex<p>I'm facing problem to render my events on calendar, my Vuex is working fine (I think).<br /> I can log my events in console.log and check in Vue DevTools.</p> <p>Any advice to render on calender after I create in Vuex?<br /> methods:</p> <pre><code> methods: { handl...
<p>Since I can't see the full code example I can only guess, that you did not define a getter as followed:</p> <pre><code>events: (state) =&gt; state.events, </code></pre> <p>If you want to compute the state, change your code to</p> <pre><code> computed: { ...mapState([&quot;events&quot;]), } </code></pre> <p>Ho...
Event is not rendering from $store.state Vuex
vue.js|fullcalendar|vuex|fullcalendar-5
0
56
1
72,803,813
72,803,813
1
true
2022-06-29T14:59:48.463Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Event is not rendering from $store.state Vuex<p>I'm facing problem to render my events on calendar, my Vuex is working fine (I think).<br /> I can log my ev...
72,803,622
SendGrid send mail - how to keep track of emails?<p>I am sending emails from sendgrid from my backend. When I send the email, the response is 202 and the response body is empty. Since the response body is empty, i do not have any information like an ID to track the email events in my system.</p> <p>When I go to fetch t...
<p>The response body of a successful Mail Send API call is empty, but the response contains a <code>x-message-id</code> header which you can use to retrieve details about the messages being sent.</p> <p>Since one API call to the Mail Send API can result in multiple emails being sent, this ID identifies the group of mes...
SendGrid send mail - how to keep track of emails?
sendgrid
0
56
1
72,803,937
72,803,937
1
true
2022-06-29T15:00:02.647Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: SendGrid send mail - how to keep track of emails?<p>I am sending emails from sendgrid from my backend. When I send the email, the response is 202 and the res...
72,806,254
@StateObject issue inside init() routine<p>I can't get an @StateObject variable correctly initialized within the main view init() routine. It looks as if the object gets reinitialized at every modification and ends up being unpopulated when the ui gets ready. Here is the code:</p> <pre><code> import SwiftUI class Node...
<p>As referenced in comment here is a fixed variant (tested with Xcode 13.4 / iOS 15.5)</p> <pre><code>struct ContentView: View { @StateObject var objects: Objects init() { let objects = Objects() // &lt;&lt; created var node = Node() node.x = 50 node.y = 200 print(nod...
@StateObject issue inside init() routine
swiftui
0
56
2
72,806,584
72,806,584
1
true
2022-06-29T18:31:56.193Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: @StateObject issue inside init() routine<p>I can't get an @StateObject variable correctly initialized within the main view init() routine. It looks as if the...
72,807,426
get painting, of canvas in react<p>hello i build a drawing app with react and I want receive what the user has drawn when the user removes the mouse from the canvas . and i want it's alwayes repeat, when user has stoped drawing. what thing do you suggest to me for solve this problem . thanks for your help i used mousec...
<p>you should add this line into your endDrawing Func:</p> <pre><code> console.log(canvasRef.current.toDataURL()); </code></pre> <p>this is give you a link in console, and you can save it in another varriable.</p>
get painting, of canvas in react
javascript|css|reactjs|canvas
2
56
1
72,810,859
72,810,859
1
true
2022-06-29T20:24:53.347Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: get painting, of canvas in react<p>hello i build a drawing app with react and I want receive what the user has drawn when the user removes the mouse from the...
72,812,811
Terraform how to create a block of code based on a conditions<p>I'm trying to create a resource with a creation condition for the github_configuration block, but I don't find such an option. Depending on the environment I need or don't need git config. I can't figure out how I can set up such a dependency</p> <pre><cod...
<p>To make <code>github_configuration</code> block optional, you can do:</p> <pre><code> dynamic &quot;github_configuration&quot; { for_each = var.Environment == &quot;dev&quot; ? [1] : [] content { account_name = var.Environment == &quot;dev&quot; ? var.AccountName : null branch_name = va...
Terraform how to create a block of code based on a conditions
azure|terraform|terraform-provider-azure|terraform-template-file
1
56
1
72,812,898
72,812,898
1
true
2022-06-30T08:46:00.223Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Terraform how to create a block of code based on a conditions<p>I'm trying to create a resource with a creation condition for the github_configuration block,...
72,813,753
How check value by consecutive date variable<p>I have database table in SNOWFLAKE, where I need check for each customer if there is FLAG_1 == 1 at minimum 3 days in row. Flag_1 indicates whether the order contained any specific goods. And create new table with customer_id and flag_2. I really don't know how to handle t...
<p>Maybe this can be help:</p> <pre><code>with calcflag as ( select customer_id, IFF( sum(flag_1) over (PARTITION by customer_id order by order_date rows between 3 preceding and 1 preceding) = 3, 1, 0 ) as new_flag from tmp_Test) select customer_id, max(new_flag) flag_2 from calcflag group by 1 order by 1; +---------...
How check value by consecutive date variable
sql|snowflake-cloud-data-platform
1
56
3
72,814,637
72,814,637
1
true
2022-06-30T09:53:53.460Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How check value by consecutive date variable<p>I have database table in SNOWFLAKE, where I need check for each customer if there is FLAG_1 == 1 at minimum 3 ...
72,818,123
Python: Remove digits and decimals from text file<p>i wrote this code to remove digits and dots from a text file</p> <pre><code>import fileinput for line in fileinput.input(&quot;/content/drive/MyDrive/011186973309203002021041922243182.txt&quot;, inplace=True): #remove digits result = ''.join(i for i in ...
<p>Try to remove the <code>inplace=True</code> from your function call. According to the fileinput <a href="https://docs.python.org/3/library/fileinput.html" rel="nofollow noreferrer">documentation</a></p> <blockquote> <p>&quot;if the keyword argument inplace=True is passed to fileinput.input() or to the FileInput cons...
Python: Remove digits and decimals from text file
python
0
56
2
72,818,427
72,818,427
1
true
2022-06-30T15:08:06.597Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python: Remove digits and decimals from text file<p>i wrote this code to remove digits and dots from a text file</p> <pre><code>import fileinput for line i...
72,828,151
Why can't I access data() using 'this' directly?<p>I work on Vue2 app. What I have noticed is sometimes I can't access elements stored in <code>data()</code> using <code>this</code> directly in my code. What I mean by that is that sometimes I need to assign <code>this...</code> to a variable inside a method to make it ...
<p>You have defined a local function named <code>getPos</code> inside the <code>addRegals</code> method. The only problem is that <code>getPos</code> does not share <code>this</code> with <code>addRegals</code>. However, when you declare the variable, it is available in the <code>getPos</code> closure.</p> <p>The solut...
Why can't I access data() using 'this' directly?
javascript|vue.js
0
56
1
72,828,330
72,828,330
1
true
2022-07-01T10:50:42.783Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why can't I access data() using 'this' directly?<p>I work on Vue2 app. What I have noticed is sometimes I can't access elements stored in <code>data()</code>...
72,831,386
How safe is to store files into the document directory?<p>I am writing an iOS app in Swift and Xcode where I allow users to download some files from a server and to store them into the iPhone's document directory.</p> <p>How safe is it to do so?</p> <p>Is it possible for a user to access one of these files from outside...
<p>For jailbroken iPhone i think yes it's possible to access apps directories.</p> <p>For normal iPhone I'm pretty sure other apps can't access it as all third-party apps are “sandboxed&quot;</p> <p><a href="https://support.apple.com/en-gb/guide/security/sec15bfe098e/web#:%7E:text=Sandboxing,information%20stored%20by%2...
How safe is to store files into the document directory?
ios|swift|download|nsdocumentdirectory
-1
56
1
72,831,680
72,831,680
1
true
2022-07-01T15:18:27.737Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How safe is to store files into the document directory?<p>I am writing an iOS app in Swift and Xcode where I allow users to download some files from a server...
72,832,033
Creating private channels and deleting them in the discord<p>I want to make a system where when a user enters the private creation channel, a text channel and a voice channel are created, in the text the creator can give and take away the rights to enter the private, and if the owner leaves the private, then in a minut...
<ol> <li>you're using normal sleep in async code. use async sleep.</li> <li>try using discord.ext.tasks to create timer. instead of sleep.</li> </ol> <p>and the channel deletion. This should work :</p> <pre class="lang-py prettyprint-override"><code>@bot.event async def on_voice_state_update(member, before, after): ...
Creating private channels and deleting them in the discord
python|database|discord.py|bots|pymongo
-1
56
1
72,832,495
72,832,495
1
true
2022-07-01T16:11:52.563Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Creating private channels and deleting them in the discord<p>I want to make a system where when a user enters the private creation channel, a text channel an...
72,833,048
BigQuery - Extract first non-null value from JSON collection<p>Here is how my collection looks:</p> <p><a href="https://i.stack.imgur.com/0fxji.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0fxji.png" alt="" /></a></p> <p>What I would like to is to get a first non-null value from it, something like...
<p>Consider below approach</p> <pre><code>create temp function values(input string) returns array&lt;string&gt; language js as &quot;&quot;&quot; return Object.values(JSON.parse(input)); &quot;&quot;&quot;; select my_collection, ( select val from unnest(values(my_collection)) val with offset where not val i...
BigQuery - Extract first non-null value from JSON collection
sql|json|google-bigquery
0
56
2
72,833,169
72,833,169
1
true
2022-07-01T17:56:27.057Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: BigQuery - Extract first non-null value from JSON collection<p>Here is how my collection looks:</p> <p><a href="https://i.stack.imgur.com/0fxji.png" rel="nof...
72,822,383
SublimeText4: How to disable LSP-typescript for specific directories?<p>I have LSP and LSP-typescript packages installed.</p> <p>I also have directory with typescript code snippets (read: gists), which i sometimes open with sublime. When i interact with such a snippet, i usually get some typecript syntax warnings, comi...
<p>Apparently it is not possible to exclude directories, but you can achieve something similar by creating new project and disabling chosen LSP-clients at project level. It is doable via command palette =&gt; LSP: Disable language server in project.</p>
SublimeText4: How to disable LSP-typescript for specific directories?
sublimetext|language-server-protocol|sublimetext4
0
56
1
72,838,237
72,838,237
1
true
2022-06-30T21:49:48.180Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: SublimeText4: How to disable LSP-typescript for specific directories?<p>I have LSP and LSP-typescript packages installed.</p> <p>I also have directory with t...
72,838,567
Aggregating on 2 columns and turning into columns on another<p>I have the following dataframe of HTTP requests with columns <code>IP</code>, <code>Timestamp</code>, <code>user_agent</code> and <code>hostname</code>:</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th style="text-align: center;"...
<p>You can insert a <a href="https://spark.apache.org/docs/3.1.1/api/python/reference/api/pyspark.sql.GroupedData.pivot.html#pyspark.sql.GroupedData.pivot" rel="nofollow noreferrer"><strong><code>pivot</code></strong></a> between <code>groupBy</code> and <code>agg</code></p> <pre class="lang-py prettyprint-override"><c...
Aggregating on 2 columns and turning into columns on another
dataframe|apache-spark|pyspark|count|aggregate
0
56
2
72,838,879
72,838,879
1
true
2022-07-02T11:08:07.103Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Aggregating on 2 columns and turning into columns on another<p>I have the following dataframe of HTTP requests with columns <code>IP</code>, <code>Timestamp<...
72,830,836
Visual Studio rename stash<p>Is it possible to set the name of a stash in <strong>Visual Studio</strong>'s <em>Git Changes</em> window instead of standard <code>WIP on &lt;branch name&gt;</code>?</p>
<p>You can just add commit message when you create the stash - then you will see this as a description for your stash instead of the default <code>wip on &lt;branchname&gt;</code>.</p>
Visual Studio rename stash
visual-studio|ide|visual-studio-2022
0
56
1
72,839,388
72,839,388
1
true
2022-07-01T14:33:06.833Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Visual Studio rename stash<p>Is it possible to set the name of a stash in <strong>Visual Studio</strong>'s <em>Git Changes</em> window instead of standard <c...
72,839,254
Pull data in from firestore with React<p>From my understanding, if i use the code below to retrieve what i have in firestore, it should be an array. I tried</p> <pre><code>data.forEach((doc) =&gt; { console.log(doc.id, &quot; =&gt; &quot;, doc.data()); }); </code></pre> <p>standard example code from google firestore...
<p>When you call</p> <pre><code>setPostList({ ...doc.data() }); </code></pre> <p>It will overwrite the old state, so what you would need to do is to create an array from Firestore data and then set that whole array inside of state like below</p> <pre><code> useEffect(() =&gt; { const getPosts = async () =&gt; { ...
Pull data in from firestore with React
reactjs|firebase|google-cloud-firestore
0
56
2
72,839,411
72,839,411
1
true
2022-07-02T13:02:42.113Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pull data in from firestore with React<p>From my understanding, if i use the code below to retrieve what i have in firestore, it should be an array. I tried<...
72,841,998
Javascript - localStorage issues<p>In the script below, I want to be able to display on the main html page lists of paragraphs saved in the localstorage. In the html I defined an are with the id &quot;content&quot;. I want to display the texte stored in the localstorage in this area.</p> <p>In the script below the func...
<p>displaylocalstorage is not being called.</p> <p>add this to your js</p> <pre><code>const buttonshow = document.getElementById(&quot;buttonshow&quot;); buttonshow.addEventListener(&quot;click&quot;, displaylocalstorage); </code></pre> <p>and to your html:</p> <pre><code> &lt;input type=&quot;button&quot; ...
Javascript - localStorage issues
javascript|html|local-storage|displaytag|remove-if
2
56
1
72,842,207
72,842,207
1
true
2022-07-02T19:44:13.507Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Javascript - localStorage issues<p>In the script below, I want to be able to display on the main html page lists of paragraphs saved in the localstorage. In ...
72,842,468
python pandas - how to transform ds into dataframe<p>By using the below code, I have the following output. But I need to create a plot from it (ggplot). My understanding is that I need to transform the DS to a DF.</p> <p>Can someone help me on how to make my current dataset A,to look like a dataframe B as per below?</p...
<p>When grouping the DataFrame using more columns you get a MultiIndex.</p> <p>You can use the <code>reset_index</code> method (see <a href="https://pandas.pydata.org/docs/reference/api/pandas.Series.reset_index.html" rel="nofollow noreferrer">docs</a>) to transform the MultiIndex into columns of a DataFrame.</p> <p>Fo...
python pandas - how to transform ds into dataframe
python|pandas|dataframe
0
56
2
72,842,675
72,842,675
1
true
2022-07-02T21:16:42.187Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: python pandas - how to transform ds into dataframe<p>By using the below code, I have the following output. But I need to create a plot from it (ggplot). My u...
72,842,217
Problems with debugging Fortran in Visual Studio 2022<p>I recently downloaded the Intel oneAPI HPC Toolkit to try some Fortran development in Visual Studio. The installation worked, and I can make Fortran projects and files. However I can't debug or run them. Is there any way to fix this?</p>
<p>Are you sure you can't run them or are they running so fast that the program starts and finishes in a blink of an eye.</p> <ol> <li>Pop up the source</li> <li>Move the cursor to the first executable statement. Then press F9. A red dot will appear on the left of the code. This indicates a breakpoint. If you get a...
Problems with debugging Fortran in Visual Studio 2022
visual-studio|fortran
-2
56
1
72,845,322
72,845,322
1
true
2022-07-02T20:27:15.667Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Problems with debugging Fortran in Visual Studio 2022<p>I recently downloaded the Intel oneAPI HPC Toolkit to try some Fortran development in Visual Studio. ...
72,847,404
How can I make Visual Studio Code auto format the code?<p>How can I make <strong>Visual Studio Code</strong> auto format to adequately render my methods and loops indented? Although I tried <code>Ctrl + K</code> and <code>Ctrl + D</code>, they didn't work for me.</p>
<p>You can press <code>Control + Shift + P</code> or <code>Command + Shift + P</code> (Mac) to open the command palette and type &quot;settings&quot; and then select &quot;Preferences: Open User Settings&quot; option. Search for &quot;format on save&quot; setting and check the checkbox. Whenever you save your file, it ...
How can I make Visual Studio Code auto format the code?
visual-studio-code
0
56
1
72,847,594
72,847,594
1
true
2022-07-03T14:42:13.603Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I make Visual Studio Code auto format the code?<p>How can I make <strong>Visual Studio Code</strong> auto format to adequately render my methods and ...
72,853,790
Azure machine learning compute bicep template naming error<p>I have a file called machine-learning.bicep file which contains both resources machine learning workspace and compute(I want to keep both resources together). Getting the following naming error for the compute resource 'incorrect segment lengths. A nested res...
<p>Here, you are missing the parent/child relationship between the ML workspace and the compute resources.</p> <p>If you add the <code>parent</code> property on the compute resource it should work:</p> <pre><code>resource amlci 'Microsoft.MachineLearningServices/workspaces/computes@2020-09-01-preview' = { name: 'mlw-...
Azure machine learning compute bicep template naming error
azure|machine-learning|azure-resource-manager|azure-bicep
0
56
1
72,854,552
72,854,552
1
true
2022-07-04T08:29:49.793Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Azure machine learning compute bicep template naming error<p>I have a file called machine-learning.bicep file which contains both resources machine learning ...
72,853,827
Add dataframe column WITH VARYING VALUES to MySQL table?<p>Pretty simple question, but not sure if it’s possible from what I’ve seen so far online.</p> <p>To keep it simple, let’s say I have a MySQL table with 1 column and 5 rows made already. If I have a pandas dataframe with 1 column and 5 rows, how can I add that da...
<p>You can use <a href="https://dev.mysql.com/doc/refman/8.0/en/insert-on-duplicate.html" rel="nofollow noreferrer">INSERT ... ON DUPLICATE KEY UPDATE</a>.</p> <p>You have the following table:</p> <pre><code>create table tbl ( index_ int , col_1 int , primary key index_(`index_`) ) ; insert into tbl values (1,1), (2,...
Add dataframe column WITH VARYING VALUES to MySQL table?
python|mysql|pandas
0
56
1
72,854,702
72,854,702
1
true
2022-07-04T08:33:42.637Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Add dataframe column WITH VARYING VALUES to MySQL table?<p>Pretty simple question, but not sure if it’s possible from what I’ve seen so far online.</p> <p>To...
72,856,953
show list of records chosen by a category in a category tree on a separate page<p>TYPO3 11.5.12, events2 8.0.1</p> <p>I get the used categories of a calendar (<code>https://www.my-domain.de/lehre/kalender</code>) in a category tree with the following fluid</p> <pre><code>&lt;ul&gt; &lt;f:for each=&quot;{selectorDat...
<p>It's difficult in TYPO3 (or in general) to combine data from several tables in the URL.<br /> Therefore the most simple and reliable approach is to create for each category a distinct page, there you can likely limit the output from events2 to the one category only (Sorry, I never used events2,so I never know for 10...
show list of records chosen by a category in a category tree on a separate page
typo3|categories
0
56
1
72,857,874
72,857,874
1
true
2022-07-04T12:41:18.370Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: show list of records chosen by a category in a category tree on a separate page<p>TYPO3 11.5.12, events2 8.0.1</p> <p>I get the used categories of a calendar...
72,858,872
Error: Null check operator used on a null value - for boolean value - in Flutter<p><a href="https://flutterigniter.com/checking-null-aware-operators-dart/" rel="nofollow noreferrer">https://flutterigniter.com/checking-null-aware-operators-dart/</a></p> <p><a href="https://stackoverflow.com/questions/64278595/null-check...
<p>you can use ? instead of ! which means that it may or maynot be null. If you add ! you are mentioning that its not null but the value is unknown</p> <pre><code>d.data?.lockoutDetails ?? true </code></pre>
Error: Null check operator used on a null value - for boolean value - in Flutter
flutter|dart|dart-null-safety
0
56
3
72,858,943
72,858,943
1
true
2022-07-04T15:13:21.520Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Error: Null check operator used on a null value - for boolean value - in Flutter<p><a href="https://flutterigniter.com/checking-null-aware-operators-dart/" r...
72,865,756
How can I transfer matrix data from Matlab to OpenCV, C++?<p>I have a 57X1 double matrix in Matlab and I want to find a way to save that data and then load it to a new OpenCV Mat. For actual images I used to do <code>imwrite</code> in Matlab and then <code>imread</code> in OpenCV but, in this current situation, the res...
<p>The simplest way is to just use csvwrite to write as a text file, and then load it in C++ by reading the numbers from the text file.</p> <p>If you must have binary exact values, you can use the fopen, fwrite, fclose to write the values in binary format, and then use the equivalent functions (i.e. fread or ifstream::...
How can I transfer matrix data from Matlab to OpenCV, C++?
c++|matlab|opencv|matrix
2
56
1
72,865,967
72,865,967
1
true
2022-07-05T07:46:44.607Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I transfer matrix data from Matlab to OpenCV, C++?<p>I have a 57X1 double matrix in Matlab and I want to find a way to save that data and then load i...
72,870,282
Why does bootstrap formatting not work in my typoscript?<p>I am using a Typo3(11.5.12) server, set up locally with xampp. I am trying to understand how bootstrap works in typoscript, so I followed <a href="https://www.youtube.com/watch?v=jtkjlAAD2Hw&amp;list=PLUxFY3H2SU4iZpoSocMXOT424aiiMGEOQ&amp;index=3&amp;ab_channel...
<p>In newer TYPO3 versions <code>.js</code> and <code>.css</code> sources cannot be in <code>./fileadmin</code>. This is enforced by the Content-Security-Policy (CSP) headers which are set in the default <code>./public/fileadmin/.htaccess</code> (<a href="https://github.com/TYPO3/typo3/blob/main/typo3/sysext/install/Re...
Why does bootstrap formatting not work in my typoscript?
typo3|typoscript
1
56
1
72,870,581
72,870,581
1
true
2022-07-05T13:27:55.943Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why does bootstrap formatting not work in my typoscript?<p>I am using a Typo3(11.5.12) server, set up locally with xampp. I am trying to understand how boots...
72,844,241
How to style css of scrollbar at the root level?<pre class="lang-css prettyprint-override"><code>body { overflow-y: scroll; ::-webkit-scrollbar { width: 10px; } ::-webkit-scrollbar-thumb { background-color: var(--scroll-thumb-color); border-radius: 5px; } ::-webkit-scrollbar-track { backgrou...
<p>Your selectors don't seem to be correct.</p> <p>If you're using SASS it should be:</p> <pre><code>body { &amp;::-webkit-scrollbar { width: 10px; } &amp;::-webkit-scrollbar-thumb { background-color: var(--scroll-thumb-color); border-radius: 5px; } &amp;::-webkit-scrollbar-track { backgroun...
How to style css of scrollbar at the root level?
javascript|html|css|user-interface|frontend
0
56
1
72,871,736
72,871,736
1
true
2022-07-03T06:02:44.177Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to style css of scrollbar at the root level?<pre class="lang-css prettyprint-override"><code>body { overflow-y: scroll; ::-webkit-scrollbar { wid...
72,871,578
visibility: hidden svg sibling side effect<p>So I have 2 identical SVG images following each other.<br> When I apply <code>style=&quot;visibility: hidden&quot;</code> attribute to first of it, both svg elements disappears.<br> Can anyone explain why?</p> <p><div class="snippet" data-lang="js" data-hide="false" data-con...
<p>There is a difference between visibility and display in CSS. The first is inherited, the second isn't.</p> <p>Therefore having the first svg as visibility: hidden means that its children also are visibility: hidden.</p> <p>The second svg does not of itself inherit this hidden visibility but it is using the path defi...
visibility: hidden svg sibling side effect
html|css|svg|visibility
0
56
2
72,874,045
72,874,045
1
true
2022-07-05T14:59:21.227Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: visibility: hidden svg sibling side effect<p>So I have 2 identical SVG images following each other.<br> When I apply <code>style=&quot;visibility: hidden&quo...
72,873,926
how can i retrieve value in JSON string in lambda python3<p>I'm developing an AWS lambda function that is triggered from an event bridge and then putting another event using python but struggling to retrieve a value from a variable in the Json string</p> <p>below is the code</p> <pre><code>import json, boto3 client = ...
<p>You don't have enough escaping in there. If <code>testV2</code> is supposed to be a JSON string emebedded in a JSON string embedded in as JSON string, then you need more string escapes. I would let <code>json.dumps</code> handle that:</p> <pre><code>import json event = {'e1': 99, 'e2': 101} testV2_dict={ &quot...
how can i retrieve value in JSON string in lambda python3
python|json|aws-lambda|aws-event-bridge
0
56
2
72,874,100
72,874,100
1
true
2022-07-05T18:21:51.617Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how can i retrieve value in JSON string in lambda python3<p>I'm developing an AWS lambda function that is triggered from an event bridge and then putting ano...
72,875,201
Remove all elements except string from list<p>I have a list which looks like this <code>[[{a:7},&quot;1&quot;,{x:0.25},&quot;2&quot;],[{y:0.25,x:1.5},&quot;4&quot;],[{y:-0.75},&quot;3&quot;]]</code> and i want to remove everything that isn't a string from the list while still keeping the &quot;shape&quot; of the list s...
<p>To create new list with required values, you can use list comprehension:</p> <pre><code>given = [[{a: 7}, &quot;1&quot;, {x: 0.25}, &quot;2&quot;], [{y: 0.25, x: 1.5}, &quot;4&quot;], [{y: -0.75}, &quot;3&quot;]] new_data = [[e for e in inner if isinstance(e, str)] for inner in given] </code></pre> <p>This means: &q...
Remove all elements except string from list
python
-3
56
1
72,875,495
72,875,495
1
true
2022-07-05T20:29:40.087Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Remove all elements except string from list<p>I have a list which looks like this <code>[[{a:7},&quot;1&quot;,{x:0.25},&quot;2&quot;],[{y:0.25,x:1.5},&quot;4...
72,848,230
`docker exec -i db_mysql mysqldump` doesn't produce any backup<p>I have a MySQL Docker container (<code>db_mysql</code>) with database <code>wp_almond</code></p> <p>When I try to dump it with <code>docker exec -i db_mysql mysqldump</code> it doesn't work</p> <pre class="lang-bash prettyprint-override"><code>$ docker ex...
<p>When you run</p> <p><code>docker exec -i db_mysql mysqldump -u root -p wp_almond</code></p> <p>then the output is produced to stdout (of your host terminal)</p> <p>Therefore, when you run</p> <p><code>docker exec -i db_mysql mysqldump -u root -p wp_almond &gt; wp_almond.sql</code></p> <p>It simply redirects the outp...
`docker exec -i db_mysql mysqldump` doesn't produce any backup
mysql|bash|docker|shell|dump
-1
56
1
72,876,826
72,876,826
1
true
2022-07-03T16:35:14.843Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: `docker exec -i db_mysql mysqldump` doesn't produce any backup<p>I have a MySQL Docker container (<code>db_mysql</code>) with database <code>wp_almond</code>...
72,851,923
How to find and extract the last reading of recorded days/weeks/months from one column to new ones in a DataFrame using pandas?<p>In a large DataFrame, I have readings in one column and the local date and time of the readings in &quot;DateTime&quot; format in another column. I want to generate new columns in the same D...
<p><a href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.resample.html#pandas-dataframe-resample" rel="nofollow noreferrer">Resampling</a> with a proper DatetimeIndex will be useful here.</p> <pre class="lang-py prettyprint-override"><code># Make it a datetime index: df.local_date_time = ...
How to find and extract the last reading of recorded days/weeks/months from one column to new ones in a DataFrame using pandas?
python|pandas|dataframe
1
56
1
72,877,227
72,877,227
1
true
2022-07-04T04:55:43.007Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to find and extract the last reading of recorded days/weeks/months from one column to new ones in a DataFrame using pandas?<p>In a large DataFrame, I hav...
72,885,166
how to merge rows of a df with same value<p>I am facing a problem using pandas on python and i can't solve it. I would like to merge/combine/regroup the rows which have the same url.</p> <p>EDIT : I have a dataframe looking like this :</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>url</th...
<p>You can use <code>groupby</code> and <code>first</code>.</p> <pre class="lang-py prettyprint-override"><code>df = df.groupby('url', as_index=False).first() </code></pre>
how to merge rows of a df with same value
python-3.x|pandas
1
56
3
72,885,380
72,885,380
1
true
2022-07-06T14:17:33.027Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to merge rows of a df with same value<p>I am facing a problem using pandas on python and i can't solve it. I would like to merge/combine/regroup the rows...
72,883,515
How using isin inside lambda<pre><code>import pandas as pd import numpy as np Open_Time_s=['2022-04-30 11:05:00+03:00','2022-04-30 11:10:00+03:00', np.nan, np.nan] intersect=[np.nan,np.nan,'intersect_2022-04-30 11:05:00+03:00','intersect_2022-04-30 11:10:00+03:00'] df = pd.DataFrame.from_dict({'Open Time':Ope...
<p>Given:</p> <pre><code>Open_Time_s=['2022-04-30 11:05:00+03:00','2022-04-30 11:10:00+03:00', np.nan, np.nan] intersect=[np.nan,np.nan,'intersect_2022-04-30 11:05:00+03:00','intersect_2022-04-30 11:10:00+03:00'] df = pd.DataFrame.from_dict({'Open Time':Open_Time_s,'intersect':intersect}) </code></pre> <p>Doing:</p...
How using isin inside lambda
python|pandas
0
56
1
72,887,939
72,887,939
1
true
2022-07-06T12:24:03.557Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How using isin inside lambda<pre><code>import pandas as pd import numpy as np Open_Time_s=['2022-04-30 11:05:00+03:00','2022-04-30 11:10:00+03:00', np.n...
72,886,647
Find the most frequent value and avoid duplicates BIGQUERY<p>I am using the query below found under this <a href="https://stackoverflow.com/questions/62310171/finding-the-most-frequent-value-of-string-using-bigquery">post</a> (thanks to Mikhail Berlyant) and it works almost perfectly.</p> <pre><code>#standardSQL SELECT...
<p>You don't want to have date in the group by statement, but the get the latest value for each language, right? So you should get max(date) instead of having it in the group by.</p> <pre><code>#standardSQL SELECT User_ID, ARRAY_AGG(Language ORDER BY cnt DESC, max_date desc LIMIT 1)[OFFSET(0)] most_frequent_languag...
Find the most frequent value and avoid duplicates BIGQUERY
google-bigquery
0
56
1
72,888,576
72,888,576
1
true
2022-07-06T15:59:13.773Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Find the most frequent value and avoid duplicates BIGQUERY<p>I am using the query below found under this <a href="https://stackoverflow.com/questions/6231017...
72,893,342
Getting count of last records of 2 columns SQL<p>I was looking for a solution for the below mentioned scenario. So my table structure is like this ; Table name : energy_readings</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>equipment_id</th> <th>meter_id</th> <th>readings</th> <th>readin...
<p>You can use <code>CTE</code> like below. CTE <code>LatestRecord</code> will get latest record for equipment_id &amp; meter_id. Later you can join it with your current table and use <code>WHERE</code> to filter out record with <code>null</code> values only.</p> <pre><code>;WITH LatestRecord AS ( SELECT equipment_...
Getting count of last records of 2 columns SQL
sql
1
56
2
72,894,416
72,894,416
1
true
2022-07-07T06:44:15.713Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Getting count of last records of 2 columns SQL<p>I was looking for a solution for the below mentioned scenario. So my table structure is like this ; Table n...
72,894,647
Faster ' find & reorder' logic in javascript<p>I am reordering the nodes in a certain level for a tree structure using the following recursive function. Reorder using the sort is not taking time, however recursively finding the parent node is taking time. how can I make this faster?</p> <pre><code>const reorderNodes = ...
<p>Your code should be fast. I've implemented a recursive descent parser for a family tree app similar to what you're doing and have never exceeded a few tens of milliseconds drawing an entire family tree.</p> <p>The main problem with your code is this:</p> <pre><code>let copy = cloneDeep(tree); </code></pre> <p>That's...
Faster ' find & reorder' logic in javascript
javascript|recursion
-2
56
2
72,895,266
72,895,266
1
true
2022-07-07T08:33:19.520Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Faster ' find & reorder' logic in javascript<p>I am reordering the nodes in a certain level for a tree structure using the following recursive function. Reor...
72,902,281
How can I pass multiple data with GetServerSideProps<p>I'm trying to pass multiple sanity data into a component. but I can only use getserversideprops one time. how can I use more than one sanity data?</p> <p>pages &gt; members.tsx</p> <pre class="lang-js prettyprint-override"><code>export const getServerSideProps = as...
<p>You can change your query to something like:</p> <pre><code>const query = `{ 'teamMembers': *[ _type == &quot;teammembers&quot;] { _id, name, position, bordercolor, memberimage, }, 'otherStuff': *[ _type != &quot;teammembers&quot;] {...} }`; </code></pre> <p>Notice the queries are wrapped i...
How can I pass multiple data with GetServerSideProps
typescript|next.js|sanity
0
56
1
72,902,475
72,902,475
1
true
2022-07-07T17:54:04.353Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I pass multiple data with GetServerSideProps<p>I'm trying to pass multiple sanity data into a component. but I can only use getserversideprops one ti...
72,910,766
StateHasChanged not updating component<p>I have two components, one is used to list all students and the other shows details of a selected student.</p> <p>Here are the parent components for both:</p> <pre><code>&lt;p&gt; Id of student @id &lt;/p&gt; &lt;Students onStudentSelected=&quot;@getStudentId&quot;&gt; &lt;/S...
<p>In <code>Student</code> component call api in <code>OnParametersSetAsync()</code> method</p> <pre><code>protected override async Task OnParametersSetAsync(){ using (HttpClient client = new HttpClient()) { ... JsonResponseContent = JsonConvert.DeserializeObject&lt;Student(ResponseContent); }...
StateHasChanged not updating component
c#|blazor
0
56
1
72,911,488
72,911,488
1
true
2022-07-08T11:31:58.527Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: StateHasChanged not updating component<p>I have two components, one is used to list all students and the other shows details of a selected student.</p> <p>...
72,911,908
How to create email addresses using SQL - duplicate names<p>I have a table with the first_name and last_name of the employees of a company. So I tried to do a simple query by concatenating the names and adding &quot;@mycompany.com&quot;.</p> <pre><code>SELECT first_name || last_name || '@mycompany.com' AS employee_emai...
<p>You can generate a running number using the <code>row_number</code> window function:</p> <pre class="lang-sql prettyprint-override"><code>SELECT first_name || last_name || CASE ROW_NUMBER() OVER (PARTITION BY first_name, last_name ORDER BY 1) WHEN 1 THE...
How to create email addresses using SQL - duplicate names
sql|postgresql|select
1
56
1
72,912,055
72,912,055
1
true
2022-07-08T13:09:43.530Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to create email addresses using SQL - duplicate names<p>I have a table with the first_name and last_name of the employees of a company. So I tried to do ...
72,913,872
How to get the value from the localStorage object key? Angular<p>I need your help. In <code>localStorage</code> I have the object in the example. I am using Angular. I need to extract the value of the first <code>linkedinMail</code> key. I tried to do it in several ways, but as a result in the console, I get the first ...
<p>LocalStorage, sessionStorage stores strings. To change it to it original type, you have to parse it like this:</p> <p>const emailLoginLinkedin = JSON.parse(localStorage.getItem('credsForJetLeadBE'));</p> <p>After that you can use any way you want to retrieve the first key,value pair.</p>
How to get the value from the localStorage object key? Angular
javascript|angular|typescript|local
0
56
3
72,914,079
72,914,079
1
true
2022-07-08T15:41:53.193Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to get the value from the localStorage object key? Angular<p>I need your help. In <code>localStorage</code> I have the object in the example. I am using ...
72,913,108
React.JS - Custom Cursor not following with scroll<p>This is my first question on stackoverflow, I'm a junior front-end developper and I'm struggling with a custom cursor for my portfolio.</p> <p>The problem I'm facing is that the custom cursor is not following the mouse when I'm scrolling.</p> <p>This is what I did fo...
<p>Okay, I found a solution. I switched the custom cursor position from absolute to fixed and then had to delete the <code>window.pageYOffset</code> from this line : `</p> <pre><code>cursor.current.setAttribute('style', `top:${event.clientY + window.pageYOffset - 15}px; left:${event.clientX - 15}px;`);. </code></pre> <...
React.JS - Custom Cursor not following with scroll
javascript|reactjs|react-hooks|react-redux
0
56
1
72,915,866
72,915,866
1
true
2022-07-08T14:42:14.340Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: React.JS - Custom Cursor not following with scroll<p>This is my first question on stackoverflow, I'm a junior front-end developper and I'm struggling with a ...
72,889,852
How to divide points into groups when they are in the same hole?<p>I have a List of 2D points. I want to divide points which are in a hole into the same group, unless they aren't in the same hole.</p> <p>For example <code>1</code> represents solid, <code>0</code> represents air (part of a hole):</p> <pre><code>11111111...
<p>I used an algorithm called &quot;connected component labeling&quot;. This site gives you some info about how to implement this: <a href="https://towardsdatascience.com/implementing-a-connected-component-labeling-algorithm-from-scratch-94e1636554f" rel="nofollow noreferrer">https://towardsdatascience.com/implementing...
How to divide points into groups when they are in the same hole?
c#|grouping|connected-components
-1
56
1
72,915,955
72,915,955
1
true
2022-07-06T21:05:30.623Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to divide points into groups when they are in the same hole?<p>I have a List of 2D points. I want to divide points which are in a hole into the same grou...
72,917,214
C# How to append details to exception<p>I'm trying to handle exceptions being thrown in a worker function. My goal is to only throw one exception with all necessary details up to the calling function, who then decides if it needs to be logged or to alert the user, etc. But I would prefer to preserve the function and li...
<p>The standard way to solve this is to threw a new exception in the exception handler of the <code>Worker</code> function with an <code>InnerException</code> that contains the original exception:</p> <pre><code>public static void Worker(string details) { try { int i = 1; int j = 0; int ...
C# How to append details to exception
c#|.net|exception
2
56
1
72,922,559
72,922,559
1
true
2022-07-08T21:33:57.720Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: C# How to append details to exception<p>I'm trying to handle exceptions being thrown in a worker function. My goal is to only throw one exception with all ne...