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,176,003
Print function is printing nothing inside call function in Keras/Tensorflow<p>I want to print some objects inside below call function using print command but it prints nothig when the code runs successfully. I am reading (<a href="https://keras.io/examples/keras_recipes/debugging_tips/" rel="nofollow noreferrer">THIS</...
<p>For the code shared in the comments. Add this as the first code cell before the imports.</p> <pre><code>%%bash pip install -U tensorflow_addons </code></pre> <p>Add a yo in the routine of interest</p> <pre><code>class Patches(layers.Layer): def __init__(self, patch_size): super(Patches, self).__init__()...
Print function is printing nothing inside call function in Keras/Tensorflow
python|tensorflow|machine-learning|keras|deep-learning
0
141
1
72,203,326
72,203,326
0
true
2022-05-09T17:27:22.957Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Print function is printing nothing inside call function in Keras/Tensorflow<p>I want to print some objects inside below call function using print command but...
72,206,223
navigation bar issue after clicking on card flutter<p><a href="https://i.stack.imgur.com/3kfd0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3kfd0.png" alt="this is my navigation bar and it works perfectly without any issues" /></a></p> <p><a href="https://i.stack.imgur.com/iZhnu.png" rel="nofollow...
<p>create a new list of screens and add the screens you created as the list items</p> <pre><code>List screens = [ HomeScreen(); CarpentryScreen(); ... ... ]; </code></pre> <p>then make the body of your <code>MenuBarWidget()</code> return screens[_index]</p> <pre><code>class MenuBarWidget extends StatefulWidget { @over...
navigation bar issue after clicking on card flutter
flutter|dart
0
23
1
72,206,302
72,206,302
0
true
2022-05-11T18:53:36.367Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: navigation bar issue after clicking on card flutter<p><a href="https://i.stack.imgur.com/3kfd0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur...
72,126,677
Clear canvas on window resize<p>I am trying to reset my progress ring, which is drawn with canvas on resize.</p> <p>Currently, when I resize my window the function is run again as expected, but instead of the canvas being reset another progress ring is being drawn within the same canvas, please see screenshot below:</p...
<p><strong>1. Clear size problem</strong></p> <blockquote> <p>var canvas = document.querySelector('.percentage-ring canvas');</p> </blockquote> <blockquote> <p>var ctx = canvas.getContext('2d');</p> </blockquote> <blockquote> <p>ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height);</p> </blockquote> <p>You have to ...
Clear canvas on window resize
javascript|canvas|resize
0
35
1
72,126,887
72,126,887
0
true
2022-05-05T11:49:50.027Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Clear canvas on window resize<p>I am trying to reset my progress ring, which is drawn with canvas on resize.</p> <p>Currently, when I resize my window the fu...
72,170,599
andorid ViewGroup childs isn't resized after onMeasure<p>I want to create my own ViewGroup with <code>ImageView</code> and some other views. I do this as follows (i have removed adding of other views for simplyfing the example):</p> <pre><code>class TestWidget @JvmOverloads constructor( context: Context, attrs: Attri...
<p>Override <code>onMeasure</code> like this way:</p> <pre><code>override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) { super.onMeasure(widthMeasureSpec, widthMeasureSpec) } </code></pre>
andorid ViewGroup childs isn't resized after onMeasure
android|kotlin|custom-view
0
45
1
72,173,572
72,173,572
0
true
2022-05-09T10:34:30.210Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: andorid ViewGroup childs isn't resized after onMeasure<p>I want to create my own ViewGroup with <code>ImageView</code> and some other views. I do this as fol...
72,212,030
how to prevent jdbc from trying to connect to a mysql database during unit testing<p>I'm making an application for a school project, but I'm running into the issue that when I try to run the unit tests that it tries to connect to the database while starting up the application, which isn't required for the tests (becaus...
<p>while I was investigating the spring boot H2 in-memory database (as suggested by Chris Olive and Paranaaan) I also came across the option of using a test container. after looking into this I saw that this enables the project to create a temp docker container with a MySQL image that I can use during the testing of my...
how to prevent jdbc from trying to connect to a mysql database during unit testing
java|spring-boot|unit-testing|jdbc|mocking
0
149
3
72,215,262
72,215,262
0
true
2022-05-12T08:03:52.770Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to prevent jdbc from trying to connect to a mysql database during unit testing<p>I'm making an application for a school project, but I'm running into the...
72,131,087
Move XML different elements<p>I'm trying to move each <code>programme</code> element inside it's corresponding <code>channel</code> element based on attribute <code>id</code>. I tried to create each element manually but they don't have the same child elements, so It would be very long to check for each.</p> <p><strong>...
<p>This should be easy to do using a <a href="https://www.w3.org/TR/1999/REC-xslt-19991116/#key" rel="nofollow noreferrer"><strong>key</strong></a>:</p> <p><strong>XSLT 1.0</strong></p> <pre><code>&lt;xsl:stylesheet version=&quot;1.0&quot; xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot;&gt; &lt;xsl:output m...
Move XML different elements
xml|xslt
0
25
1
72,131,617
72,131,617
0
true
2022-05-05T17:06:58.157Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Move XML different elements<p>I'm trying to move each <code>programme</code> element inside it's corresponding <code>channel</code> element based on attribut...
72,109,781
how to config u-boot for imx6?<p>When I am trying to make u-boot for apalis-aimx6-quad board, and below list is shows the details of my configuration:</p> <ol> <li>CROSS_COMPILER = aarch64-unknown-linux-gnu 1.1 it already exported to path 1.2 menuconfig of the cross compiler remains as before.</li> <li>Host Linux versi...
<ol> <li><p>You are using the wrong compiler, i.e. the gcc from your Linux PC, this is why the error message is suggesting to use values such as <code>corei7</code> for the <code>-mtune</code> option.</p> </li> <li><p>This being said, because your apalis-aimx6-quad SoC is a <code>Cortex-A9</code>,its architecture is <...
how to config u-boot for imx6?
embedded-linux|bootloader|u-boot|imx6|crosstool-ng
0
283
2
72,223,236
72,223,236
0
true
2022-05-04T08:14:11.397Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to config u-boot for imx6?<p>When I am trying to make u-boot for apalis-aimx6-quad board, and below list is shows the details of my configuration:</p> <o...
72,167,844
Estimation fiber length of overlapping fibers from image using python code<p>I need a help in estimating the accurate fiber length from image. I have developed code in <code>python</code> through which estimation of length is possible up to some extent.<br /> I have used <code>Skan</code> opensource library to get the ...
<p>Starting with the skeleton I would proceed as follows:</p> <ul> <li>convert the skeleton to a path graph</li> <li>for each pair of paths identify valid junctions</li> <li>calculate the angle between each adjacent path</li> <li>merge paths that go nearly straight through the junction</li> </ul> <p>Here is a sketch th...
Estimation fiber length of overlapping fibers from image using python code
python|opencv|image-processing|scikit-image
0
249
1
72,196,895
72,196,895
0
true
2022-05-09T06:40:18.973Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Estimation fiber length of overlapping fibers from image using python code<p>I need a help in estimating the accurate fiber length from image. I have develop...
72,210,958
Calculating the time length of each binary/boolean column as reference<p>I have two columns. One is listed as True/False for a series of data. The entire dataset also has a timestep column. I want to write code that can read when the Boolean column changes to true, the time is calculated from the timestamp column until...
<p>Converting <code>running</code> column to boolean and working with for-loop is a way. Also, you can operate in the dataframe. You already have one! This is a solution working with <code>tidyverse</code> library and some date operations thanks to <code>lubridate</code> library. I encourage you to learn to work with t...
Calculating the time length of each binary/boolean column as reference
r|for-loop|histogram|boolean-logic
0
47
1
72,212,328
72,212,328
0
true
2022-05-12T06:26:21.583Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Calculating the time length of each binary/boolean column as reference<p>I have two columns. One is listed as True/False for a series of data. The entire dat...
72,219,798
Excel macro to insert certain characters into column<p>Im currently using this. while this works for now. Im looking to add code that allows me replace everything in that column. Not just limited to only replacing the 0 or one word.</p> <pre><code>.AutoFilter field:=6, Criteria1:=&quot;0&quot; Columns(&quot;F&quot;).re...
<p><a href="https://i.stack.imgur.com/JY8gg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JY8gg.png" alt="enter image description here" /></a></p> <pre><code>Sub test() Dim rg As Range With ActiveSheet Set rg = .Range(&quot;A1&quot;, .Range(&quot;C&quot; &amp; Rows.Count).End(xlUp)) 'ch...
Excel macro to insert certain characters into column
excel|vba
0
36
1
72,238,128
72,238,128
0
true
2022-05-12T17:21:21.977Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Excel macro to insert certain characters into column<p>Im currently using this. while this works for now. Im looking to add code that allows me replace every...
72,233,457
How to style react styled components using classNames<p>How to style a styled component based on the class name it has. I found the following implementation through some blogs, but this isn't working. Can someone help me with this? I really appreciate any help you can provide.</p> <pre><code>import React from &quot;rea...
<p>When accessing a child or a selector, you don'thave to use space. Below is an example:</p> <pre><code>const Star = styled.div` font-size: 2rem; &amp;.filled { color: red; } `; </code></pre> <p><a href="https://styled-components.com/docs/basics#pseudoelements-pseudoselectors-and-nesting" rel="nofollow nore...
How to style react styled components using classNames
css|reactjs|styled-components
0
608
1
72,233,509
72,233,509
0
true
2022-05-13T17:32:37.983Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to style react styled components using classNames<p>How to style a styled component based on the class name it has. I found the following implementation ...
72,229,205
Serialize response from post async .NET 6<p>I am trying to modify the response when serialized. <code>TimeJoined</code> is returned as a string in format <code>hh:mm (GMT +_)</code> and I want to modify as a 24h format, in the instance below would be <code>14:46</code></p> <pre class="lang-cs prettyprint-override"><cod...
<p>The key for 24h is in the following string format:</p> <pre><code>hh for 12h format HH for 24h format z is for time zone </code></pre> <p>Lets put that together, something like:</p> <pre><code>string.Format(DateTime.Now.ToString(&quot;HH:mm ({0} z)&quot;), &quot;GMT&quot;); </code></pre> <p>To put that in your perso...
Serialize response from post async .NET 6
c#|.net-6.0
0
92
2
72,230,010
72,230,010
0
true
2022-05-13T11:56:49.633Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Serialize response from post async .NET 6<p>I am trying to modify the response when serialized. <code>TimeJoined</code> is returned as a string in format <co...
72,174,422
How to display multiple lines in Recharts X-Axis tick label?<p>I am being asked to put long string values as my X axis tick labels.</p> <p>I tried other charting libraries, but this one overall has worked the best for my situation. I just cannot figure out what to do with the x axis labels.</p> <p>I tried to create a s...
<p>You need to create a custom <a href="https://recharts.org/en-US/api/YAxis#tick" rel="nofollow noreferrer">tick</a> react component. Line breaks will not work. You will need to use multiple <code>&lt;tspan&gt;</code> components with correct <code>dy</code> or vertical position. Also increase the chart <code>bottom</c...
How to display multiple lines in Recharts X-Axis tick label?
reactjs|charts|recharts
0
1,421
1
72,174,696
72,174,696
0
true
2022-05-09T15:21:33.167Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to display multiple lines in Recharts X-Axis tick label?<p>I am being asked to put long string values as my X axis tick labels.</p> <p>I tried other char...
72,204,676
How to add if and else condition in wordpress shortcode<p>I have a shortcode showing the username of the current user, it works. What I want to do is insert conditions.</p> <p>if the user has the username show it, otherwise show first name or something else.</p> <p>I searched on google and here on stack, I understood t...
<p><code>If/Else</code> conditionals are a foundational aspect of PHP. It doesn't matter really if it's WP or not, they work the same.</p> <p>To answer the main question, you would add the conditional like this:</p> <pre><code>function display_current_username () { /* ADDED BASED ON WPEXPERTS ANSWER This is...
How to add if and else condition in wordpress shortcode
php|wordpress|shortcode
0
83
2
72,204,770
72,204,770
0
true
2022-05-11T16:38:02.817Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to add if and else condition in wordpress shortcode<p>I have a shortcode showing the username of the current user, it works. What I want to do is insert ...
72,178,666
Do DRF views use its queryset's object manager?<p>If I have a custom object manager with a custom <code>create</code> function for a model:</p> <pre><code>class CustomManager(models.Manager): def get_queryset(self): return super().get_queryset().filter(custom=True) def create(self): kwargs[&quot;custom&quot...
<p>The creation on <code>ModelViewSet</code>s is handled by the <code>serializer_class</code> as seen on the <a href="https://github.com/encode/django-rest-framework/blob/master/rest_framework/mixins.py#L16-L24" rel="nofollow noreferrer"><code>CreateModelMixin</code></a> and same thing for the update - a <code>serializ...
Do DRF views use its queryset's object manager?
django-models|django-rest-framework|django-views|django-managers|django-viewsets
0
29
1
72,179,338
72,179,338
0
true
2022-05-09T22:05:55.270Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Do DRF views use its queryset's object manager?<p>If I have a custom object manager with a custom <code>create</code> function for a model:</p> <pre><code>cl...
72,237,368
C Program, printf() and strlen() argument format for output<p>Why does my terminal crash when I attempt to run this C Program?</p> <p>Here are the instructions for the programming exercise.</p> <p><a href="https://i.stack.imgur.com/XCe7u.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XCe7u.png" alt=...
<p>Salut, (Why can't I say &quot;hello&quot; at the beginning of my message?)</p> <blockquote> <p>Why does my terminal crash when I attempt to run this C Program?</p> </blockquote> <p>Because you don't provide enough argument in your printf function. Suddenly printf tries to read a forbidden memory area</p> <blockquote...
C Program, printf() and strlen() argument format for output
c|printf|strlen
0
71
2
72,237,559
72,237,559
0
true
2022-05-14T04:31:48.703Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: C Program, printf() and strlen() argument format for output<p>Why does my terminal crash when I attempt to run this C Program?</p> <p>Here are the instructio...
72,237,144
My code runs smoothly to the end in Linux but ends abruptly in Windows<p>I am new to coding. As a practice problem, I wrote a program to sort strings as alphabetically, as in a dictionary. My program takes as input: (a) The number of strings the user has in mind and (b) The strings, one by one, each terminated by pres...
<h2>First error:</h2> <p>You are allocating memory for <code>index</code> and <code>input[i]</code>, but not for <code>input</code> itself. This means that you are dereferencing an uninitialized pointer on the following line:</p> <pre><code>input[i]=(char*)malloc(j*sizeof(char)); </code></pre> <p>This will invoke <a hr...
My code runs smoothly to the end in Linux but ends abruptly in Windows
c|malloc|compatibility
0
64
1
72,237,344
72,237,344
0
true
2022-05-14T03:32:50.913Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: My code runs smoothly to the end in Linux but ends abruptly in Windows<p>I am new to coding. As a practice problem, I wrote a program to sort strings as alph...
72,206,738
Kusto project only non null values or drop columns with null values<p>When I query, I get a row, with multiple null values. is there a way to either not get null values in the result, or drop the columns with null values?</p> <p>sample code is:</p> <pre><code>let table_name = datatable(name:string, date_part:datetime, ...
<pre><code>let table_name = datatable(name:string, date_part:datetime, job_1:string, job_2:string, job_3:string, job_4:string) [ &quot;David&quot;, datetime(2022-05-9), &quot;Architect&quot;, &quot;&quot;, &quot;&quot;, &quot;Engineer&quot; ,&quot;David&quot;, datetime(2022-05-6), &quot;Musician&quot;, &quot;P...
Kusto project only non null values or drop columns with null values
azure-data-explorer|kql
0
558
1
72,210,996
72,210,996
0
true
2022-05-11T19:37:23.973Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Kusto project only non null values or drop columns with null values<p>When I query, I get a row, with multiple null values. is there a way to either not get ...
72,144,021
How do I (efficiently) update the text of a tkinter label that was procedurally generated?<p>I am making a restaurant menu program that pulls items and their attributes from a .json file, and then allows users to add them to a cart and export an order (not for actual use, just a project)</p> <p>A goal I set for this pr...
<p>Instead of creating a new label to change the values when + or - is clicked, I suggest you to update the value held by the same Label.<br /> Sample code:</p> <pre><code>import tkinter as tk root = tk.Tk() root.geometry('300x300') items=['Food a','Food b','food c','food d','food e','food f'] #food items #a ...
How do I (efficiently) update the text of a tkinter label that was procedurally generated?
python|python-3.x|tkinter
0
52
2
72,153,507
72,153,507
0
true
2022-05-06T15:32:43.050Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I (efficiently) update the text of a tkinter label that was procedurally generated?<p>I am making a restaurant menu program that pulls items and their...
72,222,732
Hangfire RecurringJob "does not contain a method with signature"<p>I am using Hangfire configured in my WebAPI .NET Framework 4.7.2 application. I am configuring it inside the Global.asax.cs My dependency injection chain is configured using Autofac.</p> <p>This is the way I am calling the recurring job</p> <pre><code>R...
<p>While the job is being executed from the worker that is listening on a specific queue; only this worker needs the implementation. But creating (and enqueuing) a job from a recurring entry will be done by <em>any</em> Hangfire server. And this is what currently is failing. To avoid this problem, create a separate pro...
Hangfire RecurringJob "does not contain a method with signature"
c#|webapi|hangfire
0
408
1
72,228,098
72,228,098
0
true
2022-05-12T22:35:11.720Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Hangfire RecurringJob "does not contain a method with signature"<p>I am using Hangfire configured in my WebAPI .NET Framework 4.7.2 application. I am configu...
72,223,064
How can I add a path to the CSV files created?<p>Im splitting a CSV file based on column &quot;ColumnName&quot;. How can I make all the CSV files created save into a specified path?</p> <pre><code> data = pd.read_csv(r'C:\Users\...\Output.csv') for (ColumnName), group in data.groupby(['ColumnName']): group.to...
<p><code>pandas.DataFrame.to_csv()</code> takes a string path as input to write to said path.</p> <p>With your current code <code>group.to_csv('{ColumnName}.csv', index=False)</code>, <code>{ColumnName}</code> is being interpreted as a normal string. If you wanted variable substition in this case Python has many method...
How can I add a path to the CSV files created?
python|pandas
0
331
1
72,223,178
72,223,178
0
true
2022-05-12T23:33:56.837Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I add a path to the CSV files created?<p>Im splitting a CSV file based on column &quot;ColumnName&quot;. How can I make all the CSV files created sav...
72,165,918
Plotting position="identity" geom_col in ggplot2 - some series hiding behind others i.e. not visible<p>I'm trying to plot an annual time series in bar-chart format.</p> <p>I have 7 sets of yearly data, and they are in a set order (so, the same dataset has the lowest value each year, and the same dataset is highest valu...
<p>You can use <code>forcats::fct_reorder()</code> to order values by <code>Rain</code>. This only works where <code>Type</code> values are in the same relative order in <code>Year</code>. This can best be seen in the following dodged graph.</p> <pre class="lang-r prettyprint-override"><code>library(ggplot2) library(pl...
Plotting position="identity" geom_col in ggplot2 - some series hiding behind others i.e. not visible
r|ggplot2|identity|geom-col
0
138
1
72,168,346
72,168,346
0
true
2022-05-09T00:21:04.230Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Plotting position="identity" geom_col in ggplot2 - some series hiding behind others i.e. not visible<p>I'm trying to plot an annual time series in bar-chart ...
72,198,542
Dynamic Div Tags in a While Loop<p>I have a while loop that populates 4 div tabs (in one parent div) with PHP.</p> <p>I also have a copy-to-clipboard script to copy text from a P tag. Unfortunately, this function works only if the tag and button have a unique Id.</p> <p>So my question is this: How do I assign a sequent...
<p>If you are not committed to using jQuery then you can easily accomplish your goal with some fairly basic, vanilla Javascript. The <a href="https://developer.mozilla.org/en-US/docs/Web/API/Clipboard_API" rel="nofollow noreferrer">Clipboard API</a> provides the modern solution for copying text (&amp; other things) to ...
Dynamic Div Tags in a While Loop
javascript|php|html|while-loop
0
72
1
72,201,797
72,201,797
0
true
2022-05-11T09:24:36.407Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Dynamic Div Tags in a While Loop<p>I have a while loop that populates 4 div tabs (in one parent div) with PHP.</p> <p>I also have a copy-to-clipboard script ...
72,127,835
Should assignment initialization work with a type with non-explicit single param ctor but with deleted move ctor?<p>Should the following compile under c++11 rules? Why should it or why not? Is there UB? It seems that gcc forbade it before but changed their mind in version 11. Microsoft accepts it and clang consistently...
<p>msvc v.19.x and gcc 11.x both default to using C++17 as the language standard to compile against while all of the other compilers you used default to C++14. This is why you see a difference.</p> <p>Before C++17 <code>IntWrapper myInt = 42;</code> is semantically treated as <code>IntWrapper myInt = IntWrapper(42);</...
Should assignment initialization work with a type with non-explicit single param ctor but with deleted move ctor?
c++|c++11
0
17
1
72,127,957
72,127,957
0
true
2022-05-05T13:16:29.167Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Should assignment initialization work with a type with non-explicit single param ctor but with deleted move ctor?<p>Should the following compile under c++11 ...
72,143,442
Group by Day of Month<p>Say I have a table <code>logins</code> with just the <code>bigint id</code> ,a <code>date_login</code> of type <code>datetime</code>, and <code>fk_user</code> of type <code>bigint</code>. I need to select the first and last logins for each day of the month in the specified year.</p> <p>I was gue...
<p>You were close. It will look something like this:</p> <pre><code>SELECT DATE(date_login) as dayOfMonth, min(date_login), max(date_login) FROM logins WHERE year(date_login) = @theYearInput and fk_user = @theKeySpecified and month(date_login) = @theMonthInput GROUP BY DATE(date_login) </code></pre> <p>Alternat...
Group by Day of Month
mysql|sql
0
36
2
72,143,558
72,143,558
0
true
2022-05-06T14:50:22.350Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Group by Day of Month<p>Say I have a table <code>logins</code> with just the <code>bigint id</code> ,a <code>date_login</code> of type <code>datetime</code>,...
72,145,403
How to make a vertical side menu, Jmenus in swing?<p>I'm relatively new to java swing, so I don't know to change the menu component in swing with a vertical one.</p>
<p>If you want a side menu with buttons, I imagine you probably want to use a JPanel with GridLayout. Something like:</p> <pre><code>JPanel p = new JPanel(); p.setLayout(new GridLayout(2,2)); Jlabel l = new JLabel(&quot;a&quot;); p.add(l); JButton btn = new JButton(&quot;click&quot;); p.add (btn); l = new JLabel(&quot;...
How to make a vertical side menu, Jmenus in swing?
java|swing|menu|jmenu
0
69
1
72,145,512
72,145,512
0
true
2022-05-06T17:33:07.220Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to make a vertical side menu, Jmenus in swing?<p>I'm relatively new to java swing, so I don't know to change the menu component in swing with a vertical ...
72,168,302
JS cannot import npm module<p>I can't import npm module using for example <code>import fs from 'fs';</code> in my main.js file that linked with index.html. Script tag that connect JS file has attribute <code>type=&quot;module&quot;</code>. Error in console of browser throws error: <code>Uncaught TypeError: Failed to re...
<p>You need to import it as <code>import * as fs from 'fs';</code>. You may also have problems with <code>fs</code> import in the web, but that's a different issue.</p> <p>More details can be found <a href="https://stackoverflow.com/questions/43622337/using-import-fs-from-fs">here</a></p> <p>EDIT: The question was &quo...
JS cannot import npm module
javascript|html|npm|import|module
0
467
2
72,168,372
72,168,372
0
true
2022-05-09T07:23:47.967Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: JS cannot import npm module<p>I can't import npm module using for example <code>import fs from 'fs';</code> in my main.js file that linked with index.html. S...
72,236,339
Use an observable inside of an interceptor<p>I want to write an interceptor to add an auth token to all the requests. My token comes from a lib, angularx-social-login, that only provides an Observable to get the token. So I wrote this but my request is never sent, as if the value was never outputed from the observable....
<p>I guess what happens here is that by the time the subscription to the observable occurs, the value of authState was already emitted in the login process, so the request hangs waiting for a new value to be emitted, which happened already in the login process.</p> <p>In order to deal with this, I suggest that you impl...
Use an observable inside of an interceptor
angular|rxjs|angular-social-login
0
209
3
72,237,402
72,237,402
0
true
2022-05-13T23:49:32.690Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Use an observable inside of an interceptor<p>I want to write an interceptor to add an auth token to all the requests. My token comes from a lib, angularx-soc...
72,141,866
How to add complex inner query to @Query annotaion<p>normal sql query which work correctly in db in sql developer passing values for bID and period.</p> <pre><code>SELECT * FROM A WHERE abcID IN (SELECT abcID FROM B WHERE bID=1) AND period=3 </code></pre> <p>in project at Repository class I passed as this</p> <pre><cod...
<p>First of all I would tell you below points.</p> <ol> <li>you can't use select query as <code>select a from A where a.abcID</code>. Here <strong>a</strong> is a column so can't define something like <code>a.abcID</code>. It need to be <code>select column from tableA a where a.abcID</code></li> <li>Same for query use ...
How to add complex inner query to @Query annotaion
spring-data-jpa
0
36
1
72,143,000
72,143,000
0
true
2022-05-06T12:59:24.017Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to add complex inner query to @Query annotaion<p>normal sql query which work correctly in db in sql developer passing values for bID and period.</p> <pre...
72,165,896
Failed to apply plugin [class 'JetGradlePlugin'] Problem with setting up 1.8 Minecraft modding workspace in IntelliJ<p>Disclaimer I've already fixed the problem, this is just for others that might have the same issue as I couldn't find a fix anywhere else.</p> <p>The stack trace error was:</p> <p>Caused by: org.gradle....
<p>In the <code>gradle/wrapper/gradle-wrapper.properties</code> file</p> <p>Change</p> <pre><code>distributionUrl=https\://services.gradle.org/distributions/gradle-2.7-bin.zip </code></pre> <p>to</p> <pre><code>distributionUrl=https\://services.gradle.org/distributions/gradle-3.0-bin.zip </code></pre> <p>Then reload th...
Failed to apply plugin [class 'JetGradlePlugin'] Problem with setting up 1.8 Minecraft modding workspace in IntelliJ
minecraft-forge
0
78
1
72,165,907
72,165,907
0
true
2022-05-09T00:10:53.550Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Failed to apply plugin [class 'JetGradlePlugin'] Problem with setting up 1.8 Minecraft modding workspace in IntelliJ<p>Disclaimer I've already fixed the prob...
72,183,835
Custom sorting in Amazon Redshift / SQL<p>I'm writing some SQL queries where I need to sort the grouped values by abbreviated month names. I think I've tried all the possibilities I could found but still something is not working. I try to use the 'ORDER BY CASE' statement which was advised <a href="https://stackoverflo...
<p>I would rather use the month-number-to-month-name conversion at the very end. Something like this:</p> <pre><code>with filtered_table as ( select foo, bar, extract(month from mesurementstopdatelocal) as month_number from ... where ... ) select foo, bar, case month_number when 1 then 'Jan' when 2 ...
Custom sorting in Amazon Redshift / SQL
sql|amazon-redshift
0
67
1
72,183,920
72,183,920
0
true
2022-05-10T09:28:09.840Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Custom sorting in Amazon Redshift / SQL<p>I'm writing some SQL queries where I need to sort the grouped values by abbreviated month names. I think I've tried...
72,190,691
Count rows between time periods excluding time-overlap<p>I have a table where it holds some vehicle events, I need to count the number of event occurrences every 5 minutes.</p> <p>Sample :</p> <pre><code>CREATE TABLE Sample ( Id INT PRIMARY KEY NOT NULL, EventTime DATETIME NOT NULL, AssetId BIGINT NOT NULL, ...
<p>I believe this can only be done via recursive cte because the 5 minute window can contain arbitrary number of rows... a situation where lead/lag/rows between x preceding will not work. Here is my stab at it:</p> <pre><code>with ncte as ( select *, rn = row_number() over (partition by AssetId, EventTypeId, Severi...
Count rows between time periods excluding time-overlap
sql|sql-server
0
50
1
72,192,342
72,192,342
0
true
2022-05-10T17:28:50.303Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Count rows between time periods excluding time-overlap<p>I have a table where it holds some vehicle events, I need to count the number of event occurrences e...
72,151,582
how to remove and replace an element in a list using python<pre><code> def functionA(): countries = [&quot;Nigeria&quot;, &quot;Uganda&quot;, &quot;America&quot;, &quot;Chad&quot;] print(countries) name1 = input(&quot;choose a country you don't like:&quot;) for i in range(3): if countries[i] == name1: ...
<p>This is because of the logic inside of the for loop: in case the first element is not equal to name1, functionA gets called again. You should instead check if name1 was found at the end of the for loop.</p> <pre><code>def functionA(): countries = [&quot;Nigeria&quot;, &quot;Uganda&quot;, &quot;America&quot;, &quot...
how to remove and replace an element in a list using python
python|list|function|for-loop|range
0
98
4
72,151,642
72,151,642
0
true
2022-05-07T10:21:21.423Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to remove and replace an element in a list using python<pre><code> def functionA(): countries = [&quot;Nigeria&quot;, &quot;Uganda&quot;, &quot;Americ...
72,206,915
".gitlab-ci.yml" pipeline returns an error `downstream project could not be found`<p>Path to all projects is valid. I can confirm this because the code below works and runs a child pipeline:</p> <pre><code> stage: multi_project_test trigger: project: &quot;my_organization/my_group/project_1&quot; strategy: d...
<p>Variables are allowed in many places, however <code>trigger:project</code> does not support use of variables. There is an <a href="https://gitlab.com/gitlab-org/gitlab/-/issues/249583" rel="nofollow noreferrer">open issue</a> tracking enabling this feature to work for <code>trigger:project</code>.</p> <p>As of GitLa...
".gitlab-ci.yml" pipeline returns an error `downstream project could not be found`
gitlab|gitlab-ci
0
1,040
1
72,207,590
72,207,590
0
true
2022-05-11T19:53:40.980Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: ".gitlab-ci.yml" pipeline returns an error `downstream project could not be found`<p>Path to all projects is valid. I can confirm this because the code below...
72,211,330
The input of the forward part of my model is a tuple, cannot be converted to onnx format?<p>Test Code:</p> <pre><code> #!/usr/bin/env python # -*- coding:utf-8 -*- import torch import torch.nn as nn class Model(nn.Module): def __init__(self): super(Model, self).__init__() ...
<p>Looking at <a href="https://github.com/onnx/onnx/issues/2711" rel="nofollow noreferrer">this issue</a> and <a href="https://github.com/pytorch/pytorch/issues/11456" rel="nofollow noreferrer">this other issue</a>, the parameters are unpacked by default so you need to provide a tuple as argument to <a href="https://py...
The input of the forward part of my model is a tuple, cannot be converted to onnx format?
pytorch|onnx
0
215
1
72,212,371
72,212,371
0
true
2022-05-12T07:02:58.640Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: The input of the forward part of my model is a tuple, cannot be converted to onnx format?<p>Test Code:</p> <pre><code> #!/usr/bin/env python # -*- cod...
72,144,433
Grid column template breaks when width < 500px<p>Everything works in landscape mode it outputs like this:</p> <p><code>value#1 value#2 value#3</code></p> <p>But when screen width is &lt; 500px it outputs like this:</p> <p><code>value#1 value#2value#3</code></p> <p>And no it's not a width issue i tried.</p> <p><di...
<p>Seems like you have 2 grid-column-templates on your css. remove one then change it to auto auto auto. I also added the cafe-outputs on your media call to make it space evenly on mobile. Let me know.</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snip...
Grid column template breaks when width < 500px
html|css
0
42
1
72,144,951
72,144,951
0
true
2022-05-06T16:03:27.607Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Grid column template breaks when width < 500px<p>Everything works in landscape mode it outputs like this:</p> <p><code>value#1 value#2 value#3</code></p>...
72,139,136
Javascript Remove Negative Decimal Value From String<p>I am trying to remove the negative and positive decimal value from the string following script remove the positive decimal value from the string however negative is not working</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-ba...
<p>The sign should be optional (<code>?</code>), and then you can match a set of numbers followed by a <code>.</code> or a <code>,</code>, followed by another set of numbers, and replace that match. That way you can match both positive and negative numbers with the same expression.</p> <p><div class="snippet" data-lang...
Javascript Remove Negative Decimal Value From String
javascript|node.js
0
57
3
72,139,447
72,139,447
0
true
2022-05-06T09:24:55.790Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Javascript Remove Negative Decimal Value From String<p>I am trying to remove the negative and positive decimal value from the string following script remove ...
72,182,866
Working with Strings and useState variables in react js?<p>I have two useStates, which stores the values taken from the user.</p> <pre><code>const [classname, setClassname] = useState(''); const [name, setName] = useState(''); </code></pre> <p>Similarly I have a string that has to be passed as body for the Rest API pos...
<p><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse" rel="nofollow noreferrer">Parse the string (JSON)</a> to an object, update the properties, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify" rel="nofollow nore...
Working with Strings and useState variables in react js?
javascript|reactjs
0
254
5
72,183,017
72,183,017
0
true
2022-05-10T08:18:39.387Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Working with Strings and useState variables in react js?<p>I have two useStates, which stores the values taken from the user.</p> <pre><code>const [classname...
72,143,619
How can I add animation to Bootstrap dropdowns?<p>How can I add animation to the dropdown? I assume by modifying popperConfig, but how?</p> <p>At the moment dropdown-menu has a generated inline style, e.g. <code>position: absolute; inset: 0px auto auto 0px; margin: 0px; transform: translate3d(0px, 40px, 0px);</code></p...
<p>In the current example, the <code>dm-example</code> will be the dropdown menu that shows up.<br> HTML will not differ much from its Bootstrap5 examples:</p> <pre><code> &lt;div class=&quot;dropdown&quot;&gt; &lt;button class=&quot;btn btn-secondary dropdown-toggle&quot; type=&quot;button&quot; id=&quot;dr...
How can I add animation to Bootstrap dropdowns?
javascript|twitter-bootstrap|dropdown|bootstrap-5|popper.js
0
131
1
72,145,105
72,145,105
0
true
2022-05-06T15:03:04.910Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I add animation to Bootstrap dropdowns?<p>How can I add animation to the dropdown? I assume by modifying popperConfig, but how?</p> <p>At the moment ...
72,187,725
How to find score probability of classification model result in pytorch?<p>I'm new to pytorch using this I've trained a image classification model, when I test the model with the image I only get label , if I want to get probability of prediction of that class how can I get that ?</p> <pre><code> test_image = test_imag...
<p>The probabilities are the softmax of the predictions:</p> <pre class="lang-py prettyprint-override"><code>class_prob = torch.softmax(out, dim=1) # get most probable class and its probability: class_prob, topclass = torch.max(class_prob, dim=1) # get class names class_name = idx_to_class[topclass.cpu().numpy()[0][0]]...
How to find score probability of classification model result in pytorch?
python|python-3.x|tensorflow|deep-learning|pytorch
0
249
1
72,187,781
72,187,781
0
true
2022-05-10T13:58:10.780Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to find score probability of classification model result in pytorch?<p>I'm new to pytorch using this I've trained a image classification model, when I te...
72,221,584
Sending JSON data stored in a struct through a segue<p>I'm wanting to store &quot;idMeal&quot; on the cell I click to send it through a segue to my DetailViewController and use it to access an API endpoint for the respective meal.</p> <p><a href="https://www.themealdb.com/api/json/v1/1/filter.php?c=Dessert" rel="nofoll...
<p>I have to define the index the user tapped. E.g., just save the row and use it.</p> <pre><code> class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSource { var mealList = [Desserts]() var indexTapped: Int? func tableView(_ tableView: UITableView, didSelectRowAt ...
Sending JSON data stored in a struct through a segue
ios|swift|api|struct|segue
0
44
1
72,221,664
72,221,664
0
true
2022-05-12T20:11:20.930Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Sending JSON data stored in a struct through a segue<p>I'm wanting to store &quot;idMeal&quot; on the cell I click to send it through a segue to my DetailVie...
72,224,362
JS how to add hours and minutes to scheduled date<p>I need to be able to let clients schedule a certain type of meeting for a future date, the meeting duration I get back from the database is in minutes. I need to be able to create a future start date and time, then add the duration minutes to that time and get the end...
<p>I like to approach problems with time using the <a href="https://date-fns.org/" rel="nofollow noreferrer">date-fns</a> library. Today the Date object solves &quot;most&quot; of our problems so date-fns helps giving useful functions to manipulate dates.</p> <p>What you might be looking for is the <a href="https://dat...
JS how to add hours and minutes to scheduled date
javascript|reactjs|date|datetime|time
0
65
2
72,224,407
72,224,407
0
true
2022-05-13T04:14:58.970Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: JS how to add hours and minutes to scheduled date<p>I need to be able to let clients schedule a certain type of meeting for a future date, the meeting durati...
72,104,753
How to remove the choice field based on relationships between instances in the database in Django<p>I'm new to django and I would like to ask a question about a case that I can't solve if for example I have many categories, in these categories I can have one or more fixed sections eg. section = [a, b, c, d, e] so if I ...
<p>class SectionForm(forms.ModelForm):</p> <pre><code>class Meta: model = Section fields = [&quot;nome&quot;] def __init__(self, *args, **kwargs,): section_pk = kwargs.pop('section_pk', None) super(CategotyForm, self).__init__(*args, **kwargs) key = Section.objects.filter(category=section_pk).valu...
How to remove the choice field based on relationships between instances in the database in Django
django-forms
0
15
1
72,265,453
72,265,453
0
true
2022-05-03T19:50:46.600Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to remove the choice field based on relationships between instances in the database in Django<p>I'm new to django and I would like to ask a question abou...
72,158,589
www-data user cannot access a Virtualbox shared folder through Docker container<p>I have an Ubuntu server VM running on a Windows 10 host, where a folder on an external hard drive is passed through to the VM at the mountpoint /NextCloudStorage. I can access this folder from my normal user, and from root, by adding my n...
<p>You could try to add the <code>www-data</code> user to the <code>vboxsf</code> group</p> <p>To achieve this we need to figure out the group id. <code>In the virtual machine run</code></p> <pre><code>cat /etc/group </code></pre> <p>You will see something like this</p> <p><a href="https://i.stack.imgur.com/KJhlN.png" ...
www-data user cannot access a Virtualbox shared folder through Docker container
docker|virtualbox|ubuntu-server
0
341
1
72,159,817
72,159,817
0
true
2022-05-08T06:18:23.803Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: www-data user cannot access a Virtualbox shared folder through Docker container<p>I have an Ubuntu server VM running on a Windows 10 host, where a folder on ...
72,210,682
Use of "get Stringify" and "get props" in dart<pre><code>import 'package:equatable/equatable.dart'; class Point extends Equatable { const Point(this.x, this.y); final int x; final int y; @override List&lt;Object?&gt; get props =&gt; [x, y]; @override bool? get stringify =&gt; true; Point operator +(...
<p>The purpose of the <code>equatable</code> package are described as:</p> <blockquote> <p>A Dart package that helps to implement value based equality without needing to explicitly override <code>==</code> and <code>hashCode</code>.</p> </blockquote> <p>To do achieve this goal, we can make our classes extend from <code...
Use of "get Stringify" and "get props" in dart
dart|stringify
0
256
1
72,213,232
72,213,232
0
true
2022-05-12T05:53:24.493Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Use of "get Stringify" and "get props" in dart<pre><code>import 'package:equatable/equatable.dart'; class Point extends Equatable { const Point(this.x, th...
72,153,998
How to select row based on data in array postgresql<p>I am trying to select a row from a postgresql table based on the data in the array of that row. Here are the two tables:</p> <p>Table 1: users</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>users</th> <th>---</th> </tr> </thead> <tbody>...
<p>I found a solution!</p> <p>Here is the query:</p> <pre><code>SELECT * FROM chats WHERE &quot;Hello_world1&quot; = ANY (users) </code></pre> <p>Translation:</p> <p>Grab every row from chats if any of the users from the users array = &quot;Hello_world1&quot;</p>
How to select row based on data in array postgresql
postgresql
0
24
1
72,154,082
72,154,082
0
true
2022-05-07T15:37:28.597Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to select row based on data in array postgresql<p>I am trying to select a row from a postgresql table based on the data in the array of that row. Here ar...
72,211,642
How to fix not finding a plugin artifact?<p>I am getting this error: [ERROR] Plugin org.apache.maven.plugins:maven-surefire-plugin:2.12.4 or one of its dependencies could not be resolved: Could not find artifact org.apache.maven.plugins:maven-surefire-plugin:jar:2.12.4 in nexus-xyz-plugin</p> <p>I tried to run maven wi...
<p>Version <code>2.12.4</code> of the maven-surefire-plugin is always added to the pom by maven version <code>3.x</code> unless you depend on a specific other version.</p> <p>Maven has a so called <code>super pom</code> that you get for free, but that doesn't list surefire: <a href="https://maven.apache.org/ref/3.8.5/...
How to fix not finding a plugin artifact?
maven|pom.xml|maven-plugin|maven-surefire-plugin
0
535
1
72,319,326
72,319,326
0
true
2022-05-12T07:31:39.373Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to fix not finding a plugin artifact?<p>I am getting this error: [ERROR] Plugin org.apache.maven.plugins:maven-surefire-plugin:2.12.4 or one of its depen...
72,205,465
exception in user defined functions and two select query in one user defined function<p>i actually only want to throw an exception if there is no rating for the tutor. so i thought i would count how many ratings he has received so that i can also output how many ratings the tutor has received and if it is 0 or only 1 r...
<p>The output you want from your function, is not the expected behavior of the Oracle function. Though you can create one like below -</p> <pre><code>CREATE OR REPLACE FUNCTION averageRating (tutorrating IN NUMBER, -- By default parameter type is IN. total_count_Rati...
exception in user defined functions and two select query in one user defined function
sql|oracle
0
42
1
72,205,874
72,205,874
0
true
2022-05-11T17:48:14.540Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: exception in user defined functions and two select query in one user defined function<p>i actually only want to throw an exception if there is no rating for ...
72,154,576
body inside express middleware is empty<p>i'm receiving emails from mailgun so i set my endpoint as follow</p> <pre><code>app.post( 'http://www.example.com/mail', async(req, res, next) =&gt; { // i want to check if email coming from mailgun // so i want to set if statement using the req.body['X-Mailgun-Coming'] ...
<p><code>uploadHandler.any()</code> has to be BEFORE where you check <code>req.body</code> because it is that middleware that actually reads the body of the request and populates <code>req.body</code>. So, you are trying to read <code>req.body</code> before the code runs that actually puts the value in it.</p> <p>Here...
body inside express middleware is empty
node.js|express|mailgun
0
67
1
72,154,841
72,154,841
0
true
2022-05-07T16:46:44.637Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: body inside express middleware is empty<p>i'm receiving emails from mailgun so i set my endpoint as follow</p> <pre><code>app.post( 'http://www.example.com/m...
72,220,702
Web App SPA & OIDC: How to properly authenticate before accessing the front?<p>I have a regular web app, composed as usual of a frontend SPA (angular) and a backend.</p> <p>The server calls are protected from unauthorized calls through authentication provided by OpenID Connect.</p> <p>My web app is accessible from the ...
<p><strong>HMTL</strong></p> <p>Usually in an SPA there is a single index.html file, as in <a href="https://authguidance.com/home/code-samples-quickstart/" rel="nofollow noreferrer">this online SPA of mine</a>. So when following a pure SPA architecture the HMTL reveals no information.</p> <pre class="lang-html prettypr...
Web App SPA & OIDC: How to properly authenticate before accessing the front?
angular|authentication|single-page-application|openid-connect
0
120
2
72,247,145
72,247,145
0
true
2022-05-12T18:48:02.027Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Web App SPA & OIDC: How to properly authenticate before accessing the front?<p>I have a regular web app, composed as usual of a frontend SPA (angular) and a ...
72,044,043
Copy cells full and append to other page<p>I have a google sheet connect to a google form. The form is compiled by team leaders with his members and some informations that are reported in a row by google. I need to make another sheet with all data from members in a single column. I won't copy and paste 'cause there are...
<p>You CAN do it internally using Google Apps Script. This allows users to make custom functions and code in JavaScript which can make changes to sheets in Google Sheets or get info based on what code you write.</p> <p><a href="https://developers.google.com/apps-script/guides/sheets" rel="nofollow noreferrer">Here</a> ...
Copy cells full and append to other page
python|google-sheets
0
26
1
72,044,130
72,044,130
0
true
2022-04-28T12:52:39.747Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Copy cells full and append to other page<p>I have a google sheet connect to a google form. The form is compiled by team leaders with his members and some inf...
72,189,755
How can I delete half of the words contained in .txt-files using R?<p>I aim to compare the first half of texts with the entirety of the same texts. I have already done multiple analyses using the full texts, which I simply loaded into r with the help of the &quot;readtext&quot;-function (and some functions to attach va...
<p>With the following, we take the text column and split it into words using <code>strsplit()</code>.</p> <p>Then we use <code>lapply()</code> to calculate ho how many words would be half of each text.</p> <p>Finally, we return only the first half of each text, but we lose all punctuation in the proccess.</p> <pre clas...
How can I delete half of the words contained in .txt-files using R?
r
0
45
1
72,190,723
72,190,723
0
true
2022-05-10T16:13:47.013Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I delete half of the words contained in .txt-files using R?<p>I aim to compare the first half of texts with the entirety of the same texts. I have al...
72,206,412
Calculating fitness in Knapsack problem in Jenetics<p>I am trying to understand how evolution and fitness function work. I implemented my own Knapsack problem, which tries to find 3 most valuable items from a given set. It is my own cost function:</p> <pre><code> static int counter=1; static double MyCostFunction(...
<p>The described behavior is as expected :)</p> <p>The following facts leads to the observed outcome:</p> <ol> <li>During the evolution process, the population is divided into <em>offspring</em> and <em>survivors</em>.</li> <li>Only the offspring is target for the alterers (mutation operation).</li> <li>The default <em...
Calculating fitness in Knapsack problem in Jenetics
java|genetic-algorithm|jenetics
0
104
1
72,207,614
72,207,614
0
true
2022-05-11T19:09:53.300Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Calculating fitness in Knapsack problem in Jenetics<p>I am trying to understand how evolution and fitness function work. I implemented my own Knapsack proble...
72,162,651
How to create a table with if statements for each row in each column in r<p>I would like to create a new output that is based on an if statement for each row in each column for example:</p> <p>If the value of the year for each flower in table 1 is smaller than the min for each flower in each year in table 2 then the va...
<p>I think it will help to make the first table match the &quot;long&quot; form of the 2nd table. Then you could join the two tables together, pick the max value for each flower-year combination, and then reshape wide:</p> <pre><code>library(dplyr) t1_long %&gt;% left_join(t2) %&gt;% group_by(flower, year) %&gt;% ...
How to create a table with if statements for each row in each column in r
r
0
31
1
72,163,034
72,163,034
0
true
2022-05-08T15:44:33.700Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to create a table with if statements for each row in each column in r<p>I would like to create a new output that is based on an if statement for each row...
72,176,470
How to count maximum value for given time period in R?<p>I got the data from MySQL and I'm trying to visualize it and uncover some answers. <strong>Using R for the statistic.</strong></p> <p>The final product is % discount for reach price change (=row).</p> <p>Here is an example of my dataset.</p> <pre><code> itemI...
<p>I like <code>slider::slide_index_dbl</code> for this sort of thing. Here's some fake data chosen to demonstrate the 6mo window:</p> <pre><code>data.frame(itemId = rep(1:2, each = 6), price = floor(100*cos(0:11)^2), timestamp = as.Date(&quot;2000-01-01&quot;) + 50*(0:11)) -&gt; df </code></pre> ...
How to count maximum value for given time period in R?
r|max
0
54
1
72,177,168
72,177,168
0
true
2022-05-09T18:11:07.560Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to count maximum value for given time period in R?<p>I got the data from MySQL and I'm trying to visualize it and uncover some answers. <strong>Using R f...
72,143,152
How to add loading Spinner when first time loaded the website<p>I'm using React. New in React and nodejs.</p> <p>My application takes a few times before it loads the component and that time is spent in loading resources and validating the user. In this time only displayed that component which don't need to load data f...
<p>first, you create a loading component, there you put a loading element, you may use bootstrap loading component</p> <p>after that in your products component write, <code>if(products.length===0){ return &lt;Loading&gt;&lt;/Loading&gt; }</code></p> <p>while loading all products.</p>
How to add loading Spinner when first time loaded the website
reactjs|spinner|loading
0
340
1
72,143,302
72,143,302
0
true
2022-05-06T14:29:57.273Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to add loading Spinner when first time loaded the website<p>I'm using React. New in React and nodejs.</p> <p>My application takes a few times before it l...
72,148,075
How to join two list into one on some common fields?<p>I want to join two list into one using deep copy.<br /> E.g.</p> <pre><code>list1: [ {&quot;key1&quot;:[&quot;val1&quot;]}, {&quot;key2&quot;:[&quot;val2&quot;, &quot;val3&quot;]} ] list2: [ {&quot;key2&quot;:[&quot;val2&quot;, &quot;val4&quot;]}, {&q...
<p>Copying below a possible solution, which &quot;unrolls&quot; the list(s) down to single key-value entries, then aggregate them into the manifested object, note that the code is long because of detailed comments.</p> <pre><code>local list1 = [ { key1: ['val1'] }, { key2: ['val2', 'val3'] }, ]; local list2 = [ ...
How to join two list into one on some common fields?
jsonnet
0
69
2
72,194,045
72,194,045
0
true
2022-05-06T22:45:49.473Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to join two list into one on some common fields?<p>I want to join two list into one using deep copy.<br /> E.g.</p> <pre><code>list1: [ {&quot;key1&qu...
72,132,959
GETFOOTNOTES() and ALERT: How can I verify i f students append a footnote?<p>I want to verify on google docs if students added a footnote. My scripts doesn't run.</p> <p>script:</p> <pre><code> function addNote () { const menuMessage = DocumentApp.getUi(); const doc = DocumentApp.getActiveDocument(); const noteP...
<p>This looks incorrect:</p> <pre><code>const notePiedPage = doc.getFootnotes(); if(notePiedPage == DocumentApp.ElementType.FOOTNOTE){ menuMessage.alert('Génial, le 3e mot de passe est BISCOTO'); } </code></pre> <p>because getFootnotes() returns an array</p> <p>Try something like this:</p> <pre><code>function HowMan...
GETFOOTNOTES() and ALERT: How can I verify i f students append a footnote?
google-apps-script|footnotes
0
16
1
72,133,244
72,133,244
0
true
2022-05-05T19:57:46.087Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: GETFOOTNOTES() and ALERT: How can I verify i f students append a footnote?<p>I want to verify on google docs if students added a footnote. My scripts doesn't...
72,189,672
How to create a google doc for each row of a spreadsheet?<p>Yo! This is my code that uses the last line of a spreadsheet to generate a google docs, in addition, it places a link to this document in the source spreadsheet. Is it possible to create code that does this for all rows in a worksheet? I'm having trouble using...
<h3>Create document for every row of spreadsheet</h3> <pre><code> function createDocforEveryRowofSpreadsheet() { var ss = SpreadsheetApp.openById(&quot;Google ID&quot;); var sh = ss.getSheetByName('Respostas ao formulário 1') var file = DriveApp.getFileById('Google Drive ID'); var folder = Dri...
How to create a google doc for each row of a spreadsheet?
javascript|google-apps-script|google-sheets|google-docs
0
83
1
72,190,561
72,190,561
0
true
2022-05-10T16:08:13.363Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to create a google doc for each row of a spreadsheet?<p>Yo! This is my code that uses the last line of a spreadsheet to generate a google docs, in additi...
72,219,674
Google Sheets get Background color formula<p>I set up this custom function that returns the background color of a certain cell:</p> <pre class="lang-js prettyprint-override"><code>/* Returns the Hexadecimal value of a cell's background color. * * @param {number} row The cell's row number. * @param {number} column Th...
<p>You might be able to do it like this</p> <pre><code>function BGHEX() { let r = SpreadsheetApp.getUi().prompt(&quot;Get Row and Column&quot;,&quot;Enter row , column&quot;,SpreadsheetApp.getUi().ButtonSet.OK); let t = r.getResponseText().split(','); var background = SpreadsheetApp.getActiveSheet().getRange(t[0...
Google Sheets get Background color formula
javascript|google-apps-script|google-sheets|custom-function
0
96
2
72,220,359
72,220,359
0
true
2022-05-12T17:10:45.733Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Google Sheets get Background color formula<p>I set up this custom function that returns the background color of a certain cell:</p> <pre class="lang-js prett...
72,143,422
Kotlin sort one List with key and Enum with key and order<p>I receive data from Request information as list <strong>data</strong> (List) below code. That data has a &quot;key&quot; parameter by which I want to sort it.</p> <pre><code>data class ApplianceSetting( @SerializedName(&quot;key&quot;) val key: String, ...
<p>I fixed it using sortedBy and as comparator I am using received value (order) from getSettingByMode(), if item is not found (null) I give him order value of 99 and put it on tail position:</p> <pre><code> private fun sortAndGetControlModes(data: ApplianceSettingsList) = data.settings.sortedBy { ...
Kotlin sort one List with key and Enum with key and order
kotlin|sorting|collections
0
97
2
72,143,786
72,143,786
0
true
2022-05-06T14:49:39Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Kotlin sort one List with key and Enum with key and order<p>I receive data from Request information as list <strong>data</strong> (List) below code. That dat...
72,161,626
Button background-image toggle not going back to original background-image<pre><code>function myFunction() { var element = document.body; element.classList.toggle(&quot;light-mode&quot;); var btndrk = document.getElementById('drk'); if (btndrk.style.backgroundImage === &quot;url('https://assets.codepen.io/1462889/moon....
<p>You don't need to do the image change in JS.</p> <p>The JS can simply be:</p> <pre><code>document.getElementById('drk').addEventListener(&quot;click&quot;, function() { document.body.classList.toggle(&quot;light-mode&quot;); }); </code></pre> <p>And for the CSS part you need to add:</p> <pre><code>body.light-mod...
Button background-image toggle not going back to original background-image
javascript|button|toggle
0
70
1
72,161,729
72,161,729
0
true
2022-05-08T13:46:52.433Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Button background-image toggle not going back to original background-image<pre><code>function myFunction() { var element = document.body; element.classList.t...
72,203,617
WinSCP.exe does not match version of this assembly<p>I tried to update to the latest version of WinSCP.</p> <p>We do have the .exe in our project. I made sure it was the correct version, and it has &quot;Copy&quot;</p> <p>Getting Error:</p> <blockquote> <p>Exception thrown: 'WinSCP.SessionLocalException' in WinSCPnet....
<p>I scanned the entire source code directory for the sharedrive name and found it in the app.config file.</p> <p>The program set the &quot;ExecutablePath&quot; using a variable from the app.config file:</p> <pre><code>if (!String.IsNullOrWhiteSpace(WinSCPExePath)) session.ExecutablePath = WinSCPExePath; </code></pre> ...
WinSCP.exe does not match version of this assembly
visual-studio-2015|winscp|winscp-net
0
173
1
72,203,885
72,203,885
0
true
2022-05-11T15:21:12.743Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: WinSCP.exe does not match version of this assembly<p>I tried to update to the latest version of WinSCP.</p> <p>We do have the .exe in our project. I made su...
72,172,803
Changing hex color from string's color<p>So I've seen a bunch posted like this but none solved anything for me.</p> <pre class="lang-js prettyprint-override"><code> const HexPattern = /(#[0-9a-f]{6})(\s*[\w,]+\s*)/gi function parseColors(str) { return str.replace(HexPattern, (s, g0, g1) =&gt; `&lt;span style=&quot;c...
<p>The issue in your question is all in the regex. If you only want to replace the hex colour value in the string with that colour then the second matching group, <code>(\s*[\w,]+\s*)</code>, can be removed.</p> <p>That leaves you with this: <code>/(#[0-9a-f]{6})/gi</code>. However it's worth noting that a valid hex co...
Changing hex color from string's color
javascript|html|jquery
0
58
1
72,173,102
72,173,102
0
true
2022-05-09T13:30:33.853Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Changing hex color from string's color<p>So I've seen a bunch posted like this but none solved anything for me.</p> <pre class="lang-js prettyprint-override"...
72,148,700
Flask select which form to POST by button click<p>I'm trying to have only one of two forms POST depending on which button from a btn-group is selected. Currently all of the forms POST with no issue, but there are two forms where only one or the other value is needed. I've unsuccessfully tried to parse the not needed va...
<p>The following example allows you to exclude and hide parts of the form.</p> <p>When a fieldset or input is disabled, it is no longer part of the form data that can be queried on the server side. For this reason, depending on the value of the radio buttons, parts of the form that are referenced by specifying dataset ...
Flask select which form to POST by button click
python|html|flask
0
335
1
72,156,282
72,156,282
0
true
2022-05-07T01:05:05.293Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Flask select which form to POST by button click<p>I'm trying to have only one of two forms POST depending on which button from a btn-group is selected. Curre...
72,042,537
Unale to create list with element value containing '-' in robot framework<p>Unable to create list and iterate in for loop with element value containing '-' in robot framework</p> <p>Example:</p> <pre><code> @{w_message}= Create List ${&quot;t-Expo&quot;} ${&quot;n-yiko&quot;} ${&quot;sf-git&quot;} @{w_...
<p>Because robotframework is looking for variable with the specific name. If you want to create a list loose the variable decorator and make sure to have double spaces in your code.</p> <p>This example should work:</p> <pre><code>*** Test Cases *** Example @{w_message}= Create List &quot;t-Expo&quot; &...
Unale to create list with element value containing '-' in robot framework
robotframework
0
26
1
72,042,960
72,042,960
0
true
2022-04-28T11:02:32.750Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Unale to create list with element value containing '-' in robot framework<p>Unable to create list and iterate in for loop with element value containing '-' i...
72,159,266
How to check strictly increasing and decreasing array in javascript<p>I solved an exercise in javascript but I'm not very happy with my solution and I couldn't find a better one.</p> <p>Problem: check if an array have a starting subarray strictly increasing and an ending subarray strictly decreasing. Each array has at ...
<p>You can create difference graph and check for the specific pattern.</p> <p>Here you can find two patterns first return condition check whether array elements follows increment and then decrement pattern.</p> <p>Second return condition check whether array elements follows and decrement then increment pattern.</p> <p>...
How to check strictly increasing and decreasing array in javascript
javascript|arrays
0
181
1
72,160,022
72,160,022
0
true
2022-05-08T08:27:09.473Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to check strictly increasing and decreasing array in javascript<p>I solved an exercise in javascript but I'm not very happy with my solution and I couldn...
72,128,139
Is there a way to match patterns from one column to other one?<p>I want to use club position and check if preferred_position contain the string then return True/False value for each row.</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th style="text-align: left;">Club_position</th> <th style="...
<p>Turns out you can use concat.</p> <pre><code>UPDATE &quot;Football&quot; SET &quot;Desired_Position&quot; = &quot;Preferred_Position&quot; LIKE CONCAT('%', &quot;Club_Position&quot;, '%'); </code></pre>
Is there a way to match patterns from one column to other one?
string|postgresql|string-matching
0
25
1
72,163,794
72,163,794
0
true
2022-05-05T13:36:37.890Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is there a way to match patterns from one column to other one?<p>I want to use club position and check if preferred_position contain the string then return T...
72,197,068
restore default animation view of .setOnClickListener<p><a href="https://i.stack.imgur.com/SU9uW.png" rel="nofollow noreferrer">The Image of the issue</a></p> <p>Before clicked, the view of &quot;setOnClickListener&quot; is like the right picture</p> <p>The action of code setOnClickListener:</p> <pre><code>card_sales.s...
<p>You shouldn't set a fixed color when button clicked with <code>setBackgroundColor</code>. instead use selector for background</p> <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt; &lt;selector xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&gt; &lt;item android:stat...
restore default animation view of .setOnClickListener
android|onclicklistener
0
19
1
72,198,355
72,198,355
0
true
2022-05-11T07:31:22.513Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: restore default animation view of .setOnClickListener<p><a href="https://i.stack.imgur.com/SU9uW.png" rel="nofollow noreferrer">The Image of the issue</a></p...
72,208,324
Implementing a partial pivot If condition for Gaussian Elimination in Python<p>I've figured out how to code a function such that you can row reduce and solve linear algebra problems, the only issue I'm running into is setting up the if condition that does the partial pivoting when the constant that is used to row reduc...
<p>One issue is this code:</p> <pre><code> for i in range (nr-1): M[r][i]=M[r+1][i] # line 1 M[r+1][i] = M[r][i] # line 2 const = M[r][r] # line 3 </code></pre> <p>The line I've commented as <code>line 2</code> simply undoes the work of <code>line 1</code>. If you're att...
Implementing a partial pivot If condition for Gaussian Elimination in Python
python|arrays|numpy
0
69
1
72,209,420
72,209,420
0
true
2022-05-11T22:38:20.253Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Implementing a partial pivot If condition for Gaussian Elimination in Python<p>I've figured out how to code a function such that you can row reduce and solve...
72,124,958
How to get the error body from an ApolloHttpException?<p>With Apollo Kotlin 3 the <code>ApolloHttpException</code> there is no <code>rawResponse()</code> method anymore and the <code>body</code> property is always null.</p> <p>Is there a way to get the error body?</p>
<p>As stated in the <a href="https://apollographql.github.io/apollo-kotlin/kdoc/apollo-api/com.apollographql.apollo3.exception/-apollo-http-exception/index.html" rel="nofollow noreferrer">documentation</a>, the HTTP error body, by default, is always null. You can opt-in <code>exposeHttpErrorBody</code> in <code>HttpNet...
How to get the error body from an ApolloHttpException?
apollo-kotlin
0
27
1
72,124,959
72,124,959
0
true
2022-05-05T09:31:53.007Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to get the error body from an ApolloHttpException?<p>With Apollo Kotlin 3 the <code>ApolloHttpException</code> there is no <code>rawResponse()</code> met...
72,076,491
Unwanted quote mark when dealing with the simply-scheme package<p>Following <a href="https://stackoverflow.com/questions/50354553/how-to-follow-the-simply-scheme-book-with-drracket">the answer in this question</a> I installed the simply-scheme package and ran the follwing code:</p> <pre><code>#lang simply-scheme (se (...
<p>I think this is just question of settings. In DrRacket, choose Language settings, Choose Language, Show Details, set Output Style to print or write, run your code again and compare outputs.</p> <p>For <code>#lang simply-scheme</code> it seems to work like this:</p> <p><code>print</code>:</p> <pre><code>&gt; (se (but...
Unwanted quote mark when dealing with the simply-scheme package
scheme|racket|dr.racket
0
25
1
72,077,534
72,077,534
0
true
2022-05-01T12:01:12.123Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Unwanted quote mark when dealing with the simply-scheme package<p>Following <a href="https://stackoverflow.com/questions/50354553/how-to-follow-the-simply-sc...
72,148,074
I am getting an error during JasperReport Server Installation<p>I am trying to install JasperReport Server Community v8.0.0 on a vm windows server 2019 in Azure.</p> <p>The installation process fails with the following error message:</p> <blockquote> <p>Problem running post-install step. Installation may not complete c...
<p>When there is the existence of the same windows user, either as a local account or the same user in a different domain, and the installation is done with this user, the installation script creates keystore files with 0 bytes.</p> <p>In this case the solution was to change the computer's name to a different one since...
I am getting an error during JasperReport Server Installation
azure|jasperserver
0
285
1
72,241,063
72,241,063
0
true
2022-05-06T22:45:47.600Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: I am getting an error during JasperReport Server Installation<p>I am trying to install JasperReport Server Community v8.0.0 on a vm windows server 2019 in Az...
72,164,997
Trigger when there are 30 events in sqs<p>I have a requirement to process 30 files together from an s3 bucket. I configured sqs for s3 object create event but my lambda is triggered every time the files comes in. I wanted to trigger the lambda only when 30 files are there .can any body help please?</p>
<p>It's not possible. You need to develop a fully <strong>custom solution</strong> for that. For example store all events in dynanodb, and monitor it for when it gets to 30 events. Then you process them all.</p>
Trigger when there are 30 events in sqs
amazon-web-services|aws-lambda
0
28
1
72,165,646
72,165,646
0
true
2022-05-08T20:50:49.037Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Trigger when there are 30 events in sqs<p>I have a requirement to process 30 files together from an s3 bucket. I configured sqs for s3 object create event bu...
72,066,946
without resolveStrategy=DELEGATE_FIRST properties end up as binding variables<p>I'm trying to write java beans that can be loaded from a Groovy config file. The config format expects properties in closures and if I don't call <code>c.setResolveStrategy(Closure.DELEGATE_FIRST)</code> then all properties set inside the c...
<p>because the default value is OWNER_FIRST</p> <p><a href="https://docs.groovy-lang.org/latest/html/api/groovy/lang/Closure.html#OWNER_FIRST" rel="nofollow noreferrer">https://docs.groovy-lang.org/latest/html/api/groovy/lang/Closure.html#OWNER_FIRST</a></p> <p>and you have 2 levels of closures so - owners are differen...
without resolveStrategy=DELEGATE_FIRST properties end up as binding variables
groovy
0
26
1
72,083,916
72,083,916
0
true
2022-04-30T08:40:55.067Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: without resolveStrategy=DELEGATE_FIRST properties end up as binding variables<p>I'm trying to write java beans that can be loaded from a Groovy config file. ...
72,213,752
Do you need to use the OAuth flow to access your own dropbox account?<p>I'm writing a dropbox integration against my own account. When file get dropped I respond to a webhook notification and import the files into one of our backend systems.</p> <p>It's all done in back end server code and there is no real opportunity...
<p>I've figured out some shortcuts for myself</p> <p>First off all as its a background process it needs to be running with &quot;offline&quot; access and using refresh tokens to acquire short lived access tokens.</p> <p>As there is no UI and its only for my own account I can get an authorisation code via the browser fr...
Do you need to use the OAuth flow to access your own dropbox account?
dropbox-api
0
60
1
72,215,484
72,215,484
0
true
2022-05-12T10:13:38.043Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Do you need to use the OAuth flow to access your own dropbox account?<p>I'm writing a dropbox integration against my own account. When file get dropped I re...
72,229,647
How do I execute clob in execute immediate<p>I have a table with one row and <code>clob</code> as column (whose size is 5239). This column contains a table script extracted with the help of <code>dbms_metadata.get_ddl</code>. Along with table <code>ddl</code> it also extracts the primary key constraint and unique index...
<p>You could execute those commands one by one in a LOOP. Something like in the code here. I just printed the commands, but you could execute them:</p> <pre><code> SET SERVEROUTPUT ON DECLARE mySQL VarChar2(8000); mySQLexecute VarChar2(8000); BEGIN SELECT TEXT INTO mySQL FROM DUMMY_1...
How do I execute clob in execute immediate
sql|oracle|dynamic-sql|execute
0
118
1
72,240,787
72,240,787
0
true
2022-05-13T12:30:41.350Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I execute clob in execute immediate<p>I have a table with one row and <code>clob</code> as column (whose size is 5239). This column contains a table s...
72,192,903
Pandas apply with a function as a keyword<p>How can I pass an optional function as a keyword into another function called with pd.apply?</p> <p>For example, sometimes the dataframe I am working with has <code>z</code> in it:</p> <pre><code>df = pd.DataFrame( { &quot;x&quot;: [1, 2, 3, 4], &quot;y&qu...
<p>It looks like you need at second positional parameter in the <code>myfunc2</code> definition. The first argument passed will be the row itself for <code>axis=1</code> - then your positional parameter:</p> <pre><code>def myfunc2(row, p2): return p2(row) </code></pre> <p>and then the passed positional <code>...
Pandas apply with a function as a keyword
python|pandas
0
57
1
72,193,383
72,193,383
0
true
2022-05-10T21:02:01.413Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pandas apply with a function as a keyword<p>How can I pass an optional function as a keyword into another function called with pd.apply?</p> <p>For example, ...
72,231,443
Counter for occasion within a day based on date/time by ID<p>Now updated with the code for the data frame - Thanks for the tip!</p> <pre><code>structure(list(id = c(5L, 5L, 5L, 5L, 5L, 5L, 5L, 6L, 6L, 6L, 6L, 6L), date = c(&quot;2022-03-03&quot;, &quot;2022-03-03&quot;, &quot;2022-03-03&quot;, &quot;2022-03-04&quot;, ...
<p>You can use <code>dense_rank()</code> to rank <code>date</code> and <code>time</code> in each group with different depths.</p> <pre class="lang-r prettyprint-override"><code>library(dplyr) df %&gt;% group_by(id) %&gt;% mutate(day = dense_rank(date)) %&gt;% group_by(day, .add = TRUE) %&gt;% mutate(beep = den...
Counter for occasion within a day based on date/time by ID
r
0
37
2
72,231,945
72,231,945
0
true
2022-05-13T14:45:04.140Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Counter for occasion within a day based on date/time by ID<p>Now updated with the code for the data frame - Thanks for the tip!</p> <pre><code>structure(list...
72,157,744
How to display the Word in a Loop removing the last letter at each iteration<p>Problem statement:</p> <blockquote> <p>Create a program that initializes a word in a character array (this becomes your stack) and displays the word removing the last letter on the stack.</p> </blockquote> <p>Example</p> <p><em>Input:</em></...
<p>You can use nested <code>for</code> loop.</p> <p>The variable of the inner loop points to a particular character. And the variable defined in the outer loop denotes the number of characters that need to be skipped in the current row.</p> <p>Statement <code>System.out.println()</code> is executed after each inner loo...
How to display the Word in a Loop removing the last letter at each iteration
java|arrays|for-loop|stack
0
104
2
72,157,786
72,157,786
0
true
2022-05-08T02:57:23.853Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to display the Word in a Loop removing the last letter at each iteration<p>Problem statement:</p> <blockquote> <p>Create a program that initializes a wor...
72,235,826
POST <APIURL> net::ERR_NAME_NOT_RESOLVED<p>I'm trying to create a simple web application form. It requires the user to input their information, and click submit which ideally would hit an api and store the information somewhere like dynamodb.</p> <p>I have this code</p> <pre><code> $.ajax({ type: 'POST', ...
<p>This is a name resolution issue, nothing wrong with your code.</p> <p>Basically, your computer must &quot;convert&quot; the name of your website to an IP Address it can send packets to.</p> <p><strong>Name resolution == Hostname -&gt; IP.</strong></p> <p>This process can be done in multiple ways. Hosts file, local n...
POST <APIURL> net::ERR_NAME_NOT_RESOLVED
javascript|ajax|api|error-handling
0
304
1
72,235,857
72,235,857
0
true
2022-05-13T22:06:58.757Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: POST <APIURL> net::ERR_NAME_NOT_RESOLVED<p>I'm trying to create a simple web application form. It requires the user to input their information, and click sub...
72,169,123
ImportError and ModuleNotFoundError: how to get a script running from the command line?<p>I have a project with the following structure:</p> <pre><code>HorticulturalSalesPrediction/ Docker HorticulturalSalesPrediction_API/ optimization/ __init__.py optuna_optim.py preproc...
<p>So I found my mistake. The solution is to run <code>python3 -m HorticulturalSalesPrediction_API.run</code> in the HorticulturalSalesPrediction folder. Then it works like expected. I just then had to adjust some imports:</p> <pre><code>from HorticulturalSalesPrediction_API.utils import helper_functions from . import ...
ImportError and ModuleNotFoundError: how to get a script running from the command line?
python|path|python-import|importerror|modulenotfounderror
0
52
2
72,173,121
72,173,121
0
true
2022-05-09T08:36:53.007Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: ImportError and ModuleNotFoundError: how to get a script running from the command line?<p>I have a project with the following structure:</p> <pre><code>Horti...
72,102,352
Can you include multiple labels in the same PDF using shippo.transaction.create({...})<p>I am creating a new transaction object and purchasing the shipping label with one API call using shippo.transaction.create({...}). My user can request 1 or more of the same label at the same time. How can I include the number of la...
<p>As far as I understand, we don't have an option to download/aggregate multiple labels into one PDF file via API/SDK.</p> <p>Batch API can be used to group the purchased labels. This API will aggregate the label into one single PDF as well.</p> <blockquote> <p>Once your purchases are complete, you will be able to dow...
Can you include multiple labels in the same PDF using shippo.transaction.create({...})
shippo
0
34
1
72,118,669
72,118,669
0
true
2022-05-03T16:11:43.057Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can you include multiple labels in the same PDF using shippo.transaction.create({...})<p>I am creating a new transaction object and purchasing the shipping l...
72,227,984
When FileUploadBase.SizeException (FileUploadException) is thrown, it seems the request is repeated (using Commons FileUpload)<p>I have an Ajax POST call that uploads one or more files to a servlet.</p> <p>In my servlet, I use Commons FileUpload library to manage the uploading file process:</p> <pre><code>private Reque...
<p>Finally I found the error and it was nothing to do with Ajax or servlet code, but with Tomcat default connector maxSwallowSize property:</p> <p>When somebody uploads a file that Tomcat knows is greater than maximum size allowed, Tomcat aborts the upload. Then, Tomcat does not swallow the body and the client is unlik...
When FileUploadBase.SizeException (FileUploadException) is thrown, it seems the request is repeated (using Commons FileUpload)
java|ajax|tomcat|servlets|apache-commons-fileupload
0
29
1
72,274,976
72,274,976
0
true
2022-05-13T10:20:11.533Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: When FileUploadBase.SizeException (FileUploadException) is thrown, it seems the request is repeated (using Commons FileUpload)<p>I have an Ajax POST call tha...
72,199,094
In geom_tile(), how to change vertical or horizon border color of the cell<p>In geom_tile(), how to change vertical or horizon border color of the cell ?</p> <pre><code>library(tidyverse) month &lt;- c(1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10) category &lt;- c(&quot;A&quot;,&quot;B&quot;,&quot;A&quot;,&quot;B&quot;,...
<pre><code>plot_data %&gt;% ggplot(aes(x=factor(month),y=category,fill=sales))+ geom_tile() + geom_vline(xintercept = 1.5, color = &quot;white&quot;) + geom_vline(xintercept = 2.5, color = &quot;white&quot;) + geom_vline(xintercept = 3.5, color = &quot;white&quot;) + geom_vline(xintercept = 4.5, color = &quot;white&quo...
In geom_tile(), how to change vertical or horizon border color of the cell
r|ggplot2|geom-tile
0
36
1
72,199,439
72,199,439
0
true
2022-05-11T10:02:27.023Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: In geom_tile(), how to change vertical or horizon border color of the cell<p>In geom_tile(), how to change vertical or horizon border color of the cell ?</...
72,164,449
JsonSerializable to Json throws return error<p>I am trying to use this package - <a href="https://pub.dev/packages/json_serializable" rel="nofollow noreferrer">https://pub.dev/packages/json_serializable</a> to help me with parsing data from api. However I am facing the error below and I am not sure how to fix it.</p> <...
<p>You need to convert complex data type to simple ones such as String, int, double, etc. to parse in json. Here's an example on how to implement Latitude and Longitude.</p> <p>Suppose I have a School Data for which I want to store name and Location. I would create a simple String for name but a separate class for Loca...
JsonSerializable to Json throws return error
flutter|dart
0
63
1
72,164,652
72,164,652
0
true
2022-05-08T19:28:07.613Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: JsonSerializable to Json throws return error<p>I am trying to use this package - <a href="https://pub.dev/packages/json_serializable" rel="nofollow noreferre...
72,176,244
How can i make a dynamic list in Flutter where user can add items through a textfield and delete the item again?<p>I want to have a textinputfield for the user and when he tips in something and clicks on a button the input should be shown in a list item. The user should also have the option to delete items of the list ...
<p>So I decided to write this simple program just to freshen up my skills... You can directly copy paste this code and it should work just fine.</p> <p>I have used the provider package here to make this a bit more professional, as you can't always rely on setState() to update your UI when tasks are added to your list. ...
How can i make a dynamic list in Flutter where user can add items through a textfield and delete the item again?
list|flutter|dart|textfield
0
1,081
1
72,176,579
72,176,579
0
true
2022-05-09T17:50:11.230Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can i make a dynamic list in Flutter where user can add items through a textfield and delete the item again?<p>I want to have a textinputfield for the us...
72,190,834
How do I convert UTC DateTime to local DateTime without ending up with a different format<p>I have specific DateTime values in this format '<strong>YYYY-MM-DDThh:mm:ss.ms</strong>' (e.g. '<strong>2022-05-10T13:44:00.0000000</strong>') and I need to convert them to local DateTime (which is UTC+2 for me) without changing...
<p>I couldn't find a clean and satisfying solution so I decided to just to the formatting myself. Here's what I ended up with:</p> <p>Input: '<strong>2022-05-10T13:44:00.0000000</strong>'</p> <pre><code>let startDateTime = new Date(event.start.dateTime); startDateTime.setMinutes(startDateTime.getMinutes() - startDateT...
How do I convert UTC DateTime to local DateTime without ending up with a different format
javascript|datetime|localtime|datetime-conversion
0
55
2
72,200,204
72,200,204
0
true
2022-05-10T17:41:54.113Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I convert UTC DateTime to local DateTime without ending up with a different format<p>I have specific DateTime values in this format '<strong>YYYY-MM-D...
72,172,973
why does returning the local variable address throws an error but returning the local variable value don't?<p>I can not understand, what is the difference between following function bodies</p> <pre><code>int func(void){ int A = 20; return A; } </code></pre> <p>and</p> <pre><code>int* func(void){ int A = 20;...
<p>A local variable with automatic storage duration is not alive after exiting the scope of the function where it is defined. So the returned pointer will be invalid and de-referencing such a pointer invokes undefined behavior.</p> <p>If you will change the second function the following way</p> <pre><code>int* func(voi...
why does returning the local variable address throws an error but returning the local variable value don't?
c|scope|return-value|return-type|storage-duration
0
98
2
72,173,007
72,173,007
0
true
2022-05-09T13:42:51.197Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: why does returning the local variable address throws an error but returning the local variable value don't?<p>I can not understand, what is the difference be...
72,034,718
How can I split the data in dataframe if there two different signs in python?<p>My current data frame contains a column called Gross. I only want the numbers part. How can I split it and merge it back to the original data frame? <a href="https://i.stack.imgur.com/uhalz.png" rel="nofollow noreferrer">Current data frame<...
<p><code>.str.replace</code> can do that for you:</p> <pre><code>df['Gross'] = df['Gross'].str.replace('^[^\d]+|[^\d]+$', '', regex=True).astype('float') </code></pre> <p>Output:</p> <pre><code>&gt;&gt;&gt; df['Gross'] 0 0.43 1 142.50 2 858.37 3 335.45 4 316.83 5 165.36 6 27.33 7 27.3...
How can I split the data in dataframe if there two different signs in python?
python|pandas
0
25
1
72,034,844
72,034,844
1
true
2022-04-27T20:09:41.670Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I split the data in dataframe if there two different signs in python?<p>My current data frame contains a column called Gross. I only want the numbers...
72,034,612
Finding a relative axis position on a ggplot<p>I would like to figure out how to get a y position that is relative to the scale of the ggplot produced.</p> <p>For example:</p> <pre><code>library(ggplot) marks &lt;- data.frame(mpg = c(15,25,30), cyl = c(4,8,4)) ggplot()+ geom_point(mtcars,mapping = aes(x = mpg, y = ...
<p>One option to achieve your desired result would be via the <a href="https://www.stat.auckland.ac.nz/%7Epaul/Reports/gggrid/gggrid.html" rel="nofollow noreferrer"><code>gggrid</code></a> package which similar to <code>annotation_custom</code> allows to add your marks as grobs using relative coordinates but works with...
Finding a relative axis position on a ggplot
r|ggplot2
0
35
2
72,035,085
72,035,085
1
true
2022-04-27T19:58:51.900Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Finding a relative axis position on a ggplot<p>I would like to figure out how to get a y position that is relative to the scale of the ggplot produced.</p> <...
72,000,512
Graph API Device Management Configuration Compliance Policy Search<p>We have multiple clients that have a security software compliance policy in place. My goal is to look into those policies, and pull out the devices that are notcomplient. Then from there look at the machine and pull what softwares are missing. I am us...
<p>From this <a href="https://stackoverflow.com/questions/37860103/microsoft-graph-api-access-token-validation-failure">post</a>:</p> <blockquote> <p>OAUTH 2.0 requires multiple steps. The first request returns an OAUTH Code. The next step is converting that OAUTH code into a Bearer Token. This is the step you are miss...
Graph API Device Management Configuration Compliance Policy Search
powershell|microsoft-graph-api
0
267
3
72,035,280
72,035,280
1
true
2022-04-25T13:38:37.777Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Graph API Device Management Configuration Compliance Policy Search<p>We have multiple clients that have a security software compliance policy in place. My go...
72,034,753
Creating Actions via reflection with type parameters to proxy call<p>Given a simple object</p> <pre><code>public class Foo { public void RunAction(Action&lt;int, string, byte&gt; action) { Action(0, null, 0); } } </code></pre> <p>And given a sample pseudo-code method that reads this class to obtain the ac...
<p>You need a code which convert action parameters to an array before passing to a proxy. The easiest way is to use set of generic functions with different number of generic arguments:</p> <pre><code>public static class ProxyCaller { public static Action&lt;T1&gt; CallProxy&lt;T1&gt;(Action&lt;object[]&gt; proxy) =...
Creating Actions via reflection with type parameters to proxy call
c#|reflection
0
33
1
72,035,336
72,035,336
1
true
2022-04-27T20:12:57.587Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Creating Actions via reflection with type parameters to proxy call<p>Given a simple object</p> <pre><code>public class Foo { public void RunAction(Action&...
72,035,431
Reattach shell session to process running on Ubuntu<p>I have an ongoing process running on a GCP vm. When initially start the program it spits our logs in real-time from the shell session, however when I exit the session and re-connect the next day the logs are gone.</p> <p>How do I reconnect to the process to see the ...
<p>Use the program <strong>screen</strong></p> <p>This might be already installed, check with:</p> <pre><code>screen --version </code></pre> <p>If not, install with one of these commands (OS specific)</p> <pre><code>yum install screen apt install screen </code></pre> <p>Open a screen session</p> <pre><code>screen </cod...
Reattach shell session to process running on Ubuntu
ubuntu|google-cloud-platform
0
31
1
72,035,723
72,035,723
1
true
2022-04-27T21:21:32.450Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Reattach shell session to process running on Ubuntu<p>I have an ongoing process running on a GCP vm. When initially start the program it spits our logs in re...
72,035,805
Is it better to use a 403 response or 404?<p>I have a restAPI which allows for users to submit data to be saved in my database. When data is submitted their userID will be grabbed from the request header and added to the document</p> <p>In my collection (mongoDB) there is the normal <code>_id</code> field and a <code>u...
<p>404 is for &quot;not found&quot;, which is clearly not the case.</p> <p>Use 403.</p> <p>Quoting from <a href="https://en.m.wikipedia.org/wiki/HTTP_403" rel="nofollow noreferrer">Wikipedia</a>:</p> <blockquote> <p>HTTP 403 is returned when the client is not permitted access to the resource despite providing authentic...
Is it better to use a 403 response or 404?
database|mongodb|http
0
31
1
72,035,885
72,035,885
1
true
2022-04-27T22:04:57.397Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is it better to use a 403 response or 404?<p>I have a restAPI which allows for users to submit data to be saved in my database. When data is submitted their ...
72,009,529
Registry UI (joxit) does not return stored images<p>I have setup a private registry (Kubernetes) using the following configuration based on this repo <a href="https://github.com/sleighzy/k8s-docker-registry" rel="nofollow noreferrer">https://github.com/sleighzy/k8s-docker-registry</a>:</p> <p>Create the password file, ...
<p>As the owner of that repository there may be something missing here. Your <code>IngressRoute</code> rule has an <code>entryPoint</code> of <code>websecure</code> and <code>certResolver</code> of <code>tlsresolver</code>. This is intended to be the https entrypoint for Traefik, see my other repository <a href="https:...
Registry UI (joxit) does not return stored images
docker|kubernetes|yaml|registry|dockerhub
0
276
1
72,036,037
72,036,037
1
true
2022-04-26T06:54:25.073Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Registry UI (joxit) does not return stored images<p>I have setup a private registry (Kubernetes) using the following configuration based on this repo <a href...
72,036,185
Merging Numpy Arrays into 2D array<p>I have 2 numpy arrays like this:</p> <pre class="lang-py prettyprint-override"><code> a = [[a,b,c], [d,e,f]] b = [[g,h,i], [k,l,m]] </code></pre> <p>I want to merge them into another numpy array, something like following:</p> <pre class="lang-py prettyprint-o...
<p>You can use the dstack function, i.e.</p> <pre><code>a = np.array([[1,2,3], [4,5,6]]) print(a) b = np.array([[10,20,30], [40,50,60]]) print(b) c = np.dstack((a,b)) print(c) </code></pre> <p>which would outputs</p> <pre><code>[[1 2 3] [4 5 6]] [[10 20 30] [40 50 60]] [[[ 1 10] [ 2 20] [ 3 30]] [[ 4 ...
Merging Numpy Arrays into 2D array
numpy
0
27
1
72,036,248
72,036,248
1
true
2022-04-27T23:03:29.290Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Merging Numpy Arrays into 2D array<p>I have 2 numpy arrays like this:</p> <pre class="lang-py prettyprint-override"><code> a = [[a,b,c], [d,e,f]]...
72,037,115
Post Conditional Data in ReactJs<p>so I want to add conditional statements in my POST method function in React. I have a useState variable called empType that could be toggled by buttons to be set to &quot;normal&quot; or &quot;others&quot;. I want to be able to exclude data2 from the JSON data that will be posted if e...
<p>why not try building the data before the fetch call.</p> <pre><code>const onSubmit = () =&gt; { const data = { data1: &quot;something&quot; } if (empType !== &quot;normal&quot;) data.data2 = &quot;something&quot; fetch(`/apiendpoint`, { method: &quot;POST&quot;, headers: { &quot;Content-type&qu...
Post Conditional Data in ReactJs
java|reactjs|json|post|frontend
0
23
1
72,037,160
72,037,160
1
true
2022-04-28T01:52:56.250Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Post Conditional Data in ReactJs<p>so I want to add conditional statements in my POST method function in React. I have a useState variable called empType tha...
72,036,943
Angularjs different dependency injection for factories inside controller<p>Say I have multiple factories and these factories have same functions and variables inside. For example,</p> <pre><code>var app = angular.module('app', []); app.factory('employerFactory', function () { return { firstName: 'Kr...
<p>Just use a service as an extra layer to deal with the switching logic, inject both factories in it, then create methods to handle common functionality:</p> <pre><code>app.service('FactoryService', function($scope, employerFactory, employeeFactory) { var _mode = 0; var _factories = [employerFactory, employeeFac...
Angularjs different dependency injection for factories inside controller
angularjs|angular-ui-router|angular-dependency-injection
0
33
1
72,037,206
72,037,206
1
true
2022-04-28T01:20:54.043Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Angularjs different dependency injection for factories inside controller<p>Say I have multiple factories and these factories have same functions and variable...
72,037,184
Unknown syntax error when coding boolean logic<p>I am trying to make a BMI calculator but keep getting a syntax error for line 6 every time I run it. Line 5 is similar and runs with no problem. I recently made the BMI variable a float and an integer to see if that was my problem, but I just can't seem to figure it out....
<p>In English you can say &quot;if bmi is greater than 18.5 and less than 25&quot;, and everyone will know that &quot;less than 25&quot; still refers to bmi.</p> <p>Python is not that good at context though, so you have to clarify that:</p> <pre><code>elif bmi &gt;= 18.5 and bmi &lt; 25: </code></pre> <p>You will then ...
Unknown syntax error when coding boolean logic
python|if-statement|boolean-logic
0
28
2
72,037,281
72,037,281
1
true
2022-04-28T02:07:07.680Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Unknown syntax error when coding boolean logic<p>I am trying to make a BMI calculator but keep getting a syntax error for line 6 every time I run it. Line 5 ...