question_id int64 37.6M 73.2M | input_text stringlengths 88 52.4k | output_text stringlengths 37 35.6k | title stringlengths 15 150 | tags stringlengths 1 107 | q_score int64 -19 397 | view_count int64 3 879k | answer_count int64 1 21 | accepted_answer_id int64 37.6M 73.8M | answer_id int64 37.6M 73.8M | a_score int64 -5 1.29k | is_accepted bool 1
class | creation_date stringlengths 20 24 | input_text_instruct stringlengths 251 52.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
72,851,329 | Convert if else statement to simple linq query<p>I have been trying to convert a simple if else to a linq statement.</p>
<p>The if else statement goes something like this:</p>
<pre><code>if ( MessageStatus = 1 )
then MessageCount > 0
else if ( MessageStatus = 2 )
then MessageCount = 0
else
do nothing
</code... | <p>What you're asking about is <em>conditional filtering</em>. <code>request.MessageStatus</code> is a value you know <em>before</em> you execute the query, so you can use it to define which <code>Where</code> to add to the query.</p>
<p>This works by creating a <code>IQueryable<...></code> for the whole data set... | Convert if else statement to simple linq query | c#|linq | 1 | 68 | 1 | 72,851,422 | 72,851,422 | 2 | true | 2022-07-04T02:51:10.450Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Convert if else statement to simple linq query<p>I have been trying to convert a simple if else to a linq statement.</p>
<p>The if else statement goes someth... |
72,863,157 | vectorize the assignment of 3d numpy arrays conditioned on the associate values at other dimensions<p>Is it possible to vectorize the following code in Python? It runs very slowly when the size of the array becomes large.</p>
<pre><code>import numpy as np
# A, B, C are 3d arrays with shape (K, N, N).
# Entries in A, ... | <p>I can help with a partial vectorization that should speed things up quite a bit, but I'm not sure on your logic for k vs. m, so didn't try to include that part. Essentially, you create a mask with the conditions you want checked across the 2nd and 3rd dimensions of <code>A</code>. Then map between <code>A</code> and... | vectorize the assignment of 3d numpy arrays conditioned on the associate values at other dimensions | python|arrays|numpy|compound-assignment | 4 | 68 | 2 | 72,865,202 | 72,865,202 | 2 | true | 2022-07-05T01:15:10.133Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
vectorize the assignment of 3d numpy arrays conditioned on the associate values at other dimensions<p>Is it possible to vectorize the following code in Pytho... |
72,843,242 | Changing multiple text with the same class with one button<p>So I want a text to show up under every input field(don't mind the 'iii', it's a dummy text) when it's empty. I have no idea why it's not working. I could do that by having every text as a different class but the code would look terrible. When I click a butto... | <p>A few things to fix:</p>
<ul>
<li>add <code>novalidate</code> attribute in <code>form</code> to prevent native HTML5 validation</li>
<li>add <code>e.preventDefault()</code> in <code>click()</code> handler to prevent form submission without validation</li>
<li>you were trying to set <code>textContent</code> to <code... | Changing multiple text with the same class with one button | javascript|html | 1 | 68 | 3 | 72,843,286 | 72,843,286 | 2 | true | 2022-07-03T00:23:33.857Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Changing multiple text with the same class with one button<p>So I want a text to show up under every input field(don't mind the 'iii', it's a dummy text) whe... |
72,892,272 | having a flex child scale and cover all other children inside container on click<p>I have a flex container with some children that are <code><divs></code>. <code>onClick</code> I want the clicked cube to scale and animate to fill all the available width and height, but where I'm stuck is I would also like it to o... | <p>You can check the solution here <a href="https://codesandbox.io/s/nice-hypatia-e9s5cp?file=/src/App.js" rel="nofollow noreferrer">link to sandbox</a>. Used position absolute but not the <code>top</code> property as you wanted. I have pasted the code below for quick reference. Removed styles for <code>item</code> ins... | having a flex child scale and cover all other children inside container on click | css | 0 | 68 | 1 | 72,894,212 | 72,894,212 | 2 | true | 2022-07-07T04:25:38.020Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
having a flex child scale and cover all other children inside container on click<p>I have a flex container with some children that are <code><divs></co... |
72,946,469 | How to load a custom image dataset as numpy.ndarray?<p>Here, I am loading the MNIST dataset from keras and printing out the datatypes:</p>
<pre><code>(train_images, _), (test_images, _) = tf.keras.datasets.mnist.load_data()
print(type(train_images))
print(type(test_images))
</code></pre>
<p>Instead of this, I want to l... | <p>You can use <code>tf.keras.utils.image_dataset_from_directory()</code> for loading your custom image dataset, split train/test set, resize image,... if your dataset contains n sub-directories, one per class (for classification). You should read this <a href="https://www.tensorflow.org/tutorials/load_data/images" re... | How to load a custom image dataset as numpy.ndarray? | python|tensorflow|keras | 1 | 68 | 1 | 72,946,668 | 72,946,668 | 2 | true | 2022-07-12T02:35:39.947Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to load a custom image dataset as numpy.ndarray?<p>Here, I am loading the MNIST dataset from keras and printing out the datatypes:</p>
<pre><code>(train_... |
72,909,404 | Pointer and array usage confusion<p>There is a code excerpt from official <a href="https://github.com/id-Software/Quake-2/blob/master/qcommon/cmodel.c" rel="nofollow noreferrer">Quake 2 source code</a>:</p>
<pre><code>unsigned *buf;
dheader_t header;
...
header = *(dheader_t *)buf; // #1
for (i=0 ; i&l... | <p>This is some seriously brittle code and you shouldn't write code like this.</p>
<p>What it does is to go through the struct <code>int</code> by <code>int</code>, then does something with each such <code>int</code> inside <code>_LittleLong</code>. Very likely this function performs a 32 bit conversion from a big endi... | Pointer and array usage confusion | c | 0 | 68 | 1 | 72,911,502 | 72,911,502 | 3 | true | 2022-07-08T09:31:26.930Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pointer and array usage confusion<p>There is a code excerpt from official <a href="https://github.com/id-Software/Quake-2/blob/master/qcommon/cmodel.c" rel="... |
72,919,264 | Why to use a const int and not a #define when declaring true and false<p>I am starting with C and OpenGL and came across the situation where I wanted to have true and false as boolean values, but couldn't get them, since they don't exist as such in C. I then came up with the idea to use the <code>#define</code> to just... | <p>The upside of making them <code>const int</code> is that they are proper variables and you can't make mistakes when defining and using them as easily which is often the case with <code>#define</code>s.</p>
<p>But, I wouldn't say it's better to make them <code>const int</code> since they then couldn't be used where c... | Why to use a const int and not a #define when declaring true and false | c|boolean | 1 | 68 | 1 | 72,919,371 | 72,919,371 | 3 | true | 2022-07-09T05:49:21.540Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why to use a const int and not a #define when declaring true and false<p>I am starting with C and OpenGL and came across the situation where I wanted to have... |
72,922,421 | Display last two lines of a large text in a div<p>I have continuous text added to a <code>div</code>, I want to display only the last two lines of the text in the <code>div</code> which is of fixed width. I could split the large text into multiple lines and then show the last two lines in the div but I was checking if ... | <p>You can try like below:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-css lang-css prettyprint-override"><code>.box {
width: 280px;
line-height: 1.2em;
height: 2.4em; /* twice the line-height */
overflo... | Display last two lines of a large text in a div | javascript|html|css | 1 | 68 | 1 | 72,922,446 | 72,922,446 | 3 | true | 2022-07-09T15:00:09.380Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Display last two lines of a large text in a div<p>I have continuous text added to a <code>div</code>, I want to display only the last two lines of the text i... |
72,943,602 | Mimic spring used in UIKit animation with SwiftUI<p>I'm struggling to figure out how to get SwiftUI's .spring animation to mimic what I'd previously done in UIKit. The UIKit code below animates an ImageView to make it pulse, almost like it's springing when punched, when tapped (.gif below shows this in action, imageVie... | <p>You can use explicit animation in the tap Gesture to first immediately "shrink" to 0.9 without animation and then expand back WITH animation:</p>
<p><a href="https://i.stack.imgur.com/gMn79.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gMn79.gif" alt="enter image description here" /></... | Mimic spring used in UIKit animation with SwiftUI | swift|spring|animation|swiftui|uikit | 0 | 68 | 1 | 72,944,035 | 72,944,035 | 3 | true | 2022-07-11T19:18:39.210Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Mimic spring used in UIKit animation with SwiftUI<p>I'm struggling to figure out how to get SwiftUI's .spring animation to mimic what I'd previously done in ... |
72,936,458 | CUDA - how to report problem/error from within kernels?<p>Let's say I have a kernel that is processing some data and can detect problems with it (overflow, not correct data, etc.). How to set a single flag from multiple threads?</p>
<p>Here is a code sketch for the kernel:</p>
<pre class="lang-cpp prettyprint-override"... | <p>The first thing that comes to mind is just setting up some global variable like:</p>
<pre><code>__device__ int isProblemDetected;
</code></pre>
<p>Then you can set it to 0 before the kernel with:</p>
<pre><code>int zero = 0;
cudaMemcpyToSymbol(isProblemDetected, &zero, sizeof(int));
</code></pre>
<p>And retrieve... | CUDA - how to report problem/error from within kernels? | error-handling|cuda | 0 | 68 | 1 | 72,951,717 | 72,951,717 | 3 | true | 2022-07-11T09:37:49.780Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
CUDA - how to report problem/error from within kernels?<p>Let's say I have a kernel that is processing some data and can detect problems with it (overflow, n... |
72,995,022 | Are GCP tags a new kind of network_tag or something else entirely?<p>GCP <strong>network tags</strong> can be applied to VMs (and maybe GKE node_pools). Then firewall rules can target those resources. They have just a name, not a value.</p>
<p><strong>tags</strong>, on the other hand, are more like <em>labels</em>, in ... | <p>It's confusing, but Tag, Network_Tags and Labels are 3 different things. They work separately from each other.</p>
<p><a href="https://cloud.google.com/resource-manager/docs/creating-managing-labels" rel="nofollow noreferrer">Labels</a> are pretty straight forward. They are a metadata key/value that can be assigned ... | Are GCP tags a new kind of network_tag or something else entirely? | google-cloud-platform|gke-networking | 1 | 68 | 1 | 73,033,522 | 73,033,522 | 3 | true | 2022-07-15T13:46:56.477Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Are GCP tags a new kind of network_tag or something else entirely?<p>GCP <strong>network tags</strong> can be applied to VMs (and maybe GKE node_pools). Then... |
72,998,776 | Firebase emulator prevent log window from opening<p>When I run the <code>firebase emulators:start</code> command on Windows 10, it opens up a console with what looks like a java program outputting log events from the emulator suite. Is there any way to prevent this window from opening?</p>
<p>Thanks!</p>
<p>edit: This ... | <p>First of all , this link can help you on how to shutdown correctly the JVMs:
<a href="https://stackoverflow.com/questions/72606370/shut-down-jvm-when-firebase-emulator-closes">Shut down JVM when Firebase emulator closes</a>
Since you're talking about Java console , then you should use javaw.exe instead of java.exe !... | Firebase emulator prevent log window from opening | firebase|firebase-tools | 0 | 68 | 1 | 73,150,445 | 73,150,445 | 3 | true | 2022-07-15T19:25:30.170Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Firebase emulator prevent log window from opening<p>When I run the <code>firebase emulators:start</code> command on Windows 10, it opens up a console with wh... |
72,949,669 | Is it possible to modify type definitions at runtime?<p>Is it possible to modify type definitions at runtime? For example if you were to define a class like this</p>
<pre><code>class Test {
public:
int x;
int y;
};
</code></pre>
<p>could I remove the x or y field from the class at runtime? Or could I a... | <p>No. It is definitely impossible.</p>
<p>For example, we are updating the field x in the structure <em>Test</em> and <strong>we must</strong> know the size at the compile time because of operations on machine code level performs on data offsets</p>
<pre class="lang-cpp prettyprint-override"><code>class Test {
pub... | Is it possible to modify type definitions at runtime? | c++|types | 1 | 68 | 3 | 72,950,296 | 72,950,296 | 3 | true | 2022-07-12T09:03:14.930Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is it possible to modify type definitions at runtime?<p>Is it possible to modify type definitions at runtime? For example if you were to define a class like ... |
72,864,514 | Passing pointer reference from template function to non-template function<p>I am attempting to move around a pointer by reference (T*&) between some template functions. Under certain conditions this pointer reference may get passed to a different function that accepts a void pointer reference (void*&). When I... | <h4>Case 1</h4>
<p>Here we discuss the reason for the mentioned error.</p>
<p>The <strong>problem</strong> is that <code>param</code> is an lvalue of type <code>int*</code> and it can be converted to a <strong>prvalue</strong> of type <code>void*</code> when passing it as the call argument in <code>NonTempFunct( Param ... | Passing pointer reference from template function to non-template function | c++|templates|rvalue | 2 | 68 | 1 | 72,864,585 | 72,864,585 | 3 | true | 2022-07-05T05:48:29.717Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Passing pointer reference from template function to non-template function<p>I am attempting to move around a pointer by reference (T*&) between some temp... |
72,893,843 | How to update dataframe cell value based on values in other columns?<p>I have a pandas dataframe (called <code>removedCols</code>) of ~2000 rows, and I am trying to populate certain columns in my dataframe by using values in corresponding cells. An exerpt of the original dataframe is as such:</p>
<pre><code> A B ... | <p>Use <a href="http://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.update.html" rel="nofollow noreferrer"><code>DataFrame.update</code></a> with <a href="http://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.str.join.html" rel="nofollow noreferrer"><code>Series.str.join</code><... | How to update dataframe cell value based on values in other columns? | python|pandas|dataframe|iteration | 2 | 68 | 2 | 72,893,938 | 72,893,938 | 3 | true | 2022-07-07T07:27:55.773Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to update dataframe cell value based on values in other columns?<p>I have a pandas dataframe (called <code>removedCols</code>) of ~2000 rows, and I am tr... |
72,905,567 | how to change file timestamp including nanoseconds<p>I am making a program to copy files from a source to a destination directory and would like to change the destination file timestamps so they match the source file timestamps.</p>
<p>So far I have discovered the <a href="https://pubs.opengroup.org/onlinepubs/00960449... | <p>According to POSIX, the function you need is <a href="https://pubs.opengroup.org/onlinepubs/9699919799/functions/utimensat.html" rel="nofollow noreferrer"><code>utimensat()</code></a> (or its close relative, <code>futimens()</code>). Both of these take a pair of <code>struct timespec</code> values in an array, whic... | how to change file timestamp including nanoseconds | c|file|time|stat|time.h | 1 | 68 | 1 | 72,906,413 | 72,906,413 | 3 | true | 2022-07-08T00:42:24.813Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to change file timestamp including nanoseconds<p>I am making a program to copy files from a source to a destination directory and would like to change th... |
72,977,124 | React, render component based on localStorage changes<p>I am trying to make an authentication system. Users can sign in and sign out via the top nav bar. The username will store in the local storage. I can find 'user' in my local storage after sign in, and it's gone after signing out.</p>
<p>But it seems that the <code... | <p>Change <code>logout</code> and <code>toggleLoggedIn</code> functions as below. You need to <code>dispach</code> the <code>storage</code> event, because normally, a <code>storage</code> change is not noticed in the same document that's is making the changes.</p>
<pre class="lang-js prettyprint-override"><code>() =>... | React, render component based on localStorage changes | javascript|reactjs|use-effect | 1 | 68 | 3 | 72,977,251 | 72,977,251 | 3 | true | 2022-07-14T07:59:25.827Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
React, render component based on localStorage changes<p>I am trying to make an authentication system. Users can sign in and sign out via the top nav bar. The... |
72,996,624 | Can the list of custom jobs in vertex AI custom seen in the UI?<p>I have created a custom job with</p>
<pre><code>gcloud ai custom-jobs create --region=us-west1 --display-name=test-job --config=trainjob.yaml
</code></pre>
<p>where <code>trainjob.yaml</code> is</p>
<pre><code>workerPoolSpecs:
machineSpec:
machineT... | <p>I don't know if it is exactly what you are looking for, but you can see the custom training jobs details using the UI at <code>Console</code> > <code>Vertex AI</code> > <code>Training</code> > <code>Custom Jobs</code> or following the next <a href="https://console.cloud.google.com/vertex-ai/training/custom-... | Can the list of custom jobs in vertex AI custom seen in the UI? | google-cloud-vertex-ai|google-ai-platform|gcp-ai-platform-training | 1 | 68 | 1 | 73,023,971 | 73,023,971 | 3 | true | 2022-07-15T15:50:55.003Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Can the list of custom jobs in vertex AI custom seen in the UI?<p>I have created a custom job with</p>
<pre><code>gcloud ai custom-jobs create --region=us-we... |
72,899,227 | Why is the signature verification not working despite using the same parameters?<p>I have trouble making this simple test for verifying a signature work. I have the Public and Private Key from the same Keystore, I do the exact steps for signing and verifying, but yet the verifying is always false.</p>
<p>Should I suspe... | <p>No, you don't perform the same steps when signing and verifying: When signing with <code>sign.update(encrypted)</code> the content of <code>encrypted</code> is signed. Therefore, when verifying, <code>sign.update(encrypted)</code> has to be used, but instead <code>sign.update(signatureBytes)</code> is applied, which... | Why is the signature verification not working despite using the same parameters? | java|encryption|rsa|signature|sha256 | 1 | 68 | 1 | 72,900,216 | 72,900,216 | 3 | true | 2022-07-07T14:02:32.257Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why is the signature verification not working despite using the same parameters?<p>I have trouble making this simple test for verifying a signature work. I h... |
72,777,601 | Create XML file via Progress 12 using WRITE-XML statement<p>I am trying to generate an XML file in Progress 12 using temp tables and a WRITE-XML statement. I am almost there. The format should be</p>
<pre><code><CdtrAgt>
<FinInstrnId>
<ClrSysMmbId>
<MmbId>xxx</MmbId>
... | <p>Change the order of your data-relations so that the relations appear in the order in the dataset that they should appear in the XML.</p>
<pre><code>DEFINE TEMP-TABLE tt NO-UNDO
FIELD id AS INTEGER SERIALIZE-HIDDEN
FIELD val AS CHARACTER .
DEFINE TEMP-TABLE tt2 NO-UNDO
FIELD id AS INTEGER SERIALIZE-... | Create XML file via Progress 12 using WRITE-XML statement | xml|openedge|progress-4gl|writexml | 2 | 68 | 1 | 72,787,550 | 72,787,550 | 3 | true | 2022-06-27T19:49:53.727Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Create XML file via Progress 12 using WRITE-XML statement<p>I am trying to generate an XML file in Progress 12 using temp tables and a WRITE-XML statement. ... |
72,955,109 | How do i calculate a rolling sum by group with monthly data in Python?<p>I am trying to use rolling().sum() to create a dataframe with 2-month rolling sums within each 'type'. Here's what my data looks like:</p>
<pre><code>import pandas as pd
df = pd.DataFrame({'type': ['A', 'A', 'A', 'A', 'B', 'B', 'B', 'B', 'C', 'C',... | <p>Here's a way to do it:</p>
<pre class="lang-py prettyprint-override"><code>rolling_sum = (
df.assign(value=df.groupby(['type'])['value']
.rolling(2, min_periods=1).sum().reset_index()['value'])
)
</code></pre>
<p>Output:</p>
<pre><code> type date value
0 A 2022-01-01 1.0
1 A 2022-02-01... | How do i calculate a rolling sum by group with monthly data in Python? | python|pandas|rolling-computation | 1 | 68 | 2 | 72,955,268 | 72,955,268 | 3 | true | 2022-07-12T15:51:47.877Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do i calculate a rolling sum by group with monthly data in Python?<p>I am trying to use rolling().sum() to create a dataframe with 2-month rolling sums w... |
72,802,784 | Is using a variable in an onclick worse than using e.target?<p>Wondering if there is a performance/memory area I could improve when setting <code>onclick</code> listeners to elements.</p>
<p>Example:</p>
<pre><code>let btn = document.querySelector('.example')
btn.addEventListener('click', (e) => {
btn.classList.... | <p><em>TL;TiM</em>: <strong>Event delegation*</strong> is better.</p>
<h2>Event <code>target</code> vs <code>currentTarget</code></h2>
<p><a href="https://developer.mozilla.org/en-US/docs/Web/API/Event/target" rel="nofollow noreferrer"><strong>Event.target</strong></a> might <strong>not</strong> be your <code>btn</code... | Is using a variable in an onclick worse than using e.target? | javascript|performance|memory | 3 | 68 | 1 | 72,802,933 | 72,802,933 | 3 | true | 2022-06-29T14:06:44.367Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is using a variable in an onclick worse than using e.target?<p>Wondering if there is a performance/memory area I could improve when setting <code>onclick</co... |
73,018,683 | Refactoring the ternary operator<p>I am quite stuck in a refactored ternary operator while learning react. Here is the code I came across inside a JSX:</p>
<pre><code>{props.openSpots === 0 && <div className="card--badge">SOLD OUT</div>}
</code></pre>
<p>I would like to ask why this will r... | <p><code>AND</code> operator looks for the <code>second</code> argument if the <code>first</code> argument is <code>true</code>.</p>
<p>But, if <code>first</code> argument is <code>false</code> it does not look for <code>second</code> argument, and directly returns <code>false</code>.</p>
<p><code>true</code> &&... | Refactoring the ternary operator | javascript|reactjs|conditional-operator | 2 | 68 | 2 | 73,018,744 | 73,018,744 | 3 | true | 2022-07-18T07:30:40.847Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Refactoring the ternary operator<p>I am quite stuck in a refactored ternary operator while learning react. Here is the code I came across inside a JSX:</p>
<... |
72,903,971 | Python output random lists from input list<p>I need to create 3 lists from my list1. One with 70% of the values and two with 20% and 10%.</p>
<pre><code>list1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
# listOutput70 = select 70% of list1 items(randomly)
# with the remaining create two lists of 20% and 10%
#the output can be... | <p>Shuffle the list with <code>random.shuffle()</code>. Then use slices to get each percentage.</p>
<pre><code>def selector(percents):
RandomSelection = []
mySel = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
random.shuffle(mySel)
start = 0
for cur in percents:
end = start + cur * len(mySel) // 100
... | Python output random lists from input list | python|list|function | 1 | 68 | 2 | 72,904,057 | 72,904,057 | 3 | true | 2022-07-07T20:39:48.343Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python output random lists from input list<p>I need to create 3 lists from my list1. One with 70% of the values and two with 20% and 10%.</p>
<pre><code>list... |
72,901,601 | Count each character in a string<p>I have to count character in a string and i'm a little stuck. If input data is "test", the result will be t=2; e=1; s=1; and so on.In my code, the result is t=1; e=1; s=1; and i don't know how to make to work correctly.</p>
<pre><code>Input data
</code></pre>
<p>test</p>
<pr... | <p>This line</p>
<pre><code> Console.WriteLine(c + " " + CountCharOccurrences(distinctChars, c));
</code></pre>
<p>should be</p>
<pre><code> Console.WriteLine(c + " " + CountCharOccurrences(text , c));
</code></pre>
<p>There are better ways to do this than how you are doing it. Using a ... | Count each character in a string | c# | 1 | 68 | 1 | 72,901,668 | 72,901,668 | 3 | true | 2022-07-07T16:50:29.177Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Count each character in a string<p>I have to count character in a string and i'm a little stuck. If input data is "test", the result will be t=2; e... |
73,022,390 | Python - text color of one variable in multivariable sentence in Tkinter label<p>The text source consists out of elements from a nested lists. A label is created for each element in the list. Below the code:</p>
<pre><code>list1 = [["test", 3, 2, 0], ["test2", 4, 1, 1],["test3", 0, 5, 2]]
... | <p>The easiest way to do this is to create multiple labels in a frame and set the colour of the one you want.</p>
<pre><code>list1 = [["test", 3, 2, 0], ["test2", 4, 1, 1],["test3", 0, 5, 2]]
row = 1
for i in list1:
label_wrapper = customtkinter.CTkFrame(master = self.frame_1)
labe... | Python - text color of one variable in multivariable sentence in Tkinter label | python|tkinter|customtkinter | 2 | 68 | 1 | 73,023,185 | 73,023,185 | 3 | true | 2022-07-18T12:35:24.507Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python - text color of one variable in multivariable sentence in Tkinter label<p>The text source consists out of elements from a nested lists. A label is cre... |
72,975,278 | Reading CSV file into an array in Java [incompatible types: Integer cannot be converted to int[].]<p>I have a CSV file that looks like:
<a href="https://i.stack.imgur.com/JBVRU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JBVRU.png" alt="enter image description here" /></a></p>
<p>and I have read ... | <p><strong>1. Dealing with this error: Integer cannot be converted to int[]</strong></p>
<p>We can only assign <code>int[]</code> to an <code>int[]</code>, <code>lines</code> is a List of Integer and so when we try to get any element in <code>lines</code> it will always return an Integer.</p>
<p>So <code>int thirdCount... | Reading CSV file into an array in Java [incompatible types: Integer cannot be converted to int[].] | java|arrays|list|csv|incompatibletypeerror | 2 | 68 | 1 | 72,975,919 | 72,975,919 | 3 | true | 2022-07-14T04:41:03.080Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Reading CSV file into an array in Java [incompatible types: Integer cannot be converted to int[].]<p>I have a CSV file that looks like:
<a href="https://i.st... |
72,979,265 | Why does my direct autowire property injection turns into null?<p>So I try to inject an interface implemention through a field. But can't figure it out why it's null.</p>
<pre><code>Package
com.a
Interfacex
com.b
Interfaceximpl
</code></pre>
<p><strong>Interfacex.java</strong></p>
<pre><code>pub... | <p>Are you really placing the <code>@Autowired</code> on the field of the main class or its just an illustration? If you do - it won't work because the class on which @Autowired can happen must be by itself managed by Spring. And in this case its obviously not, because its a special class - an entry point of the applic... | Why does my direct autowire property injection turns into null? | java|spring | 0 | 68 | 2 | 72,979,383 | 72,979,383 | 3 | true | 2022-07-14T10:48:05.813Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Why does my direct autowire property injection turns into null?<p>So I try to inject an interface implemention through a field. But can't figure it out why i... |
72,887,593 | returning the largest and smallest numbers as an array<p>I'm trying to return the largest and the smallest numbers in an array as an array</p>
<p>for example:
<code>int[] arr = {5, 1, 2, 4, 9, 10, 200}</code></p>
<pre><code>public static int[] largest_smallest(int[] arr)
{
int max = array_values.Max();
... | <p>like this</p>
<pre><code> int [] result = { min, max};
return result;
</code></pre> | returning the largest and smallest numbers as an array | c#|algorithm | 0 | 68 | 3 | 72,887,690 | 72,887,690 | 4 | true | 2022-07-06T17:19:31.547Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
returning the largest and smallest numbers as an array<p>I'm trying to return the largest and the smallest numbers in an array as an array</p>
<p>for example... |
72,929,672 | How to use tidyeval in base function in r<p>I wrote a function.
In my function, there is a step that needs to extract the number of non-repeating values, similar to this:</p>
<pre><code>df = data.frame(a = c(1, 1:3))
df
length(unique(df$a))
> length(unique(df$a))
[1] 3
</code></pre>
<p>I use tidyeval for programmi... | <p>Here are a couple of options. If you're committed to base R type functions, you could use:</p>
<pre class="lang-r prettyprint-override"><code>library(dplyr)
df = data.frame(a = c(1, 1:3))
my_fun1 <- function(data, var){
tmp <- data[[quo_name(enquo(var))]]
length(unique(tmp))
}
my_fun1(df, a)
#> [1] 3
... | How to use tidyeval in base function in r | r|tidyverse|tidyeval|non-standard-evaluation | 2 | 68 | 2 | 72,929,766 | 72,929,766 | 4 | true | 2022-07-10T15:29:51.283Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to use tidyeval in base function in r<p>I wrote a function.
In my function, there is a step that needs to extract the number of non-repeating values, sim... |
72,968,801 | Count unread messages in MongoDb<p>I try to count unread messages for a user.
On my model i have a property, LastMessageDate that contains the date on the last created message in the group chat. I have also a Members propeerty (list) that contains the members in the group chat. Each member has a UserId and LastReadDate... | <p>Based on the provided data in the comment, I think the aggregation query is required to achieve the outcome.</p>
<ol>
<li><p><code>$set</code> - Set <code>Members</code> field</p>
<p>1.1. <code>$filter</code> - With <code>Members</code> array as <code>input</code>, filter the document(s) with matching the current do... | Count unread messages in MongoDb | c#|mongodb|mongodb-.net-driver | 1 | 68 | 2 | 72,974,256 | 72,974,256 | 4 | true | 2022-07-13T15:24:45.003Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Count unread messages in MongoDb<p>I try to count unread messages for a user.
On my model i have a property, LastMessageDate that contains the date on the la... |
73,021,592 | Pointer to constant array<p>I am making a multi-language interface for an AVR system, the strings are stored in the program memory with each language string placed in its own array. The idea is that when the user switches language, the pointer that contains the address of the currently selected language array will chan... | <p>The number of the qualifier <code>const</code> in the declaration of a pointer</p>
<pre><code>static const MEMORY_PREFIX wchar_t** Unicode_text = Greek_text;
</code></pre>
<p>does not corresponds to the number of the qualifier in the arrays.</p>
<p>You should write</p>
<pre><code>static const MEMORY_PREFIX wchar_t *... | Pointer to constant array | c|pointers|constants|implicit-conversion|avr | 1 | 68 | 2 | 73,021,739 | 73,021,739 | 4 | true | 2022-07-18T11:27:04.610Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pointer to constant array<p>I am making a multi-language interface for an AVR system, the strings are stored in the program memory with each language string ... |
72,927,653 | Split Test::More suite into multiple files<p>I'm using Test::More to test my application. I have a single script, <code>run_tests.pl</code>, that runs all the tests. Now I want to split this into <code>run_tests_component_A.pl</code> and B, and run both test suites from <code>run_tests.pl</code>. What is the proper way... | <p>Instead of running the creating a <code>run_tests.pl</code> to run the test suite, the standard practice is to use <code>prove</code>.</p>
<p>Say you have</p>
<pre class="lang-none prettyprint-override"><code>t/foo.t
t/bar.t
</code></pre>
<p>Then,</p>
<ul>
<li><code>prove</code> is short for <code>prove t</code>.</l... | Split Test::More suite into multiple files | perl|testing|test-more | 1 | 68 | 1 | 72,930,765 | 72,930,765 | 4 | true | 2022-07-10T10:01:28.503Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Split Test::More suite into multiple files<p>I'm using Test::More to test my application. I have a single script, <code>run_tests.pl</code>, that runs all th... |
72,930,368 | Concept of Linearization in Scala and behaviour of super<p>Consider the following example of traits:</p>
<pre class="lang-java prettyprint-override"><code>trait TextileEngineer extends Engineer {
override def nameIt = {println("TextileEngineer"); super.nameIt;}
}
trait FabricEngineer extends Engineer {
ov... | <p>The short answer is because <code>Trader</code> does not call <code>super</code> inside <code>nameIt</code>:</p>
<pre><code>trait Trader {
def nameIt = println("Trader");
}
</code></pre>
<p>The long answer is because linearization begins with <code>TheSmiths</code> itself, then checks every class or trai... | Concept of Linearization in Scala and behaviour of super | scala|traits|multiple-inheritance | 1 | 68 | 1 | 72,931,408 | 72,931,408 | 4 | true | 2022-07-10T17:04:48.810Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Concept of Linearization in Scala and behaviour of super<p>Consider the following example of traits:</p>
<pre class="lang-java prettyprint-override"><code>tr... |
72,842,267 | How to register and show 2nd sidebar only if the screen is wider than 1682px in wordpress?<p>I want to show a 336px width second sidebar (left side on all pages) for destop/tv screens wider than 1682px.</p>
<p>If the second sidebar has its own class then I can hide it with the {display: none;} CSS tag inside the media ... | <p><strong>STEP I:</strong> Open the <code>functions.php</code> and paste the following codes:</p>
<pre class="lang-php prettyprint-override"><code> function __widgets_init() {
register_sidebar( array (
'name' => __('2nd Sidebar', 'textdomain'),
'id' => 'sidebar-secondary',
'before_widget' => ... | How to register and show 2nd sidebar only if the screen is wider than 1682px in wordpress? | php|wordpress | 1 | 68 | 1 | 72,842,986 | 72,842,986 | 4 | true | 2022-07-02T20:36:01.073Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to register and show 2nd sidebar only if the screen is wider than 1682px in wordpress?<p>I want to show a 336px width second sidebar (left side on all pa... |
72,937,558 | How to assign the value to be returned by a method?<p>I have a method which I want to be returning a value. The declaration is clear to me. But how do I assign the value to be returned inside the method implementation?</p>
<p>I can only think of creating an output variable and use that to propagate the value to the cal... | <p>The solution is simple:</p>
<pre><code>M_MyMethod := bWhatever;
</code></pre>
<p>Using <code>VAR_OUT</code> is also usefull, if you need to return more than one value and don't want to create dedicated type :)</p> | How to assign the value to be returned by a method? | plc|twincat|st | 2 | 68 | 1 | 72,937,745 | 72,937,745 | 5 | true | 2022-07-11T11:06:50.817Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to assign the value to be returned by a method?<p>I have a method which I want to be returning a value. The declaration is clear to me. But how do I assi... |
72,943,544 | How do I use variables in SQL Server backup disk path?<p>The following SQL statement works fine:</p>
<pre><code>DECLARE @database VARCHAR(30) = 'DEMO';
BACKUP LOG @database
TO DISK = N'C:\zbackups\DEMO.trn'
WITH NOFORMAT, NOINIT,
NAME = N'MyDatabase Log Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10;
DBCC SHRINKFI... | <p>The problem is simply that you can't pass an <em>expression</em> there. Instead of:</p>
<pre><code>TO DISK = 'C:\zbackups\' + @database + '.trn'
</code></pre>
<p>You need:</p>
<pre><code>DECLARE @fullpath nvarchar(1024);
SET @fullpath = 'C:\zbackups\' + @database + '.trn';
...
TO DISK = @fullpath
...
</code></p... | How do I use variables in SQL Server backup disk path? | sql-server|sql-server-2008 | 0 | 68 | 2 | 72,943,674 | 72,943,674 | 5 | true | 2022-07-11T19:12:27.300Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do I use variables in SQL Server backup disk path?<p>The following SQL statement works fine:</p>
<pre><code>DECLARE @database VARCHAR(30) = 'DEMO';
BACK... |
72,958,500 | What is the "sense" of a command line option?<p>I am reading the documentation for <a href="https://developer-old.gnome.org/glib/stable/glib-Commandline-option-parser.html" rel="nofollow noreferrer">glib's CLI option parser</a> and I'm very confused about one of their <a href="https://developer-old.gnome.org/glib/stabl... | <p>If an option does not take an argument, it can be considered boolean. The option is usually considered 'true' if present, or 'false' if absent. Those interpretations can be reversed, and that changes the sense of the option.</p> | What is the "sense" of a command line option? | c|command-line-interface|command-line-arguments|glib | 2 | 68 | 1 | 72,958,623 | 72,958,623 | 6 | true | 2022-07-12T21:18:40.603Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What is the "sense" of a command line option?<p>I am reading the documentation for <a href="https://developer-old.gnome.org/glib/stable/glib-Commandline-opti... |
72,878,439 | Debugger is not stepping into expected function<pre><code>#include<iostream>
#include<string>
using namespace std;
void reverse(string s){
if(s.length()==0){ //base case
return;
}
string ros=s.substr(1);
reverse(ros);
cout<<s[0];
}
int main(){
reverse("binod&quo... | <p>The debugger is stepping into the <code>std::string(const char*)</code> constructor. Your code calls this implicitly before calling <code>reverse</code> because you pass <code>"binod"</code> (which effectively has type <code>const char*</code>) to a function expecting a <code>std::string</code>.</p>
<p>The... | Debugger is not stepping into expected function | c++|debugging | 4 | 68 | 1 | 72,878,595 | 72,878,595 | 6 | true | 2022-07-06T05:43:32.433Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Debugger is not stepping into expected function<pre><code>#include<iostream>
#include<string>
using namespace std;
void reverse(string s){
i... |
72,848,431 | Constexpr methods for nonconstexpr class<p>Is there any reason to add constexpr to class's methods if class hasn't any constexpr constructor? Maybe compiler can do some optimizations in this case?</p> | <p>Yes, one obvious case is when the class is an aggregate class. Aggregate initialization doesn't call any constructor, but can still be used in constant expression evaluation.</p>
<p>Even if the class is not an aggregate class, you can still call a <code>constexpr</code> member function in constant expression evaluat... | Constexpr methods for nonconstexpr class | c++|class|optimization|constexpr | 3 | 68 | 1 | 72,848,490 | 72,848,490 | 6 | true | 2022-07-03T17:06:01.080Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Constexpr methods for nonconstexpr class<p>Is there any reason to add constexpr to class's methods if class hasn't any constexpr constructor? Maybe compiler ... |
72,921,229 | ggplot stacked bar chart in horizontal direction. What is the influence of the y-aesthetic?<p>So I have this data:</p>
<pre><code>structure(list(names = structure(1:4, .Label = c("v1", "v2",
"v3", "v4"), class = "factor"), count = c(55, 13, 2, 2), share = c(0.76,
0.18... | <p>The reason why <code>y = "a"</code> works but <code>y = 1</code> does not is that "a" is interpreted as a factor, whereas 1 is interpreted as a number. This matters, since <code>geom_col</code> tries to guess the orientation from the data types. This is spelled out in the <em>Orientation</em> sec... | ggplot stacked bar chart in horizontal direction. What is the influence of the y-aesthetic? | r|ggplot2|tidyverse | 2 | 68 | 2 | 72,921,593 | 72,921,593 | 7 | true | 2022-07-09T12:06:36.380Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ggplot stacked bar chart in horizontal direction. What is the influence of the y-aesthetic?<p>So I have this data:</p>
<pre><code>structure(list(names = stru... |
72,889,284 | How does Python know there is a local variable before encountering its declaration?<pre><code>def f():
print("Before", locals()) # line 2
print(x); # line 3
x = 2 # line 4
print("After", locals()) # line 5
x = 1
f()
</code></pre>
<p>I am... | <p>To some extent, the answer is implementation specific, as Python only specifies the expected behavior, not how to implement it.</p>
<p>That said, let's look at the byte code generated for <code>f</code> by the usual implementation, CPython:</p>
<pre><code>>>> import dis
>>> dis.dis(f)
2 ... | How does Python know there is a local variable before encountering its declaration? | python|scoping | 2 | 68 | 2 | 72,889,356 | 72,889,356 | 8 | true | 2022-07-06T20:05:44.307Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How does Python know there is a local variable before encountering its declaration?<pre><code>def f():
print("Before", locals()) # line 2
... |
72,865,651 | How to pass variable to Azure DevOps Run Pipeline<p>I am trying to put predefined value <strong>RELEASE_RELEASENAME</strong> to Azure DevOps Run Pipeline task, but it ends always with error: "##[error]Build parameters is not a valid json object array. Example valid object: [{"VAR1":"VALUE1",&qu... | <p>You could try the change the expression of the variable like:
[{"var1": "$(Release.ReleaseName)"}]</p> | How to pass variable to Azure DevOps Run Pipeline | azure|azure-devops|azure-pipelines-release-pipeline|azure-pipelines-release-task | -1 | 68 | 1 | 72,865,853 | 72,865,853 | -1 | true | 2022-07-05T07:39:05.983Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to pass variable to Azure DevOps Run Pipeline<p>I am trying to put predefined value <strong>RELEASE_RELEASENAME</strong> to Azure DevOps Run Pipeline tas... |
72,796,011 | When to decide to set up a variable to True or False?<p>I'm trying to figure out why some variables are set up directly with a booleans value.</p>
<pre><code>my_boolean = True
print(my_boolean)
</code></pre>
<p>Does anyone have some concrete example to provide and explain the reason for those actions in a real situatio... | <p>Usually, boolean values are used to be a means to either establish a condition. Or to check the correctness of a condition. Sometimes they are just simply used to stop an execution from happening further. It has extended usage but the main one is usually to keep a certain value/piece of code in check.</p>
<p>For exa... | When to decide to set up a variable to True or False? | python|variables|boolean | 0 | 69 | 3 | 72,796,140 | 72,796,140 | 0 | true | 2022-06-29T05:05:23.010Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
When to decide to set up a variable to True or False?<p>I'm trying to figure out why some variables are set up directly with a booleans value.</p>
<pre><code... |
72,799,191 | How to convert string to ISODate in mongodb and compare it with $$NOW<p>Here, In my mongo collection, the date type column data is stored as string. I have a view where I need to compare this date with current date and time $$NOW. Since my date is stored as string. The query is getting executed but not getting compared... | <p>Use <a href="https://www.mongodb.com/docs/manual/reference/operator/aggregation/toDate/" rel="nofollow noreferrer"><code>$toDate</code></a> operator to convert date string to date.</p>
<pre><code>db.collection.aggregate([
{
"$match": {
$expr: {
$lt: [
{
$toDate: &q... | How to convert string to ISODate in mongodb and compare it with $$NOW | mongodb|aggregation-framework | 0 | 69 | 1 | 72,799,748 | 72,799,748 | 0 | true | 2022-06-29T09:42:28.617Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to convert string to ISODate in mongodb and compare it with $$NOW<p>Here, In my mongo collection, the date type column data is stored as string. I have a... |
72,805,718 | What is the best way to pass a variable value from VBA to C# app?<p>I need a way to pass a variable from <code>VBA</code> to C# app , The variable will be a string (a path) which will be used as a parameter in C# method (zip and unzip) .</p>
<p>Example :
My <code>VBA</code> code in ms access :</p>
<pre><code>Dim strSou... | <p>I'd pass them as command line arguments.</p>
<p>(this is untested pseudo-code. you'll probably need to enclose those parameters in quotes and possibly escape special characters).</p>
<pre class="lang-vb prettyprint-override"><code>Shell("C:\your-program.EXE " & strSource & " " & strD... | What is the best way to pass a variable value from VBA to C# app? | c#|vba|ms-access | -1 | 69 | 1 | 72,805,836 | 72,805,836 | 0 | true | 2022-06-29T17:40:56.270Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
What is the best way to pass a variable value from VBA to C# app?<p>I need a way to pass a variable from <code>VBA</code> to C# app , The variable will be a ... |
72,817,676 | Grouping items and expand branches in D3 Org Chart<p>Good day, I'm relatively new using D3. I have created a Org Chart using D3 and JQuery/Javascript.</p>
<pre><code> <script src="https://d3js.org/d3.v7.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/d3-org-chart@2">... | <p>As per source code of the d3-org, you will have to use chart.expandAll(); where chart is your created chart. There are other methods like collapseAll, downloadImage, exportSVG etc. You can refer this file <a href="https://github.com/bumbeishvili/org-chart/blob/master/src/d3-org-chart.js" rel="nofollow noreferrer">ht... | Grouping items and expand branches in D3 Org Chart | javascript|jquery|d3.js | 0 | 69 | 1 | 72,818,158 | 72,818,158 | 0 | true | 2022-06-30T14:36:12.003Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Grouping items and expand branches in D3 Org Chart<p>Good day, I'm relatively new using D3. I have created a Org Chart using D3 and JQuery/Javascript.</p>
<p... |
72,798,635 | Getting a property from a mocked model's relationship (Laravel, PHPUnit)<p>In the code I have this:</p>
<pre><code>if (!$check = $this->getCheck()) {
return false;
}
if (!$user = $check->user) {
return false;
}
$user->verification->some_id;
</code></pre>
<p>Method <code>getCheck</code> is in a tr... | <p>In <code>Laravel</code> you should not mock Models, there is weird side effects with it. You can without a problem use models without saving them to the database, which i assume is the best approach for you.</p>
<pre><code>$check = new Check();
$check->user = new User();
$expect->andReturn($check);
</code></p... | Getting a property from a mocked model's relationship (Laravel, PHPUnit) | php|laravel|orm|phpunit|laravel-8 | 0 | 69 | 1 | 72,820,103 | 72,820,103 | 0 | true | 2022-06-29T09:02:21.413Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Getting a property from a mocked model's relationship (Laravel, PHPUnit)<p>In the code I have this:</p>
<pre><code>if (!$check = $this->getCheck()) {
... |
72,377,666 | Sabre BargainFinderMax REST API ResponseType field not working properly<p>Checking the BFM v4 Rest API <a href="https://developer.sabre.com/docs/rest_apis/air/search/bargain_finder_max/versions/v400/reference-documentation#/default/createBargainFinderMax" rel="nofollow noreferrer">docs</a> we find that we can set a 'Re... | <p>Informing that there's no support for OTA using REST, the REST service answers will always be on GIR format.</p>
<p>Best regards.</p> | Sabre BargainFinderMax REST API ResponseType field not working properly | sabre | 0 | 69 | 1 | 72,822,369 | 72,822,369 | 0 | true | 2022-05-25T12:28:46.533Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Sabre BargainFinderMax REST API ResponseType field not working properly<p>Checking the BFM v4 Rest API <a href="https://developer.sabre.com/docs/rest_apis/ai... |
72,802,297 | How to send clock message from arduino to MIDI synth?<p>I'm trying to send periodically clock from arduino to Electron Digitakt synth with <code>120 bpm</code>. It means I need to send <code>0xF8</code> every 21ms (<code>60000/bpm/ppq -> ppq = 24 pulses per quarter</code>)</p>
<p>My code looks like</p>
<pre><code>vo... | <p>From this <a href="http://www.music-software-development.com/midi-tutorial.html" rel="nofollow noreferrer">MIDI tutorial for programmers</a> it seems the Reset message should be used cautiously:</p>
<blockquote>
<ul>
<li>MIDI Reset message
<ul>
<li>This is a one status byte message 0xFF, without data bytes. It shoul... | How to send clock message from arduino to MIDI synth? | arduino|clock|midi|tempo | 1 | 69 | 1 | 72,825,525 | 72,825,525 | 0 | true | 2022-06-29T13:31:54.540Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to send clock message from arduino to MIDI synth?<p>I'm trying to send periodically clock from arduino to Electron Digitakt synth with <code>120 bpm</cod... |
72,806,705 | ALINK error 1065 even when Windows Long Paths enabled<p>I am trying to get a C# Visual Studio 2019/MSBuild job to build on a Jenkins build server. I know that my file paths are too long, so I have enabled Long File Paths in the Group Policy Editor (and verified that it has persisted in the registry editor after a serve... | <p>I am going to set this as an answer since, after Hans Passant's very helpful comments and subsequent research, I think it's pretty definitive that this can mostly only be worked around, not resolved. (As possible exception will be discussed at the end of this answer.)</p>
<p>As stated in those comments, this error o... | ALINK error 1065 even when Windows Long Paths enabled | windows|msbuild|large-address-aware|long-path | 0 | 69 | 1 | 72,833,004 | 72,833,004 | 0 | true | 2022-06-29T19:13:50.977Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
ALINK error 1065 even when Windows Long Paths enabled<p>I am trying to get a C# Visual Studio 2019/MSBuild job to build on a Jenkins build server. I know tha... |
72,847,320 | How to redirect to another page using on keypress in nextjs?<p>I need to redirect users using onkeypress in nextjs.</p>
<p>I have a search input where users can type and then press enter key to go to the other page.</p>
<h4>What I've tried:</h4>
<pre><code> const handler = (e) => {
const ENTER = 13;
if... | <p>You can use the <code>useRouter</code> hook from next - <a href="https://nextjs.org/docs/api-reference/next/router" rel="nofollow noreferrer">https://nextjs.org/docs/api-reference/next/router</a></p>
<p>Try changing you handler to</p>
<pre><code>import {useRouter} from "next/router";
const Component = () ... | How to redirect to another page using on keypress in nextjs? | javascript|next.js | 0 | 69 | 2 | 72,847,382 | 72,847,382 | 0 | true | 2022-07-03T14:33:01.370Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to redirect to another page using on keypress in nextjs?<p>I need to redirect users using onkeypress in nextjs.</p>
<p>I have a search input where users ... |
72,842,772 | C# ACR122U WPF Could not load file<p>im working on a project in WPF where i need to read NFC / RFID Tags.
I bought the ACR122U and tried to set it up, but whenever i start my application the
error "System.BadImageFormatException: "Could not load file or assembly 'Sydesoft.NfcDevice.ACR122U, Version=1.0.0.0, C... | <p>Turns out this error derives from my WPF-Application being 64-bit and the ACR122U library using 32-bit.
Changing my application to 32-bit in Visual Studio solved the issue.</p> | C# ACR122U WPF Could not load file | c#|wpf|nfc|rfid | 0 | 69 | 1 | 72,852,714 | 72,852,714 | 0 | true | 2022-07-02T22:18:48.460Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
C# ACR122U WPF Could not load file<p>im working on a project in WPF where i need to read NFC / RFID Tags.
I bought the ACR122U and tried to set it up, but wh... |
72,858,210 | how to get indexes of elements in MatrixSymbol<p>i generate two matrices :</p>
<p>y=MatrixSymbol('y', n, k)</p>
<p>T=MatrixSymbol('T', n,k) , where</p>
<p>n=k=3</p>
<p>then I get expressions :</p>
<ol>
<li>Matrix([[y[0, 2] + 11.0 * y[1, 2] - 12.0 * y[2, 2] + 195.0*exp(-100000/(5819.8 * T[1] + 5819.8))*y[1, 1] * y[1, 2]... | <p>This is how you get those elements:</p>
<pre class="lang-py prettyprint-override"><code>from sympy import *
from sympy.matrices.expressions.matexpr import MatrixElement
n=k=3
y=MatrixSymbol('y', n, k)
T=MatrixSymbol('T', n,k)
M1 = Matrix([[y[0, 2] + 11.0 * y[1, 2] - 12.0 * y[2, 2] + 195.0*exp(-100000/(5819.8 * T[1... | how to get indexes of elements in MatrixSymbol | python|sympy | 0 | 69 | 1 | 72,858,571 | 72,858,571 | 0 | true | 2022-07-04T14:20:50.300Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to get indexes of elements in MatrixSymbol<p>i generate two matrices :</p>
<p>y=MatrixSymbol('y', n, k)</p>
<p>T=MatrixSymbol('T', n,k) , where</p>
<p>n=... |
72,859,395 | React Native - add specific clearButton on input field when the keyboard is open<p>I am trying to create a specific clear button to use on both ios and android devices. I have created a reusable component for the several fields I have. When I press the fields since the keyboard opens the X button shows in all fields n... | <p>Seems 'keyboardDidShow' and 'keyboardDidHide' events triggered in each reusable component.</p>
<p>You can try another approach. Just use onBlur and onFocus events. It's isolated for each component:</p>
<pre><code><TouchableComponent>
<TextInput
onBlur={() => setIsFocused(false)}
... | React Native - add specific clearButton on input field when the keyboard is open | react-native|keyboard|touchableopacity|react-native-textinput | 0 | 69 | 1 | 72,861,926 | 72,861,926 | 0 | true | 2022-07-04T15:57:49.097Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
React Native - add specific clearButton on input field when the keyboard is open<p>I am trying to create a specific clear button to use on both ios and andr... |
72,856,800 | GetStorage returns null in flutter<p>trying to save some data using GetSorage in flutter app but when i leave the app and come back again all the storage is deleted. this is how i get my data from db</p>
<pre><code> final box = GetStorage();
List<Mesure> measures = [];
if (box.hasData("measures")) {... | <p>use await before box.write() to ensure that the data is written</p>
<pre class="lang-dart prettyprint-override"><code>setState(() async {
widget.mesure.sampleNumber = result.rawContent;
measures.removeWhere((Mesure measure) => measure.id == widget.mesure.id);
measures.add(Mesure.fromJson(widget.mesure.toJso... | GetStorage returns null in flutter | flutter | 0 | 69 | 1 | 72,865,163 | 72,865,163 | 0 | true | 2022-07-04T12:30:19.603Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
GetStorage returns null in flutter<p>trying to save some data using GetSorage in flutter app but when i leave the app and come back again all the storage is ... |
72,865,835 | Prefect: Is is possible to access storage like NAS with multiple machines in Prefect?<p>I have set up a Prefect backend server on a remote machine. I was able to connect local agents from different other machines to the server by modifying the config.toml in the .prefect folder:</p>
<pre><code>[server]
endpoint = "... | <p>I was able to find a solution to my answer. The prerequisite is shared storage (e.g. a NAS), which is accessible on all machines under the same path. In this storage, the flows are stored in the form of .py files. Flows and used local Agents do not need any special preparations.
I simply registered my flows with</p>... | Prefect: Is is possible to access storage like NAS with multiple machines in Prefect? | deployment|server|orchestration|prefect | 0 | 69 | 2 | 72,880,564 | 72,880,564 | 0 | true | 2022-07-05T07:53:02.173Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Prefect: Is is possible to access storage like NAS with multiple machines in Prefect?<p>I have set up a Prefect backend server on a remote machine. I was abl... |
72,891,955 | How to use ScheduledEnqueueTimeUtc with Azure Service bus<p>I am trying to delay processing the message, but it doesn't work. It processes the message right away without any delay. This is how I implemented it:</p>
<pre class="lang-cs prettyprint-override"><code>public QueueClient Client { get; private set; } // set up... | <p>Use <code>UserProperties</code> as a way to workaround. Finally, it works. Thanks, @Markus Meyer</p>
<pre class="lang-cs prettyprint-override"><code>var deliveryCountKey = "DeliveryCount";
var deliveryCount = receivedMessage.UserProperties.ContainsKey(deliveryCountKey) ? (int)receivedMe... | How to use ScheduledEnqueueTimeUtc with Azure Service bus | c#|azure|message-queue|servicebus | 0 | 69 | 1 | 72,893,664 | 72,893,664 | 0 | true | 2022-07-07T03:22:35.050Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to use ScheduledEnqueueTimeUtc with Azure Service bus<p>I am trying to delay processing the message, but it doesn't work. It processes the message right ... |
72,870,319 | Which design pattern to use for using different subclasses based on input<p>There is an interface called <code>Processor</code>, which has two implementations <code>SimpleProcessor</code> and <code>ComplexProcessor</code>.</p>
<p>Now I have a process, which consumes an input, and then using that input decides whether i... | <p>It is possible to use <a href="https://en.wikipedia.org/wiki/Strategy_pattern" rel="nofollow noreferrer">Strategy pattern</a> with combination of <a href="https://en.wikipedia.org/wiki/Factory_method_pattern" rel="nofollow noreferrer">Factory pattern</a>. Factory objects can be cached to have reusable objects withou... | Which design pattern to use for using different subclasses based on input | oop|design-patterns | -1 | 69 | 2 | 72,895,480 | 72,895,480 | 0 | true | 2022-07-05T13:30:45.600Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Which design pattern to use for using different subclasses based on input<p>There is an interface called <code>Processor</code>, which has two implementation... |
72,903,231 | React native paper display custom views when List accordian is expanded<p>Unable to display custom view as list item in react native paper List accordian . I could only figure out that it can be used for text but not for custom components or custom views. Can anyone let me know if this can be done using react native pa... | <p>You can display custom view like this</p>
<pre><code><List.Accordion
title="Accordion"
left={(props) => <List.Icon {...props} icon="folder" />}>
<TextInput style={{height:100}} placeholder={'enter text...'}/>
</List.Accordion>
</code></pre> | React native paper display custom views when List accordian is expanded | android|react-native|accordion|react-native-paper | 0 | 69 | 1 | 72,906,766 | 72,906,766 | 0 | true | 2022-07-07T19:26:00.170Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
React native paper display custom views when List accordian is expanded<p>Unable to display custom view as list item in react native paper List accordian . I... |
72,908,178 | Is this a proper way to AES encrypt larger file in powershell?<p>I've tried first by loading the file content into some variable with <code>[IO.File]::ReadAllBytes</code></p>
<p>But that takes a lot of RAM and it's painfully slow.</p>
<p>So here's what I've got:</p>
<pre><code>ErrorActionPreference = "Stop"
$... | <p>Yes, use streams and <code>CopyTo</code>. Yes, you should probably prefix the IV, no it doesn't do this automatically.</p>
<p>Note that you provide confidentiality, but no authenticity / integrity. This could be fine for encrypting files though.</p>
<p>You have used <code>Aes.Create()</code> and indicated the exact ... | Is this a proper way to AES encrypt larger file in powershell? | .net|powershell|encryption|powershell-4.0|encryption-symmetric | 1 | 69 | 1 | 72,909,028 | 72,909,028 | 0 | true | 2022-07-08T07:36:45.740Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is this a proper way to AES encrypt larger file in powershell?<p>I've tried first by loading the file content into some variable with <code>[IO.File]::ReadAl... |
72,913,511 | React MUI TextField component with 'sx' works but 'styled' does not, why<p>I am writing a styled 'modal' TextField component which I want to overlay on my app. If I use 'sx' styling the component works as expected. However, if I use 'styled' from the mui material styles package (which I have used very successfully in t... | <p>You need to place your const for the styled component outside you container and export it so you have access to it. Here is a working <a href="https://codesandbox.io/s/basictextfields-demo-material-ui-forked-mzu5nt?file=/demo.tsx:2168-2528" rel="nofollow noreferrer">sandbox</a></p>
<pre><code>export const ModalTextF... | React MUI TextField component with 'sx' works but 'styled' does not, why | reactjs|material-ui|textfield | 0 | 69 | 1 | 72,913,814 | 72,913,814 | 0 | true | 2022-07-08T15:13:59.743Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
React MUI TextField component with 'sx' works but 'styled' does not, why<p>I am writing a styled 'modal' TextField component which I want to overlay on my ap... |
72,914,695 | React Router Dom, redirection happens before the code inside useEffect gets executed<p>I am attempting to use React's <code>useEffect</code> hook to run a fetch command and store the result in state. I would then like to use that state value to conditionally render a React Route component. I am having trouble setting t... | <h1>Issue</h1>
<p>Your initial <code>token</code> state masks, or matches, the "unauthenticated" state and this is why the <code>Navigate</code> component is rendered on the initial render cycle and navigates to the login route.</p>
<h1>Solution</h1>
<p>Don't use the same initial state as either the "aut... | React Router Dom, redirection happens before the code inside useEffect gets executed | javascript|reactjs|typescript|react-router-dom | 2 | 69 | 2 | 72,915,699 | 72,915,699 | 0 | true | 2022-07-08T17:00:11.103Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
React Router Dom, redirection happens before the code inside useEffect gets executed<p>I am attempting to use React's <code>useEffect</code> hook to run a fe... |
72,916,556 | Select next non empty cell in A column - Excel VBA<p>Trying to have a button to select next non empty/blank cell in column A, relative to current row. The code below works, but only if active cell is in column A.
Need it to work on column A, even when active cell is in another column.</p>
<pre><code>Private Sub Command... | <p>The problem is your activecell is in the wrong column. You need to address that:</p>
<pre><code>Private Sub CommandButton3_Click() 'Next step button - selects next step in A column
Dim n As Long, fixed_range As Range
Set fixed_range = ActiveSheet.Cells(ActiveCell.Row, 1)
n = Cells(Rows.Count, fixed_range.Column).End... | Select next non empty cell in A column - Excel VBA | excel|vba | 0 | 69 | 1 | 72,916,814 | 72,916,814 | 0 | true | 2022-07-08T20:14:55.140Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Select next non empty cell in A column - Excel VBA<p>Trying to have a button to select next non empty/blank cell in column A, relative to current row. The co... |
72,924,802 | Error HTTP status code is not handled or not allowed<p>I am trying to get the data from json but they give me error that <code>HTTP status code is not handled or not allowed</code> is there anysolution how to handle these error in scrapy what is the reason these error will occur is that many request occur that why they... | <p>You are getting <code>HTTP status code is not handled or not allowed</code> because of headers and param's extravagant.</p>
<pre><code>import scrapy
import json
from scrapy.crawler import CrawlerProcess
class TestSpider(scrapy.Spider):
name = 'test'
custom_settings = {
'CONCURRENT_REQUESTS_PER_DOMAI... | Error HTTP status code is not handled or not allowed | python|json|web-scraping|scrapy | 0 | 69 | 1 | 72,925,136 | 72,925,136 | 0 | true | 2022-07-09T21:40:43.917Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Error HTTP status code is not handled or not allowed<p>I am trying to get the data from json but they give me error that <code>HTTP status code is not handle... |
72,922,893 | Mock not respecting dynamic parameters with mocktail and GetIt dependency injection<p>I have a mock for a <code>SharedPreferencesService</code> that is supposed to return a true/false depending on whether it's the user's first time using the app.</p>
<p>I have a parameter in my method to initialize the mock service to ... | <p>I've found two solutions:</p>
<p>First, make sure I initialize the SUT <em>after</em> I update the locator.</p>
<pre><code>test(
'loadAuthenticationPage - firstTimeUsingApp set to value in sharedprefs',
() async {
// ARRANGE
var service =
getAndRegisterSharedPreferencesServiceMock(firstTimeUsage: f... | Mock not respecting dynamic parameters with mocktail and GetIt dependency injection | flutter|unit-testing|mocking|flutter-dependencies|stacked | 0 | 69 | 1 | 72,929,242 | 72,929,242 | 0 | true | 2022-07-09T16:08:18.317Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Mock not respecting dynamic parameters with mocktail and GetIt dependency injection<p>I have a mock for a <code>SharedPreferencesService</code> that is suppo... |
72,925,389 | Create order details shortcode for WooCommerce<p>Hey I am trying to build a shortcode for my order details on the order received page.</p>
<p>The code below will generate the last result and then on top of it, it will display the word Array. My guess is that something in the foreach loop i am creating is still an array... | <p>It looks like you jumbled a few things up, and had some unused variables in there. Try this.</p>
<pre><code>function getOrderItemList() {
// set up array.
$item_list = '';
// get order ID.
global $wp;
$order_id = absint( $wp->query_vars['order-received'] );
$order = wc... | Create order details shortcode for WooCommerce | php|wordpress|shortcode | 1 | 69 | 1 | 72,932,032 | 72,932,032 | 0 | true | 2022-07-10T00:04:51.037Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Create order details shortcode for WooCommerce<p>Hey I am trying to build a shortcode for my order details on the order received page.</p>
<p>The code below ... |
72,910,411 | How to remove an Azure AD B2C application's api permission by MSAL JAVA?<p>I can grant an api permission by:</p>
<pre><code> OAuth2PermissionGrant ret = graphClient.oauth2PermissionGrants()
.buildRequest()
.post(oAuth2PermissionGrant);
AppRoleAssignment ret = graphClient.serv... | <p>Access which was granted can be revoked when that delegated permission grant is deleted. access tokens already in use will continue to be valid for their lifetime, but new access tokens will not be granted permissions.i.e;new ones are not generated..</p>
<pre><code>GraphServiceClient graphClient = GraphServiceClien... | How to remove an Azure AD B2C application's api permission by MSAL JAVA? | azure-ad-b2c|aad-b2c | 0 | 69 | 1 | 72,937,584 | 72,937,584 | 0 | true | 2022-07-08T10:57:50.193Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to remove an Azure AD B2C application's api permission by MSAL JAVA?<p>I can grant an api permission by:</p>
<pre><code> OAuth2PermissionGrant ret... |
72,936,514 | Java Hikari How to solve SSL factory error when using org.postgresql.ssl.jdbc4.LibPQFactory<p>I'm trying to create a DB connection using Hikari data source
this is my Parameters, i need to use a sslfactory
when i use LibPQFactor it fails with the error below, how can i solve it ?
i want to clarify that i must <strong>N... | <p>Thanks to Jjanes
i had a typo and missing a y in the factory name</p>
<pre><code>?sslmode=verify-ca&ssl=true&sslrootcert=/var/lib/jetty/global-bundle.pem&sslfactory=org.postgresql.ssl.jdbc4.LibPQFactory
</code></pre> | Java Hikari How to solve SSL factory error when using org.postgresql.ssl.jdbc4.LibPQFactory | java|spring|postgresql|ssl|hikaricp | 0 | 69 | 1 | 72,941,622 | 72,941,622 | 0 | true | 2022-07-11T09:42:01.613Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Java Hikari How to solve SSL factory error when using org.postgresql.ssl.jdbc4.LibPQFactory<p>I'm trying to create a DB connection using Hikari data source
t... |
72,925,309 | traefik HTTP POST request net::ERR_CONNECTION_RESET<p>I am trying to install <a href="https://hub.docker.com/r/openspeedtest/latest" rel="nofollow noreferrer">This docker image</a></p>
<p>which runs on port 3000 for http and 3001 for https.</p>
<p>I need to run just HTTP version on a LocalNetwork.</p>
<p>I am getting n... | <p>I don't know why i need to add</p>
<p><code>"traefik.http.middlewares.limit.buffering.maxRequestBodyBytes</code></p>
<p>now it is working for me.</p>
<p>mytraefik yml</p>
<pre><code>
version: "3.9"
services:
traefik:
image: traefik:v2.8.0
container_name: traefik
command:
- --log.le... | traefik HTTP POST request net::ERR_CONNECTION_RESET | traefik|traefik-ingress|traefik-authentication|traefik-plugins | 0 | 69 | 1 | 72,949,810 | 72,949,810 | 0 | true | 2022-07-09T23:43:10.010Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
traefik HTTP POST request net::ERR_CONNECTION_RESET<p>I am trying to install <a href="https://hub.docker.com/r/openspeedtest/latest" rel="nofollow noreferrer... |
72,956,254 | Get the last element of a 'request.security_lower_tf' array<p>I am trying to get the last element of an array containing multiple daily <code>close</code> values, and using the code below I get an error. I believe it is related to the fact that the array has a zero size at the first bar of the chart. I tried in various... | <p>You are correct. The error is caused on the first bar, which returns 0 elements.<br />
So, the solution is to only retrieve the element when you have a non-zero array size.<br />
Also, remember that arrays are zero-based, so the index of the last element in the array will always be one less than the array size.<br /... | Get the last element of a 'request.security_lower_tf' array | pine-script|pinescript-v5 | 0 | 69 | 1 | 72,956,869 | 72,956,869 | 0 | true | 2022-07-12T17:31:05.613Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Get the last element of a 'request.security_lower_tf' array<p>I am trying to get the last element of an array containing multiple daily <code>close</code> va... |
72,962,462 | Save the data in Local storage using jQuery<p>I create a table with CRUD operations in jQuery. All CRUD operations worked, no issues on it. I need to save the data in local storage. But I don't know the code for how to save the data in local storage. Please help me to code for save the data in local storage. Below, my ... | <p>add this</p>
<p><code>localStorage.setItem('x', y);</code></p>
<p>x = name of whatver you want the local storage var to be
y = the value of what you want to save</p>
<p>for example:</p>
<p><code>const id = $(this).parent().parent().find(".txtID").val();</code></p>
<p>you would save it in local storage as<... | Save the data in Local storage using jQuery | html|jquery|save|local-storage|crud | 0 | 69 | 1 | 72,962,676 | 72,962,676 | 0 | true | 2022-07-13T07:30:32.890Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Save the data in Local storage using jQuery<p>I create a table with CRUD operations in jQuery. All CRUD operations worked, no issues on it. I need to save th... |
72,968,003 | How do you create multiple buttons in a ListView that are independent of each other?<p>I have setup a Firestore database in which I have a collection 'products'. I use a ListView builder to print them out on ListTiles.
I have also created leading "checkmark" IconButtons that appear for all ListTiles.
My goal ... | <p>You are using single variable <code>iconColor</code> to change all items. That's why all items are getting effected by changing any of it. You can create a <code>List<int></code> to hold selected index
, <code>List<YourModelClass></code> or on your model create another bool variable <code>bool icChecke... | How do you create multiple buttons in a ListView that are independent of each other? | flutter|firebase|dart|google-cloud-firestore | 0 | 69 | 4 | 72,968,191 | 72,968,191 | 0 | true | 2022-07-13T14:28:16.323Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How do you create multiple buttons in a ListView that are independent of each other?<p>I have setup a Firestore database in which I have a collection 'produc... |
72,994,191 | Java Stream iterate is not working with a predicate when doing a check for even-odd<p>I am trying to create a Stream of even integer using Stream.iterate where I will pass a Predicate to check for even and an Unary operator.</p>
<pre><code> Stream<Integer> stream = Stream.iterate(0, s-> ((s<10) &... | <p>Ihe second parameter is called hasNext, so if s is 1 the prdicate return false and the iteration stops.</p>
<p>Use:</p>
<pre><code> IntStream.range(0,10).filter(s-> s%2==0).forEach(System.out::println);
</code></pre>
<p>it will print:</p>
<pre><code>0
2
4
6
8
</code></pre> | Java Stream iterate is not working with a predicate when doing a check for even-odd | java|lambda|functional-programming|java-stream|predicate | -3 | 69 | 2 | 72,994,272 | 72,994,272 | 0 | true | 2022-07-15T12:43:59.163Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Java Stream iterate is not working with a predicate when doing a check for even-odd<p>I am trying to create a Stream of even integer using Stream.iterate whe... |
73,004,290 | How to align items HStack to VStack SwiftUI?<p>I'm new to swiftui, even though I tried all the ways, I can't get any reaction.</p>
<p>How to align everything like in the picture? (I've tried everything I know)</p>
<pre><code> ForEach(viewModel.setupList, id:\.self){ item in
ZStack{
Color.colorDark... | <p>I don't have your full code, so I could not run your app.</p>
<p>However, here is a solution, try replicate my sample view with your own image, size, and resource. Code is below the image:
<a href="https://i.stack.imgur.com/FF08p.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FF08p.png" alt="ente... | How to align items HStack to VStack SwiftUI? | ios|swift|swiftui | 1 | 69 | 1 | 73,004,532 | 73,004,532 | 0 | true | 2022-07-16T12:40:09.740Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to align items HStack to VStack SwiftUI?<p>I'm new to swiftui, even though I tried all the ways, I can't get any reaction.</p>
<p>How to align everything... |
73,005,550 | For loop in r for if else statements<p><img src="https://i.stack.imgur.com/rzZeQ.png" alt="enter image description here" />Good morning,
I can't quite grasp what I am doing wrong here, could someone assist? I am trying to convert my datetime in r but some of my dates are "Jan." or "Aug." so I get nu... | <p>The lubridate backage is fairly clever at working out how to interpret a date. I'm using the tidyverse simply for formatting and showing the column type easily.</p>
<p>First, create some test data</p>
<pre><code>library(lubridate)
library(tidyverse)
d <- tibble(Workout.Date=c("July 14, 2022", "Ju... | For loop in r for if else statements | r|as.date | 0 | 69 | 2 | 73,006,771 | 73,006,771 | 0 | true | 2022-07-16T15:43:05.853Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
For loop in r for if else statements<p><img src="https://i.stack.imgur.com/rzZeQ.png" alt="enter image description here" />Good morning,
I can't quite grasp ... |
73,013,492 | Is breaking my class into multiple classes, the right thing to do?<p>I'm working with Unity and C# and I have a canvas that is about a competition with several milestones. So I have to show a leaderboard and a slider for the player's progress in the competition and the rewards they'v got since now and also some other s... | <p>Single Responsibility Principle (SRP) is one of the <em>many</em> software development principles and practices that can be interpreted multiple ways. It's an organizational approach, and any time organization will involve more than a single attribute it can be sliced different ways and in different orders.</p>
<h2>... | Is breaking my class into multiple classes, the right thing to do? | c#|unity3d|oop|code-cleanup|single-responsibility-principle | -2 | 69 | 1 | 73,013,831 | 73,013,831 | 0 | true | 2022-07-17T16:25:32.997Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Is breaking my class into multiple classes, the right thing to do?<p>I'm working with Unity and C# and I have a canvas that is about a competition with sever... |
73,012,776 | Set assets path for `exports` property in package.json<p>I noticed that since Angular 13 Webpack started to add <code>exports</code> property to the package.json. And it breaks my library package. That is because there are SCSS and asset files in the library and those are consumed by <code>@import</code> statement by t... | <p>I've found the answer. The issue occurred because the assets were referred from inside the library using the <em>package name</em> instead of the relative path.
Let's say here is a package structure:</p>
<pre><code>@namespace/my-lib
|-> scss/src/main.scss
|-> assets/fonts/materialicons/MaterialIcons-Outlined.w... | Set assets path for `exports` property in package.json | angular|webpack | 0 | 69 | 1 | 73,015,680 | 73,015,680 | 0 | true | 2022-07-17T14:48:55.497Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Set assets path for `exports` property in package.json<p>I noticed that since Angular 13 Webpack started to add <code>exports</code> property to the package.... |
73,013,920 | Flutter error encounter 'The argument type 'int' can't be assigned to the parameter type 'CardItem'.'<p><a href="https://i.stack.imgur.com/ZCrkz.png" rel="nofollow noreferrer">enter image description here</a>
Encounter an error</p>
<blockquote>
<p>(The argument type 'int' can't be assigned to the parameter type 'CardIt... | <p>Firstly you extracted Widget to method which named <code>buildCard</code>. This approach is not recommended by Flutter. To learn more why:</p>
<p><a href="https://dartcodemetrics.dev/docs/rules/flutter/avoid-returning-widgets" rel="nofollow noreferrer">https://dartcodemetrics.dev/docs/rules/flutter/avoid-returning-w... | Flutter error encounter 'The argument type 'int' can't be assigned to the parameter type 'CardItem'.' | flutter|dart|flutter-layout | 0 | 69 | 3 | 73,017,691 | 73,017,691 | 0 | true | 2022-07-17T17:27:47.647Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Flutter error encounter 'The argument type 'int' can't be assigned to the parameter type 'CardItem'.'<p><a href="https://i.stack.imgur.com/ZCrkz.png" rel="no... |
73,017,718 | Aws-amplify Auth not configured correctly Error<p>When upgrading the aws-amplify package an error might arise auth not configured correctly specially when config is setup manually instead of amplify cli's configure.</p> | <p>So the problem we were facing as we were using manual made config like these:</p>
<pre><code>import Amplify from 'aws-amplify';
Amplify.configure(
Auth: {
identityPoolId: 'XX-XXXX-X:XXXXXXXX-XXXX-1234-abcd-1234567890ab', //REQUIRED - Amazon Cognito Identity Pool ID
region: 'XX-XXXX-X', // REQUIRE... | Aws-amplify Auth not configured correctly Error | javascript|reactjs|authentication|aws-amplify|amplify | 0 | 69 | 1 | 73,017,756 | 73,017,756 | 0 | true | 2022-07-18T05:35:38.720Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Aws-amplify Auth not configured correctly Error<p>When upgrading the aws-amplify package an error might arise auth not configured correctly specially when co... |
73,022,445 | Refresh multiple Excel files with different file paths - Using Python<p>Hi I have just started learning python/programming and have the following problem:</p>
<p>I want to refresh several excel files with python. However, all these excel files have a completely different file path, so they are not all stored in one fol... | <p>I would do something like that.</p>
<pre><code>import win32com.client as win32
file_paths = ['path_one', 'path_two']
Xlsx = win32.DispatchEx('Excel.Application')
Xlsx.DisplayAlerts = False
Xlsx.Visible = False
for path in file_paths:
book = Xlsx.Workbooks.Open(path)
book.RefreshAll()
Xlsx.CalculateUnt... | Refresh multiple Excel files with different file paths - Using Python | python|excel|pywin32 | 0 | 69 | 2 | 73,022,674 | 73,022,674 | 0 | true | 2022-07-18T12:39:36.093Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Refresh multiple Excel files with different file paths - Using Python<p>Hi I have just started learning python/programming and have the following problem:</p... |
72,914,128 | Python on Linux says 'no such file or directory' even if it exists<p>I'm getting the error <code>no such file or directory</code> from Python when I try to open a .xlsx file with openpyxl.</p>
<p>It's strange because:
All files (.py and .xlsx) are stored on my NAS.
The script reads several .xlsx files from different di... | <p>The name wasn't identical. It looked that way, but the name contained an "ä" which wasn't recognized correctly by Linux.</p> | Python on Linux says 'no such file or directory' even if it exists | python|linux|openpyxl|mount|smb | 0 | 69 | 1 | 73,028,458 | 73,028,458 | 0 | true | 2022-07-08T16:06:23.847Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python on Linux says 'no such file or directory' even if it exists<p>I'm getting the error <code>no such file or directory</code> from Python when I try to o... |
72,904,139 | Azure AD B2C Custom Policy Key Management: Can I upload 2 policy keys and use both of them for id hint token validation?<p>I have a custom Azure AD B2C Sign Up Invitation flow with a single policy key. The key is used to sign the token that's contained in the invitation link email and is then validated at sign up time.... | <p>You can have more than one certificate inside a key container. The system will use both to determine if the invitation token is valid up until the cert itself expires.</p> | Azure AD B2C Custom Policy Key Management: Can I upload 2 policy keys and use both of them for id hint token validation? | certificate|azure-ad-b2c|azure-ad-b2c-custom-policy | 0 | 69 | 2 | 73,109,864 | 73,109,864 | 0 | true | 2022-07-07T20:58:15.507Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Azure AD B2C Custom Policy Key Management: Can I upload 2 policy keys and use both of them for id hint token validation?<p>I have a custom Azure AD B2C Sign ... |
73,028,470 | Python package with optional namespace sub-packages<h2>Problem</h2>
<p>I am struggling to create a single entry point for installing a python package that leverages <a href="https://packaging.python.org/en/latest/guides/packaging-namespace-packages/" rel="nofollow noreferrer">namespace sub-package</a> to allow users to... | <p>Here is the setup.py that worked for me. I got inspiration from <a href="https://stackoverflow.com/questions/19569557/pip-not-picking-up-a-custom-install-cmdclass">this post</a></p>
<p><code>starwars/setup.py</code></p>
<pre class="lang-py prettyprint-override"><code>import subprocess
from setuptools import setup
fr... | Python package with optional namespace sub-packages | python|python-3.x|installation|pip|namespaces | 2 | 69 | 1 | 73,115,188 | 73,115,188 | 0 | true | 2022-07-18T20:48:50.500Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python package with optional namespace sub-packages<h2>Problem</h2>
<p>I am struggling to create a single entry point for installing a python package that le... |
72,858,491 | Asterisk Freepbx - hide external number on user's display after forwarding<p>For some reason I can not find the necessary information on the Internet.</p>
<p>Subscriber A has set forwarding to an external number (output to the city goes through a sip trunk). I want this external number to be hidden for subscriber B, wh... | <p>it seems to work like that:</p>
<pre><code>[dial-siemens]
exten => _11X.,1,ExecIf($["${DB(CF/${CONNECTEDLINE(num)})}"!=""]?Macro(dial-siemens-cf-external,${EXTEN}),s,1)
exten => _11X.,n,Dial(PJSIP/${EXTEN}@Siemens,120)
exten => _11X.,n,Hangup()
[macro-dial-siemens-cf-external]
exten =&g... | Asterisk Freepbx - hide external number on user's display after forwarding | asterisk|freepbx | -1 | 69 | 2 | 73,133,303 | 73,133,303 | 0 | true | 2022-07-04T14:42:01.200Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Asterisk Freepbx - hide external number on user's display after forwarding<p>For some reason I can not find the necessary information on the Internet.</p>
<p... |
72,779,843 | Disable Layout Scaling WinUI 3.0<p>How do I do the equivalent of UWP XAML UI's ApplicationViewScaling.TrySetDisableLayoutScaling(true) in a WinUI 3.0 Desktop application?</p> | <p>WinUI 3.0 Application UI's are already adjusted for DPI Scaling, but media is not. If your screen size is 1080p and media is 1080p, but scaling is 125%, the media will be larger than the screen size, but the app will be properly adjusted. If you have a lot of media, it might be worth scaling the root frame.</p>
<p>T... | Disable Layout Scaling WinUI 3.0 | winapi|winui-3 | 0 | 69 | 1 | 73,214,881 | 73,214,881 | 0 | true | 2022-06-28T01:38:05.450Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Disable Layout Scaling WinUI 3.0<p>How do I do the equivalent of UWP XAML UI's ApplicationViewScaling.TrySetDisableLayoutScaling(true) in a WinUI 3.0 Desktop... |
73,028,129 | Problems about Scheme with postfix<p>Here is my code about postfix in scheme:</p>
<pre><code>(define (stackupdate e s)
(if (number? e)
(cons e s)
(cons (eval '(e (car s) (cadr s))) (cddr s))))
(define (postfixhelper lst s)
(if (null? lst)
(car s)
(postfixhelper (cdr lst) (stackupdate (car lst) s))))... | <p><code>eval</code> never has any information about variables that some how are defined in the same scope as it is used. Thus <code>e</code> and <code>s</code> does not exist. Usually <code>eval</code> is the wrong solution, but if you are to use eval try doing it as as little as you can:</p>
<pre><code>;; Use eval to... | Problems about Scheme with postfix | scheme|postfix-notation|mit-scheme | 0 | 69 | 1 | 73,035,617 | 73,035,617 | 0 | true | 2022-07-18T20:16:02.667Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Problems about Scheme with postfix<p>Here is my code about postfix in scheme:</p>
<pre><code>(define (stackupdate e s)
(if (number? e)
(cons e s)
(... |
72,946,088 | Search for event date falling between two Cloud Firestore timestamps in SwiftUI<p>Primarily what I’m looking to do, is to pull out documents from my Cloud Firestore when the current date falls between two timestamp fields. I have included simplified code snippets below. Hopefully it makes sense, as I’m a noob.</p>
<p... | <p>you could try this approach, using some functions to <code>...pull out only the calendar events when the current date (i.e. now) falls between the datebegin and dateend...</code> and sorting the results based on time to <code>...then I would subsequently sort the resulting list by day ideally (based on the Day of da... | Search for event date falling between two Cloud Firestore timestamps in SwiftUI | firebase|date|google-cloud-firestore|swiftui|timestamp | 0 | 69 | 1 | 72,946,808 | 72,946,808 | 0 | true | 2022-07-12T01:14:56.953Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Search for event date falling between two Cloud Firestore timestamps in SwiftUI<p>Primarily what I’m looking to do, is to pull out documents from my Cloud Fi... |
72,885,528 | Pass data from RecyclerView to another in fragment<p>i want to pass data from recyclerview to another both in fragment, first adapter
for display item, and second adapter for basket fragment that want to put selected item in.</p>
<p>Adapter I want to take data from</p>
<pre><code>public class FruitItemAdapter extends R... | <p>You can achieve this by using the <strong>delegation pattern</strong>. Basically you create an interface relative to the first adapter (you can put it inside the adapter class or outside depending on your coding style) and you require it as an argument inside the adapter constructor like this:</p>
<pre class="lang-j... | Pass data from RecyclerView to another in fragment | java|android|android-recyclerview|fragment|transfer | 0 | 69 | 1 | 72,886,825 | 72,886,825 | 0 | true | 2022-07-06T14:41:37.473Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Pass data from RecyclerView to another in fragment<p>i want to pass data from recyclerview to another both in fragment, first adapter
for display item, and s... |
72,907,867 | How to import @NonNull class<p><strong>I have to import @NonNull but can not find out using Alt+Enter in Windows, what steps have to do to import @NonNull class in java.</strong></p>
<pre><code>private Toaster(@NonNull Context context) {
weakReference = new WeakReference<>(context);
}
public static Toaster g... | <p>Settings > Keymap > Find 'Alt+Enter'.</p>
<p><a href="https://i.stack.imgur.com/pIv8N.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pIv8N.png" alt="enter image description here" /></a></p> | How to import @NonNull class | java|android|android-studio | -1 | 69 | 1 | 72,907,909 | 72,907,909 | 0 | true | 2022-07-08T07:08:02.620Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
How to import @NonNull class<p><strong>I have to import @NonNull but can not find out using Alt+Enter in Windows, what steps have to do to import @NonNull cl... |
72,805,797 | In Foundry, how can I Hive partition with only 1 parquet file per value?<p>I'm looking to improve the performance on running filtering logic. To accomplish this, the idea is to do hive partitioning setting by setting the partition column to a column in the dataset (called <code>splittable_column</code>).</p>
<p>I che... | <p>If you look at the input data, you may notice that the data is split across multiple parquet files. When you look at the build report for just running <code>my_output_df.write_dataframe(df_with_logic,partition_cols=["splittable_column"])</code>, you may notice that there is no shuffle in the query plan.<... | In Foundry, how can I Hive partition with only 1 parquet file per value? | pyspark|palantir-foundry|hive-partitions|foundry-code-repositories|foundry-code-workbooks | 1 | 69 | 1 | 72,806,152 | 72,806,152 | 0 | true | 2022-06-29T17:48:07.090Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
In Foundry, how can I Hive partition with only 1 parquet file per value?<p>I'm looking to improve the performance on running filtering logic. To accomplish... |
72,875,405 | Exception caught by widgets library, Null check operator used on a null value<p>I want to add a messaging plugin to my application, but I get the error "Null check operator used on a null value". I'm getting uid error, '?' next to String I put it but it doesn't work.</p>
<p>Error:</p>
<blockquote>
<p>Type <co... | <p>Most probably the <code>snap</code> in <code>User.fromSnap</code> is returning <code>null</code> on some of its values. To solve this you should do the following:</p>
<ul>
<li>First, you should make sure the values are not <code>null</code> from the API/DB/whatever the snapshot comes from;</li>
<li>For the <code>nul... | Exception caught by widgets library, Null check operator used on a null value | flutter|dart | 2 | 69 | 1 | 72,879,902 | 72,879,902 | 0 | true | 2022-07-05T20:54:25.967Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Exception caught by widgets library, Null check operator used on a null value<p>I want to add a messaging plugin to my application, but I get the error "... |
72,788,508 | JavaScript function always return false even if a value is true<p>I have a function returns <code>true</code> or <code>false</code> but what I see is this function always returns <code>false</code>.</p>
<pre><code> const isLastImageAttachment = index => {
const isLastImage =
filteredImages.uuid === attach... | <p>If you are 100% sure the is "islastimage" return true
if not check your index param</p>
<pre><code> const isLastImage = filteredImages.uuid === attachments[index].uuid;
</code></pre>
<p>Then your code is correct just change what I mentioned down blow</p>
<pre><code> const isLastImageAttachment = index =&... | JavaScript function always return false even if a value is true | javascript|reactjs | -1 | 69 | 4 | 72,788,779 | 72,788,779 | 0 | true | 2022-06-28T14:39:29.207Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
JavaScript function always return false even if a value is true<p>I have a function returns <code>true</code> or <code>false</code> but what I see is this fu... |
72,825,963 | Keras: Siamese Model with VGG16 is stuck at 50% accuarcy<p>I´m trying to create a Siamese model with <code>Keras</code> which learns to recognize differences in Mel-Spectrograms.
The dataset I´m using is the ESC-50 dataset.
I split it in training files (40 classes a 40 files) and test files (5 classes a 40 files).
I ge... | <p>I could change that by changing the last activation function from sigmoid to relu:</p>
<pre><code>#Output Layer
outputs = Dense(1, activation="relu")(distance)
</code></pre> | Keras: Siamese Model with VGG16 is stuck at 50% accuarcy | python|tensorflow|keras | 1 | 69 | 1 | 72,948,622 | 72,948,622 | 0 | true | 2022-07-01T07:44:48.750Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Keras: Siamese Model with VGG16 is stuck at 50% accuarcy<p>I´m trying to create a Siamese model with <code>Keras</code> which learns to recognize differences... |
72,902,566 | Python - Read a CSV and Delete Last Comma of Last Row Value<p>I have the following code to generate a <code>.csv</code> File:</p>
<pre><code>sfdc_dataframe.to_csv('sfdc_data_demo.csv',index=False,header=True)
</code></pre>
<p>It is just one column, how could I get the last value of the column, and delete the last comma... | <p>Updated answer below as it only required to change value of the last row.</p>
<pre><code>val = sfdc_dataframe.iloc[-1, sfdc_dataframe.columns.get_loc('col')]
sfdc_dataframe.iloc[-1, sfdc_dataframe.columns.get_loc('col')] = val[:-1]
</code></pre> | Python - Read a CSV and Delete Last Comma of Last Row Value | python|csv | 0 | 69 | 3 | 72,902,644 | 72,902,644 | 0 | true | 2022-07-07T18:21:43.363Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Python - Read a CSV and Delete Last Comma of Last Row Value<p>I have the following code to generate a <code>.csv</code> File:</p>
<pre><code>sfdc_dataframe.t... |
72,944,433 | Add another css grid container/div below the first one<p>I've been learning css grid, and I've tried to make a common layout. In this layout I want to add another container/div (basically a sidebar) just below the first one, tinkering around with it, I've managed to get it to the second row however it appears at the ve... | <p>You could make it way simpler with Flexbox or Bootstrap-Grid. The easiest way with CSS-Grid is either using <code>grid-template-areas</code> or hardcode their position with <code>grid-column</code> to move inside the right column.</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-... | Add another css grid container/div below the first one | html|css|flexbox|css-grid | 1 | 69 | 2 | 72,944,661 | 72,944,661 | 0 | true | 2022-07-11T20:41:27.067Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
Add another css grid container/div below the first one<p>I've been learning css grid, and I've tried to make a common layout. In this layout I want to add an... |
72,974,371 | how to Get last Transaction For Ticket based on time stamp in Bigquery<p><a href="https://i.stack.imgur.com/r7iQh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/r7iQh.png" alt="Based on the below Table on Bigquery "Type: is an actions applied on ticket, timestamp:was when Action Applied " /></a... | <p>Try query below:</p>
<pre class="lang-sql prettyprint-override"><code>with sample_data as (
select struct(111 as ticket_id, ['Open','ReOpen','Modified','Cancelled'] as type, [timestamp('2022-7-14 03:39:00'),timestamp('2022-7-14 03:40:00'),timestamp('2022-7-14 03:50:00'),timestamp('2022-7-14 04:39:00')] as time_stamp... | how to Get last Transaction For Ticket based on time stamp in Bigquery | google-cloud-platform|google-bigquery | -3 | 69 | 1 | 72,975,297 | 72,975,297 | 0 | true | 2022-07-14T01:52:39.107Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
how to Get last Transaction For Ticket based on time stamp in Bigquery<p><a href="https://i.stack.imgur.com/r7iQh.png" rel="nofollow noreferrer"><img src="ht... |
72,830,639 | insert all elements from one binary search tree into another<p>I am given two binary search trees, and I need to insert all the nodes of the binary search tree with the smaller height into the other tree. Both trees are self balancing.</p>
<p>I am not allowed to flatten the trees into sorted arrays.</p>
<p>I am struggl... | <p>If <code>insert</code> rebalances the tree, it may select a different node as the root. There are two main ways to deal with that. One way is to use a double pointer for the destination tree in both <code>insert</code> and <code>merge</code> like this:</p>
<pre><code>void insert(struct node **tree, int value)
{
... | insert all elements from one binary search tree into another | c|recursion|data-structures|binary-tree|binary-search-tree | 0 | 69 | 1 | 72,831,262 | 72,831,262 | 0 | true | 2022-07-01T14:17:32.150Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
insert all elements from one binary search tree into another<p>I am given two binary search trees, and I need to insert all the nodes of the binary search tr... |
72,949,268 | loop with a condition in a two dimensional array with Python<p>I have an array in this form data[values,longitude,latitude] where the size is data[21000,12,13]. The data are daily temperature values for around 50 years in NetCDF format, for an area of 12x13 grids.</p>
<p>I want to extract in a new table the sum of the ... | <p>A possible solution to your question is:</p>
<pre class="lang-py prettyprint-override"><code>file = netCDF4.Dataset ('/mnt/data/rcp45/tas/merged_rcp45/rcp45_Celsius.nc')
lat = file.variables['lat'][:]
lon = file.variables['lon'][:]
data = file.variables['tas'][:]
summed_values = np.zeros((12, 13))
for grid_inde... | loop with a condition in a two dimensional array with Python | python|arrays|netcdf | 0 | 69 | 1 | 72,952,428 | 72,952,428 | 0 | true | 2022-07-12T08:31:17.947Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
loop with a condition in a two dimensional array with Python<p>I have an array in this form data[values,longitude,latitude] where the size is data[21000,12,1... |
72,788,142 | wx.StaticText updates slower with whitespace?<p>I'm writing a simple <a href="https://en.wikipedia.org/wiki/Roguelike" rel="nofollow noreferrer">roguelike</a> in Python 3.10 as a way to learn the language as well as principles of proper software architecture. I'm using wxPython310 (4.1.2a2).</p>
<p>The map is an octago... | <p><strong>1. Switch whitespace to no-break whitespace.</strong></p>
<p>As <a href="https://stackoverflow.com/users/15275/vz">VZ.</a> mentioned, <code>wxStaticText</code> aren't really meant to be used to update big blobs of text. However, he also mentioned that the word wrapping in <code>wxStaticText</code> is a proba... | wx.StaticText updates slower with whitespace? | python|wxpython|wxwidgets | 0 | 69 | 2 | 72,817,426 | 72,817,426 | 0 | true | 2022-06-28T14:18:41.817Z | Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions.
Stackoverflow question:
wx.StaticText updates slower with whitespace?<p>I'm writing a simple <a href="https://en.wikipedia.org/wiki/Roguelike" rel="nofollow noreferrer">roguelike</a... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.