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,930,826
Webscraping pdfs in Python in multiple links<p>I am trying to webscrape this <a href="https://www.bis.org/cbspeeches/index.htm?m=1010" rel="nofollow noreferrer">website</a>. To do so, I wrote the following code which works nicely:</p> <pre><code>from bs4 import BeautifulSoup import pandas as pd import requests payload...
<p>I'll allow you the pleasure of adapting this to your <code>requests</code>, sync scraping fashion (really not hard):</p> <pre> from PyPDF2 import PdfReader ... async def get_full_content(url): async with AsyncClient(headers=headers, timeout=60.0, follow_redirects=True) as client: if url[-3:] == 'pdf': ...
Webscraping pdfs in Python in multiple links
python|web-scraping|beautifulsoup
0
70
2
72,931,953
72,931,953
1
true
2022-07-10T18:17:03.353Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Webscraping pdfs in Python in multiple links<p>I am trying to webscrape this <a href="https://www.bis.org/cbspeeches/index.htm?m=1010" rel="nofollow noreferr...
72,775,612
How to tell cmake to use c89<p>So I recently decided to make the switch to using c89 only for my code from now on. I use cmake and i'm not sure how to tell cmake to use c89.</p> <p>Per a information on a website it says &quot;(accepted values are 98, 99 and 11)&quot;, which is really strange because 89 isn't there.</p>...
<p>Use <code>set(CMAKE_C_STANDARD 90)</code> to use C89.</p> <p>C89 is the same as C90, also called ANSI C.</p> <p>Note: prefer to use <code>set_target_properties(your_target C_STANDARD 90)</code> explicitly on your target, so it doesn't affect other targets.</p>
How to tell cmake to use c89
c|cmake
1
70
1
72,775,750
72,775,750
2
true
2022-06-27T16:43:30.253Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to tell cmake to use c89<p>So I recently decided to make the switch to using c89 only for my code from now on. I use cmake and i'm not sure how to tell c...
72,776,451
Plot a histogram for a frequency table in R- ggplot2<p>I have a frequency table of number of occurrences of a variable per each value of reference (essentially bin size). For example (see data below): column 1, row 1 is reference value (0-5) and column 2, column 3 and column 4 represent the number of times status 1, st...
<p>First make your data from wide to longer using <code>pivot_longer</code>. After that you can create a stacked barplot like this:</p> <pre><code>library(ggplot2) library(dplyr) library(tidyr) df_1 %&gt;% pivot_longer(-ref) %&gt;% ggplot(aes(x = ref, y =value, fill = name)) + geom_bar(stat = &quot;identity&quot;...
Plot a histogram for a frequency table in R- ggplot2
r|ggplot2|histogram|frequency-table
0
70
2
72,776,874
72,776,874
2
true
2022-06-27T17:54:31.450Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Plot a histogram for a frequency table in R- ggplot2<p>I have a frequency table of number of occurrences of a variable per each value of reference (essential...
72,779,668
Problem parsing timing info from an SPS inside an avcC box<p>I am trying to parse an SPS inside an avcC box in a MP4 file. For some reason, I don't get the expected timing values while everything else is fine. Using a hex editor, I extracted these bytes to works with.</p> <pre><code>byte[] spsSmall = { 0x67, 0x42, ...
<p>You should remove emulation_prevention_three_byte from the NAL i.e. you should search for 0x00, 0x00, 0x03 byte aligned sequences and remove 0x03 from there. So that resulting unescaped spsSmall would be:</p> <pre><code>byte[] spsSmall = { 0x67, 0x42, 0xC0, 0x1E, 0x9E, 0x21, 0x81, 0x18, 0x53, 0x4D, 0x40, 0x40, ...
Problem parsing timing info from an SPS inside an avcC box
c#|parsing|video|mp4|h.264
2
70
1
72,794,438
72,794,438
2
true
2022-06-28T00:58:26.017Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Problem parsing timing info from an SPS inside an avcC box<p>I am trying to parse an SPS inside an avcC box in a MP4 file. For some reason, I don't get the e...
72,800,088
Tls 1.3 client hello structure. in C supported on Linux Userspace. Can anyone please tell what struct should look like to represent client hello<p>I like to understand tls by code. tls 1.3 and cipher suits so I started and at first I found in tls 1.3 handshake is client initiate the handshake with the server with hello...
<p>This structure is defined in RFC 8446 and it is pseudo code, it does not map as is directly to any kind of programming language, so it is not C.</p> <p>See <a href="https://datatracker.ietf.org/doc/html/rfc8446#section-3" rel="nofollow noreferrer">https://datatracker.ietf.org/doc/html/rfc8446#section-3</a> that expl...
Tls 1.3 client hello structure. in C supported on Linux Userspace. Can anyone please tell what struct should look like to represent client hello
c|ssl|tls1.3
0
70
1
72,803,164
72,803,164
2
true
2022-06-29T10:46:51.560Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Tls 1.3 client hello structure. in C supported on Linux Userspace. Can anyone please tell what struct should look like to represent client hello<p>I like to ...
72,803,839
Passing useState setter function to child component for a click event but getting setState is not a function<p>I am using Material UI Drawer for sidebar and passing the setReplyDrawer to child ReplyReview so that I can close it from the child with a click event but getting error that setReplyDrawer is not a function.<b...
<p>You forgot to deconstruct the props</p> <pre><code>const ReplyReview = (name,replyDrawer,setReplyDrawer,first,setFirst) =&gt; { </code></pre> <p>to</p> <pre><code>const ReplyReview = ({name,replyDrawer,setReplyDrawer,first,setFirst}) =&gt; { </code></pre> <p>&quot;name.name&quot; should now be just &quot;name&quot;...
Passing useState setter function to child component for a click event but getting setState is not a function
reactjs|react-hooks|material-ui
0
70
2
72,804,413
72,804,413
2
true
2022-06-29T15:14:02.490Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Passing useState setter function to child component for a click event but getting setState is not a function<p>I am using Material UI Drawer for sidebar and ...
72,802,456
Store iterator inside a struct<p>I need to read data from multiple JSON files. The actual reading of data is performed later in the code, after some initialization stuffs. For reasons beyond the scope of this question, I believe that it would beneficial for my application to store somewhere an iterator set to the firs...
<p>You're storing iterators, but using them after they were invalidated.</p> <p>Reasons for invalidation are when the corresponding ptree node moved, was erased or destructed.</p> <p>Just store the ptree inside the struct, which makes sure the ptree's lifetime extends long enough. Of course, you will still need to make...
Store iterator inside a struct
c++|json|boost
0
70
1
72,808,646
72,808,646
2
true
2022-06-29T13:43:19.523Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Store iterator inside a struct<p>I need to read data from multiple JSON files. The actual reading of data is performed later in the code, after some initial...
72,810,040
Will variable declaration inside infinite loop in c cause stack overflow<p>This is a simple question, but I would just like to throw this out there and appreciate if anyone could validate if my understanding is correct or provide some more insight. My apologies in advance if this is a duplicate post.</p> <p>Eg. In the ...
<blockquote> <p>Am I correct in saying that in the 1st code snippet, this code would eventually cause a stack overflow because of the variables continually being declared inside of the infinite loop?</p> </blockquote> <p>No:</p> <blockquote> <strong>6.2.4 Storage durations of objects</strong><br> ...<br> 6 For such an ...
Will variable declaration inside infinite loop in c cause stack overflow
c|gcc|optimization|stack-overflow|cc
0
70
3
72,815,467
72,815,467
2
true
2022-06-30T03:34:50.593Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Will variable declaration inside infinite loop in c cause stack overflow<p>This is a simple question, but I would just like to throw this out there and appre...
72,823,184
How can I draw a Polygon on the Gmap without refreshing the whole Gmap component?<p>I'm developing an app with JSF and PrimeFaces. I have a PrimeFaces Gmap component on a page. I want to allow the user to draw a map polygon on screen, simply clicking each vertex, and see how the polygon constructs on the fly with each ...
<p>I did something similar which you can use here as well. In my case I have a set of markers which you can select a few of to plan appointments at the selected markers.</p> <p>Basically I added an empty <code>Polyline</code> (you can do something similar using a <code>Polygon</code>), and a function to add coordinates...
How can I draw a Polygon on the Gmap without refreshing the whole Gmap component?
google-maps|jsf|primefaces
2
70
1
72,827,422
72,827,422
2
true
2022-07-01T00:08:29.767Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I draw a Polygon on the Gmap without refreshing the whole Gmap component?<p>I'm developing an app with JSF and PrimeFaces. I have a PrimeFaces Gmap c...
72,844,698
Extract date which is in strange format (EURO MTH/MM/YYYY) in R<p>I want to convert the date in the format MMYYYY from a column which is in this format EURO MTH/MM/YYYY in R. The Monat column is in character.</p> <pre><code>structure(list(Monat = c(&quot;EURO MTH/07/2015&quot;, &quot;EURO MTH/08/2015&quot;, &quot;EURO...
<p>Here is a way but not with package <code>lubridate</code>, base R is enough.</p> <pre class="lang-r prettyprint-override"><code>df1 &lt;- structure(list( Monat = c(&quot;EURO MTH/07/2015&quot;, &quot;EURO MTH/08/2015&quot;, &quot;EURO MTH/09/2015&quot;, &quot;EURO MTH/10/2015&quot;, ...
Extract date which is in strange format (EURO MTH/MM/YYYY) in R
r|date|lubridate
3
70
3
72,844,780
72,844,780
2
true
2022-07-03T07:36:46.023Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Extract date which is in strange format (EURO MTH/MM/YYYY) in R<p>I want to convert the date in the format MMYYYY from a column which is in this format EURO ...
72,848,868
Does `Box` obscure trait bounds? Why can i assign `dyn FnOnce()` to `dyn Fn()` in this case?<p>I'd like to have a struct, <code>Quox</code> which can optionally have each type of closure that there can be(<code>Fn</code>, <code>FnMut</code> and <code>FnOnce</code>) around. I typed it this way:</p> <pre class="lang-rust...
<p>Boiling down your first question:</p> <pre><code>let greeting = &quot;Hi. We are moving soon!&quot;.to_string(); let clsr_move = move |p:&amp;Person| println!(&quot;Hi, {}. {} says: {}&quot;, p.name, p.name, greeting); let soft_closure: Box&lt;dyn Fn(&amp;Person)&gt; = Some(Box::new(clsr_move)); </code></pre> <p>T...
Does `Box` obscure trait bounds? Why can i assign `dyn FnOnce()` to `dyn Fn()` in this case?
rust
2
70
1
72,849,455
72,849,455
2
true
2022-07-03T18:12:27.337Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Does `Box` obscure trait bounds? Why can i assign `dyn FnOnce()` to `dyn Fn()` in this case?<p>I'd like to have a struct, <code>Quox</code> which can optiona...
72,842,789
What are all the requirements of a QObject derived class?<p>I'm working on my first non-trivial project using the Qt Framework and to help maintain consistency across documents and to ensure I don't forget some small requirement I've decided to make a template document demonstrating the member functions, macros, etc. n...
<p>As Jeremy Friesner suggested, the requirements are not that strict. The situation is more like this:</p> <ul> <li>If your class uses signals and/or slots, it must both have the Q_OBJECT macro and be derived from QObject,</li> <li>If it only uses other meta-object functionality, such as Q_PROPERTY declarations, it ca...
What are all the requirements of a QObject derived class?
c++|qt|qt5
2
70
1
72,850,198
72,850,198
2
true
2022-07-02T22:21:25.213Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What are all the requirements of a QObject derived class?<p>I'm working on my first non-trivial project using the Qt Framework and to help maintain consisten...
72,873,707
Find first match in string from the end<p>I have a string</p> <pre><code>Manager of Medical Threat Devlop at Micro </code></pre> <p>I want to find any words that go after <code>at</code>, <code>for</code>, <code>of</code>. Here, I want to get the <code>['Micro']</code> (that is at the end of string, after the last <cod...
<p>You can use</p> <pre class="lang-py prettyprint-override"><code>re.findall(r'.*\b(?:for|at|of)\s+(.*)', text) </code></pre> <p>See the <a href="https://regex101.com/r/XcuCJv/2" rel="nofollow noreferrer">regex demo</a>. <em>Details</em>:</p> <ul> <li><code>.*</code> - any zero or more chars other than line break char...
Find first match in string from the end
python|regex
2
70
3
72,874,098
72,874,098
2
true
2022-07-05T17:59:52.540Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Find first match in string from the end<p>I have a string</p> <pre><code>Manager of Medical Threat Devlop at Micro </code></pre> <p>I want to find any words ...
72,885,817
Generate rows with difference dates by id and fill with 0 in Pyspark<p>I have a dataframe in pyspark with information about customer transactions per day</p> <pre><code>id,date,value 1,2016-01-03,10 1,2016-01-05,20 1,2016-01-08,30 1,2016-01-09,20 2,2016-01-02,10 2,2016-01-04,10 2,2016-01-06,20 2,2016-01-07,20 2,2016-01...
<p>So, you'd like to get a dataframe with dates in day interval. It can be done in 2 steps - create a dataframe with all dates, and then join the values in that dataframe.</p> <pre><code>data_sdf.show() # +---+----------+---+ # | id| dt|val| # +---+----------+---+ # | 1|2016-01-03| 10| # | 1|2016-01-05| 20| ...
Generate rows with difference dates by id and fill with 0 in Pyspark
python|pyspark
0
70
2
72,886,380
72,886,380
2
true
2022-07-06T15:00:52.063Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Generate rows with difference dates by id and fill with 0 in Pyspark<p>I have a dataframe in pyspark with information about customer transactions per day</p>...
72,908,035
Match values in two columns within group in R<p>I have a big data frame in which I would like to flag the rows as follows:</p> <p>within each group, I want to find whether any <strong>col1</strong> value is present in <strong>col2</strong> column. If so, mark those lines where same values appear.</p> <p>this is my data...
<p>Please note: I am not sure if you made a typo in your dataframe for row ABC-LKJ 210-31.</p> <p>You can use the or <code>|</code> so that the 1 returns for both of the rows where the values match per <code>group_by</code>. You can use the following code:</p> <pre class="lang-r prettyprint-override"><code>df &lt;- dat...
Match values in two columns within group in R
r|dplyr|group-by|any
1
70
2
72,908,359
72,908,359
2
true
2022-07-08T07:23:49.803Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Match values in two columns within group in R<p>I have a big data frame in which I would like to flag the rows as follows:</p> <p>within each group, I want t...
72,953,092
Azure Search with Postgres<p>I am new to Azure Cognitive Search and was able to get Azure Search work with SQL Server but I want to use Azure Search for PostgreSQL. I could not find it in the documents that Azure Search supports PostgreSQL. Can someone confirm that for me?</p> <p>I created an Instance of Azure Cognitiv...
<p>Using Import Data, Postgres is not a supported data source and you can confirm in the official doc:</p> <pre><code>type Required. Must be one of the supported data source types: azuresql for Azure SQL Database cosmosdb for the Azure Cosmos DB SQL API azureblob for Azure Blob Storage adlsgen2 for Azure Data Lake ...
Azure Search with Postgres
postgresql|azure|elasticsearch|full-text-search|azure-cognitive-search
1
70
2
72,953,506
72,953,506
2
true
2022-07-12T13:26:13.993Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Azure Search with Postgres<p>I am new to Azure Cognitive Search and was able to get Azure Search work with SQL Server but I want to use Azure Search for Post...
72,967,625
I want to Deserialize the Json-File and output it's data<p><strong>I thought I would understand Json.NET now a bit but unfortunately not. Can somebody help me with that</strong> <br /> I am trying to show data from the json-file in the Console <br /> (Error:CS1061 | List has no definition for &quot;title&quot; | file:P...
<p><code>CObject</code> returns a List (btw naming the class <code>Todo</code> would probably be better for later understanding). You can iterate over the list and each item inside should have a title property. But a list has not.</p> <pre><code>foreach(var item in todos) { Console.WriteLine(item.title); } </code></p...
I want to Deserialize the Json-File and output it's data
c#|json|visual-studio|json.net|json-deserialization
1
70
1
72,967,798
72,967,798
2
true
2022-07-13T14:01:21.507Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I want to Deserialize the Json-File and output it's data<p><strong>I thought I would understand Json.NET now a bit but unfortunately not. Can somebody help m...
72,983,784
how to replace special characters in a string by "_"<p>hello i have a string ch and i want to replace the special characters if it exist by &quot;_&quot; how can detect all special characters is there another way . can we use replaceAll and include all the special characters</p> <pre><code> for(int i=0; i&lt;s.length;...
<p>You can do it like this with regex</p> <pre><code>_string.replaceAll(RegExp('[^A-Za-z0-9]'), '_'); </code></pre> <p>This will replace all characters except alphabets and numbers with _</p>
how to replace special characters in a string by "_"
flutter
0
70
2
72,983,879
72,983,879
2
true
2022-07-14T16:27:24.110Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to replace special characters in a string by "_"<p>hello i have a string ch and i want to replace the special characters if it exist by &quot;_&quot; how...
72,998,257
How can I get the anonymous access token after the user has logged in with an email account?<p>As part of my project, I need to send both the anonymous and the email access token to the backend.<br /> Unfortunately, after the user logs in through the Firebase-UI, Firebase only returns the token for the newly logged-in ...
<blockquote> <p>I need to send both the anonymous and the email access token to the backend.</p> </blockquote> <p>You can do that, but separately. You cannot have a single user logged in with two different providers at the same time.</p> <blockquote> <p>Unfortunately, after the user logs in through the Firebase-UI, Fir...
How can I get the anonymous access token after the user has logged in with an email account?
firebase|google-cloud-platform|firebase-authentication
0
70
1
73,002,388
73,002,388
2
true
2022-07-15T18:25:44.687Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I get the anonymous access token after the user has logged in with an email account?<p>As part of my project, I need to send both the anonymous and t...
73,018,299
How do I convert a regular expression match into a "struct"?<p>Regular Expression: <code>([0-9]*)|([0-9]*\.[0-9]*)</code><br /> String: <code>word1 word2 0:12:13.23456</code> ... example string match: <code>0</code>,<code>12</code>,<code>13.23456</code></p> <p>Requirement:<br /> convert to a struct -&gt;</p> <pre class...
<p>I recommend using <a href="https://en.cppreference.com/w/cpp/regex/regex_search" rel="nofollow noreferrer"><code>std::regex_search</code></a> instead of iterators and loops. Then you get <a href="https://en.cppreference.com/w/cpp/regex/match_results" rel="nofollow noreferrer">a match result</a> which you can <a href...
How do I convert a regular expression match into a "struct"?
c++|regex|struct|data-conversion
1
70
1
73,018,592
73,018,592
2
true
2022-07-18T06:52:13.953Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I convert a regular expression match into a "struct"?<p>Regular Expression: <code>([0-9]*)|([0-9]*\.[0-9]*)</code><br /> String: <code>word1 word2 0:1...
72,924,544
How to get the reverse result to a sql query<p>I am using the following sql query to get the name of a branch that has submitted a report.</p> <pre><code>SELECT DISTINCT branch.b_name AS branch from branch, report_activity2 where branch.branch_id=report_activity2.branch_id and week =16 and year =2022 </code></pre> <...
<p>In the first one you don't really need distinct and also you shouldn't use the old style join anyway:</p> <pre><code>SELECT b_name AS branch from branch where exists (select * from report_activity2 where branch.branch_id=report_activity2.branch_id and report_activity2.week =16 and report_activity2.year =2022); </cod...
How to get the reverse result to a sql query
mysql|sql|mariadb
0
70
2
72,924,599
72,924,599
2
true
2022-07-09T20:49:18.283Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to get the reverse result to a sql query<p>I am using the following sql query to get the name of a branch that has submitted a report.</p> <pre><code>SEL...
72,938,177
time complexity recursive function<p>How can i calculate the time complexity and the t(n) equation of this recursive function?</p> <pre><code>Function CoeffBin(n,k) if (n=1) or (k=0) then return(1) else return (CoeffBin(n-1,k) + CoeffBin(n-1,k-1)) </code></pre>
<p>Let <code>T(n, k)</code> be the cost function and assume a unit cost of the statement <code>if (n=1) or (k=0) then return(1)</code>.</p> <p>Now neglecting the cost of addition, we have the recurrence</p> <pre><code>T(n, k) = 1 if n = 1 or k = 0 (that is T(1, k) = T(n, 0) = 1) T(n-1, k) + T(n-1, k-1) otherwis...
time complexity recursive function
algorithm|recursion|time-complexity|recursive-datastructures
1
70
2
72,939,187
72,939,187
2
true
2022-07-11T11:54:44.510Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: time complexity recursive function<p>How can i calculate the time complexity and the t(n) equation of this recursive function?</p> <pre><code>Function CoeffB...
72,827,038
Finding number of rows in a dataframe when previewing a large dataset (Foundry Platform)<p>Is there a way in a Foundry Code Repository to be able to print the shape of DataFrame, like in pandas how one can do <code>df.shape()</code>? I am interested in getting the correct number of rows in the dataset.</p> <p>I am usin...
<p>The way Foundry preview works is that it samples all the input datasets. This is generally the first 10,000 rows for datasets above this size. It then runs the transform on these preview inputs.</p> <p>Therefore, when running in preview mode the 'shape' of the dataset is correctly reported as having 10,000 rows as t...
Finding number of rows in a dataframe when previewing a large dataset (Foundry Platform)
palantir-foundry
2
70
1
72,828,315
72,828,315
2
true
2022-07-01T09:16:58.323Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Finding number of rows in a dataframe when previewing a large dataset (Foundry Platform)<p>Is there a way in a Foundry Code Repository to be able to print th...
72,865,106
May this kind of rewrite of placement new compile?<p><strong>Background</strong></p> <p>I am cleaning up a legacy codebase by applying a coding guideline for the <code>new</code> statement.</p> <p>There is code like <code>auto x = new(ClassName);</code> that I rewrite to <code>auto x = new ClassName();</code>. It's qui...
<p><code>placement-params</code> is not a type, it is a value.</p> <p>Consider this code with a placement new:</p> <pre><code>int* buf = new int; int* a = new(buf)(int); </code></pre> <p>If we remove parenthesis around <code>buf</code>, the compiler can easily detect <code>buf</code> is not a type.</p> <pre><code>int* ...
May this kind of rewrite of placement new compile?
c++|placement-new
1
70
1
72,866,133
72,866,133
2
true
2022-07-05T06:54:06.330Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: May this kind of rewrite of placement new compile?<p><strong>Background</strong></p> <p>I am cleaning up a legacy codebase by applying a coding guideline for...
73,003,597
Assigning multiple elements of array in one statement(after initialization)<pre class="lang-cpp prettyprint-override"><code> std::string mstring[5]; mstring[0] = &quot;veena&quot;; mstring[1] = &quot;guitar&quot;; mstring[2] = &quot;sitar&quot;; mstring[3] = &quot;sarod&quot;; ...
<p>You can do that by using <code>std::array&lt;std::string, 5&gt;</code> instead of the raw array.</p> <p>For example</p> <pre><code>#include &lt;iostream&gt; #include &lt;string&gt; #include &lt;array&gt; int main() { std::array&lt;std::string, 5&gt; mstring; mstring = { &quot;veena&quot;, &quot;guitar&...
Assigning multiple elements of array in one statement(after initialization)
c++|arrays|assignment-operator
0
70
3
73,003,698
73,003,698
2
true
2022-07-16T10:58:14.203Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Assigning multiple elements of array in one statement(after initialization)<pre class="lang-cpp prettyprint-override"><code> std::string mstring[5]; ...
72,814,992
How to pass tidyselect::starts_with(...) etc. to dplyr function(s)?<p>I would like to pass a column selection to a dplyr function (across) inside an ifelse statement.</p> <p>This is my data:</p> <pre><code>tibble(var1 = c(NA,1,2), var2 = c(NA,NA,3), var3 = c(NA,0,0), do_not_touch = c(1:3) ) ...
<p>One option would be:</p> <pre class="lang-r prettyprint-override"><code>library(dplyr) test %&gt;% mutate(new_col = ifelse( if_all(starts_with(&quot;var&quot;), is.na), NA, rowSums(across(starts_with(&quot;var&quot;)), na.rm = TRUE))) #&gt; # A tibble: 3 × 5 #&gt; var1 var2 var3 do_not_touch ne...
How to pass tidyselect::starts_with(...) etc. to dplyr function(s)?
r|if-statement|dplyr|tidyselect
0
70
2
72,815,151
72,815,151
2
true
2022-06-30T11:29:00.770Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to pass tidyselect::starts_with(...) etc. to dplyr function(s)?<p>I would like to pass a column selection to a dplyr function (across) inside an ifelse s...
72,932,692
React Native not recognizing useState hook<p>Render Error: (0,_reactNative.usestate) is not a function.(In'(0,_reactNative.useState)(''),'(0,_reactNative.useState)'is undefined</p> <p>This is the error my code is producing. All the imports are up to date. Not sure why it is not recognizing useState.</p> <pre><code>impo...
<ol> <li>You need to import useState and useEffect from React, not React Native</li> <li>You cannot call .then() on useEffect since it does not return a promise.</li> <li>You can't use useEffect as a callback function.</li> </ol> <p>EDIT: Code example:</p> <p>Based on the snippet from your question, it seems like you'r...
React Native not recognizing useState hook
javascript|react-native|react-hooks|use-effect|use-state
0
70
2
72,933,735
72,933,735
2
true
2022-07-11T00:13:17.683Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: React Native not recognizing useState hook<p>Render Error: (0,_reactNative.usestate) is not a function.(In'(0,_reactNative.useState)(''),'(0,_reactNative.use...
72,849,804
Display the name and surname of a dictionary, after choosing it in a combobox<p><a href="https://i.stack.imgur.com/9GH2R.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9GH2R.png" alt="enter image description here" /></a></p> <p>I would like to get the first and last name when I select &quot;trainer&...
<p>I think this problem can be solved easily if you change the data structure. Right now, you have each team inside each variable, so if you're expanding to more teams, that means you will have to make more variables and search through all of them manually. So instead of that, you can create a main dictionary with team...
Display the name and surname of a dictionary, after choosing it in a combobox
python|python-3.x|dictionary|tkinter
1
70
1
72,850,439
72,850,439
2
true
2022-07-03T20:48:54.700Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Display the name and surname of a dictionary, after choosing it in a combobox<p><a href="https://i.stack.imgur.com/9GH2R.png" rel="nofollow noreferrer"><img ...
73,009,715
How to find the parents in this data structure in PHP?<p>We have a data structure where each item stores -- among other things -- its depth. Its parent the closest previous item which has a smaller depth: To show an example:</p> <pre><code>A:depth 0 B:depth 1 C:depth 1 D:depth 2 E:depth 1 F:depth 2 G:depth 0 H:depth 1 ...
<p>Oh, ok, for that case I have another idea. We can use <code>depth</code> as index to array <code>$lastItemsByDepth</code>, because the parent of the item is the last item with the <code>depth-1</code> so we keep it in the <code>$lastItemsByDepth</code> array and access it by the items depth. And rewrite previous arr...
How to find the parents in this data structure in PHP?
php|algorithm
0
70
1
73,010,109
73,010,109
2
true
2022-07-17T06:45:46.787Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to find the parents in this data structure in PHP?<p>We have a data structure where each item stores -- among other things -- its depth. Its parent the c...
72,788,636
Value of type 'Int' has no member 'seconds'<p>I have tried many ways, but I still can't convert the timestamp to date (year month day..), now I have this problem,</p> <p>problem appear Value of type 'Int' has no member 'seconds' (已解決)</p> <hr /> <p>Here is my edited code, but the time is showing on Xcode instead of the...
<p>You have converted something from a network response into an <code>Int</code>. You have then called <code>&lt;int&gt;.seconds</code>. The error message is telling you that there is no such thing as <code>.seconds</code> on an Int.</p> <p>The timestamp that the <code>Date</code> class is expecting is simply a <code>D...
Value of type 'Int' has no member 'seconds'
ios|swift|date
-2
70
2
72,788,937
72,788,937
2
true
2022-06-28T14:48:00.543Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Value of type 'Int' has no member 'seconds'<p>I have tried many ways, but I still can't convert the timestamp to date (year month day..), now I have this pro...
72,778,219
Python Image Text Label Script<p>I would like to create a python script that dynamically adds text to fit within the center of the image, regardless of the amount of text. I have a working script that does this which I've pasted below. Now I would like to surround the text with a gray box.</p> <p>What I've tried to do ...
<p>It's not 100% elegant solution, but at least it works.</p> <pre><code>import textwrap from string import ascii_letters from PIL import Image, ImageDraw, ImageFont def add_text_to_image(image, text, color): img = Image.open(fp=image, mode='r') img_temp = Image.new('RGB', (img.width, img.height), color='whit...
Python Image Text Label Script
python|image-processing|python-imaging-library
2
70
1
72,784,283
72,784,283
2
true
2022-06-27T20:56:14.930Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python Image Text Label Script<p>I would like to create a python script that dynamically adds text to fit within the center of the image, regardless of the a...
73,008,438
Type Mismatch Error when loop through the field names in a query<p>I am getting a type mismatch error when attempting to loop through the fields in a recordset:</p> <pre><code>Public Function fnCompareTableHeaders(strFirstQuery As String, strSecondQuery As String) As Boolean On Error GoTo ErrHandler Dim db As Data...
<p>I think that @June7 did answer in comment.<br /> If you reference in same project two libraries that both have same named objects such as 'field' in them, like DAO and ADO libraries, you will get a Type Mismatch.</p> <p>See if you have, at <strong>Tools &gt;&gt; References:</strong></p> <pre><code>Microsoft Office 1...
Type Mismatch Error when loop through the field names in a query
vba|function|ms-access|field|recordset
0
70
1
73,008,630
73,008,630
2
true
2022-07-17T00:07:27.030Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Type Mismatch Error when loop through the field names in a query<p>I am getting a type mismatch error when attempting to loop through the fields in a records...
72,810,174
Difference between Mule's jms:consume and jms:listener<p>Using Mule 4.4 on premise along with Apache ActiveMQ. I am trying to get a better understanding of how Mule handles messaging.</p> <p>I tried searching the internet but am not finding any details about the same.</p> <p>I have a <code>jms:listener</code>:</p> <pre...
<p><code>jms listener</code> is a source, so using it you can trigger a flow whenever there is a new message in queue.<br/> <a href="https://i.stack.imgur.com/uycks.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uycks.png" alt="enter image description here" /></a></p> <p><code>jms consume</code> is ...
Difference between Mule's jms:consume and jms:listener
jms|mule4
0
70
1
72,810,766
72,810,766
2
true
2022-06-30T04:03:16.387Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Difference between Mule's jms:consume and jms:listener<p>Using Mule 4.4 on premise along with Apache ActiveMQ. I am trying to get a better understanding of h...
72,836,470
how to edit rownames in R using sub or gsub command<p>I have a gene expression file and its row names is like this: GTEX.1117F.3226.SM.5N9CT <a href="https://i.stack.imgur.com/OU6c3.png" rel="nofollow noreferrer">enter image description here</a> I want to edit its rownames to be like this:</p> <p>GTEX-1117F and so on.<...
<p>A base R solution. Data borrowed from <a href="https://stackoverflow.com/a/72836626/8245406">TarJae's answer</a>.</p> <p>In the first instruction, the regex is almost identical to TarJae's, with two differences:</p> <ol> <li>The first period to be matched is escaped;</li> <li>the end of string is made explicit.</li>...
how to edit rownames in R using sub or gsub command
r|row|gsub|substr
2
70
2
72,836,667
72,836,667
2
true
2022-07-02T04:35:38.007Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to edit rownames in R using sub or gsub command<p>I have a gene expression file and its row names is like this: GTEX.1117F.3226.SM.5N9CT <a href="https:/...
72,968,744
Using class alias for its constructor definition<p>This minimum reproducible piece of code</p> <pre><code>class MyClass { public: explicit MyClass(); ~MyClass(); }; using MyClassAlias = MyClass; MyClassAlias::MyClassAlias() { } MyClassAlias::~MyClassAlias() { } int main() { MyClassAlias obj; ...
<p>The &quot;names&quot; (although these are not names in the technical sense of the standard) of the constructor and destructor are <code>MyClass</code> and <code>~MyClass</code> respectively. They are based on the injected class name. You need to use these two to define them or write any declaration for them. You can...
Using class alias for its constructor definition
c++
2
70
1
72,968,842
72,968,842
2
true
2022-07-13T15:20:27.203Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Using class alias for its constructor definition<p>This minimum reproducible piece of code</p> <pre><code>class MyClass { public: explicit MyClass(); ...
72,810,442
how to get the caller stage from ObservableValue<? extends Boolean> in focus change listener<p>I want to have a focus listener as a static variable that is passed throw static method, and its function is to close a stage when focus on that stage is lost.</p> <p>i have the code:</p> <p>Main class</p> <pre><code>public c...
<p>The error tells you what's wrong:</p> <blockquote> <pre class="lang-none prettyprint-override"><code>java.lang.ClassCastException: class javafx.beans.property.ReadOnlyBooleanWrapper$ReadOnlyPropertyImpl cannot be cast to class javafx.beans.property.BooleanProperty (javafx.beans.property.ReadOnlyBooleanWrapper$ReadOn...
how to get the caller stage from ObservableValue<? extends Boolean> in focus change listener
javafx|focus|stage|changelistener
-1
70
2
72,817,956
72,817,956
2
true
2022-06-30T04:51:29.303Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to get the caller stage from ObservableValue<? extends Boolean> in focus change listener<p>I want to have a focus listener as a static variable that is p...
72,934,937
import with no known parent package<p>I found similar discussion <a href="https://stackoverflow.com/questions/62894432/attempted-relative-import-with-no-known-parent-package">here</a>. But my problem is it works running python code in normal mode. When I run in debugging as python -m pdb nmt.py, I have <code>ImportErro...
<h2>Explanations</h2> <p>The error message is actually pretty explicit:</p> <p>Relatives import (using <code>from . import module</code>, or <code>from .module import something</code>) Only work if the module (ie the file) you are editing, and the module you are importing are in the same python <a href="https://docs.py...
import with no known parent package
python
1
70
1
72,935,022
72,935,022
2
true
2022-07-11T07:15:33.710Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: import with no known parent package<p>I found similar discussion <a href="https://stackoverflow.com/questions/62894432/attempted-relative-import-with-no-know...
72,936,151
Search inside a JSON Javascript<p>I have a problem concern search JSON string and i have JSON string</p> <pre><code>{&quot;userDetail&quot;:[ { &quot;Name&quot;: &quot;Scottic Mangry&quot;, &quot;Age&quot; : &quot;12&quot;, }, { &quot;Name&quot;: &quot;Joneson Mangly&quot;, &quot;Age&quot; : &quot;18&qu...
<p>Something like:</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>let data = { "userDetail":[ { "Name": "Scottic Mangry", "Age" : "12", }, { ...
Search inside a JSON Javascript
javascript
0
70
4
72,936,266
72,936,266
2
true
2022-07-11T09:13:04.650Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Search inside a JSON Javascript<p>I have a problem concern search JSON string and i have JSON string</p> <pre><code>{&quot;userDetail&quot;:[ { &quot;Nam...
72,796,284
'Type' does not refer to a value<p>I've checked other questions with similar errors, and they didn't seem comparable to the issue that I'm running into. I'm trying to instantiate an object and assign it in a constructor initialization list.</p> <p>However, on line 11, I'm getting an error saying 'Enemy' does not refer ...
<p>Not sure why you are trying to name this object, just</p> <pre><code>Room::Room() : Room{Enemy{&quot;Goblin&quot;}}{ } </code></pre> <p>Temporaries (like <code>Enemy{&quot;Goblin&quot;}</code>) are objects <strong>without</strong> names.</p>
'Type' does not refer to a value
c++|constructor
0
70
2
72,796,361
72,796,361
3
true
2022-06-29T05:40:15.067Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: 'Type' does not refer to a value<p>I've checked other questions with similar errors, and they didn't seem comparable to the issue that I'm running into. I'm ...
72,805,747
Remove the last 0 in a list of vectors if it appears twice at the end<p>I have data as follows:</p> <pre><code>dat &lt;- list(`A` = c(0, 25, 500, 1000, 0, 0), `B` = c(0, 25, 500, 1000, 1500, 0) </code></pre> <p>I would like to remove the last <code>0</code> if there are two <code>0</code>'s.</p> <p>I am breaking my br...
<p>One solution:</p> <pre><code>trim0 &lt;- function (x) { if (all(tail(x, 2) == 0)) x[-length(x)] else x } out_dat &lt;- lapply(dat, trim0) </code></pre>
Remove the last 0 in a list of vectors if it appears twice at the end
r|list
2
70
3
72,805,809
72,805,809
3
true
2022-06-29T17:43:49.020Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Remove the last 0 in a list of vectors if it appears twice at the end<p>I have data as follows:</p> <pre><code>dat &lt;- list(`A` = c(0, 25, 500, 1000, 0, 0)...
72,831,697
Search for more elegant way to handle many nested try with resources<p>I am searching for more elegant way to handle problems where we need to have many nested try with resources ,which are dependednt from one another. Example of such case:</p> <pre><code> try (MDC.MDCCloseable test= MDC.putCloseable(&quot;test&...
<p>Why not to put all resources to the same <code>try</code>?</p> <p>Here is simplified example:</p> <pre><code>try (MDC.MDCCloseable test= MDC.putCloseable(&quot;test&quot;, test); MDC.MDCCloseable paw= MDC.putCloseable(&quot;paw&quot;, test.getPaw().toString()) { /// etc, etc. } </code></pre>
Search for more elegant way to handle many nested try with resources
java|try-catch
-2
70
1
72,831,974
72,831,974
3
true
2022-07-01T15:44:33.653Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Search for more elegant way to handle many nested try with resources<p>I am searching for more elegant way to handle problems where we need to have many nest...
72,909,722
How to check if uploaded file is a JSON file?<p>I am taking a file input from a user and I want to check if the selected file is a JSON file. How can I do that?</p> <pre><code>&lt;input type = &quot;file&quot; onChange = {checkJSON}/&gt; </code></pre> <p>Also how do I retrieve data from the JSON file.</p>
<p>If JSON.parse throws an error, its most likely invalid, therefore you can check if its valid by getting the data into a string and then trying to parse it.</p> <pre><code> try { const json = JSON.parse(jsonStr); } catch (e) { console.log('invalid json'); } </code></pre>
How to check if uploaded file is a JSON file?
html|reactjs|json|input
0
70
2
72,909,807
72,909,807
3
true
2022-07-08T09:59:28.007Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to check if uploaded file is a JSON file?<p>I am taking a file input from a user and I want to check if the selected file is a JSON file. How can I do th...
72,946,773
Axios get request inside useEffect gives infinite loop<p>Calling axios get request inside useEffect results in infinite loop</p> <pre><code>useEffect(() =&gt; { get(); }); const get = async () =&gt; { await axios.get(&quot;http://localhost:5001/events/get&quot;).then((res) =&gt; { setEvents(res.data); ...
<p>The hook <code>useState()</code> returns a function to mutate the state, in this case <code>setEvents</code>. This mutation function is <strong>asynchronous</strong> in nature meaning the state does not update immediately as it waits for the component to re-render.</p> <p>When calling <code>console.log</code> statem...
Axios get request inside useEffect gives infinite loop
node.js|reactjs|axios|use-effect|mern
0
70
3
72,946,952
72,946,952
3
true
2022-07-12T03:38:37.913Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Axios get request inside useEffect gives infinite loop<p>Calling axios get request inside useEffect results in infinite loop</p> <pre><code>useEffect(() =&gt...
72,999,032
elixir script is not printing output to the console<p>I'm an elixir newbie and novice. I'm working through the <a href="https://joyofelixir.com/5-funky-functions" rel="nofollow noreferrer">joy of elixir</a>.</p> <p>I've created below directory structure <code>joy-of-elixir/5-funky-functions</code> and created a file ca...
<p>Unlike a regular elixir program (<code>.exs</code> script or regular <code>.ex</code> file), IEx prints the value of every evaluated line (which is what <a href="https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop" rel="nofollow noreferrer">REPLs</a> do).</p> <p>Your code is just creating these string...
elixir script is not printing output to the console
elixir
0
70
1
73,000,291
73,000,291
3
true
2022-07-15T19:56:37.783Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: elixir script is not printing output to the console<p>I'm an elixir newbie and novice. I'm working through the <a href="https://joyofelixir.com/5-funky-funct...
73,022,515
Sed to add quotes around json text following a specific json key<p>I have below malformed json file. I want to quote the value of email, i.e &quot;sampleemail@sampledoman.co.org&quot;. How do I go about it? I tried below but doesn't work.</p> <pre><code>sed -e 's/&quot;email&quot;:\[\(.*\)\]/&quot;email&quot;:[&quot;\1...
<p>Your code does not work because</p> <ul> <li><code>[</code> is not escaped so not treated as a literal</li> <li>You are using BRE, so capturing brackets will need to be escaped. In its current format, you will need <code>-E</code> to use extended functionality</li> <li>The line does not end with <code>]</code></li> ...
Sed to add quotes around json text following a specific json key
sed
0
70
2
73,023,028
73,023,028
3
true
2022-07-18T12:45:46.903Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Sed to add quotes around json text following a specific json key<p>I have below malformed json file. I want to quote the value of email, i.e &quot;sampleemai...
72,947,600
How to show line number and file on tracing events?<p>How to print what source <code>line!</code> and <code>file!</code> a trace log originated from with <a href="https://crates.io/crates/tracing" rel="nofollow noreferrer">tracing</a> and <a href="https://crates.io/crates/tracing-subscriber" rel="nofollow noreferrer">t...
<p>You can customize the formatter <a href="https://docs.rs/tracing-subscriber/latest/tracing_subscriber/fmt/index.html#customizing-formatters" rel="nofollow noreferrer">as specified in the documentation</a>. Some of the options are <a href="https://docs.rs/tracing-subscriber/latest/tracing_subscriber/fmt/format/struct...
How to show line number and file on tracing events?
rust|rust-tracing
2
70
1
72,947,718
72,947,718
3
true
2022-07-12T05:53:01.247Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to show line number and file on tracing events?<p>How to print what source <code>line!</code> and <code>file!</code> a trace log originated from with <a ...
73,018,976
With only one console writeline, how can I give multiple console writelines?<p>There are multiple Console.WriteLine() arguments between some values, but I don't want to give them all separately by copypaste, is there any way I can specify the number of WriteLine arguments with just one argument and it'll be done .</p> ...
<p>The best approach would be to create a function that prints '\n' (symbol of new line) as many times as you need. <code>new String</code> can help us with repetition of '\n'.<br /> So the function might look like this:</p> <pre><code>static void PrintNewLine(int n) { string newLines = new String('\n',n-1); Co...
With only one console writeline, how can I give multiple console writelines?
c#|console.writeline
-3
70
2
73,019,111
73,019,111
3
true
2022-07-18T07:55:28.250Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: With only one console writeline, how can I give multiple console writelines?<p>There are multiple Console.WriteLine() arguments between some values, but I do...
72,807,354
Split dataframe into multiple by every nth column<p>I would prefer <code>tidyverse</code> solution! The question is related to this <a href="https://stackoverflow.com/questions/72806702/select-group-of-columns-from-an-excel-csv-file-in-r">post</a>.</p> <p>Example data</p> <pre><code>structure(list(A = c(79L, 42L, 74L, ...
<p>This is a straightforward one-liner in base R:</p> <pre class="lang-r prettyprint-override"><code>lapply(seq(ncol(df)/4) - 1, function(x) df[4 * x + 1:4]) #&gt; [[1]] #&gt; # A tibble: 10 x 4 #&gt; A B C D #&gt; &lt;int&gt; &lt;int&gt; &lt;int&gt; &lt;int&gt; #&gt; 1 79 41 20 40 #&...
Split dataframe into multiple by every nth column
r|tidyverse|data-manipulation
1
70
2
72,807,491
72,807,491
3
true
2022-06-29T20:18:44.837Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Split dataframe into multiple by every nth column<p>I would prefer <code>tidyverse</code> solution! The question is related to this <a href="https://stackove...
72,850,139
What is difference between transient state and removed state in JPA?<p>I have a question about entity states in JPA.</p> <p>I've read some article about entity states in jpa and my understanding about them is that:</p> <ul> <li>a transient object is a newly created object that hasn’t been associated with Persistence Co...
<p>Technically they are not the same, although that they may appear to be seen as to have the same behaviour at times, but they are used to represent specific life cycle stage for an object.</p> <p><code>Transient</code> should be considered during the initial state for an object when the object is created using the ke...
What is difference between transient state and removed state in JPA?
java|database|hibernate|jpa|orm
1
70
1
72,850,224
72,850,224
3
true
2022-07-03T21:47:17.873Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What is difference between transient state and removed state in JPA?<p>I have a question about entity states in JPA.</p> <p>I've read some article about enti...
72,913,442
How do I get a position from a detected ObjectInstance?<p>I have been trying to follow what's in <a href="https://docs.microsoft.com/en-us/azure/object-anchors/concepts/sdk-overview" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/azure/object-anchors/concepts/sdk-overview</a> with some success. I successful...
<p>In reading your question above, I think based on what you are asking, you are needing to call this: <a href="https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.objectanchors.objectinstance.trygetcurrentstate?view=object-anchors-dotnet" rel="nofollow noreferrer">ObjectInstance.TryGetCurrentState Method (Micr...
How do I get a position from a detected ObjectInstance?
azure-object-anchors
0
70
1
72,945,579
72,945,579
3
true
2022-07-08T15:07:30.037Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I get a position from a detected ObjectInstance?<p>I have been trying to follow what's in <a href="https://docs.microsoft.com/en-us/azure/object-ancho...
73,008,921
Obtain integer from collection of possible types at compile time?<p>The following code does not compile, because I don't know if what I want to do is possible, but it does show what I would like. I build, at compile time (if possible!), a collection of types and integer values; this is then used at compile time in the...
<p>Here's a basic blueprint that, with some cosmetic tweaks, can be slotted into your <code>MyStructure</code>:</p> <pre><code>#include &lt;string&gt; #include &lt;iostream&gt; template&lt;typename T&gt; struct type_map; template&lt;&gt; struct type_map&lt;int&gt; { static constexpr int value=1; }; template&lt;&...
Obtain integer from collection of possible types at compile time?
c++|templates|c++17
2
70
2
73,008,959
73,008,959
3
true
2022-07-17T02:41:10.537Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Obtain integer from collection of possible types at compile time?<p>The following code does not compile, because I don't know if what I want to do is possibl...
72,844,191
How To Get Laravel Controller Method Name & Method Type Automatically<p>Basically I'm calling an event every time a Controller method runs:</p> <pre><code>public function destroy(User $user) { event(new AdminActivity('admin.users.destroy',class_basename(Route::current()-&gt;controller),'destroy','DELETE')); ... ...
<p>You can pass <code>Route::current()</code> to the event and then get your required information from the object of <code>\Illuminate\Routing\Route</code></p> <pre class="lang-php prettyprint-override"><code>public function destroy(User $user) { event(new AdminActivity(\Illuminate\Support\Facades\Route::current()))...
How To Get Laravel Controller Method Name & Method Type Automatically
php|laravel|laravel-8
2
70
1
72,844,277
72,844,277
3
true
2022-07-03T05:50:47.163Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How To Get Laravel Controller Method Name & Method Type Automatically<p>Basically I'm calling an event every time a Controller method runs:</p> <pre><code>pu...
73,029,858
C++ - Does passing by reference utilize implicit conversion?<p>I am trying to get a better understanding of what &quot;passing by reference&quot; really does in c++. In the following code:</p> <pre><code>#include &lt;iostream&gt; void func(int&amp; refVar) { std::cout &lt;&lt; refVar; } int main() { int val =...
<p>Why don't you just try it?</p> <p><a href="https://godbolt.org/z/8or3qfd5G" rel="nofollow noreferrer">https://godbolt.org/z/8or3qfd5G</a></p> <p>Note that the compiler could do implicit conversion and pass a reference to the temporary.</p> <p>But the only (good) reason to request a reference is to either store the r...
C++ - Does passing by reference utilize implicit conversion?
c++|function|pointers|reference
0
70
1
73,029,944
73,029,944
3
true
2022-07-19T00:21:18.903Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: C++ - Does passing by reference utilize implicit conversion?<p>I am trying to get a better understanding of what &quot;passing by reference&quot; really does...
72,793,974
Groupby column and create lists for other columns, preserving order<p>I have a PySpark dataframe which looks like this:</p> <pre class="lang-none prettyprint-override"><code>Id timestamp col1 col2 abc 789 0 1 def 456 ...
<p>I don't think the order can be reliably preserved using <code>groupBy</code> aggregations. So window functions seems to be the way to go.</p> <p>Setup:</p> <pre class="lang-py prettyprint-override"><code>from pyspark.sql import functions as F, Window as W df = spark.createDataFrame( [('abc', 789, 0, 1), ('d...
Groupby column and create lists for other columns, preserving order
python|dataframe|apache-spark|pyspark|apache-spark-sql
3
70
1
72,794,188
72,794,188
3
true
2022-06-28T22:50:18.593Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Groupby column and create lists for other columns, preserving order<p>I have a PySpark dataframe which looks like this:</p> <pre class="lang-none prettyprint...
72,952,845
How to create string literal type from interface key and key value<p>Suppose we have an interface and enum</p> <pre><code>enum Destination = { Home = 'home', Cafe = 'cafe' } interface Payload { apiVersion: string; destination: Destination; email?: string; } </code></pre> <p>And I want to create a template literal...
<p>Is it possible? Yes. Should you do it? Probably not...</p> <p>The following solution will generate all possible combinations of string literal types which are valid for a given <code>Payload</code> type.</p> <pre><code>type Expand&lt;T&gt; = T extends infer U ? { [K in keyof U]: U[K] } : never type OptionalProps&lt...
How to create string literal type from interface key and key value
typescript
2
70
1
72,955,599
72,955,599
3
true
2022-07-12T13:07:50.767Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to create string literal type from interface key and key value<p>Suppose we have an interface and enum</p> <pre><code>enum Destination = { Home = 'home'...
72,875,841
How can I perform recursive methods with generic class<p>I have a class that has one function that does multiplication without using build-in methods. I got my function to work without using a generic, but I can get it to work while using a generic. My problem is my recursive call-back function is giving me an error ea...
<p>Your multiplication algorithm is only valid if <code>b</code> is a non-negative integer. If <code>b</code> is negative, or includes a fraction, then <code>b == 0</code> will never become true. If you at least constrain type <code>T</code> to <code>UnsignedInteger</code>, then the compiler enforces those limitations ...
How can I perform recursive methods with generic class
swift|generics|recursion|types
1
70
2
72,876,150
72,876,150
3
true
2022-07-05T21:39:04.740Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I perform recursive methods with generic class<p>I have a class that has one function that does multiplication without using build-in methods. I got ...
72,965,104
Python - how to split by blank space if string element itself contains space?<p>I have a file with lines:</p> <pre><code>/home/Plugins/file1 e:222 k:dir (327/1) /home/Plugins/file2 e:100 k:dir (326/1) </code></pre> <p>I want to take a path and element id. That's easy.</p> <pre><code>with open('output_file.txt', 'r') as...
<p>I'd use regex:</p> <pre class="lang-py prettyprint-override"><code># coding=utf8 # the above tag defines encoding for this document and is for Python 2.x compatibility import re regex = r&quot;(.*) (e:\d*) (k:.*) \((\d{3}/\d)\)$&quot; test_str = (&quot;/home/Plugins/file1 e:222 k:dir (327/1)\n&quot; &...
Python - how to split by blank space if string element itself contains space?
python|python-2.7
2
70
3
72,965,294
72,965,294
4
true
2022-07-13T10:54:18.913Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python - how to split by blank space if string element itself contains space?<p>I have a file with lines:</p> <pre><code>/home/Plugins/file1 e:222 k:dir (327...
73,019,296
Weird Common lisp SBCL *query-io* behavior<p>Currently learning Common Lisp with SBCL, and it's bugging me how <em>query-io</em> has some unexpected differences from standard input and output. I will assume that <em>standard-output</em> contains a newline, or is formatted with one, because</p> <p><code>(format *query-i...
<p>If you want things to behave in a predictable way you should write programs which ensure that:</p> <ul> <li>don't name the function <code>read</code> (in fact I'm extremely convinced that SBCL wouldn't have allowed you to name the function <code>read</code>, unless perhaps you are using a prehistoric version);</li> ...
Weird Common lisp SBCL *query-io* behavior
linux|lisp|common-lisp|sbcl
0
70
1
73,021,414
73,021,414
4
true
2022-07-18T08:21:06.930Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Weird Common lisp SBCL *query-io* behavior<p>Currently learning Common Lisp with SBCL, and it's bugging me how <em>query-io</em> has some unexpected differen...
72,823,683
What is the range in which IEEE754 can correctly compare the size of floating point numbers<p>I know that the range of integers that can be correctly compared is <code>-(2^53 - 1)</code> to <code>2^53 - 1</code>.</p> <p>But what is the range of floating point numbers?</p> <pre class="lang-java prettyprint-override"><co...
<p>This question seems to be based on a fundamental misunderstanding of (mathematical) Real numbers, and their relationship to IEEE-754.</p> <p>&quot;Floating point&quot; refers to a representation scheme for Real numbers. Historically that comprises decimal digits and a &quot;decimal point&quot;. There are an infini...
What is the range in which IEEE754 can correctly compare the size of floating point numbers
java|ieee-754
0
70
3
72,823,942
72,823,942
4
true
2022-07-01T02:00:41.053Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What is the range in which IEEE754 can correctly compare the size of floating point numbers<p>I know that the range of integers that can be correctly compare...
72,868,412
How can I set add_executable WIN32 property or not depending on the build type?<p>This fails with the error &quot;Cannot find source file: WIN32. Tried extensions...&quot;</p> <pre><code>add_executable(${PROJECT_NAME} $&lt;$&lt;CONFIG:Release&gt;:WIN32&gt; main.cpp) </code></pre> <p>I need this in order to launch the a...
<p>As you noticed you cannot use generator expressions for the WIN32 keyword in the <code>add_executable</code> command.</p> <p>Instead, try setting the corresponding property <code>WIN32_EXECUTABLE</code> on the target:</p> <pre><code>set_target_properties(${PROJECT_NAME} PROPERTIES WIN32_EXECUTABLE $&lt;CONFIG:Releas...
How can I set add_executable WIN32 property or not depending on the build type?
c++|c|windows|cmake
4
70
1
72,868,793
72,868,793
5
true
2022-07-05T11:08:59.707Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I set add_executable WIN32 property or not depending on the build type?<p>This fails with the error &quot;Cannot find source file: WIN32. Tried exten...
72,975,272
Place and scale text onto of responsive image<p>I want to place text (I plan on dynamically generating this text later, hence why it isn't in the image) over an image (where the white rectangle is) and have the text scale along with the responsive image. I have successfully placed text over the image but I am having tr...
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-html lang-html prettyprint-override"><code> &lt;script src="https://cdn.tailwindcss.com"&gt;&lt;/script&gt; &lt;div class="flex flex-wrap w-full justify-center cont...
Place and scale text onto of responsive image
html|css
2
70
2
72,975,508
72,975,508
5
true
2022-07-14T04:40:05.107Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Place and scale text onto of responsive image<p>I want to place text (I plan on dynamically generating this text later, hence why it isn't in the image) over...
73,022,936
Why is `(2 == 2) == True` equal `True` but `2 == 2 == True` is equal `False`?<p>My problem are these two statements:</p> <pre><code>&gt; 2 == 2 == True False &gt; (2 == 2) == True True </code></pre> <p>I am confused. I expected both expressions to be the same since Python would evaluate the expression from left to righ...
<p><a href="https://docs.python.org/3/reference/expressions.html#comparisons" rel="nofollow noreferrer">Comparison chaining.</a> <code>2 == 2 == True</code> is evaluated as <code>2 == 2 and 2 == True</code>, and the second comparison is clearly false. (<code>2</code> may be <em>truthy</em>, but it is not <code>True</co...
Why is `(2 == 2) == True` equal `True` but `2 == 2 == True` is equal `False`?
python
-3
70
1
73,022,965
73,022,965
5
true
2022-07-18T13:16:49.640Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why is `(2 == 2) == True` equal `True` but `2 == 2 == True` is equal `False`?<p>My problem are these two statements:</p> <pre><code>&gt; 2 == 2 == True False...
73,005,057
How to define a function that has a condition as input?<p>I need a function that takes a rule/condition as an input. for example given an array of integers detect all the numbers that are greater than two, and all the numbers greater than four. I know this can be achieved easily without a function, but I need this to b...
<p>Functions are first class objects meaning you can treat them as any other variable.</p> <pre><code>import numpy as np def _select(x,rule): outp = rule(x) return outp def rule_2(val): return val &gt; 2 def rule_4(val): return val &gt; 4 L = np.round(np.random.normal(2,4,50),decimals=2) y = _sel...
How to define a function that has a condition as input?
python|function
3
70
1
73,005,124
73,005,124
6
true
2022-07-16T14:36:30.580Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to define a function that has a condition as input?<p>I need a function that takes a rule/condition as an input. for example given an array of integers d...
72,836,915
how to remove all zeros that are 7 characters long python<p>I have made a string without spaces. so instead of spaces, I used 0000000. but there will be no alphabet letters. so for example, 000000020000000050000000190000000200000000 should equal &quot;test&quot;. Sorry, I am very new to python and am not good. so if so...
<p>You should be able to achieve the desired effect using regular expressions and <code>re.sub()</code></p> <p>If you want to extract the literal word &quot;test&quot; from that string as mentioned in the comments, you'll need to account for the fact that if you have 8 <code>0</code>'s, it will match the first 7 from l...
how to remove all zeros that are 7 characters long python
python|string|variables
-2
70
1
72,836,936
72,836,936
-2
true
2022-07-02T06:19:02.110Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to remove all zeros that are 7 characters long python<p>I have made a string without spaces. so instead of spaces, I used 0000000. but there will be no a...
72,788,056
How to intercept error on a Promise with async/await?<p>On a NodeJs project, I call my async function this way:</p> <pre><code>const response = await myFunction(); </code></pre> <p>Here's the definition of the function:</p> <pre><code>myFunction = async () =&gt; { return await new Promise((next, fail) =&gt; { ...
<p>Use try/catch:</p> <pre><code>let response; try { response = await myFunction(); } catch (error) { // Handle error here. } </code></pre>
How to intercept error on a Promise with async/await?
javascript|node.js|async-await|promise
1
70
1
72,788,215
72,788,215
-1
true
2022-06-28T14:13:23.213Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to intercept error on a Promise with async/await?<p>On a NodeJs project, I call my async function this way:</p> <pre><code>const response = await myFunct...
72,802,806
DataRow.SetField() gives a null ref exception when adding data to a column I previously deleted then added back<p><strong>UPDATE</strong><br /> I think I have found what is causing the issue here <a href="https://stackoverflow.com/a/5665600/19393524">https://stackoverflow.com/a/5665600/19393524</a><br /> I believe my i...
<p>I fixed my original issue by changing a few lines of code in my <code>SortByColumn()</code> method:</p> <pre><code>private void SortByColumn() { if (cbAscDesc.SelectedIndex != -1)//if the user has selected ASC or DESC order { //clears the datatable object that stores t...
DataRow.SetField() gives a null ref exception when adding data to a column I previously deleted then added back
c#|sorting|nullreferenceexception|system.data
0
70
2
72,817,479
72,817,479
-1
true
2022-06-29T14:08:32.543Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: DataRow.SetField() gives a null ref exception when adding data to a column I previously deleted then added back<p><strong>UPDATE</strong><br /> I think I hav...
72,800,396
Argument data type varchar is invalid for argument 2 of substring function<p>I'm trying to put 2x'-' in phone number and I'm getting the following error</p> <blockquote> <p>Argument data type varchar is invalid for argument 2 of substring function.</p> </blockquote> <p>I'm working on Tsql. I also try 'mid' function - n...
<p>Your Query modified as below</p> <pre><code>declare @tel nvarchar(20) = '123456789' set @tel = (select left (@tel, 3))+'-'+(select substring (@tel, 4,3))+'-'+(select right (@tel, 3)) select @tel </code></pre> <p>can Re write as below</p> <pre><code>declare @tel nvarchar(20) = '123456789' set @tel = left (@tel, 3)+'-...
Argument data type varchar is invalid for argument 2 of substring function
sql-server|tsql|substring
-2
70
1
72,800,450
72,800,450
-1
true
2022-06-29T11:10:21.877Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Argument data type varchar is invalid for argument 2 of substring function<p>I'm trying to put 2x'-' in phone number and I'm getting the following error</p> ...
72,773,024
Reading XML file with PHP, but nothing shows<p>I have the following XML file:</p> <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt; &lt;Ares_dotazy xmlns=&quot;http://wwwinfo.mfcr.cz/ares/xml_doc/schemas/ares/ares_request/v_1.0.1&quot; xmlns:dtt=&quot;http://wwwinfo.mfcr.cz/ares/xml_doc/schema...
<p>With:</p> <pre><code>$response = &lt;&lt;&lt;XML &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt; &lt;Ares_dotazy xmlns=&quot;http://wwwinfo.mfcr.cz/ares/xml_doc/schemas/ares/ares_request/v_1.0.1&quot; xmlns:dtt=&quot;http://wwwinfo.mfcr.cz/ares/xml_doc/schemas/ares/ares_datatypes/v_1.0.1&quot; xmlns...
Reading XML file with PHP, but nothing shows
php|xml|simplexml
1
71
1
72,773,470
72,773,470
0
true
2022-06-27T13:35:14.003Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Reading XML file with PHP, but nothing shows<p>I have the following XML file:</p> <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;...
72,777,909
shinydashboard error message "Expected an object with class 'shiny.tag"<p>I am trying to create a dynamic notification on header on a shinyapp, and get an error message as <code>Warning: Error in FUN: Expected an object with class 'shiny.tag'.</code> The code is as below,</p> <pre><code>library(shiny) library(shinydash...
<ol> <li>you can write <code>if else</code> in one line</li> <li>to use <code>.list</code> argument, you need create your items in a list.</li> <li>each item in the list needs to be <code>notificationItem</code> or <code>messageItem</code>. Read this: <a href="https://rstudio.github.io/shinydashboard/structure.html" re...
shinydashboard error message "Expected an object with class 'shiny.tag"
r|shiny|tags|shinydashboard
0
71
1
72,778,368
72,778,368
0
true
2022-06-27T20:23:39.557Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: shinydashboard error message "Expected an object with class 'shiny.tag"<p>I am trying to create a dynamic notification on header on a shinyapp, and get an er...
72,771,449
heroku build failed on deployment<p>I am trying to host my React application on heroku but I keep getting the following errors:</p> <pre><code>-----&gt; Installing dependencies Installing node modules npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While ...
<p>I had to update the peer dependency for credit-card-input library in the <code>package-lock.json</code> file to be compatible with my version of react and this solves my problem. I'm not sure if this is the best way but it solves the issue for me.</p>
heroku build failed on deployment
javascript|reactjs|npm|heroku|build
0
71
1
72,778,668
72,778,668
0
true
2022-06-27T11:37:00.683Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: heroku build failed on deployment<p>I am trying to host my React application on heroku but I keep getting the following errors:</p> <pre><code>-----&gt; Inst...
72,783,394
Winston http log level behaves different than info<p>I am using winston to log incoming request on a <code>node v16</code> <code>express.js</code> server using following code sample (boiled down to the essentials to reproduce the behaviour).</p> <p>I am not sure what is causing this difference in behaviour and I could ...
<p>Interestingly the <code>http</code> log level is missing from the standard log levels in the source:</p> <p><a href="https://github.com/winstonjs/winston/blob/master/lib/winston.js#L87" rel="nofollow noreferrer">https://github.com/winstonjs/winston/blob/master/lib/winston.js#L87</a></p> <pre><code>// Pass through th...
Winston http log level behaves different than info
node.js|typescript|express|winston
2
71
1
72,786,043
72,786,043
0
true
2022-06-28T08:48:08.763Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Winston http log level behaves different than info<p>I am using winston to log incoming request on a <code>node v16</code> <code>express.js</code> server usi...
72,789,192
How do I change the property value name from an JSON file to object?<p>So basically I have this json file</p> <pre><code>[ { &quot;_id&quot;: &quot;62bab08c83586a7bb36b46de&quot;, &quot;index&quot;: 0, &quot;tags&quot;: [ &quot;ea in minim in occaecat pariatur cillum&quot;, &quot;ut exercitation minim officia enim...
<p>This would be a great application of a <code>.map()</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map" rel="nofollow noreferrer">array method</a> in javascript, which lets you iterate over an array, and return a new array. <code>.map()</code> works like this:<...
How do I change the property value name from an JSON file to object?
javascript|object
-1
71
3
72,789,329
72,789,329
0
true
2022-06-28T15:23:31.130Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I change the property value name from an JSON file to object?<p>So basically I have this json file</p> <pre><code>[ { &quot;_id&quot;: &quot;62bab08c...
72,790,832
Why is the integer in the struct a garbage values even though it was changed?<p>So, I implemented split in C, now I know <code>strtok</code> exists, but I wanted to implement it, so my function returns a struct that has the string array and the length, which is decided by the number of times the delimiter occurs and wh...
<p>In your <code>split.c</code> file over here:</p> <pre><code>else{ arr_counter++; //comment this line final_arr[arr_counter]=concat_str; printf(&quot;%s is the last at pos %d\n&quot;,concat_str,arr_counter); break; } </code></pre> <p>You are incrementing variable <code>arr_counter</code> which you shoul...
Why is the integer in the struct a garbage values even though it was changed?
c|memory|struct
0
71
1
72,791,489
72,791,489
0
true
2022-06-28T17:28:18.730Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why is the integer in the struct a garbage values even though it was changed?<p>So, I implemented split in C, now I know <code>strtok</code> exists, but I wa...
72,795,050
Select from @localvariable<p>I have a table of my server path, and I have a stored procedure where I need to call my server path base on the platform. I don't know why it's not working. Below is what I have so far.</p> <pre><code>SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [POLSAPSU].[SelectOrdersP...
<p>I found multiple issues here.</p> <blockquote> <ol> <li>Date parameters inside the <code>sql</code> query string are not properly escaped.</li> <li>Use <code>concat()</code> function instead of adding those constants and columns</li> <li>Columns with empty values are not property escaped.</li> </ol> </blockquote> <p...
Select from @localvariable
sql|sql-server
0
71
1
72,795,198
72,795,198
0
true
2022-06-29T02:13:32.027Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Select from @localvariable<p>I have a table of my server path, and I have a stored procedure where I need to call my server path base on the platform. I don'...
72,795,945
How to increment only one value in javascript<p>I want to only increment the score in one box but it gets incremented in 2 places. my code:</p> <pre><code>var homescore = document.getElementById('home-score') var guestscore = document.getElementById('guest-score') var i = 0; function add1() { i++; ...
<p>couple of things: I would advise to avoid using <code>var</code>. Use <code>let</code> or <code>const</code> instead. <a href="https://www.freecodecamp.org/news/var-let-and-const-whats-the-difference/" rel="nofollow noreferrer">Why?</a></p> <p>Declaring same variable again assigns a new value to that variable, remov...
How to increment only one value in javascript
javascript|html
0
71
3
72,796,090
72,796,090
0
true
2022-06-29T04:54:21.827Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to increment only one value in javascript<p>I want to only increment the score in one box but it gets incremented in 2 places. my code:</p> <pre><code>va...
72,798,326
getting value error while using datetime.strptime()<p>i am using <code> datetime.strptime() </code>in order to convert the timesatmp string received from the API to separate the date and time. one of the example :</p> <pre><code>from datetime import datetime.strptime(&quot;2019-11-14T03:41:12.869000Z&quot;,&quot;%Y-%m...
<p><a href="https://strftime.org/" rel="nofollow noreferrer"><code>%Z</code></a> is <em>Time zone name (empty string if the object is naive).</em> for example <code>UTC</code>. If trailing <code>Z</code> appears in all your strings use <code>Z</code> rather than <code>%Z</code>, that is</p> <pre><code>import datetime d...
getting value error while using datetime.strptime()
python|datetime|data-mining|strptime
0
71
2
72,798,450
72,798,450
0
true
2022-06-29T08:39:54.843Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: getting value error while using datetime.strptime()<p>i am using <code> datetime.strptime() </code>in order to convert the timesatmp string received from the...
72,803,395
Django query_set order_by default field if ordering field is an empty string<p>I have a query_set that I want to order by <code>Lower('title')</code>. However, for some elements, <code>title</code> is blank (<code>blank=True</code>). So, when I sort, those elements are rightfully are on top. However, all elements, no m...
<p>This works</p> <pre><code>query_set = query_set.annotate(order_title=Coalesce( Case( When(title__exact='', then=None), When(title__isnull=False, then='title'), default=None, output_field=CharField() ),'default_title')).order_by('order_title') </code></p...
Django query_set order_by default field if ordering field is an empty string
django|django-queryset
0
71
1
72,805,331
72,805,331
0
true
2022-06-29T14:46:44.333Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Django query_set order_by default field if ordering field is an empty string<p>I have a query_set that I want to order by <code>Lower('title')</code>. Howeve...
72,807,888
GetEvents from FullCalendar<p>I'm working with <a href="https://fullcalendar.io/" rel="nofollow noreferrer">Full Calendar</a> I want to create a button that take all the events from the calendar and send them to my database. But when trying to call the <strong>getEvents</strong> method referenced <a href="https://fullc...
<p>Your problem is because <code>var calendar = document.getElementById(&quot;calendar&quot;);</code> fetches the HTML element into which the rest of the calendar's HTML was added by fullCalendar. It does not fetch the fullCalendar instance which was generated by <code>new FullCalendar.Calendar</code> when you intialis...
GetEvents from FullCalendar
javascript|fullcalendar|fullcalendar-5
0
71
1
72,816,102
72,816,102
0
true
2022-06-29T21:07:20.800Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: GetEvents from FullCalendar<p>I'm working with <a href="https://fullcalendar.io/" rel="nofollow noreferrer">Full Calendar</a> I want to create a button that ...
72,808,725
Search for duplicates in each row and return which column has the duplicate?<p>So I have poll data that I am looking at and I've been trying to create a script in R for it. Column 1 is the voter's name. The rest of the columns are the names of the people they voted for, across different category. I have 70 voters so I ...
<p>One option would be to make a logical on all columns based on the <code>voter_name</code>, then we can pull all column names that have the same name.</p> <pre><code>library(tidyverse) df %&gt;% mutate(across(-voter_name, ~ voter_name == .x), self_vote = pmap_chr(across(where(is.logical)), ~ toString(name...
Search for duplicates in each row and return which column has the duplicate?
r|duplicates|drop-duplicates
-1
71
1
72,824,456
72,824,456
0
true
2022-06-29T23:06:29.913Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Search for duplicates in each row and return which column has the duplicate?<p>So I have poll data that I am looking at and I've been trying to create a scri...
72,822,521
Calculator Functionality<p>I’m working on a dilution calculator. I have it 98% working, however, I want it to work a certain way and I’m not sure to do that. This is my first app so I’m new at this.</p> <p>So I want the user to be able to input the numbers and hit a button to get the calculation. I’ve been using @State...
<p>So far you do the calculation in calculated properties and display them directly. So they'll update every time one of their underlying @State values change.</p> <p>If you only want to show results on button press, you should display your @State result vars, and update inside the button action.</p> <p>Side note: prop...
Calculator Functionality
swiftui|calculator
0
71
2
72,836,729
72,836,729
0
true
2022-06-30T22:06:27.830Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Calculator Functionality<p>I’m working on a dilution calculator. I have it 98% working, however, I want it to work a certain way and I’m not sure to do that....
72,803,882
GitHub Actions: How to trigger a workflow on a pull_request event filtered on the name of the merging branch<p>OK I've seen at least 1 solution on this but it isn't as elegant as it should be IMO so I'm holding out hope that I'm just not understanding the documentation.</p> <h4>Preamble</h4> <p>A pull request involves ...
<p>It's only possible using the conditional on the job.</p>
GitHub Actions: How to trigger a workflow on a pull_request event filtered on the name of the merging branch
github-actions
0
71
1
72,854,121
72,854,121
0
true
2022-06-29T15:16:46.070Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: GitHub Actions: How to trigger a workflow on a pull_request event filtered on the name of the merging branch<p>OK I've seen at least 1 solution on this but i...
72,854,148
Hawk authentication in JMeter<p>can someone please tell me how to configure hawk authentication process (Hawk Auth ID , Hawk Auth Key ,Algorithm ) in JMeter ?</p> <p>I tried to pass this values like hawk id , hawk key , algorithm through header manager but it gives unauthorized error. so I need to know the process to s...
<p>I think the easiest for you would be using <a href="https://blog.mozilla.org/services/2015/02/05/whats-hawk-and-how-to-use-it/" rel="nofollow noreferrer">Java implementation of HAWK protocol</a> from a suitable JMeter's <a href="https://jmeter.apache.org/usermanual/best-practices.html#jsr223" rel="nofollow noreferre...
Hawk authentication in JMeter
authentication|jmeter|jmeter-5.0
0
71
1
72,855,602
72,855,602
0
true
2022-07-04T08:58:18.893Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Hawk authentication in JMeter<p>can someone please tell me how to configure hawk authentication process (Hawk Auth ID , Hawk Auth Key ,Algorithm ) in JMeter ...
72,850,525
How could I make certain menu items appear depending on the navigation "bar" I press<p>I am building an app that will store multiple Nintendo consoles and their details (kinda like Mactracker but for Nintendo stuff).</p> <p>I wanna store certain consoles in categories on the main menu but I'm not sure how I could do it...
<p>Few modifications:</p> <p>In main view use only categories and pass only useful consoles to console menu :</p> <pre><code>struct MainMenu: View { // Use categories ordered by reversed alphabetical order var categories = ConsoleList.categories.sorted(by: {$0.key &gt; $1.key}) // var con: [ConsoleDetails] =...
How could I make certain menu items appear depending on the navigation "bar" I press
swift|xcode|swiftui|swiftui-navigationlink|swiftui-tabview
0
71
1
72,860,898
72,860,898
0
true
2022-07-03T23:17:56.567Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How could I make certain menu items appear depending on the navigation "bar" I press<p>I am building an app that will store multiple Nintendo consoles and th...
72,840,405
How to create something like a sniffer?<p>I want to create an app to monitor and save the received data (for test my program!). The device I'm working with have an API itself, and I want to create an app to get data from the device using CyPress CyAPI (FX3). For that the device should open and start streaming data. My ...
<p>After sometimes, figuring out that I should read two endpoint asynchronously not synchronously.</p> <pre><code>std::tuple&lt;std::vector&lt;uint8_t&gt;, std::vector&lt;uint8_t&gt;&gt; USB::getData() { OVERLAPPED ov1, ov2; ov1.hEvent = CreateEvent(NULL, false, false, L&quot;CYUSB_IN&quot;); ov2.hEvent = CreateE...
How to create something like a sniffer?
c++|usb
1
71
1
72,864,396
72,864,396
0
true
2022-07-02T15:47:21.200Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to create something like a sniffer?<p>I want to create an app to monitor and save the received data (for test my program!). The device I'm working with h...
72,861,377
Replace values in PySpark column directly without joining<p>I have two data frames:</p> <pre class="lang-py prettyprint-override"><code>data1 = [('Andy', 'male'), ('Julie', 'female'), ('Danny', 'male')] columns1 = ['name', 'gender'] df1 = spark.createDataFrame(data=data1, schema=columns1) data2 = [('male', 1), ('fema...
<p>Without join you would need to provide all the possible mappings yourself</p> <pre class="lang-py prettyprint-override"><code>df = df.replace({'male':'1', 'female':'2'}, subset='gender') </code></pre>
Replace values in PySpark column directly without joining
apache-spark|join|pyspark|replace|apache-spark-sql
0
71
2
72,868,231
72,868,231
0
true
2022-07-04T19:44:31.053Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Replace values in PySpark column directly without joining<p>I have two data frames:</p> <pre class="lang-py prettyprint-override"><code>data1 = [('Andy', 'ma...
72,869,923
GLIBC_2.28 not found (required by ./fabric-ca-server)<p>I try to initialize Fabric CA server by command:</p> <pre><code>./fabric-ca-server init -b {user}:{password} </code></pre> <p>and receive:</p> <pre><code>./fabric-ca-server: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by ./fabric-ca-server) </code><...
<p>fabric-ca-server binaries are built on Ubuntu. The version of Ubuntu that was used will depend on the version of fabric-ca-server you are trying to use.</p> <p>Whatever version of fabric-ca-server you are trying to run it won't run on your version of linux due fabric-ca-server now requiring a specific capability tha...
GLIBC_2.28 not found (required by ./fabric-ca-server)
linux|shell|hyperledger-fabric|bin|hyperledger-fabric-ca
0
71
1
72,875,751
72,875,751
0
true
2022-07-05T13:02:52.077Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: GLIBC_2.28 not found (required by ./fabric-ca-server)<p>I try to initialize Fabric CA server by command:</p> <pre><code>./fabric-ca-server init -b {user}:{pa...
72,851,170
How can I load a SVG directly instead of importing via a js file for use in a leaflet divIcon?<p>I have a Vue 2 sample project at <a href="https://github.com/ericg-vue-questions/leaflet-test" rel="nofollow noreferrer">https://github.com/ericg-vue-questions/leaflet-test</a></p> <p>I need to use this SVG inside of a leaf...
<p>My preferred solution is to use what I am calling the fetch-method.</p> <p>The changes I made was to:</p> <ol> <li>move <code>TheCloud.svg</code> to the <code>public/</code> folder.</li> <li>use the <code>fetch</code> to obtain the svg source</li> </ol> <pre><code>const response = await fetch( &quot;/TheCloud.svg&qu...
How can I load a SVG directly instead of importing via a js file for use in a leaflet divIcon?
javascript|vue.js|svg|vuejs2|leaflet
0
71
2
72,875,756
72,875,756
0
true
2022-07-04T02:14:13.020Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I load a SVG directly instead of importing via a js file for use in a leaflet divIcon?<p>I have a Vue 2 sample project at <a href="https://github.com...
72,883,251
Why combobox Items aren't displaying. C# WPF MVVM<p>I have MainWindowViewModel and AccountViewModel. When I click 'Login' on my MainView:</p> <ol> <li>data about AvaliableExchages is fetched from database.</li> <li>Property CurrentViewModel is set to AccountViewModel.</li> <li>AvaliableExchanges property now has 2 stri...
<p>A UserControl must not explicitly set its own DataContext.</p> <p>Remove</p> <pre><code>&lt;UserControl.DataContext&gt; &lt;views:AccountViewModel/&gt; &lt;/UserControl.DataContext&gt; </code></pre> <p>from the AccountView XAML, because it sets a different AccountViewModel instance than the one the control is ex...
Why combobox Items aren't displaying. C# WPF MVVM
c#|wpf
0
71
1
72,883,919
72,883,919
0
true
2022-07-06T12:02:34.890Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why combobox Items aren't displaying. C# WPF MVVM<p>I have MainWindowViewModel and AccountViewModel. When I click 'Login' on my MainView:</p> <ol> <li>data a...
72,860,833
Shiny App Issue in R "output object not found"<p>I am facing an issue while creating my Shiny App.</p> <p>The error message is</p> <blockquote> <p>Error in output$raw_data &lt;- renderTable({ : object 'output' not found</p> </blockquote> <p>which occurs for all output codes.</p> <p>The below codes contain two parts of ...
<p>You had the output object <code>value</code> being used twice in the <code>ui</code>. These IDs should be unique. Also, made <code>myData</code> to be a data frame. Try this</p> <pre><code>library(rsconnect) library(shiny) library(survival) library(survminer) library(readxl) myData &lt;- data.frame(Years_Diff_Sur...
Shiny App Issue in R "output object not found"
r|shiny
1
71
1
72,889,160
72,889,160
0
true
2022-07-04T18:36:26.237Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Shiny App Issue in R "output object not found"<p>I am facing an issue while creating my Shiny App.</p> <p>The error message is</p> <blockquote> <p>Error in o...
72,893,742
Parametric constructors<p>I am having some issues understanding the concept of parametric constructors in Julia. I am looking at the standard example in the Julia docs:</p> <pre><code>struct Point{T&lt;:Real} x::T y::T end </code></pre> <p>To my understanding, this means I can generate a Point-datatype with an ...
<p>The type parameter goes inside the curly braces in the constructor call, just like it does in the <code>struct</code> definition:</p> <pre><code> julia&gt; Point{Integer}(12, 12) Point{Integer}(12, 12) julia&gt; Point{Rational}(12, 10//3) Point{Rational}(12//1, 10//3) </code></pre> <p>The arguments supplied are t...
Parametric constructors
julia|parametric-polymorphism
2
71
1
72,893,991
72,893,991
0
true
2022-07-07T07:20:16.107Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Parametric constructors<p>I am having some issues understanding the concept of parametric constructors in Julia. I am looking at the standard example in the ...
72,896,011
push item into array at a specific index with pipeline (aggregation or update) - mongodb<p>inspired by <a href="https://stackoverflow.com/questions/72888971/swap-elements-in-a-mongodb-array-given-only-their-ids-in-place/72889749#72889749">another question</a>, I looked for a common practice for inserting an item into a...
<p>This can be done using an aggregation pipeline or an update with pipeline. In this case the simple option is an update pipeline.</p> <p>The idea here is to use the <code>$size</code> of the <code>$$value</code> in the <code>$reduce</code> step to find the right place to insert the item into:</p> <pre><code>db.collec...
push item into array at a specific index with pipeline (aggregation or update) - mongodb
arrays|mongodb|mongodb-query|aggregation-framework
0
71
1
72,896,012
72,896,012
0
true
2022-07-07T10:10:49.123Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: push item into array at a specific index with pipeline (aggregation or update) - mongodb<p>inspired by <a href="https://stackoverflow.com/questions/72888971/...
72,886,024
Airflow run bash command on an existing docker container<p>I have Airflow running in a Docker container and I want to trigger a python script that resides in another container. I tried the regular bash operator but that seems to be only for local. Also looked at the Docker operator but that one seems to want to creat...
<p>The airflow container must be able to access the python script to be executed. If the script is in another container, either you mount a volume that airflow can access it or you can execute DAG with KubernetesPodOperator.</p>
Airflow run bash command on an existing docker container
docker|airflow
0
71
1
72,900,017
72,900,017
0
true
2022-07-06T15:14:45.440Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Airflow run bash command on an existing docker container<p>I have Airflow running in a Docker container and I want to trigger a python script that resides in...
72,905,152
Tracing surrounding rectangle in manim<p>The effect I'm looking for is equivalent to creating a rectangle around an object and uncreating it (in reverse) before the first animation is over. I faked the result by drawing another rectangle over the first with black stroke, but that creates new problems for my scene. Is t...
<p>It sounds like you are looking for <a href="https://docs.manim.community/en/stable/reference/manim.animation.indication.Circumscribe.html" rel="nofollow noreferrer">the <code>Circumscribe</code> animation</a>.</p>
Tracing surrounding rectangle in manim
python|manim
0
71
1
72,905,259
72,905,259
0
true
2022-07-07T23:17:44.427Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Tracing surrounding rectangle in manim<p>The effect I'm looking for is equivalent to creating a rectangle around an object and uncreating it (in reverse) bef...
72,908,430
How to invert y axis in subplot Python<p>I am trying to make a subplot of three figures. All of the figures should have inverted y-axes. But when I use ´gca().invert_yaxis()´ it only inverts the last of the three subplots and not the first two. How can I invert all of the y axes?</p> <pre><code>import matplotlib.pyplot...
<p><code>plt.gca()</code> literally means &quot;get current axes&quot;, so it makes sense that only the last one is affected. In your case, the three axes are <code>p1,p2, p3</code>, therefore <code>p1.invert_yaxis()</code> etc. should do the job. Delete all lines containing <code>gca()</code> in your code.</p>
How to invert y axis in subplot Python
python|matplotlib|plot|subplot
0
71
1
72,908,471
72,908,471
0
true
2022-07-08T08:04:53.937Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to invert y axis in subplot Python<p>I am trying to make a subplot of three figures. All of the figures should have inverted y-axes. But when I use ´gca(...
72,917,821
Layouts inside folders Nuxt js 3<p>Layouts inside &quot;layouts&quot; folder work as expected but when I try to save a layout inside a folder like &quot;layouts/mobile/custom.vue&quot; does not seem to work.</p> <p>just throws this message as if the layout does not exists.</p> <pre><code>Invalid layout `mobile/custom` ...
<p>This feature was added in Nuxt 2 long ago.</p> <p><a href="https://github.com/nuxt/nuxt.js/pull/1865" rel="nofollow noreferrer">Adds support for folders in /layouts #1865</a></p> <p><a href="https://github.com/nuxt/nuxt.js/issues/1854" rel="nofollow noreferrer">Nuxt.js does not respect layouts in separate folders. #...
Layouts inside folders Nuxt js 3
nuxtjs3
0
71
1
72,919,408
72,919,408
0
true
2022-07-08T23:17:48.770Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Layouts inside folders Nuxt js 3<p>Layouts inside &quot;layouts&quot; folder work as expected but when I try to save a layout inside a folder like &quot;layo...
72,940,816
Spring MVC - Content type 'application/json' not supported<p>I'm writing an MVC project through Spring framework, not Spring Boot, in Eclipse Enterprise. With Postman I'm sending a json object to my method:</p> <pre><code>@PutMapping(value = &quot;/put_in_mail&quot;, produces = MediaType.APPLICATION_JSON_VALUE...
<p>As Sotirios Delimanolis mentioned, I missed a mvc:annotation tag in my -servlet.xml file and wrote something wrong about the schemaLocation, now json is supported with mvc.</p>
Spring MVC - Content type 'application/json' not supported
java|json|maven|spring-mvc
0
71
2
72,941,697
72,941,697
0
true
2022-07-11T15:15:22.203Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Spring MVC - Content type 'application/json' not supported<p>I'm writing an MVC project through Spring framework, not Spring Boot, in Eclipse Enterprise. Wit...
72,941,962
SQL syntax Error using SELECT, ORDER BY, ASC, and LIMIT<pre><code>SELECT SQL_CALC_FOUND_ROWS FROM personas ORDER BY nombre ASC LIMIT 0, 10; </code></pre> <blockquote> <p>You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM persona...
<ol> <li>In case you are using MySQL 8.0.17 or higher version</li> </ol> <p>The SQL_CALC_FOUND_ROWS query modifier and accompanying FOUND_ROWS() function are deprecated as of MySQL 8.0.17; expect them to be removed in a future version of MySQL. As a replacement, considering executing your query with LIMIT, and then a s...
SQL syntax Error using SELECT, ORDER BY, ASC, and LIMIT
mysql
0
71
1
72,942,370
72,942,370
0
true
2022-07-11T16:47:35.597Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: SQL syntax Error using SELECT, ORDER BY, ASC, and LIMIT<pre><code>SELECT SQL_CALC_FOUND_ROWS FROM personas ORDER BY nombre ASC LIMIT 0, 10; </code></pre> ...
72,946,846
Exception: The parameters (String) don't match the method signature for SpreadsheetApp.Range.setDataValidation<p>I am making a very simple Code for Google App Script and when executing it I am getting the error mentioned in the title.<br /> I use Google Sheets interchangeably in Spanish and English Language. I am wonde...
<p>You forgot to include the parenthesis on <code>build()</code>.</p> <p>Replace</p> <pre><code>var rule = SpreadsheetApp.newDataValidation().requireValueInList(list).build; </code></pre> <p>With</p> <pre><code>var rule = SpreadsheetApp.newDataValidation().requireValueInList(list).build(); </code></pre>
Exception: The parameters (String) don't match the method signature for SpreadsheetApp.Range.setDataValidation
string|google-apps-script|exception|multidimensional-array|parameters
0
71
1
72,955,022
72,955,022
0
true
2022-07-12T03:52:41.147Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Exception: The parameters (String) don't match the method signature for SpreadsheetApp.Range.setDataValidation<p>I am making a very simple Code for Google Ap...
72,962,525
Why is this react route throwing an error of no route matched location?<p>I have some problem related to routing in my code im getting error &quot;react_devtools_backend.js:4026 No routes matched location &quot;/airlines/1/reviews/new&quot; .That is when im trying to give a review to a particular airline. here is my c...
<p>Your route looks like it's got a typo, should be</p> <pre><code>&lt;Route path=&quot;/airlines/:id/reviews/new&quot; element={ &lt;AddreviewForm /&gt;} /&gt; </code></pre> <p>instead of</p> <pre><code>&lt;Route path=&quot;/airlines/${id}/reviews/new&quot; element={ &lt;AddreviewForm /&gt;} /&gt; </code></pre>
Why is this react route throwing an error of no route matched location?
reactjs|react-native|react-hooks|react-router|react-router-component
0
71
1
72,962,564
72,962,564
0
true
2022-07-13T07:35:49.420Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why is this react route throwing an error of no route matched location?<p>I have some problem related to routing in my code im getting error &quot;react_devt...
72,969,182
unzip Http FormFile in Azure Function<p>I have a front hand in which the user can download a zip. My idea is to use http triggered azure function to unzip that file and send it to Azure blob storage. Therefore I am simulating the http function with postman sending the zip in the form-data. I am not able to figure it ou...
<p>As per <a href="https://www.frankysnotes.com/2019/02/how-to-unzip-automatically-your-files.html" rel="nofollow noreferrer">article</a> credits by <a href="https://github.com/FBoucher" rel="nofollow noreferrer">FBoucher</a></p> <p>Install the extension from Inside Visual Studio Code and <a href="https://docs.microsof...
unzip Http FormFile in Azure Function
c#|azure-functions|zip|azure-blob-storage|azure-http-trigger
0
71
1
72,969,870
72,969,870
0
true
2022-07-13T15:51:51.010Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: unzip Http FormFile in Azure Function<p>I have a front hand in which the user can download a zip. My idea is to use http triggered azure function to unzip th...