question_id
int64
37.6M
73.2M
input_text
stringlengths
88
52.4k
output_text
stringlengths
37
35.6k
title
stringlengths
15
150
tags
stringlengths
1
107
q_score
int64
-19
397
view_count
int64
3
879k
answer_count
int64
1
21
accepted_answer_id
int64
37.6M
73.8M
answer_id
int64
37.6M
73.8M
a_score
int64
-5
1.29k
is_accepted
bool
1 class
creation_date
stringlengths
20
24
input_text_instruct
stringlengths
251
52.6k
71,253,843
eclipse loading src folder weirdly<p>I am using git with fellow student, now I've noticed that if I load a branch of another student it imports the src folder weirdly.</p> <p><a href="https://i.stack.imgur.com/kbU0t.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kbU0t.png" alt="enter image descripti...
<p>Eclipse is not recognizing your src directory as a source folder, and therefore not displaying the underlying directories as packages.</p> <p>You need to define the source folders in your project, typically <code>src/main/java</code> and <code>src/test/java</code> (Maven convention).</p> <p>If someone else's branch ...
eclipse loading src folder weirdly
java|eclipse
0
35
1
71,254,327
71,254,327
2
true
2022-02-24T14:52:19.707Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: eclipse loading src folder weirdly<p>I am using git with fellow student, now I've noticed that if I load a branch of another student it imports the src folde...
71,254,524
What does the empty list passed in the assert function mean?<p>sorry for the weird title.</p> <p>I am currently learning Django, and going through their tutorial. In <a href="https://docs.djangoproject.com/en/4.0/intro/tutorial05/" rel="nofollow noreferrer">Part 5</a>, it discusses test cases which I am understanding w...
<p><code>assertQuerysetEqual</code> takes two arguments: a queryset, and something to compare it against.</p> <p>In this case, the person who wrote this test wants to ensure that when a question is created in the future, it doesn't show up in the latest poll list. This can be tested by making sure that the queryset in ...
What does the empty list passed in the assert function mean?
python|django
0
43
1
71,254,590
71,254,590
2
true
2022-02-24T15:37:46.570Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What does the empty list passed in the assert function mean?<p>sorry for the weird title.</p> <p>I am currently learning Django, and going through their tuto...
71,255,722
Setting State Between Radio Buttons<p>An example of the issue is found on <a href="https://codesandbox.io/s/suspicious-bush-zgtvms" rel="nofollow noreferrer">CodeSandBox</a>. Am I short circuiting myself between TRUE/FALSE values?</p> <p>Can someone please help explain why the state variable <code>isOptionOne</code> is...
<p>That is the expected behavior. React batches the state updates, which means it doesn't immediately update the state and re-render everything after each <code>setState</code> method call. From <a href="https://reactjs.org/docs/react-component.html" rel="nofollow noreferrer">official documentation</a>:</p> <blockquote...
Setting State Between Radio Buttons
reactjs
0
31
1
71,255,827
71,255,827
2
true
2022-02-24T17:10:36.117Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Setting State Between Radio Buttons<p>An example of the issue is found on <a href="https://codesandbox.io/s/suspicious-bush-zgtvms" rel="nofollow noreferrer"...
71,255,450
How to add data labels to plotly line graph?<p>I've got a simple plotly line graph:</p> <pre><code>import plotly.express as px fig = px.line(data, x=&quot;x-axis&quot;, y=&quot;variable&quot;) fig.show() </code></pre> <p><a href="https://i.stack.imgur.com/Ovpdy.png" rel="nofollow noreferrer"><img src="https://i.stack.i...
<ul> <li>have simulated dataframe for your figure</li> <li>two steps <ol> <li>define <strong>text</strong> parameter so trace / figure is built appropriately by <strong>Plotly Express</strong></li> <li>updated <strong>texttemplate</strong> so that formatting of y-axis is used</li> </ol> </li> </ul> <pre><code>import pl...
How to add data labels to plotly line graph?
python|plotly|linegraph
0
1,553
1
71,255,932
71,255,932
2
true
2022-02-24T16:48:54.293Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to add data labels to plotly line graph?<p>I've got a simple plotly line graph:</p> <pre><code>import plotly.express as px fig = px.line(data, x=&quot;x-...
71,256,569
Multiple condition in ternary operator in jsx my component not showing<p>I am using ternary operator in jsx to show any of my component. The issue is that when I press one of my button and set my state showChat to 'true' it doesn't show my component &quot;Chat&quot;. My ternary condition seems fine so I don't understan...
<p>I don't recommend this way of conditional rendering because as you can see it is tricky. Probably you made a mistake here</p> <pre><code> {!showChat || !showRoomList ? ( -&gt; {!showChat &amp;&amp; !showRoomList </code></pre> <p>I recommend you to do this in that way</p> <pre><code>&lt;Container maxWidth=&quot;md&q...
Multiple condition in ternary operator in jsx my component not showing
reactjs|jsx
0
39
1
71,257,526
71,257,526
2
true
2022-02-24T18:24:55.097Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Multiple condition in ternary operator in jsx my component not showing<p>I am using ternary operator in jsx to show any of my component. The issue is that wh...
71,258,043
Can I parse a dataframe by row number?<p>I'm not sure if this is possible but say I have this:</p> <pre><code>In [1]: df = pd.DataFrame(np.random.rand(5,2),index=range(0,10,2),columns=list('AB')) In [2]: df Out[2]: A B 0 1.068932 -0.794307 2 -0.470056 1.192211 4 -0.284561 0.756029 6 1.037563 -0....
<p>Using your answer you could change the iloc to have a : wildcard</p> <pre><code>df2 = df.iloc[1:] </code></pre> <p>This would let you look at everything 2+ in the index</p>
Can I parse a dataframe by row number?
pandas
0
37
2
71,258,073
71,258,073
2
true
2022-02-24T20:44:46.050Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can I parse a dataframe by row number?<p>I'm not sure if this is possible but say I have this:</p> <pre><code>In [1]: df = pd.DataFrame(np.random.rand(5,2),i...
71,260,714
How can I loop this javascript function to remove redundant code?<p>I have multiple different divs that each represent an item. I am using data attributes to assign a start date and end date to each. Then I have a function written to check if the current date is within this range. If it is, then I have more code that w...
<p>Give them all a class in common - if <code>col-12</code> isn't used elsewhere, you can use that. Then just iterate over all elements matching that class.</p> <p>The third parameter doesn't come from information outside the function, so it isn't needed.</p> <pre><code>for (const elm of document.querySelectorAll('.col...
How can I loop this javascript function to remove redundant code?
javascript|loops|attributes|display
0
30
1
71,260,747
71,260,747
2
true
2022-02-25T03:33:13.950Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I loop this javascript function to remove redundant code?<p>I have multiple different divs that each represent an item. I am using data attributes to...
71,261,449
For data get the Companies have increasing no of participants in last 3 years in Pandas<p>Below is the Data given.</p> <pre><code>year Company/Account Name participants 2019 Willis Towers Watson 418 2020 Willis Towers Watson 568 2021 Willis Towers Watson 57 2019 White Plains Hospital 1904 ...
<p>We could <code>groupby</code> + <code>diff</code> + <code>gt</code> to get a boolean Series which could be returns True if participants increased compared to previous year, False otherwise. Then use <code>groupby</code> + <code>all</code> to construct a mask to filter companies that experienced increasing participat...
For data get the Companies have increasing no of participants in last 3 years in Pandas
python|python-3.x|pandas|dataframe|pandas-groupby
0
26
1
71,261,484
71,261,484
2
true
2022-02-25T05:30:59.893Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: For data get the Companies have increasing no of participants in last 3 years in Pandas<p>Below is the Data given.</p> <pre><code>year Company/Account Nam...
71,262,525
NVidia thrust arbitrary transform with three-dimensional grid<p>I want to parallelize the following nested for loop on the GPU using NVidia thrust.</p> <pre class="lang-cpp prettyprint-override"><code>// complex multiplication inline __host__ __device__ float2 operator* (const float2 a, const float2 b) { return ma...
<p>You can simply collapse the nested loop into a single loop and use for_each with a counting iterator. In the functor, you need to calculate the three indices from the single loop variable.</p> <pre><code>#include &lt;iostream&gt; #include &lt;thrust/for_each.h&gt; #include &lt;thrust/iterator/counting_iterator.h&gt;...
NVidia thrust arbitrary transform with three-dimensional grid
c++|cuda|thrust
0
39
1
71,263,352
71,263,352
2
true
2022-02-25T07:37:55.600Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: NVidia thrust arbitrary transform with three-dimensional grid<p>I want to parallelize the following nested for loop on the GPU using NVidia thrust.</p> <pre ...
71,265,657
How to use middlewares in custom middlewares in Node.js<p>So I have this custom middleware that tries to get the cookie from the client. This is the declaration:</p> <pre><code>function auth(req, res, next) {} </code></pre> <p>But to access the cookies from the request, I need to use another middleware i.e. cookieParse...
<p>You do not use the middleware in your middleware. See the code bellow which should be fairly self-explanatory but i add some commments.</p> <pre><code>var express = require('express'); var cookieParser = require('cookie-parser'); var app = express(); // add the cookie parser app.use(cookieParser()); // your middle...
How to use middlewares in custom middlewares in Node.js
node.js|express
0
44
1
71,266,160
71,266,160
2
true
2022-02-25T12:09:42.450Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to use middlewares in custom middlewares in Node.js<p>So I have this custom middleware that tries to get the cookie from the client. This is the declarat...
71,273,882
How to make object that is being dragged the foreground object<p>I am working on an app that has users drag objects to target locations. Everything thus far is programmatically created, aka no storyboard. My issue is that for the draggable objects, the colored circles on the right, when dragged over the target area, th...
<p>I think the <code>bringSubviewToFront(_:)</code> is what will help you here, more info on this from the <a href="https://developer.apple.com/documentation/uikit/uiview/1622541-bringsubviewtofront" rel="nofollow noreferrer">docs</a></p> <p>As soon as the view is selected, you can do something like:</p> <pre><code>par...
How to make object that is being dragged the foreground object
swift|uiviewcontroller|draggable
0
31
1
71,274,084
71,274,084
2
true
2022-02-26T03:35:37.160Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to make object that is being dragged the foreground object<p>I am working on an app that has users drag objects to target locations. Everything thus far ...
71,275,367
How to wait for an fadeout function to end?<p>I would like to change a value when a fadeOut function is over.</p> <p>I have the following function:</p> <pre><code> const fadeOut = (duration: number = 300) =&gt; { Animated.timing( opacity, { toValue: 0, ...
<p>Make it async:</p> <blockquote> <p><a href="https://reactnative.dev/docs/animated#working-with-animations" rel="nofollow noreferrer">Here</a> are the docs</p> </blockquote> <p><a href="https://www.typescriptlang.org/play?noUncheckedIndexedAccess=true&amp;target=99&amp;useUnknownInCatchVariables=true&amp;exactOptiona...
How to wait for an fadeout function to end?
javascript|reactjs|typescript|react-native
0
36
2
71,275,531
71,275,531
2
true
2022-02-26T09:06:46.077Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to wait for an fadeout function to end?<p>I would like to change a value when a fadeOut function is over.</p> <p>I have the following function:</p> <pre>...
71,278,273
How to make dart flutter popup box?<p>I have an application like this:</p> <p><a href="https://i.stack.imgur.com/fgdX4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fgdX4.png" alt="enter image description here" /></a></p> <p>My aim is that when I press the eye icon next to the text &quot;Hello&quot...
<p>You can convert the widget to <code>StatefulWidget</code> or use a <code>ValueNotifier</code> to control the preserve/notify the state visibility.</p> <p>You can use <code>Visibility</code> widget or just <code>if</code> to show and hide German text.</p> <pre class="lang-dart prettyprint-override"><code>class selaml...
How to make dart flutter popup box?
android|flutter|dart
0
41
2
71,278,438
71,278,438
2
true
2022-02-26T16:15:15.330Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to make dart flutter popup box?<p>I have an application like this:</p> <p><a href="https://i.stack.imgur.com/fgdX4.png" rel="nofollow noreferrer"><img sr...
71,278,443
useReducer - keydown handler re-evaluates initial state on each render<p><a href="https://codesandbox.io/s/suspicious-chebyshev-vy4mf2" rel="nofollow noreferrer">https://codesandbox.io/s/suspicious-chebyshev-vy4mf2</a></p> <p>I have a useReducer hook and useEffect with a <code>keydown</code> event handler. The issue is...
<p>When a component sees that it needs to re-render, its function will run again. What you're doing is equivalent to asking why</p> <pre><code>export default function App() { // ... const [state, dispatch] = useReducer(reducer, getInitialState()); </code></pre> <p>runs <code>getInitialState</code> every time App ru...
useReducer - keydown handler re-evaluates initial state on each render
reactjs|use-effect|keydown|use-reducer
0
39
2
71,278,486
71,278,486
2
true
2022-02-26T16:35:48.410Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: useReducer - keydown handler re-evaluates initial state on each render<p><a href="https://codesandbox.io/s/suspicious-chebyshev-vy4mf2" rel="nofollow norefer...
71,278,424
Combine rows in pandas df as per given condition<p>I have pandas df as shown</p> <pre><code> Name Subject Score Rakesh Math 65 Mukesh Science 76 Bhavesh French 87 Rakesh Science 88 Rakesh Hindi 76 Sanjay English 66 Mukesh English 98 Mukesh Marathi 77 </code></pre> <p>I...
<p>In pandas, there is a method <code>explode</code> that will take a column that contains lists and break them apart. We can do a sort of opposite of that by making list of your Subjects column. I pulled the idea here from <a href="https://stackoverflow.com/questions/64235312/how-to-implodereverse-of-pandas-explode-ba...
Combine rows in pandas df as per given condition
python|pandas|dataframe
0
40
2
71,278,574
71,278,574
2
true
2022-02-26T16:33:50.567Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Combine rows in pandas df as per given condition<p>I have pandas df as shown</p> <pre><code> Name Subject Score Rakesh Math 65 Mukesh Scienc...
71,280,037
Force facet wrapped plots to center at a common point, namely 0<p>I'm sure there's a more elegant way to get to this plot, but here goes with some of the data I have to work with</p> <pre><code>score &lt;- c(1, 2, 3, 4, 5, &quot;X&quot;) group1 &lt;- c(0,0,5,-0.2,-4.9,0) group2 &lt;- c(0.1,0,-1.2,0.4,0.6,0.1) group3 &l...
<p>You can provide a function to the limits of a scale. In the example below, note that I've used <code>score</code> instead of <code>rating</code> for facets, and circumvented the <code>coord_flip()</code> by swapping the x- and y-variables. The function below is in the so called 'lambda syntax', but you can use regul...
Force facet wrapped plots to center at a common point, namely 0
r|ggplot2|bar-chart
0
44
1
71,280,083
71,280,083
2
true
2022-02-26T20:23:36.407Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Force facet wrapped plots to center at a common point, namely 0<p>I'm sure there's a more elegant way to get to this plot, but here goes with some of the dat...
71,281,782
Is there any difference between Firebase auth.onAuthStateChanged((user)=>{}) vs onAuthStateChanged(auth,(user)=>{})?<p>I am using the modular Firebase JS SDK v9, and I have seen both of these function variations used with that SDK.</p> <p>Is there any difference between these...</p> <p><strong>Variation 1:</strong></p>...
<p>Not really. The first one is the syntax for the namespaced SDK of v8 and before, and the latter is the syntax of the modular SDK in v9 and above. Aside from syntactic changes they do exactly the same.</p>
Is there any difference between Firebase auth.onAuthStateChanged((user)=>{}) vs onAuthStateChanged(auth,(user)=>{})?
firebase-authentication
0
33
1
71,281,826
71,281,826
2
true
2022-02-27T02:56:14.580Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is there any difference between Firebase auth.onAuthStateChanged((user)=>{}) vs onAuthStateChanged(auth,(user)=>{})?<p>I am using the modular Firebase JS SDK...
71,282,214
R read csv with ="" formatting<p>I have a csv where each value is wrapped in a quote with an equals sign before it, like so:</p> <pre><code>=&quot;#&quot;,=&quot;NAME&quot;,=&quot;SM&quot;,=&quot;SRM&quot;,=&quot;SNM&quot;,=&quot;TMG&quot;,=&quot;PIL&quot;,=&quot;TIP&quot;,=&quot;TIZ&quot; =&quot;1&quot;,=&quot;A.Aaron...
<p>You can read the file with <code>readLines</code>, remove the <code>=</code> symbol and read it with <code>read.csv</code>.</p> <pre><code>read.csv(text = gsub('=', '', readLines('data.csv'), fixed = TRUE)) </code></pre> <p>Testing this as text -</p> <pre><code>text &lt;- '=&quot;#&quot;,=&quot;NAME&quot;,=&quot;SM&...
R read csv with ="" formatting
r|csv|dplyr
0
40
1
71,282,279
71,282,279
2
true
2022-02-27T04:56:10.570Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: R read csv with ="" formatting<p>I have a csv where each value is wrapped in a quote with an equals sign before it, like so:</p> <pre><code>=&quot;#&quot;,=&...
71,281,757
how to start an activity from inner class view holder? [Android studio] [kotlin]<p>So i know how to start an activity from an normal activity to another, but i do not know how to do this. I hardly know anything about android and my professor doesn't really explain anything so I apologize if this question is hard to und...
<p>Firstly, you need to pass context as a parameter in your <b> RecyclerAdapter</b>. And, next thing you need to do is give an id to your root View of CardLayoutBinding. for e.g. here I supposed that your CardLayoutBinding XML looks something like this. So, I have provided id to the root view as 'itemViewContainer'</p>...
how to start an activity from inner class view holder? [Android studio] [kotlin]
android-studio|kotlin|android-activity
0
295
1
71,283,225
71,283,225
2
true
2022-02-27T02:49:16.450Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to start an activity from inner class view holder? [Android studio] [kotlin]<p>So i know how to start an activity from an normal activity to another, but...
71,287,689
How to only execute onmousemove function if onmousedown is active<p>I don't usually use vanilla js, and I simply can't make this happen. handleTilePressed is the function I want to execute, but I don't know how to make it so that onmousemove only works if onmousedown is active.</p> <pre><code> tile.onmousemove = fun...
<p>You have to create a variable that could determine it the mouse was click or not:</p> <pre><code>var isMouseDown = false; tile.addEventListener('mousedown', e =&gt; { isMouseDown = true }); window.addEventListener('mouseup', e =&gt; { isMouseDown = false }); </code></pre> <p>Now you can use this variable to deter...
How to only execute onmousemove function if onmousedown is active
javascript
0
24
1
71,287,746
71,287,746
2
true
2022-02-27T19:05:51.580Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to only execute onmousemove function if onmousedown is active<p>I don't usually use vanilla js, and I simply can't make this happen. handleTilePressed is...
71,288,325
Type of arrows wxmaxima<p>How can I change the size and type of arrows in wxmaxima?</p> <pre><code>draw2d( xrange=[0,2], yrange=[0,3], vector([0,0],[1,1]) ); </code></pre>
<p>You can use options head_length, head_type and head_angle. Check the possible values in Maxima's help.</p>
Type of arrows wxmaxima
vector|maxima|wxmaxima
0
40
1
71,292,178
71,292,178
2
true
2022-02-27T20:41:00.470Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Type of arrows wxmaxima<p>How can I change the size and type of arrows in wxmaxima?</p> <pre><code>draw2d( xrange=[0,2], yrange=[0,3], vector([0,...
71,292,566
Change file name in Azure Databricks<p>I've write the data in the pyspark dataframe using the dataframe writer APIs. How can I change the name of the csv file generated?</p> <p><a href="https://i.stack.imgur.com/b5P5h.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/b5P5h.png" alt="enter image descrip...
<p>It seems you are trying to get a single CSV file out of a Spark Dataframe, using the spark.write.csv() method. This will create a distributed file by default. I would recommend the following instead if you want a single file with a specific name.</p> <p><code>df.toPandas().to_csv('/dbfs/path_of_your_file/filename.cs...
Change file name in Azure Databricks
pyspark|databricks
0
544
1
71,292,953
71,292,953
2
true
2022-02-28T08:57:58.250Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Change file name in Azure Databricks<p>I've write the data in the pyspark dataframe using the dataframe writer APIs. How can I change the name of the csv fil...
71,295,107
numpy write with two masks<p>If I have an array <code>a</code> with 100 elements that I want to conditionally update. I have the first mask <code>m</code> which selects elements of <code>a</code> that will be tried to update. Out of <code>a[m]</code> (say, 50 elements), I want to update a subset some elements, but leav...
<p>You can potentially first compute the &quot;final index&quot; of interest and then use those indexes to update. One way to achieve this in a more &quot;numpy&quot; way is to mask the first index array, which is computed based on the first mask array.</p> <pre class="lang-py prettyprint-override"><code>final_mask = n...
numpy write with two masks
python|numpy
0
41
2
71,295,221
71,295,221
2
true
2022-02-28T12:33:37.340Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: numpy write with two masks<p>If I have an array <code>a</code> with 100 elements that I want to conditionally update. I have the first mask <code>m</code> wh...
71,296,313
How do I delete the cell content in front of cell that have not been checked?<p>I have cell range. First column have content. Second column have check box. See first picture.<a href="https://i.stack.imgur.com/TlssD.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TlssD.jpg" alt="first picture" /></a> ...
<p>Description</p> <p>First your script and picture of script don't match, so I'm not sure which one you are currently using.</p> <p>Second, your for loop should be <code>i&lt;chkval.length</code>.</p> <p>Third, there should not be a return in your for loop.</p> <p>Fourth, your <code>sheet.getRange(29+i, 1).clearConten...
How do I delete the cell content in front of cell that have not been checked?
google-apps-script|google-sheets|checkbox
0
33
2
71,296,744
71,296,744
2
true
2022-02-28T14:12:16.787Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I delete the cell content in front of cell that have not been checked?<p>I have cell range. First column have content. Second column have check box. S...
71,291,743
How to overlap two label to make mask for segmentation in ITK-snap?<p>I'm annotating CT scan slices(Nifti format) with ITK-snap. One slice contains two labels(Subarachnoid and Intraparenchymal) in the same area. Here is the original annotated image link: <a href="https://ibb.co/FJpyVZF" rel="nofollow noreferrer">https:...
<p>ITK-SNAP uses binary label maps. That approach <a href="https://slicer.readthedocs.io/en/latest/user_guide/image_segmentation.html" rel="nofollow noreferrer">does not allow</a> label overlap. Your options are:</p> <ol> <li>Use a different label map for each structure you are segmenting.</li> <li>Use a different segm...
How to overlap two label to make mask for segmentation in ITK-snap?
computer-vision|image-segmentation|itk|medical-imaging|image-annotations
0
280
1
71,296,791
71,296,791
2
true
2022-02-28T07:25:43.230Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to overlap two label to make mask for segmentation in ITK-snap?<p>I'm annotating CT scan slices(Nifti format) with ITK-snap. One slice contains two label...
71,297,867
building a jar library from a war project using maven?<p>We have a EAR project which has a WAR project. Maven is used, so pom.xml. As typical of any project, this project also contains a big feature (say Job Scheduling &quot;JBS&quot;) among many other features. As it is planned to retire this whole project in the near...
<p>It seems like the best thing for you would be to create a multi-module project that both contains the JAR and the other project. This way, you can easily change/build them together, but you create separate artifacts.</p>
building a jar library from a war project using maven?
maven|jakarta-ee|jar
0
42
1
71,299,711
71,299,711
2
true
2022-02-28T16:11:36.230Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: building a jar library from a war project using maven?<p>We have a EAR project which has a WAR project. Maven is used, so pom.xml. As typical of any project,...
71,298,273
Does the msgraph-sdk-javascript library support SSO-OBO?<p>I am currently looking for a good JS library to use for my addin. And I came across this project : <a href="https://github.com/microsoftgraph/msgraph-sdk-javascript/wiki" rel="nofollow noreferrer">MSGRAPH-SDK-JAVASCRIPT</a></p> <p>I tried to read through their ...
<p>Single sign on and MS Graph SDK are different things. You can use SSO to deal with Graph API from Outlook web add-ins. See <a href="https://docs.microsoft.com/en-us/learn/modules/office-add-ins-sso/" rel="nofollow noreferrer">Using Single Sign-On (SSO) with Office Add-ins</a> for more information.</p> <p>Also you ma...
Does the msgraph-sdk-javascript library support SSO-OBO?
outlook|office-js|outlook-addin|outlook-web-addins|msgraph
0
41
1
71,300,105
71,300,105
2
true
2022-02-28T16:41:32.387Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Does the msgraph-sdk-javascript library support SSO-OBO?<p>I am currently looking for a good JS library to use for my addin. And I came across this project :...
71,301,748
How to set Azure DevOps pipeline variable with Powershell<p>I currently have a variable in my release pipeline and need to set its value through a Powershell script. The purpose is to have its value available to be used for postman collections in next tasks.</p> <p>I'm trying to do that in this way but not working.</p>...
<p>Using the set variable command will make the variable available for all the task steps that follow. It will not be available within the scope of the same task. If you break your task into two steps, one set then one test display, I'd expect you would see the setting is probably going to be as-expected for your pos...
How to set Azure DevOps pipeline variable with Powershell
powershell|azure-devops|azure-pipelines
0
1,580
2
71,301,813
71,301,813
2
true
2022-02-28T22:30:21.797Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to set Azure DevOps pipeline variable with Powershell<p>I currently have a variable in my release pipeline and need to set its value through a Powershell...
71,304,738
How do I save this in firestore the way I want it to be to be structured?<p>I have these data:</p> <pre><code>orders = { firstName: &quot;Jennie&quot;, lastName: &quot;asdasda&quot;, address: &quot;US&quot;, order: [ { product: &quot;Tumbler - 500- ML &quot;, variation: [{ qty: 12, color: &quot;red&quot; }]...
<p>remove the curly bracket from <code>{ orders }</code>:</p> <pre><code> const Save = () =&gt; { const { state } = useStateMachine(updateAction); const orders = state.yourDetails; const handleAdd = async () =&gt; { try { const docRef = await addDoc(collection(db, &quot;orders&q...
How do I save this in firestore the way I want it to be to be structured?
javascript|reactjs|firebase|google-cloud-firestore
0
35
1
71,304,946
71,304,946
2
true
2022-03-01T06:54:33.710Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I save this in firestore the way I want it to be to be structured?<p>I have these data:</p> <pre><code>orders = { firstName: &quot;Jennie&quot;, l...
71,308,058
How to organize data frame with several variables in Python?<p>When I organize data frame with 1 variable, it works well.</p> <pre><code>import numpy as np a = np.random.normal(45, 9, 10000) source = {&quot;Genotype&quot;: [&quot;CV1&quot;]*10000, &quot;AGW&quot;: a} df=pd.DataFrame(source) df </code></pre> <p>However...
<p>Use <a href="https://numpy.org/doc/stable/reference/generated/numpy.hstack.html" rel="nofollow noreferrer"><code>numpy.hstack</code></a> for join 2 numpy arrays:</p> <pre><code>source = {&quot;Genotype&quot;: [&quot;CV1&quot;]*10000 + [&quot;CV2&quot;]*10000, &quot;AGW&quot;: np.hstack((a, b))} df=pd.Data...
How to organize data frame with several variables in Python?
python|pandas|dataframe
0
36
1
71,308,072
71,308,072
2
true
2022-03-01T11:49:52.503Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to organize data frame with several variables in Python?<p>When I organize data frame with 1 variable, it works well.</p> <pre><code>import numpy as np ...
71,313,111
Pandas error "has no attribute sort_values" sorting a dataframe in Python<p>I am using Panda version is 1.3.5 and I am running into an error when I am trying to use the <code>sort_values</code> function.</p> <p><strong>code</strong></p> <pre><code>founded_edvideos_list = find_matching_posts_forupdate(video_id_list, sto...
<p>You're calling <code>pandas.sort_values</code> instead of calling <code>sort_values</code> on an instance of <code>pandas.Dataframe</code>. Your sorting line should likely be:<br /> <code>founded_edvideos_df = founded_edvideos_df.sort_values(by=['post_id'], ascending=True)</code></p>
Pandas error "has no attribute sort_values" sorting a dataframe in Python
python|pandas|dataframe
0
295
1
71,313,148
71,313,148
2
true
2022-03-01T18:33:47.343Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pandas error "has no attribute sort_values" sorting a dataframe in Python<p>I am using Panda version is 1.3.5 and I am running into an error when I am trying...
71,313,394
Why can't I store data with my discord bot?<p>So I set up MySQL for my discord.py bot. I'm planning to do some small project to test myself on my friend server.</p> <p>I want it to count how many messages are sent on a week, but it doesn't work. It gives me this error:</p> <pre><code>Ignoring exception in on_message Tr...
<p><code>message.author</code> returns a <code>discord.Member</code> instance, use <code>str(message.author)</code> instead to cast it to a string.</p>
Why can't I store data with my discord bot?
python|discord.py
0
28
1
71,313,452
71,313,452
2
true
2022-03-01T19:01:39.580Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why can't I store data with my discord bot?<p>So I set up MySQL for my discord.py bot. I'm planning to do some small project to test myself on my friend serv...
71,323,146
Oracle | Update huge table after comparing values with other table<p>I have two huge tables. Let's call them as <code>ITEM</code> table (1807236 records) and <code>ITEM_PROD_DUMP</code> table (796369 records). I need to update two columns (<code>total_volume_amount, total_volume_uom</code>) from <code>ITEM</code> table...
<p>Use a <code>MERGE</code> statement. Pure and simple. 1.8 million records is not a &quot;huge&quot; number of records.</p> <pre><code>merge into item t using ( SELECT * FROM item_prod_dump ipd ) u on ( t.sys_item_id = u.sys_item_id ) when matched then update set t.total_volume_amount = u.total_volume_am...
Oracle | Update huge table after comparing values with other table
oracle|join|sql-update
0
24
1
71,323,226
71,323,226
2
true
2022-03-02T13:01:00.517Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Oracle | Update huge table after comparing values with other table<p>I have two huge tables. Let's call them as <code>ITEM</code> table (1807236 records) and...
71,322,965
Summing class attributes in XAML ListView control<p>I'm pretty new to C# so I've been struggling with this for so long I dont know what i should do...</p> <p>I want to sum 2 (or more) values from my class (<code>sum</code> + <code>interestRate_1</code>) among other calculations and display the results in my respective ...
<p>Welcome to the land of xaml and c# :)</p> <p>The Key Concept of WPF or XAML and C# is MVVM which stands for Model View ViewModel In your example the Cust class would be the Model the XAML with the code behind would be the view. What is missing is the ViewModel. It's the Connection between your Code and your view.</p...
Summing class attributes in XAML ListView control
c#|wpf|xaml|listview|data-binding
0
45
2
71,323,698
71,323,698
2
true
2022-03-02T12:48:04.233Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Summing class attributes in XAML ListView control<p>I'm pretty new to C# so I've been struggling with this for so long I dont know what i should do...</p> <p...
71,321,389
Is there a way of disassembling a Custom Action written originally in managed code?<p>In WiX, when I write a CustomAction in C#, the Visual Studio build first builds a small dll from my C# source code, then combines that small dll with SfxCA.dll, creating the actual file that gets added to the Binary table in the MSI.<...
<p>You can open your *.CA.dll as cab in 7zip and extract all packaged files. Then use the disassembler of your choice to get the code.</p>
Is there a way of disassembling a Custom Action written originally in managed code?
wix
0
36
1
71,323,951
71,323,951
2
true
2022-03-02T10:49:38.273Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is there a way of disassembling a Custom Action written originally in managed code?<p>In WiX, when I write a CustomAction in C#, the Visual Studio build firs...
71,325,379
Create new columns based on previous columns with multiplication<p>I want to create a list of columns where the new columns are based on previous columns times <code>1.5</code>. It will roll until Year 2020. I tried to use previous and current but it didn't work as expected. How can I make it work as expected?</p> <pre...
<p>IIUC you can fix you code with:</p> <pre><code>a = [] for i in range(0, 21): a.append(f'us20{i:02}') for previous, current in zip(a, a[1:]): df[current] = df[previous] * 1.5 </code></pre> <p>Another, vectorial, approach with numpy would be:</p> <pre><code>df2 = (pd.DataFrame(df['us2000'].to_numpy()[:,None]*1...
Create new columns based on previous columns with multiplication
python|pandas
0
38
2
71,325,432
71,325,432
2
true
2022-03-02T15:39:15.257Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Create new columns based on previous columns with multiplication<p>I want to create a list of columns where the new columns are based on previous columns tim...
71,326,496
Integrating COUNT() into a nested MySQL query<p>I have the following nested MYSQL query. Currently, out of the results, I go through and tally the tag appearances to identify the frequency. I've tried to integrate MYSQL's COUNT() into my query but have been unable to.</p> <p>Current query:</p> <pre><code>SELECT tagId ...
<p>You want one result row per tag ID, so group by tag ID. Then count.</p> <pre><code>SELECT tagId, COUNT(*) AS number_of_posts FROM refTags WHERE postId IN (SELECT postId FROM refTags WHERE tagId = 1) AND tagId &lt;&gt; 1 GROUP BY tagId ORDER BY COUNT(*) DESC; </code></pre>
Integrating COUNT() into a nested MySQL query
mysql
0
25
1
71,326,555
71,326,555
2
true
2022-03-02T17:03:46.913Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Integrating COUNT() into a nested MySQL query<p>I have the following nested MYSQL query. Currently, out of the results, I go through and tally the tag appear...
71,326,553
Extract value after specific sequence of string in BigQuery<p>I have the following example of strings in BigQuery:</p> <pre><code>string action_1 plan_id=266 revenue=123.93 action_2 plan_id=057 re...
<p>Consider below</p> <pre><code>select *, regexp_extract(string, r'action_1 .* revenue=([\d.]+)') action_1_revenue from your_table </code></pre> <p>if applied to sample data in your question - output is</p> <p><a href="https://i.stack.imgur.com/MHKhU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur....
Extract value after specific sequence of string in BigQuery
google-bigquery
0
280
1
71,327,321
71,327,321
2
true
2022-03-02T17:08:24.027Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Extract value after specific sequence of string in BigQuery<p>I have the following example of strings in BigQuery:</p> <pre><code>string ...
71,327,314
Pythonic way for returning elements of one list by an order-preserved comparation of two other lists<p>I have three lists: <code>vals1</code>, <code>vals2</code>, and <code>names</code>. <code>names</code> includes only strings and the other two lists (<code>vals1</code>, <code>vals2</code>) contain numbers only. The l...
<p>There's nothing wrong with your method, imo.</p> <p>Alternatively, you could use <code>zip</code> + <code>enumerate</code>:</p> <pre><code>out = [(n, idx, i) for idx, (i, j, n) in enumerate(zip(vals1, vals2, names)) if i!=j] out = out if out else 'equal' </code></pre> <p>If you have Python &gt;=3.8, you can also wri...
Pythonic way for returning elements of one list by an order-preserved comparation of two other lists
python|list|compare
0
34
2
71,327,378
71,327,378
2
true
2022-03-02T18:10:24.083Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pythonic way for returning elements of one list by an order-preserved comparation of two other lists<p>I have three lists: <code>vals1</code>, <code>vals2</c...
71,327,951
Are lists ensured to be processed in order by a for loop?<p>In a Flutter application, is the order of a list always ensured?</p> <pre class="lang-dart prettyprint-override"><code>List&lt;MyClass&gt; myObjects; // ... many add operations int i = 0; for(MyClass myObject in myObjects) { assert(myObject == myObjects[i]);...
<p>Yes. <code>for-in</code> in Dart works on <a href="https://api.dart.dev/stable/dart-core/Iterable-class.html" rel="nofollow noreferrer"><code>Iterable</code></a> objects. (It is not like <code>for-in</code> in JavaScript which iterates over object <em>properties</em>, which could be in some indeterminate order.)</p>...
Are lists ensured to be processed in order by a for loop?
flutter|dart
0
33
1
71,328,068
71,328,068
2
true
2022-03-02T19:07:35.893Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Are lists ensured to be processed in order by a for loop?<p>In a Flutter application, is the order of a list always ensured?</p> <pre class="lang-dart pretty...
71,326,020
Can't load model using GLTFLoader in Vue2<p>I use <code>GLTFLoader</code> to load model to my Vue2 app. I use common Three.js template. <code>GLTFLoader</code> is taken directly from Three.js docs. My example is very easy but even in this case I can't load the model. I have no idea what can be wrong with my code, I can...
<p>so I've fixed the current and subsequent issues in the codesandbox. See here: <a href="https://codesandbox.io/s/vue-2-playground-forked-tlpdi9" rel="nofollow noreferrer">https://codesandbox.io/s/vue-2-playground-forked-tlpdi9</a>.</p> <p>The problems resolved:</p> <ol> <li>You don't have the <code>Home</code> compon...
Can't load model using GLTFLoader in Vue2
javascript|vue.js|vuejs2|three.js
0
39
1
71,328,931
71,328,931
2
true
2022-03-02T16:24:26.973Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can't load model using GLTFLoader in Vue2<p>I use <code>GLTFLoader</code> to load model to my Vue2 app. I use common Three.js template. <code>GLTFLoader</cod...
71,329,764
R: Adding brackground shading for each month in a ggplot graph<p>I am working adding brackground shading for each month in a ggplot graph. My code work fine but I would like to do this task more automatically. example of my code:</p> <pre><code>library(ggplot2) set.seed(1234) n_month &lt;- 26 df &lt;- data.frame( m...
<p>Instead of creating all those year-month variables, I would create a little data frame of dates for the backgrounds:</p> <pre class="lang-r prettyprint-override"><code>rect_df &lt;- data.frame(start = seq(as.Date(&quot;2015-01-01&quot;), length.out = n_month, by = &quot;month&quot;...
R: Adding brackground shading for each month in a ggplot graph
r|ggplot2
0
35
1
71,329,904
71,329,904
2
true
2022-03-02T22:10:18.623Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: R: Adding brackground shading for each month in a ggplot graph<p>I am working adding brackground shading for each month in a ggplot graph. My code work fine ...
71,330,155
Vue 3 Firebase 9 Vuex, in actions get URL of file after uploading to storage<p>Hi I am trying to get the url of an image after uploading to Firebase storage. In the commented code below I show a few things I have tried. I have successfully uploaded an image to Firebase Storage.</p> <pre><code>async uploadAvatar({ state...
<p>You're not returning anything from the top-level code in your <code>uploadAvatar</code> function yet.</p> <pre><code>async uploadAvatar({ state }, { authId, file, filename }) { if (!file) return null authId = authId || state.authId filename = filename || file.name try { const storage = getStorage() c...
Vue 3 Firebase 9 Vuex, in actions get URL of file after uploading to storage
javascript|vuex|firebase-storage|vuejs3
0
265
1
71,330,579
71,330,579
2
true
2022-03-02T22:56:57.413Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Vue 3 Firebase 9 Vuex, in actions get URL of file after uploading to storage<p>Hi I am trying to get the url of an image after uploading to Firebase storage....
71,331,482
How to place multiple pngs on a plot in R?<p>Similar questions have been asked <a href="https://stackoverflow.com/questions/9917049/inserting-an-image-to-ggplot2">here</a> and <a href="https://stackoverflow.com/questions/12633767/how-do-i-overlay-an-image-on-to-a-ggplot">here</a>. However, they don't exactly solve my i...
<p>You can add the annotations in a loop</p> <pre><code>xmin = b$data[[1]]$xmin xmax = b$data[[1]]$xmax ymin = b$data[[1]]$ymin ymax = b$data[[1]]$ymax for (i in seq_len(nrow(data))) { p = p + annotation_custom(g, xmin = xmin[i], xmax = xmax[i], ymin = ymin[i], ymax = ymax[i]) } </cod...
How to place multiple pngs on a plot in R?
r|ggplot2
0
38
1
71,331,550
71,331,550
2
true
2022-03-03T02:35:28.317Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to place multiple pngs on a plot in R?<p>Similar questions have been asked <a href="https://stackoverflow.com/questions/9917049/inserting-an-image-to-ggp...
71,333,817
SQL Query like Condition not working as expected<p>I have a query in SQL Server and have values like that is enclosed in the quote. I am trying to filter the value which has <code>CC_</code> somewhere in the string. In the query when I try to filter the values using <code>%CC_%</code>, it is still returning the values ...
<p>To match literal underscore in a SQL Server <code>LIKE</code> expression, you may place it into square brackets:</p> <pre class="lang-sql prettyprint-override"><code>SELECT * FROM a WHERE val LIKE '%CC[_]%'; </code></pre> <p>Underscore <code>_</code> in a <code>LIKE</code> expression literally means any single chara...
SQL Query like Condition not working as expected
sql|sql-server
0
42
1
71,333,869
71,333,869
2
true
2022-03-03T08:02:05.263Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: SQL Query like Condition not working as expected<p>I have a query in SQL Server and have values like that is enclosed in the quote. I am trying to filter the...
71,335,684
Replace dataframe entries elementwise conditionally using negated %in%<p><strong>I would like to replace entries in a dataframe elementwise on the condition that they <em>do not</em> belong to a set of valid possible entries.</strong> This is because the other (string) entries in the dataframe are not known ahead of ti...
<p>You might need to apply over the columns:</p> <pre class="lang-r prettyprint-override"><code>df[apply(df, 2, \(x) !x %in% valid_entries)] &lt;- NA </code></pre> <p>output</p> <pre class="lang-r prettyprint-override"><code>&gt; head(df) A B 1 BAD GOOD 2 GOOD &lt;NA&gt; 3 &lt;NA&gt; GOOD 4 GOOD BAD 5 GOOD GO...
Replace dataframe entries elementwise conditionally using negated %in%
r|dataframe
0
38
3
71,335,886
71,335,886
2
true
2022-03-03T10:35:18.647Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Replace dataframe entries elementwise conditionally using negated %in%<p><strong>I would like to replace entries in a dataframe elementwise on the condition ...
71,344,302
Predict values from model stored in a column<p>I have a large dataset (subset below) where I need to fit models to each subset of data (grouped by several factors: Round, Level, Temp), and then plot both the model fits and confidence intervals. The predict function works fine when the model is stored to a variable, rat...
<p>You can use the <code>{broom}</code> package, the <code>tidy()</code> function. With the argument <code>conf.int = TRUE</code> returns by default the 95% confidence interval. Check the function help if you want to change the conf.level to another value</p> <pre><code>c&lt;- b %&gt;% filter(!is.na(Round)) %&gt;% d...
Predict values from model stored in a column
r|purrr
0
45
1
71,344,618
71,344,618
2
true
2022-03-03T21:57:44.877Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Predict values from model stored in a column<p>I have a large dataset (subset below) where I need to fit models to each subset of data (grouped by several fa...
71,344,909
Pulling image from AWS ECR repository without AWS credentials<p>I need to pull docker images from on premise. However, I don't have access to AWS keys to be able to perform such an action against a private repository. How can I pull ECR images without AWS authentication? I've noticed ECR public repository, however, I s...
<p>Yes, you can authenticate temporarily. As document pointed;</p> <pre><code>You can use temporary security credentials to make programmatic requests for AWS resources using the AWS CLI or AWS API (using the AWS SDKs). The temporary credentials provide the same permissions as long-term security credentials, such as IA...
Pulling image from AWS ECR repository without AWS credentials
amazon-web-services
0
521
1
71,345,109
71,345,109
2
true
2022-03-03T23:18:37.713Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pulling image from AWS ECR repository without AWS credentials<p>I need to pull docker images from on premise. However, I don't have access to AWS keys to be ...
71,346,021
Invalid value at 'requests[0].update_cells.range' (type.googleapis.com/google.apps.sheets.v4.GridRange)<p>I'm trying to set the background of a single specific cell in column C via the NodeJS Google Sheets library. However, I am receiving this error</p> <pre><code>errors: [ { message: `Invalid value at 'reque...
<p>In your script, the UpdateCellsRequest of batchUpdate method is used. In this case, the range is the gridRange which is not A1Notation. I think that this is the reason of your issue.</p> <h3>Modified script:</h3> <p>In this case, please use the sheet ID of the sheet of &quot;Question of the day&quot; to <code>gridRa...
Invalid value at 'requests[0].update_cells.range' (type.googleapis.com/google.apps.sheets.v4.GridRange)
node.js|google-sheets
0
44
1
71,346,127
71,346,127
2
true
2022-03-04T02:37:48.820Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Invalid value at 'requests[0].update_cells.range' (type.googleapis.com/google.apps.sheets.v4.GridRange)<p>I'm trying to set the background of a single specif...
71,346,040
Flutter change text color on active ExpensionTile<p>How to change ExpensionTile text color on active?</p> <p><a href="https://i.stack.imgur.com/b6l0x.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/b6l0x.png" alt="enter image description here" /></a></p> <p>This is the ExpensionTile I'm trying to cha...
<p>To set change the text color of the <a href="https://api.flutter.dev/flutter/material/ExpansionTile-class.html" rel="nofollow noreferrer"><code>ExpansionTile()</code></a>, you can use the <a href="https://api.flutter.dev/flutter/material/ExpansionTile/textColor.html" rel="nofollow noreferrer"><code>textColor</code><...
Flutter change text color on active ExpensionTile
flutter|flutter-layout
0
27
1
71,346,349
71,346,349
2
true
2022-03-04T02:40:20.737Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Flutter change text color on active ExpensionTile<p>How to change ExpensionTile text color on active?</p> <p><a href="https://i.stack.imgur.com/b6l0x.png" re...
71,347,589
how do I allow free usage of enum and enum class member?<pre><code>enum class A { ORANGE, APPLE }; ... {// workspace brackets if(B == ORANGE){...} // use it like this }// end of workspace </code></pre> <p>instead of keep using <code>B==A::ORANGE</code>, what can I do to make it like <code>B==ORANGE</code> within...
<p>You can only do this in c++ 20 onwards with <code>using enum A</code></p> <pre><code>enum class foo { a, b, c }; int main() { { using enum foo; foo f = b; } { //foo f = b; // does not compile } } </code></pre>
how do I allow free usage of enum and enum class member?
c++
0
39
1
71,347,625
71,347,625
2
true
2022-03-04T06:54:58.187Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how do I allow free usage of enum and enum class member?<pre><code>enum class A { ORANGE, APPLE }; ... {// workspace brackets if(B == ORANGE){...} // ...
71,349,963
Which C++ random number distribution to use for the Java skip list generator?<p>The Java <code>ConcurrentSkipListMap</code> class contains a method <code>randomLevel</code> that outputs the following, according to <em>The Art of Multiprocessor Programming</em>:</p> <blockquote> <p>The <code>randomLevel()</code> method ...
<blockquote> <p>This <em>looks</em> like a <a href="https://en.cppreference.com/w/cpp/numeric/random/geometric_distribution" rel="nofollow noreferrer">geometric distribution</a>, but not quite.</p> </blockquote> <p>You are right, but problem is only probability of <code>0</code>. Note that you can use <code>std::geomet...
Which C++ random number distribution to use for the Java skip list generator?
c++|random
0
44
1
71,350,560
71,350,560
2
true
2022-03-04T10:23:57.270Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Which C++ random number distribution to use for the Java skip list generator?<p>The Java <code>ConcurrentSkipListMap</code> class contains a method <code>ran...
71,350,494
R: How can I retain the 2-3 last rows within the same IDs when the values in a column are the same in longitudinal data?<p>Using R, I would like to select the last rows within the same IDs for longitudinal data. However, I would like to keep 2-3 last rows within the same IDs when values in the time column are the same ...
<p>You can <code>group_by</code> <code>dx</code> as well and use <code>slice_tail</code>:</p> <pre class="lang-r prettyprint-override"><code>dat %&gt;% group_by(id, dx) %&gt;% slice_tail(n = 1) # A tibble: 6 x 4 # Groups: id, dx [6] id time dx code &lt;int&gt; &lt;int&gt; &lt;chr&gt; &lt;ch...
R: How can I retain the 2-3 last rows within the same IDs when the values in a column are the same in longitudinal data?
r|if-statement|select|longitudinal
0
33
1
71,350,646
71,350,646
2
true
2022-03-04T11:03:32.133Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: R: How can I retain the 2-3 last rows within the same IDs when the values in a column are the same in longitudinal data?<p>Using R, I would like to select th...
71,352,151
How to access items metadata in Stripe checkout session<p>When I create a Checkout session, I am creating prices on the fly with <code>price_data</code> and <code>product_data</code> properties. For each item, I am putting metadata in the <code>product_data.metadata</code> property.</p> <p>After payment is successfully...
<p>When creating the items on the fly, metadata ends up in the <strong>product</strong> property, and not in the <strong>price</strong> property.</p> <p>So I solved the issue with expanding the items with product data:</p> <pre class="lang-js prettyprint-override"><code>const line_items = await stripe.checkout.sessions...
How to access items metadata in Stripe checkout session
javascript|node.js|express|stripe-payments
0
299
1
71,352,601
71,352,601
2
true
2022-03-04T13:29:34.807Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to access items metadata in Stripe checkout session<p>When I create a Checkout session, I am creating prices on the fly with <code>price_data</code> and ...
71,354,109
How to Eliminate FOR Loop with the extraction of each value from <class 'pandas.core.series.Series'><p>Unable to Extract correct values from Pandas Series to use in np.select Function as default value. # With For Loop: Getting Perfect values in column &quot;C&quot; [&quot;No&quot;,&quot;No&quot;,4,4,4,4,4,4]</p> <pre><...
<p>You code is equivalent to:</p> <pre><code>m1 = df['A'].shift(1).eq('No') # previous row is No m2 = df['A'].isin(['Min', 'Max']) # current row is Min or Max # take B if both masks / ffill / replace NaN with original C df['C'] = df['B'].where(m1&amp;m2).ffill().fillna(df['C']) </code></pre> <p>output:</p> ...
How to Eliminate FOR Loop with the extraction of each value from <class 'pandas.core.series.Series'>
python|pandas|numpy|vector
0
31
1
71,354,284
71,354,284
2
true
2022-03-04T16:08:47.083Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to Eliminate FOR Loop with the extraction of each value from <class 'pandas.core.series.Series'><p>Unable to Extract correct values from Pandas Series to...
71,355,081
Cannot initialize firebase on android - Cannot use this MethodChannel before the binary messenger has been initialized<p>I've created a flutter app with the skeleton template and I'm trying to test out some basic firestore features. I've followed the flutter fire docs and if I deploy the app to the web it works perfect...
<p>I use <code>WidgetsFlutterBinding.ensureInitialized();</code> with parenthesis in my code. Maybe the missing parenthesis are the cause of your problem ?</p>
Cannot initialize firebase on android - Cannot use this MethodChannel before the binary messenger has been initialized
firebase|flutter
0
265
1
71,355,381
71,355,381
2
true
2022-03-04T17:26:24.533Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Cannot initialize firebase on android - Cannot use this MethodChannel before the binary messenger has been initialized<p>I've created a flutter app with the ...
71,358,771
flutter await does not wait in initState<p>I'm new to flutter , so i'm not sure my way of coding is correct.</p> <p>I'm trying to get data from firebase , and want to load it in initState(). But, it can not wait. whlie the process is in await, it starts to build. How can I load data before build. Thanks</p> <p>These ar...
<p>You shouldn't be holding off the <strong>initState</strong> method. This message straight from a Flutter error says it all: &quot;the <strong>initState</strong> method must be a void method without an async keyword; rather than waiting on asynchronous work directly inside of <strong>initState</strong>, just call a ...
flutter await does not wait in initState
flutter|async-await
0
287
1
71,358,962
71,358,962
2
true
2022-03-05T01:25:27.720Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: flutter await does not wait in initState<p>I'm new to flutter , so i'm not sure my way of coding is correct.</p> <p>I'm trying to get data from firebase , an...
71,358,702
Prevent IHP RunDevServer from automatically opening a window or tab<p>Is there a way to start the server without it automatically opening a tab? Something similar to <code>webpack serve --no-open</code></p>
<p>You can set the <code>IHP_BROWSER</code> environment variable to <code>echo</code> before running the dev server:</p> <pre class="lang-sh prettyprint-override"><code>export IHP_BROWSER=echo ./start </code></pre> <p>This is described in the IHP recipes:</p> <p><a href="https://ihp.digitallyinduced.com/Guide/recipes.h...
Prevent IHP RunDevServer from automatically opening a window or tab
ihp
0
28
2
71,359,192
71,359,192
2
true
2022-03-05T01:10:35.290Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Prevent IHP RunDevServer from automatically opening a window or tab<p>Is there a way to start the server without it automatically opening a tab? Something si...
71,359,308
How to replace every underscore after first with '/'<p>I have a data frame with one column of values:</p> <pre><code>df1$V1 = c(&quot;5325_214424&quot;, &quot;63325_685_2436&quot;, &quot;573_636&quot;, &quot;5754_23523_214235&quot;, &quot;5634_777_19_101&quot;) </code></pre> <p>I would like to keep only the first under...
<p>Here are two approaches -</p> <ol> <li>Split the string on <code>_</code> and paste the values back except 1st one with <code>/</code>.</li> </ol> <pre><code>x &lt;- c(&quot;5325_214424&quot;, &quot;63325_685_2436&quot;, &quot;573_636&quot;, &quot;5754_23523_214235&quot;, &quot;5634_777_19_101&quot;) sapply...
How to replace every underscore after first with '/'
r
0
30
1
71,359,354
71,359,354
2
true
2022-03-05T03:45:00.670Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to replace every underscore after first with '/'<p>I have a data frame with one column of values:</p> <pre><code>df1$V1 = c(&quot;5325_214424&quot;, &quo...
71,359,610
Templating a Derived class of a Base class that is already templated<p>I get the compiler error &quot;Use of undeclared identifier '_storage'&quot;</p> <pre><code>#include &lt;iostream&gt; struct Storage{ int t; }; struct DerivedStorage : Storage{ int s; }; struct DerivedStorage2 : DerivedStorage{ int r;...
<p>Because <code>Derived</code> itself does not have a member variable named <code>_storage</code>, use <code>this-&gt;_storage</code> to access <code>Base</code>'s <code>_storage</code> instead.</p> <pre><code>void m2(){ this-&gt;_storage-&gt;s++; } </code></pre> <p><a href="https://godbolt.org/z/o7z7EGaEf" rel="nof...
Templating a Derived class of a Base class that is already templated
c++|c++11
0
34
1
71,359,664
71,359,664
2
true
2022-03-05T04:54:23.387Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Templating a Derived class of a Base class that is already templated<p>I get the compiler error &quot;Use of undeclared identifier '_storage'&quot;</p> <pre>...
71,361,008
Conditionally change record in update<p>I would like to have some logic worked upon the <code>Msg</code> and, depending on the result, <code>update</code> the view in a different ways.</p> <p>I'm flipping some cards, and I want to test two of the selected ones. Then, accept them as a pair or discard and try again.</p> ...
<p>The record update syntax doesn't work like that.</p> <p>You can do the following.</p> <pre><code>update : Msg -&gt; Model -&gt; Model update msg model = case msg of ClickedCard data -&gt; let newModel = { model | activeCard = data.id } in if List.leng...
Conditionally change record in update
elm
0
44
1
71,361,105
71,361,105
2
true
2022-03-05T09:26:15.657Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Conditionally change record in update<p>I would like to have some logic worked upon the <code>Msg</code> and, depending on the result, <code>update</code> th...
71,364,517
Not able to clear the content of a cell<p>I want to set a value to cell X58 as then wait for 10 seconds and delete the cell value.</p> <p>Issue = only value is getting set..</p> <p>Here is the part of my code</p> <pre><code>function a(){ var spreadsheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Course');...
<p><code>clearContent</code> should be <code>clearContent()</code></p> <p>And you have one too many brackets in your code</p> <pre><code>function a() { var spreadsheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Sheet0'); spreadsheet.getRange('A1').setValue('Hooray! Event is added to your calendar'); ...
Not able to clear the content of a cell
google-apps-script|google-sheets
0
32
1
71,364,569
71,364,569
2
true
2022-03-05T17:46:59.757Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Not able to clear the content of a cell<p>I want to set a value to cell X58 as then wait for 10 seconds and delete the cell value.</p> <p>Issue = only value ...
71,366,061
Rcloud vs Rstudio bug<p>Rcloud:</p> <pre><code>&gt; y &lt;- c(8,7,7,2,4,7,4,5,3,4,7,10,6,6,5,8,5,8,7,4,2,7,5,7,8,4,6,7,9,8,6,4,2,1,4,3,5,2,5,5) &gt; a &lt;- factor(rep(c(&quot;Drug A&quot;,&quot;Drug B&quot;,&quot;Drug C&quot;,&quot;Drug D&quot;), each=10)) &gt; dat &lt;- data.frame(x=a, y=y) &gt; fit&lt;−lm(y~a-1, dat...
<p>The <code>-</code> in your fit statement is a different character. RStudio complains about this if I copy your text, but still interprets it as <code>&lt;-</code>. I guess Rcloud is less forgiving.</p> <p><a href="https://i.stack.imgur.com/un7bd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/un7b...
Rcloud vs Rstudio bug
r|rstudio
0
34
1
71,366,215
71,366,215
2
true
2022-03-05T21:26:52.293Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Rcloud vs Rstudio bug<p>Rcloud:</p> <pre><code>&gt; y &lt;- c(8,7,7,2,4,7,4,5,3,4,7,10,6,6,5,8,5,8,7,4,2,7,5,7,8,4,6,7,9,8,6,4,2,1,4,3,5,2,5,5) &gt; a &lt;- ...
71,371,164
Extracting chosen information from URL results into a dataframe<p>I would like to create a dataframe by pulling only certain information from this website.</p> <p><a href="https://www.stockrover.com/build/production/Research/tail.js?1644930560" rel="nofollow noreferrer">https://www.stockrover.com/build/production/Resea...
<p>Use regex to extract the details followed by <a href="https://docs.python.org/3/library/ast.html#ast.literal_eval" rel="nofollow noreferrer"><code>literal_eval</code></a> to convert string to python object</p> <pre><code>import re from ast import literal_eval import pandas as pd import requests url = &quot;https:/...
Extracting chosen information from URL results into a dataframe
python|pandas
0
19
1
71,371,337
71,371,337
2
true
2022-03-06T14:29:32.773Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Extracting chosen information from URL results into a dataframe<p>I would like to create a dataframe by pulling only certain information from this website.</...
71,371,826
useState acting strange<p>I'm using this code to get a random number in the range of min-max. for some reason, I get numbers that are bigger than max. (the console.log shows that the min and max are set correctly.) (I'm showing here the relevant code. this is not the whole file.)</p> <pre><code>const RandomNumber = () ...
<p>I think you need to convert your <code>e.target.value</code> in <code>setMax</code> and <code>setMin</code> to number</p> <pre><code>e.target.value &amp;&amp; !isNaN(e.target.value) &amp;&amp; setMax(Number(e.target.value)) </code></pre> <p>Similar for <code>setMin</code></p> <pre><code>e.target.value &amp;&amp; !is...
useState acting strange
reactjs|use-state
0
25
2
71,371,936
71,371,936
2
true
2022-03-06T15:49:45.587Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: useState acting strange<p>I'm using this code to get a random number in the range of min-max. for some reason, I get numbers that are bigger than max. (the c...
71,370,356
Obtain Spotify API OAuth 2.0 token with PHP<p>I am trying to obtain a <code>OAuth 2.0</code> token for the Spotify API using the following guide: <a href="https://developer.spotify.com/documentation/general/guides/authorization/client-credentials/" rel="nofollow noreferrer">https://developer.spotify.com/documentation/g...
<p>You are json encoding the form fields, you should build a query parameter.</p> <pre class="lang-php prettyprint-override"><code>curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([ 'grant_type' =&gt; 'client_credentials' ])); </code></pre>
Obtain Spotify API OAuth 2.0 token with PHP
php|curl|oauth-2.0|spotify
0
257
1
71,373,030
71,373,030
2
true
2022-03-06T12:40:31.143Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Obtain Spotify API OAuth 2.0 token with PHP<p>I am trying to obtain a <code>OAuth 2.0</code> token for the Spotify API using the following guide: <a href="ht...
71,376,172
SQL, how to get the rows under the same Id if columnA in current row or columnB in following has data<p>Imaging the original data is as the table below, I'd like to return the rows for Id 1 and 3. Because for the rows of Id 1, it has data in CodeA in one row, and another row has data for CodeB. For Id 3, it has data in...
<p>We could use <code>MAX()</code> here as an analytic function:</p> <pre class="lang-sql prettyprint-override"><code>WITH cte AS ( SELECT *, MAX(CodeA) OVER (PARTITION BY Id) AS MaxCodeA, MAX(CodeB) OVER (PARTITION BY Id) AS MaxCodeB FROM yourTable ) SELECT Id, [Group], CodeA, CodeB FROM cte WHE...
SQL, how to get the rows under the same Id if columnA in current row or columnB in following has data
sql|sql-server
0
30
1
71,376,194
71,376,194
2
true
2022-03-07T03:37:46.080Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: SQL, how to get the rows under the same Id if columnA in current row or columnB in following has data<p>Imaging the original data is as the table below, I'd ...
71,377,403
Stuck on writing a print function to convert and print binary to decimal with syscalls on NASM for x86-64 Linux system<p>I'm still new to assembly code on NASM for x86-64 Linux system and I'm trying to write a program which converts the number stored in rdi to decimal so it can be printed. I'm unsure how to write a pr...
<p>There are so many parts in your code that I want to change, but here is a minimal fix to just make your code work.</p> <p>Below</p> <pre><code>mov r10, 10 </code></pre> <p>add</p> <pre><code>mov r15, 9 </code></pre> <p>Erase</p> <pre><code>add r15, rdx cmp rax, 1 jnle convert </code></pre> <p>and change it to</p> <p...
Stuck on writing a print function to convert and print binary to decimal with syscalls on NASM for x86-64 Linux system
linux|assembly|decimal|x86-64|nasm
0
43
1
71,377,705
71,377,705
2
true
2022-03-07T06:55:47.723Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Stuck on writing a print function to convert and print binary to decimal with syscalls on NASM for x86-64 Linux system<p>I'm still new to assembly code on N...
71,377,803
Can I keep a particular value in dplyr if it contradicts my filter conditions?<p>I am trying to filter out all introduced plant species (Native = N) from my data, except one (Cenchrus ciliaris).</p> <p><strong>Example data:</strong></p> <pre><code>Example &lt;- data.frame(Site = c('Q1','Q1','Q1','Q1','Q2','Q2','Q2','Q2...
<p>How about the following:</p> <pre><code>filter(Native==&quot;Y&quot; | Taxon ==&quot;Cenchrus ciliaris&quot;) </code></pre>
Can I keep a particular value in dplyr if it contradicts my filter conditions?
dplyr|filter|conditional-formatting
0
18
1
71,377,899
71,377,899
2
true
2022-03-07T07:45:03.550Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can I keep a particular value in dplyr if it contradicts my filter conditions?<p>I am trying to filter out all introduced plant species (Native = N) from my ...
71,383,398
how can i save the dark mode state in react<p>I am wondering how I can save the state of dark mode in my components so I can use it without getting the initialized value over and over again when i navigate different pages. this is the code :</p> <pre><code>class Toggle extends React.Component { constructor(props) {...
<p>I would go take a look at React Context, themeing is a prime use case for it <a href="https://reactjs.org/docs/context.html#dynamic-context" rel="nofollow noreferrer">https://reactjs.org/docs/context.html#dynamic-context</a></p>
how can i save the dark mode state in react
javascript|reactjs
0
40
1
71,383,446
71,383,446
2
true
2022-03-07T15:27:45.193Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how can i save the dark mode state in react<p>I am wondering how I can save the state of dark mode in my components so I can use it without getting the initi...
71,384,930
CMake- what is the difference between 'target_link_options(.. -lgcov)' and 'target_link_libraries(...gcov)'?<p>I'm trying to build a library with code coverage enabled like so:</p> <pre><code> add_library(my_library my_lib.cpp) target_compile_options(my_library PRIVATE --coverage) target_link_options(my_libr...
<p>The answer is right there, in the <a href="https://cmake.org/cmake/help/latest/command/target_link_options.html" rel="nofollow noreferrer">docs</a>:</p> <blockquote> <p>Note This command cannot be used to add options for static library targets, since they do not use a linker. To add archiver or MSVC librarian flags,...
CMake- what is the difference between 'target_link_options(.. -lgcov)' and 'target_link_libraries(...gcov)'?
c++|cmake|gcov
0
278
1
71,385,141
71,385,141
2
true
2022-03-07T17:21:07.790Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: CMake- what is the difference between 'target_link_options(.. -lgcov)' and 'target_link_libraries(...gcov)'?<p>I'm trying to build a library with code covera...
71,383,875
How to pass workflow.Context to the Cadence activity<p>I would like to put <code>workflow.Sleep</code> call in one of my Cadence activities to be able to test it properly (and simulate error result coming from <code>Sleep</code> function).</p> <p>Two important things which I noticed before implementing:</p> <ul> <li><c...
<blockquote> <p>Is it possible to use workflow.Sleep inside any activity?</p> </blockquote> <p>No, it's NOT allowed to use <code>workflow.Sleep</code> in activity code.</p> <p><code>Workflow.Sleep</code> is only allowed in workflow code. More general, all the APIs in <code>workflow</code> package are ONLY allowed in wo...
How to pass workflow.Context to the Cadence activity
go|cadence-workflow|uber-cadence
0
282
1
71,385,531
71,385,531
2
true
2022-03-07T16:00:47.323Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to pass workflow.Context to the Cadence activity<p>I would like to put <code>workflow.Sleep</code> call in one of my Cadence activities to be able to tes...
71,385,388
edit sack() value depending on path<p>I have three paths leading to two goals. All edges have a different strength and I collect them with sack(). I want to weigh some of the paths more heavily than the others (independent of the edge strength). in this sample: the paths via an 'important' vertex, should have a factor ...
<p>You can multiply the sack in the important/unimportant path by the constant.</p> <pre><code>gremlin&gt; g.withSack(1.0f).V('v0').union( ......1&gt; outE().has('weight').sack(mult).by('weight') ......2&gt; .inV().hasLabel('important') ......3&gt; .outE().has('weight').sack(mult).by('weight') ....
edit sack() value depending on path
graph|gremlin|tinkerpop|amazon-neptune|tinkerpop3
0
22
1
71,385,735
71,385,735
2
true
2022-03-07T17:59:59.950Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: edit sack() value depending on path<p>I have three paths leading to two goals. All edges have a different strength and I collect them with sack(). I want to ...
71,385,601
Inferring a second type with a default<p>Can I define a function generic over two types, one of which has a default, in such a way that the default gets inferred from the usage of the function if I specify the first type?</p> <p>Example:</p> <pre class="lang-js prettyprint-override"><code>const f = &lt;T, N extends num...
<p>Not possible currently.</p> <p>You cannot partially infer generic parameters as of Typescript 4.6.2. That means that are either all inferred from usage, or all explicit.</p> <p>See this github issue: <a href="https://github.com/microsoft/TypeScript/issues/10571" rel="nofollow noreferrer">https://github.com/microsoft...
Inferring a second type with a default
typescript|types
0
27
1
71,385,779
71,385,779
2
true
2022-03-07T18:20:51.197Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Inferring a second type with a default<p>Can I define a function generic over two types, one of which has a default, in such a way that the default gets infe...
71,386,817
How to add uris to post request in javascript<p>I can't seem to figure out how to add uris to a post request like in this api request: <a href="https://developer.spotify.com/console/post-playlist-tracks/?playlist_id=3cEYpjA9oz9GiPac4AsH4n&amp;position=&amp;uris=spotify%3Atrack%3A4iV5W9uYEdYUVa79Axb7Rh%2Cspotify%3Atrack...
<p>Based on this doc: <a href="https://developer.spotify.com/documentation/web-api/reference/#/operations/add-tracks-to-playlist" rel="nofollow noreferrer">https://developer.spotify.com/documentation/web-api/reference/#/operations/add-tracks-to-playlist</a></p> <p>It looks like you have the format of the body wrong. It...
How to add uris to post request in javascript
javascript|rest|post|next.js
0
22
1
71,386,903
71,386,903
2
true
2022-03-07T20:20:15.270Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to add uris to post request in javascript<p>I can't seem to figure out how to add uris to a post request like in this api request: <a href="https://devel...
71,387,005
clean up object lead to lost of 0 value<p>I came across a list of data operations and lost value of [0].</p> <p>I could not find out why. it's good if I change value to [1], but if i put value [0], then it's gone.</p> <p>Here is the code:</p> <pre><code>let data = { title:&quot;hello world&quot;, value: [0] } let s...
<p>When <code>obj[k]</code> is <code>0</code>, <code>delete obj[k]</code> is being executed because in the expression:</p> <pre><code>(obj[k] &amp;&amp; typeof obj[k] === 'object') &amp;&amp; removeNull(obj[k]) || (typeof obj[k] !== 'boolean' &amp;&amp; !obj[k] &amp;&amp; obj[k] !== undefined) &amp;&amp; delete o...
clean up object lead to lost of 0 value
javascript
0
45
3
71,387,281
71,387,281
2
true
2022-03-07T20:40:53.357Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: clean up object lead to lost of 0 value<p>I came across a list of data operations and lost value of [0].</p> <p>I could not find out why. it's good if I chan...
71,386,990
format all textfields the same in flutter<p>I'm trying to learn Flutter. I have the below TextField setup as I would like it, I could copy and paste all the settings/properties for each TextField in the app, however is there a better way to make all of the TextFields have the same setting/properties?</p> <pre><code> ...
<p>Of course and basically, this is the main idea behind Flutter - you are building reusable components (widgets) and later use them to build your app.</p> <ol> <li><p>Identify what properties of your <code>TextField</code> should change. E.g. let's consider (from your example) that could be <code>labelText</code> and ...
format all textfields the same in flutter
flutter|flutter-layout|textfield
0
43
1
71,387,303
71,387,303
2
true
2022-03-07T20:38:45.377Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: format all textfields the same in flutter<p>I'm trying to learn Flutter. I have the below TextField setup as I would like it, I could copy and paste all the ...
71,387,599
HttpDeleteAttribute decorator, valid template? C#<p>Is the next template route valid?</p> <pre><code>[HttpDelete(&quot;withdrawal/client/{clientId}/dni/{dni}?catalogNumber={catalogNumber}&amp;warehouse={warehouseId}&quot;)] </code></pre> <p>I receive an exception, with the next description:</p> <pre class="lang-yaml pr...
<p>Instead of including the query params in the string literal you can specify them in the function declaration</p> <pre><code>[HttpDelete(&quot;withdrawal/client/{clientId}/dni/{dni}&quot;)] public void Foo([FromQuery] string catalogNumber, [FromQuery] string warehouseId) { ... } </code></pre>
HttpDeleteAttribute decorator, valid template? C#
c#|.net|asp.net-web-api
0
44
2
71,387,930
71,387,930
2
true
2022-03-07T21:43:25.257Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: HttpDeleteAttribute decorator, valid template? C#<p>Is the next template route valid?</p> <pre><code>[HttpDelete(&quot;withdrawal/client/{clientId}/dni/{dni}...
71,389,496
location.href load on the current page/previous url<p>i have the following jquery for onclick code :</p> <pre><code>function find(){ $.ajax({ type: &quot;post&quot;, url: link + 'register/data', data: {}, success: function () { window.location.href= &quot;mycontroller/myfunction&quot; } }); ...
<p>Let's pretend you're on <code>http://example.com</code>. You redirect the page to <code>&quot;test&quot;</code>, so now you're on <code>http://example.com/test</code>. Now you redirect to <code>&quot;test&quot;</code> again. Uh oh, now you're on <code>http://example.com/test/test</code>. Didn't want that to happen, ...
location.href load on the current page/previous url
javascript|jquery
0
300
2
71,389,678
71,389,678
2
true
2022-03-08T02:50:54.220Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: location.href load on the current page/previous url<p>i have the following jquery for onclick code :</p> <pre><code>function find(){ $.ajax({ type: &quot...
71,392,725
Importing Excel list where every cell is a individual List python, 2d to 3d list<p>I have a CSV Excel file with a lot of rows. When I import it with csv.reader it converts it into a 2D-List where every Row is a single list. How do you break open those and convert every cell to a single list.</p> <p>My Input:</p> <pre><...
<p>I can't tell if your lists there are lists or strings since you have semi-columns delimiting them. Under the assumption they are a string you can use</p> <pre class="lang-py prettyprint-override"><code>example = [&quot;1;2;3&quot;,&quot;Hello;How;areyou&quot;,&quot;test;1;2&quot;,&quot;4;5;6&quot;] desired = [[[elm]...
Importing Excel list where every cell is a individual List python, 2d to 3d list
python|csv|3d|2d|import-csv
0
45
1
71,392,998
71,392,998
2
true
2022-03-08T09:30:05.400Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Importing Excel list where every cell is a individual List python, 2d to 3d list<p>I have a CSV Excel file with a lot of rows. When I import it with csv.read...
71,393,640
How can I list the objects (views, mostly) I updated in the last 2 weeks in Oracle?<p>I ran this:</p> <pre><code>SELECT * FROM sys.all_views where view_name like 'V%DIMFE%' </code></pre> <p>but I would like to have the 'last changed' date. is that possible ? (I don't have DBA permissions, but I guess I could ask a col...
<pre><code>select last_ddl_time from all_objects where object_type = 'VIEW' </code></pre> <p>should give the hint</p>
How can I list the objects (views, mostly) I updated in the last 2 weeks in Oracle?
oracle
0
23
2
71,393,660
71,393,660
2
true
2022-03-08T10:41:24.993Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I list the objects (views, mostly) I updated in the last 2 weeks in Oracle?<p>I ran this:</p> <pre><code>SELECT * FROM sys.all_views where view_name...
71,395,834
Use an array as a reference for initials/shortcuts<p>I've got datas from an external source that uses initials to refer to specific type of data</p> <div class="s-table-container"> <table class="s-table"> <thead> <tr> <th>Initial</th> <th>Value</th> </tr> </thead> <tbody> <tr> <td>A</td> <td>Attelé</td> </tr> <tr> <td>...
<p>Can you not just put the data in an object</p> <pre><code>const names = { &quot;a&quot;: &quot;Attelé&quot;, &quot;b&quot;: &quot;Base&quot; } </code></pre> <p>and then access the data by using</p> <pre><code>names[&quot;a&quot;] </code></pre>
Use an array as a reference for initials/shortcuts
javascript|optimization|conditional-statements
0
22
1
71,395,888
71,395,888
2
true
2022-03-08T13:26:51.267Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Use an array as a reference for initials/shortcuts<p>I've got datas from an external source that uses initials to refer to specific type of data</p> <div cla...
71,396,652
How to transpose and condense pandas dataframe<p>I have a dataframe (<code>df</code>) as follows:</p> <pre class="lang-py prettyprint-override"><code>import pandas as pd pd.DataFrame( { &quot;Query Strain&quot;: {0: &quot;YAL001C&quot;, 1: &quot;YAL001C&quot;, 2: &quot;YAL001C&quot;, 3: &quot;YAL001C&quot;...
<p>Try with <code>pivot</code>:</p> <pre><code>output = (df.pivot(&quot;Query Strain&quot;, &quot;Array Strain ID&quot;, &quot;Genetic interaction score (ε)&quot;) .rename_axis(None, axis=1)) &gt;&gt;&gt; output YBL026W_tsa1065 YBR123C_tsa568 ... YBR...
How to transpose and condense pandas dataframe
python|python-3.x|pandas|dataframe|numpy
0
27
1
71,396,703
71,396,703
2
true
2022-03-08T14:28:07.920Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to transpose and condense pandas dataframe<p>I have a dataframe (<code>df</code>) as follows:</p> <pre class="lang-py prettyprint-override"><code>import ...
71,396,485
Creating a unique array in awk: can this snippet be elaborated?<p><a href="https://stackoverflow.com/a/60157991/1068046">Thanks</a> to @EdMorton, I can unique an array in awk this way:</p> <pre><code>BEGIN { # create an array # here, I create an array from a string, but other approaches are possible, too s...
<p>Hope this is clearer but idk - best I can say is it's more elaborate as requested!</p> <pre><code>$ cat tst.awk BEGIN { # create an array # here, I create an array from a string, but other approaches are possible, too split(&quot;a b c d e a b&quot;, array) # unique it for (i=1; i in array; i++)...
Creating a unique array in awk: can this snippet be elaborated?
arrays|awk
0
45
2
71,396,741
71,396,741
2
true
2022-03-08T14:15:57.237Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Creating a unique array in awk: can this snippet be elaborated?<p><a href="https://stackoverflow.com/a/60157991/1068046">Thanks</a> to @EdMorton, I can uniqu...
71,398,103
How to write custom excetion for Mutilple exceptions in java?<p>I am using smtp api which throws MessageException and IOException</p> <p>But in our application, we need to have wrapper exception for both.</p> <p>Is it possible to write wrapper exception for this? like custom exception?</p>
<p>Sure. Exceptions just are, and can wrap anything; you don't need to write them as specifically wrapping only IOException or MessageExceptions.</p> <pre class="lang-java prettyprint-override"><code>public class MyCustomException extends Exception { public MyCustomException(String msg) { super(msg); } publi...
How to write custom excetion for Mutilple exceptions in java?
java|exception|smtp|ioexception
0
41
2
71,398,316
71,398,316
2
true
2022-03-08T16:12:09.560Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to write custom excetion for Mutilple exceptions in java?<p>I am using smtp api which throws MessageException and IOException</p> <p>But in our applicati...
71,402,538
Postgresql: UNION ALL on two queries using "with <name> as"?<p>I have this query:</p> <pre><code>with active_cars as ( select c.id from car c inner join dealership d on c.dealer_id = d.id and d.active=true and d.ownerId=${userId} ) select cd.* from car_details cd inner join active_cars ac on cd.car_id = ac....
<p>You need to define both CTEs at the start of the statement:</p> <pre class="lang-sql prettyprint-override"><code>with active_cars as ( select c.id from car c inner join dealership d on c.dealer_id = d.id and d.active = true and d.ownerId = ${userId} ), ports_active_cars as ( select c.id f...
Postgresql: UNION ALL on two queries using "with <name> as"?
postgresql
0
21
1
71,402,570
71,402,570
2
true
2022-03-08T23:13:02.970Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Postgresql: UNION ALL on two queries using "with <name> as"?<p>I have this query:</p> <pre><code>with active_cars as ( select c.id from car c inn...
71,405,477
How to take tmpfs usage into account in Kubernetes resource allocation?<p>I have a Kubernetes cluster and some applications running on it. All of the Pods have their own resource limit/request settings.</p> <p>One of my applications uses tmpfs (/dev/shm) for its data processing, so I have described its volume setting l...
<p><code>tmpfs</code> volume is treated as container memory usage, you should add the 1Gi to your <code>resources.limits.memory</code> for the scheduler to take this into consideration. It is fine to have the <code>resources.requests.memory</code> lower than your limits.</p>
How to take tmpfs usage into account in Kubernetes resource allocation?
kubernetes|containers|resources|tmpfs
0
256
1
71,406,547
71,406,547
2
true
2022-03-09T07:04:32.970Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to take tmpfs usage into account in Kubernetes resource allocation?<p>I have a Kubernetes cluster and some applications running on it. All of the Pods ha...
71,400,089
Hide navigator's top outline outside of selection<p>I'm working on a Highchart plot using a navigator and I've noticed that my outline color is applied to the whole navigator's top, not just the selected data range.</p> <p>To visualize: <a href="https://i.stack.imgur.com/MVmA3.png" rel="nofollow noreferrer"><img src="h...
<p>All the blue lines are created by one svg path element. The only way to change a navigator outline is to wrap the function responsible for drawing it and change its path.</p> <p>For example:</p> <pre><code>(function(H) { H.wrap(H.Navigator.prototype, 'drawOutline', function(procced, zoomedMin, zoomedMax, inverted,...
Hide navigator's top outline outside of selection
highcharts
0
45
1
71,408,053
71,408,053
2
true
2022-03-08T18:48:12.777Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Hide navigator's top outline outside of selection<p>I'm working on a Highchart plot using a navigator and I've noticed that my outline color is applied to th...
71,407,863
Remove unwanted data entries<p>Apologise for the rubbish title but struggling to phrase the problem.</p> <p>I receive data from a client, they manually start and stop tests on site but some times they double press start test or stop test and this makes it hard for me to automate the output.</p> <p>Here is some data</p>...
<pre><code>library(tidyverse) df %&gt;% mutate(id = cumsum(type == &quot;StartTesting&quot;)) %&gt;% arrange(id, type, desc(time)) %&gt;% distinct(id, type, .keep_all = T) %&gt;% pivot_wider(names_from = type, values_from = c(time, comments)) id time_StartTesting time_StopTesting comments_Star...
Remove unwanted data entries
r|filter
0
33
2
71,408,120
71,408,120
2
true
2022-03-09T10:28:40.283Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Remove unwanted data entries<p>Apologise for the rubbish title but struggling to phrase the problem.</p> <p>I receive data from a client, they manually start...
71,408,885
firebase auth.currentUser.email error/bug?<p>clearly (jimmy22@mail.com === &quot;benjamin@icloud.com&quot; || &quot;lame@mail.com&quot;) should return false</p> <p>so why is it printing &quot;email in first : jimmy22@mail.com&quot;</p> <p>when it should print &quot;email was : jimmy22@mail.com&quot;</p> <p>code below<...
<p>your expression will always evaluate to true because it falls to the &quot;lame@mail.com&quot; string which always evaluates to true in the condition.</p> <p>change your condition to the following:</p> <pre><code>if(email === &quot;benjamin@icloud.com&quot; || email === &quot;lame@mail.com&quot;) </code></pre> <p>th...
firebase auth.currentUser.email error/bug?
javascript
0
26
1
71,409,109
71,409,109
2
true
2022-03-09T11:49:54.060Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: firebase auth.currentUser.email error/bug?<p>clearly (jimmy22@mail.com === &quot;benjamin@icloud.com&quot; || &quot;lame@mail.com&quot;) should return false<...
71,410,160
get a self join recursive for base id dynamically<p>I have a table that have a parent/child structure which the parent column point on the child column the child could be a parent or an ancestor...so I want the base Id for that parent this could be 3,4,5...etc. levels or even 1 level... this is the output that should b...
<p>You can use a hierarchical query and find the leaves of the hierarchy:</p> <pre class="lang-sql prettyprint-override"><code>SELECT CONNECT_BY_ROOT id AS id, CONNECT_BY_ROOT ref_id AS ref_id, CONNECT_BY_ROOT round_id AS round_id, id AS base_id FROM TAB WHERE CONNECT_BY_ISLEAF = 1 CONNECT BY...
get a self join recursive for base id dynamically
oracle
0
17
1
71,410,310
71,410,310
2
true
2022-03-09T13:31:44.950Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: get a self join recursive for base id dynamically<p>I have a table that have a parent/child structure which the parent column point on the child column the c...
71,411,230
assign zero before decimal value in oracle sql<p>I have table <code>tst_fr</code> where i have column Dur which is <code>varchar</code> datatype. In this table there are lot of values which is starting with decimal for example <code>.16</code>.</p> <p>I need to assign <code>0</code> before that decimal value for exampl...
<p>You can use:</p> <pre class="lang-sql prettyprint-override"><code>Select to_char( round(to_number(DUR)/(1024*1024), 3), 'fm9990.999' ) as DUR from tst_fr </code></pre> <p>Which, for the sample data:</p> <pre class="lang-sql prettyprint-override"><code>CREATE TABLE tst_fr (dur) AS SELECT 0...
assign zero before decimal value in oracle sql
sql|oracle
0
35
1
71,411,299
71,411,299
2
true
2022-03-09T14:50:00.343Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: assign zero before decimal value in oracle sql<p>I have table <code>tst_fr</code> where i have column Dur which is <code>varchar</code> datatype. In this tab...
71,407,491
Is there an easy way to to add a secret file to my Gitlab CI/CD pipeline?<p>I have a .NET application which uses a <strong>Web.config</strong> which in turn uses <strong>ConnectionStrings.config</strong>. By default .NET uses xml for it's config files.</p> <p>I <a href="https://medium.com/@michalkalita/export-secret-fi...
<p>GitLab supports <a href="https://docs.gitlab.com/ee/ci/variables/#cicd-variable-types" rel="nofollow noreferrer">&quot;file type variables&quot;</a> which can be used to supply files with secrets to jobs. Common use cases include things like SSH keys, but should be usable for your needs.</p> <p>Though, web.config al...
Is there an easy way to to add a secret file to my Gitlab CI/CD pipeline?
gitlab|gitlab-runner
0
1,067
1
71,412,282
71,412,282
2
true
2022-03-09T10:00:59.053Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is there an easy way to to add a secret file to my Gitlab CI/CD pipeline?<p>I have a .NET application which uses a <strong>Web.config</strong> which in turn ...
71,413,792
Stick the columns based on the one columns keeping ids<p>I have a DataFrame with 100 columns (however I provide only three columns here) and I want to build a new DataFrame with two columns. Here is the DataFrame:</p> <pre><code>import pandas as pd df = pd.DataFrame() df ['id'] = [1,2,3] df ['c1'] = [1,5,1] df ['c2'] =...
<p>You could first <code>set_index</code> with &quot;id&quot;; then <code>stack</code> + <code>reset_index</code>:</p> <pre><code>out = (df.set_index('id').stack() .droplevel(1).reset_index(name='c')) </code></pre> <p>Output:</p> <pre><code> id c 0 1 1 1 1 -1 2 2 5 3 2 6 4 3 1 5 3 5 </code></...
Stick the columns based on the one columns keeping ids
python|pandas|dataframe
0
27
1
71,413,863
71,413,863
2
true
2022-03-09T17:46:01.843Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Stick the columns based on the one columns keeping ids<p>I have a DataFrame with 100 columns (however I provide only three columns here) and I want to build ...
71,413,989
Function in kivy focuses wrong input<p>I'm having a trouble creating a mechanism moving to the next TextInput with arrows. This code works, but it doesn't put me in the right container. While i click right,left,right I should be at 2nd container, but I am at the one with id3. I figured out that the function which is su...
<p>The problem is that you are creating <code>focused</code> as a <code>StringProperty</code>, which means that each instance of <code>MyTextInput</code> will have its own instance of <code>focused</code>, so that changes to one will not be known by the others. The fix is to make <code>focused</code> a class level vari...
Function in kivy focuses wrong input
python|kivy
0
28
1
71,414,315
71,414,315
2
true
2022-03-09T18:01:25.347Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Function in kivy focuses wrong input<p>I'm having a trouble creating a mechanism moving to the next TextInput with arrows. This code works, but it doesn't pu...
71,417,898
How can I can create an array that merges the first 2 lists from another array?<p>Let's say that I have the following array:</p> <pre><code>[[1],[2],[3],[4],[5]] </code></pre> <p>How can I create a new array that looks like this:</p> <pre><code>[[1,2],[2,3],[3,4],[4,5]] </code></pre> <p>In my case I need to &quot;merge...
<p>Try this:</p> <pre class="lang-py prettyprint-override"><code>arr = [[1],[2],[3],[4],[5]] merged = [[arr[i][0], arr[i+1][0]] for i in range(len(arr)-1)] </code></pre> <p>gives <code>[[1, 2], [2, 3], [3, 4], [4, 5]]</code></p>
How can I can create an array that merges the first 2 lists from another array?
python|list
0
26
2
71,417,922
71,417,922
2
true
2022-03-10T01:41:10.053Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I can create an array that merges the first 2 lists from another array?<p>Let's say that I have the following array:</p> <pre><code>[[1],[2],[3],[4],...
71,418,460
How to use dplyr::if_else to mutate across a tibble dataframe?<p>I wonder how to combine <code>mutate</code> and <code>if_else</code> to transform a data frame into <code>TRUE</code> and <code>FALSE</code>?</p> <p>For example, mutate a table into <strong>TRUE (value &gt;= 2)</strong> and <strong>FALSE(value &lt;2)</str...
<pre><code>iris %&gt;% mutate(across(where(is.numeric), ~ . &gt;= 2)) </code></pre> <p>You don't need <code>if_else</code> when the result you want is <code>TRUE</code> or <code>FALSE</code>. Generally, <code>ifelse(test, TRUE, FALSE)</code> is a long way of writing <code>test</code>.</p> <p>Or in base R</p> <pre><co...
How to use dplyr::if_else to mutate across a tibble dataframe?
r|dplyr
0
34
1
71,418,483
71,418,483
2
true
2022-03-10T03:22:27.577Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to use dplyr::if_else to mutate across a tibble dataframe?<p>I wonder how to combine <code>mutate</code> and <code>if_else</code> to transform a data fra...
71,418,946
how to select last json data<p>In here i want to make a condition if the dropdown box select the last option it will show new box but i don't know how to make that condition. What i use now is the condition where the option is &quot;Other Impression&quot; selected but the api has 2 language so i cannot hard code the co...
<p>In Dart, you also have a <code>last</code> property on the <code>List</code>. <a href="https://api.dart.dev/stable/2.16.1/dart-core/List/last.html" rel="nofollow noreferrer">Doc</a></p> <pre class="lang-dart prettyprint-override"><code>void main() { print(dummyDropdownOption.last); } </code></pre> <h3>Console log<...
how to select last json data
flutter|dart
0
31
2
71,419,278
71,419,278
2
true
2022-03-10T04:45:16.177Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to select last json data<p>In here i want to make a condition if the dropdown box select the last option it will show new box but i don't know how to mak...
71,421,358
R: Creating new column to represent hi/mid/low bins by mean and standard deviation<p>I've got a batch of survey data that I'd like to be able to subset on a few specific columns which have 0-10 scale data (e.g. Rank your attitude towards x as 0 to 10) so that I can plot using using ggplot() + facet_grid. Faceting will ...
<pre class="lang-r prettyprint-override"><code>library(tidyverse) climate_experience_data &lt;- structure(list(Q4 = c(2, 3, 3, 5, 4, 3), Q5 = c( 1, 3, 3, 3, 2, 2 ), Q6 = c(4, 3, 3, 3, 4, 4), Q7 = c(4, 2, 3, 5, 5, 5), Q53_1 = c( 5, 8, 4, 5, 4, 5 )), row.names = c(NA, -6L), class = c( &quot;tbl_df&quot;, &qu...
R: Creating new column to represent hi/mid/low bins by mean and standard deviation
r|dplyr|facet-grid
0
44
1
71,421,472
71,421,472
2
true
2022-03-10T08:58:55.950Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: R: Creating new column to represent hi/mid/low bins by mean and standard deviation<p>I've got a batch of survey data that I'd like to be able to subset on a ...
71,421,706
AWS Dynamo DB - How can I set the TTL to a default value of 7 days<p>I am looking to set up TTL on my DynamoDB so that I can expire items from some of the tables.</p> <p>I worked out how to enable the TTL and set an attribute on the table with an Epoch value of when the TTL will expire and it works, however this is not...
<blockquote> <p>Can anyone advise if it is possible to set the TTL to a default value of 7 days...</p> </blockquote> <p>No - you will have to set this every time (which should be trivial to calculate) in your DynamoDB request.</p>
AWS Dynamo DB - How can I set the TTL to a default value of 7 days
amazon-web-services|amazon-dynamodb
0
540
1
71,421,776
71,421,776
2
true
2022-03-10T09:26:25.693Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: AWS Dynamo DB - How can I set the TTL to a default value of 7 days<p>I am looking to set up TTL on my DynamoDB so that I can expire items from some of the ta...