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,193,369
Summary of the method documentation is not showing in Swagger UI<p>I have added the content in the summary tag but it not showing in the swagger ui in .NET 6 Web Api project.</p> <p><a href="https://i.stack.imgur.com/aZmvx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aZmvx.png" alt="enter image de...
<p>Here's what worked on my side (in a sample .NET 6 Web Api project):</p> <ol> <li><p>Go to the properties of your project =&gt; Build =&gt; General =&gt; Output section =&gt; Tick the checkbox 'XML Documentation file'</p> </li> <li><p>Edit the <code>AddSwaggerGen</code> service configuration by adding the following:<...
Summary of the method documentation is not showing in Swagger UI
swagger|swashbuckle
0
304
1
72,303,515
72,303,515
2
true
2022-05-10T22:00:58.933Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Summary of the method documentation is not showing in Swagger UI<p>I have added the content in the summary tag but it not showing in the swagger ui in .NET 6...
72,184,474
Unable to validate the following destination configurations<p>I am trying to enable Eventbridge notification on S3 but I am getting this error message &quot;Unable to validate the following destination configurations &quot; I am not sure what's causing this. Any help would be appreciated.</p>
<p>You may have an issue with the SNS access policy. There is a video of troubleshooting this issue at <a href="https://youtu.be/RjSW75YsBMM" rel="nofollow noreferrer">https://youtu.be/RjSW75YsBMM</a>.</p>
Unable to validate the following destination configurations
amazon-web-services|amazon-s3|aws-lambda|aws-event-bridge
0
238
1
72,306,087
72,306,087
2
true
2022-05-10T10:14:53.623Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Unable to validate the following destination configurations<p>I am trying to enable Eventbridge notification on S3 but I am getting this error message &quot;...
72,214,378
IIS redirect with url exception for stripe<p>I'm working on updating the stripe checkout from a website, I was doing it successfully on localhost but when I put it on live mode on a windows server it stopped working. The issue is that when I should be redirected to the checkout page from stripe, the url is altered and ...
<p>I figured it out. This is my final web.config</p> <pre><code>&lt;configuration&gt; &lt;system.webServer&gt; &lt;urlCompression doDynamicCompression=&quot;false&quot; /&gt; &lt;rewrite&gt; &lt;rules&gt; &lt;clear /&gt; &lt;rule name=&quot;ReverseProxyInboundRule&quot;&gt; ...
IIS redirect with url exception for stripe
node.js|iis|url-rewriting|stripe-payments
0
77
2
72,316,671
72,316,671
2
true
2022-05-12T11:01:19.677Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: IIS redirect with url exception for stripe<p>I'm working on updating the stripe checkout from a website, I was doing it successfully on localhost but when I ...
72,191,639
VS Code extension: setting custom semantic token colors<p>Is it possible to modify the styling of semantic token modifiers received from LSP inside an extension without the need to create custom themes?</p> <p>I am able to use <code>editor.semanticTokenColorCustomizations</code> in my <code>settings.json</code> file an...
<p>You can introduce all your custom semantic tokens without the need to restrict yourself to the built-in ones. Personally I prefer the way proposed in the official sample file: <a href="https://github.com/microsoft/vscode-extension-samples/blob/main/semantic-tokens-sample/src/extension.ts" rel="nofollow noreferrer">s...
VS Code extension: setting custom semantic token colors
visual-studio-code|syntax-highlighting|vscode-extensions
0
516
1
72,377,523
72,377,523
2
true
2022-05-10T18:51:50.540Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: VS Code extension: setting custom semantic token colors<p>Is it possible to modify the styling of semantic token modifiers received from LSP inside an extens...
72,155,221
send2trash not working with tkinter filedialog<p>I am trying to send a file to the trash using send2trash. Used like <code>send2trash(&quot;C:\\path\\to\\file\\file.txt&quot;)</code> works correctly but when using <code>filedialog.askopenfilename()</code> and feeding the results in to it doesn't. I have tried using <co...
<p>Very new to python but I think send2trash only accepts backslashes in pathname and looking at the error 'askopenfilename' is returning path using forward slashes</p> <pre><code>m = filedialog.askopenfilename(title=&quot;Choose which file to shred&quot;,filetypes=[(&quot;file&quot;,&quot;*.*&quot;)]) m = m.replace('/...
send2trash not working with tkinter filedialog
python
0
70
1
72,392,122
72,392,122
2
true
2022-05-07T18:06:42.760Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: send2trash not working with tkinter filedialog<p>I am trying to send a file to the trash using send2trash. Used like <code>send2trash(&quot;C:\\path\\to\\fil...
72,203,678
Strahler stream order using igraph or sfnetwork in R<p>I cannot fathom how to derive <a href="https://en.wikipedia.org/wiki/Stream_order" rel="nofollow noreferrer">strahler order</a> in R. Here's an example in <a href="https://stackoverflow.com/questions/29202822/how-to-determine-strahler-number-on-a-directed-graph-for...
<p>I have found a solution that converts class <code>igraph</code> to class <code>phylo</code> then uses <code>phytools::StrahlerNumber</code>. I had to modify <code>phytools::igraph_to_phylo</code> and reverse the order of my edges to get it to work.</p> <pre><code>library(phytools) library(igraph) library(sfnetworks)...
Strahler stream order using igraph or sfnetwork in R
r|igraph|directed-graph|sfnetwork
0
142
1
72,433,429
72,433,429
2
true
2022-05-11T15:25:39.160Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Strahler stream order using igraph or sfnetwork in R<p>I cannot fathom how to derive <a href="https://en.wikipedia.org/wiki/Stream_order" rel="nofollow noref...
72,229,496
Not able to get access token from azure AD using MSAL4J<p>I'm trying to access graph api. I'm using <code>MSAL4J</code> to access the <code>graph</code> apis. But I'm getting <code>com.microsoft.aad.msal4j.MsalClientException: java.net.SocketTimeoutException: connect timed out</code> even when I'm not using my vpn.</p>...
<p>Finally, I figured it out. And writing this answer with hope that it will help someone. <code>com.microsoft.aad.msal4j.MsalClientException: java.net.SocketTimeoutException: connect timed out</code> This exception was occurring due to the proxy issues.</p> <p>My system was behind the proxy so it was not able to conne...
Not able to get access token from azure AD using MSAL4J
azure-active-directory|msal
0
933
1
72,443,111
72,443,111
2
true
2022-05-13T12:17:43.090Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Not able to get access token from azure AD using MSAL4J<p>I'm trying to access graph api. I'm using <code>MSAL4J</code> to access the <code>graph</code> apis...
72,186,944
Json column - Date field must cast to 'date' in Eloquent model<p>I have a laravel nova panel like below. Im trying to use a Date field like below:</p> <pre><code>new Panel('Suggestions', [ Flexible::make('Suggestions') -&gt;addLayout('Suggestions', 'suggestion', [ Text::make('Title'), ...
<p>Add this to your casts instead of 'date' =&gt; 'date', this solved for me the issue.</p> <pre><code>protected $casts = [ 'flexible-content' =&gt; FlexibleCast::class ]; </code></pre> <p>Another options is resolving it and converting it to a MomentJS format which also works fine:</p> <pre><code>DateTime::...
Json column - Date field must cast to 'date' in Eloquent model
php|laravel|laravel-nova
0
191
1
72,187,829
72,187,829
2
true
2022-05-10T13:08:47.867Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Json column - Date field must cast to 'date' in Eloquent model<p>I have a laravel nova panel like below. Im trying to use a Date field like below:</p> <pre><...
72,231,743
Terraform: use output of one module in another module<p>I have a module called vpc and another module called ecs. I'm trying to reference the AWS subnets created in the vpc module in ecs. Here's what I have, so far:</p> <p>main.tf</p> <pre><code>module &quot;ecs&quot; { source = &quot;./service/ecs&quot; public_sub...
<p><code>count</code> is used when you're using a block that's meant to make multiple resources. Think of it as like the index of a loop. What you're doing is simpler and easier - you're assigning an array to a field that takes an array.</p> <p>First, just reference your array in the module definition. <code>.ids</code...
Terraform: use output of one module in another module
terraform
0
384
1
72,232,025
72,232,025
2
true
2022-05-13T15:07:05.523Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Terraform: use output of one module in another module<p>I have a module called vpc and another module called ecs. I'm trying to reference the AWS subnets cre...
72,193,528
Why substr() returning wrong result when used in a while loop PHP<p>So im using substr to copy certain content inside a while loop but after the first iteration it always return wrong result i tried everything and im sure the logic is right but still im not getting what i want.</p> <p>This is how it should work user wi...
<p>Your problem is that you're not accounting for all the characters in the string, so you've got spaces and newlines which you're not noticing because you're outputting HTML.</p> <p>If you change <code>echo $bin;</code> and <code>echo $short_bin;</code> to <code>var_dump($bin);</code> and <code>var_dump($short_bin);</...
Why substr() returning wrong result when used in a while loop PHP
php
0
39
1
72,193,751
72,193,751
2
true
2022-05-10T22:24:57.917Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why substr() returning wrong result when used in a while loop PHP<p>So im using substr to copy certain content inside a while loop but after the first iterat...
72,172,815
Multiple Case When slows down query performance<p>I have the following query with multiple case-whens for each respective 'AttributeId' column from another table which gets aggregated. Adding these statements increases the time-complexity significantly. I would appreciate any suggestions for improving the performance a...
<p>Another option, which may be easier in your case, is to use <code>APPLY</code>. (<code>OUTER APPLY</code> is similar to <code>LEFT JOIN</code> and <code>CROSS APPLY</code> is similar to <code>INNER JOIN</code>).</p> <p>You can use conditional aggregation within the subquery.</p> <pre class="lang-sql prettyprint-over...
Multiple Case When slows down query performance
sql|sql-server
0
58
2
72,173,270
72,173,270
2
true
2022-05-09T13:31:33.673Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Multiple Case When slows down query performance<p>I have the following query with multiple case-whens for each respective 'AttributeId' column from another t...
72,147,635
Python rank: give negative rank to negative numbers<p>I have a basic set of data like:</p> <pre><code>ID Value A 0.1 B 0.2 C -0.1 D -0.01 E 0.15 </code></pre> <p>If we use data.rank() we get the result:</p> <pre><code>ID Value A 3 B 5 C 1 D 2 E 4 </code></pre> <p>But i want to have so that the negative values...
<p>Another method similar to the concat answer, but not as compact:</p> <pre><code>import pandas as pd A = ['A', 'B', 'C', 'D'] B = [-1, 1, 3, -2] df = pd.DataFrame({'ID': A, 'value': B}) pos = df.where(df['value'] &gt;= 0)['value'].rank() neg = df.where(df['value'] &lt; 0)['value'].rank(ascending=False) pos.update(...
Python rank: give negative rank to negative numbers
python|pandas|rank
0
101
3
72,147,766
72,147,766
2
true
2022-05-06T21:40:25.610Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python rank: give negative rank to negative numbers<p>I have a basic set of data like:</p> <pre><code>ID Value A 0.1 B 0.2 C -0.1 D -0.01 E 0.15 </code>...
72,157,165
Rails ActiveRecord default values are overridden by default_scope<p>DB Scheme</p> <pre class="lang-rb prettyprint-override"><code>create_table &quot;user&quot;, force: :cascade do |t| t.string &quot;name&quot; t.boolean &quot;active&quot;, default: false end </code></pre> <p>Model</p> <pre class="lang-rb pretty...
<p>The <code>default_scope</code> is also applied while creating/building a record. It is not applied while updating or deleting a record.</p> <p>Ref: <a href="https://api.rubyonrails.org/classes/ActiveRecord/Scoping/Default/ClassMethods.html#method-i-default_scope" rel="nofollow noreferrer">https://api.rubyonrails.org...
Rails ActiveRecord default values are overridden by default_scope
ruby-on-rails|ruby|activerecord
0
46
1
72,157,644
72,157,644
2
true
2022-05-07T23:57:28.420Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Rails ActiveRecord default values are overridden by default_scope<p>DB Scheme</p> <pre class="lang-rb prettyprint-override"><code>create_table &quot;user&quo...
72,161,171
z sorting issue with triangles in 3d<p>We coded a spinning 3d shape in js. There's a flicker in the render of the top triangle, we think it's because the z sorting is not working correctly. How do we resolve this?</p> <p>Here's a <a href="https://jsfiddle.net/SquareGiraffe/06cbtqge/5/" rel="nofollow noreferrer">jsfiddl...
<p>Sorting by average Z just doesn't give you a reliable rendering order. Since your shape is convex, though, you don't need to sort at all.</p> <p>Make sure the vertices of each triangle are sorted so that you can consistently get a surface normal that points outward. Then, just don't render any triangles with normal...
z sorting issue with triangles in 3d
javascript|sorting|graphics|3d
0
41
1
72,162,243
72,162,243
2
true
2022-05-08T12:50:03.367Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: z sorting issue with triangles in 3d<p>We coded a spinning 3d shape in js. There's a flicker in the render of the top triangle, we think it's because the z s...
72,167,446
How do I extract this field using JQ?<p>JQ makes me irrationally angry and I despise its very existence. I have been trying to extract the value of the <code>tf-name</code> key for 30 minutes and I'm going to become a hermit if I have to make another attempt at this. Please, how do I get <code>tmp</code> as a a result?...
<p>Its quite simple to extract, once you know the type of the top level objects. You can see <code>ResourceTagMappingList</code> is a list of records, so it should have a <code>[]</code> notation following it, which I think most beginners with <code>jq</code> tend to miss out. So</p> <pre class="lang-none prettyprint-o...
How do I extract this field using JQ?
amazon-web-services|jq
0
91
1
72,167,593
72,167,593
2
true
2022-05-09T05:47:18.560Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I extract this field using JQ?<p>JQ makes me irrationally angry and I despise its very existence. I have been trying to extract the value of the <code...
72,209,125
DLookUp select secondary email if primary is empty or null<p>I have a form that is selecting emails based on companies that have expired insurances. Some companies have both a Business and personal emails whilst others have one or the other. I am using the DLookUp function to select the email based on Suppliers meeting...
<p>The <code>DLookup()</code> function returns null if the value was not found, so you can make use of the <code>Nz()</code> function to check for the personal email, if the business email is null.</p> <p>Since we assign the return value to a string and strings cannot hold null values, we make use of the <code>Nz()</co...
DLookUp select secondary email if primary is empty or null
vba|ms-access
0
84
2
72,214,617
72,214,617
2
true
2022-05-12T01:21:39.803Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: DLookUp select secondary email if primary is empty or null<p>I have a form that is selecting emails based on companies that have expired insurances. Some com...
72,205,808
Dictionary of derived objects<p>I have a config with thousands of EnumValues and I parse them in runtime</p> <pre><code>void DoSmth() { foreach (var line in configLines) { var myEnumValue = (MyEnum) Enum.Parse(line); ... } } </code></pre> <p>and I can improve perfomance by creating a map bet...
<p>Sure:</p> <pre><code>public sealed class EnumHelper&lt;T&gt; where T : Enum { private static readonly ConcurrentDictionary&lt;string, T&gt; Cache = new ConcurrentDictionary&lt;string, T&gt;(StringComparer.OrdinalIgnoreCase); public static T Parse(string s) { return Cache.GetOrAdd(s, k =&gt; (T)E...
Dictionary of derived objects
c#|generics
0
42
1
72,206,009
72,206,009
2
true
2022-05-11T18:16:14.990Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Dictionary of derived objects<p>I have a config with thousands of EnumValues and I parse them in runtime</p> <pre><code>void DoSmth() { foreach (var line...
72,157,936
This is a question from GFG. I am trying to analyse and understand this code<p>This is a code I have taken from GeeksForGeeks. I am trying to understand the code.</p> <p>In the line in the function <code>deleteEle</code> which says <code>if(i==n) return n</code>, how could <code>i</code> become <code>n</code> if it is ...
<blockquote> <p>how could I become <code>n</code> if it is running for <code>&lt; n</code> times in the for loop just above it?</p> </blockquote> <p>Because it may happen that the if condition <code>arr[i] == x</code> inside the preceding for loop is never satisfied which in turn means that the <code>break</code> is ne...
This is a question from GFG. I am trying to analyse and understand this code
c++
0
40
2
72,157,962
72,157,962
2
true
2022-05-08T03:53:31.027Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: This is a question from GFG. I am trying to analyse and understand this code<p>This is a code I have taken from GeeksForGeeks. I am trying to understand the ...
72,195,181
Using Templates to set function types in a class gives error<p>So I have this class:</p> <pre><code> template &lt;typename callBackOne, typename callBackTwo&gt; class MyClass { // The class public: callBackOne cbo; callBackTwo cbt; MyClass(callBackOne cbop, callBackTwo cbtp){ ...
<p>The <strong>problem</strong> is that the explicit template arguments that you're passing are of type <code>void</code> but the function arguments <code>voidFuncOne</code> and <code>voidFuncTwo</code> will be implicitly converted to <code>void (*)()</code> and passed but since there is no conversion from a <code>void...
Using Templates to set function types in a class gives error
c++|function|templates
0
39
3
72,195,348
72,195,348
2
true
2022-05-11T03:47:22.017Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Using Templates to set function types in a class gives error<p>So I have this class:</p> <pre><code> template &lt;typename callBackOne, typename c...
72,196,654
Most commonly used description use in each row for each unique id<p>I have a problem. I have articles and these articles have a unique <code>id</code>. The problem is, however, the <code>article</code> description aka <code>article</code> - this is not unique. I would like to try changing the name of the <code>article<...
<p>Use <a href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.core.groupby.DataFrameGroupBy.transform.html" rel="nofollow noreferrer"><code>GroupBy.transform</code></a> with lambda function with <a href="http://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.value_counts.html" rel="...
Most commonly used description use in each row for each unique id
python|pandas|dataframe|apply
0
55
4
72,196,725
72,196,725
2
true
2022-05-11T06:56:44.330Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Most commonly used description use in each row for each unique id<p>I have a problem. I have articles and these articles have a unique <code>id</code>. The p...
72,161,656
Obsidian.md Plugins: ''obsidian' not defined'<p>I am currently writing a plugin for obsidian.md that renders math functions inside a code block. I used webpack for bundling node libraries like yaml and function-plot. In the config, I added 'obsidian' as an external. The plugin builds with a warning about the bundle siz...
<p>Thank you @håkon-hægland for your suggestion (why didn't I think of that?). First of all, the file generated by webpack looked like</p> <pre class="lang-js prettyprint-override"><code>function(obsidian) { ... (around 300kb code) }(obsidian); </code></pre> <p>, so webpack tried to access some global object called 'ob...
Obsidian.md Plugins: ''obsidian' not defined'
javascript|webpack|webpack-5|obsidian
0
190
1
72,173,344
72,173,344
2
true
2022-05-08T13:50:53.367Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Obsidian.md Plugins: ''obsidian' not defined'<p>I am currently writing a plugin for obsidian.md that renders math functions inside a code block. I used webpa...
72,155,334
How figure out multiple nested if else condition?<p>I am not getting an efficient way to check below mentioned condition. What I want to achieve is that- There are some processes that need to be done if their corresponding boolean is true suggesting to start the process. So I want to check if a particular condition is ...
<p>Instead of doing things this way, I'd recommend a data structure that allows you to add tasks and check their state. There are a lot of ways to do that, but the basic idea is you can iterate over all the items and use functions like <code>all</code> to confirm they're all in the appropriate state. That way you don't...
How figure out multiple nested if else condition?
kotlin|conditional-statements
0
128
2
72,155,679
72,155,679
2
true
2022-05-07T18:23:48.823Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How figure out multiple nested if else condition?<p>I am not getting an efficient way to check below mentioned condition. What I want to achieve is that- The...
72,159,163
Destructuring references for Iterator::find in Rust<p>I'm reading Rust by Example and having trouble with <a href="https://doc.rust-lang.org/stable/rust-by-example/fn/closures/closure_examples/iter_find.html" rel="nofollow noreferrer">this section</a> on searching through iterators.</p> <pre><code>pub trait Iterator { ...
<p>The fact that <code>find()</code> takes <code>&amp;mut self</code> is not relevant. It means <em>the iterator</em> needs to be mutably borrowed, i.e. <code>iter.find(f)</code> is actually <code>Iterator::find(&amp;mut iter, f)</code>.</p> <p>The <code>|&amp;&amp;x|</code>/<code>|&amp;x|</code> is for the callback, w...
Destructuring references for Iterator::find in Rust
rust
0
55
1
72,159,394
72,159,394
2
true
2022-05-08T08:08:22.063Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Destructuring references for Iterator::find in Rust<p>I'm reading Rust by Example and having trouble with <a href="https://doc.rust-lang.org/stable/rust-by-e...
72,175,891
Why does vswhere not find VS Build Tools when a specific version is specified?<p>In our build task log I see,</p> <pre><code>&quot;D:\DevopsBuildAgents\Agent 1\_work\_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.166.2\ps_modules\MSBuildHelpers\vswhere.exe&quot; -version [16.0,17.0) -latest -format json &quot;D:...
<p>It turns out that the latest version of Azure Devops 2020.1.1 still does not support Visual Studio 2022. So, even though newer devops agents recognize the software, the Devops Server doesn't query for it properly.</p> <p>If it were working properly it would issue a version parameter that looks like <code>-version [1...
Why does vswhere not find VS Build Tools when a specific version is specified?
visual-studio|msbuild|azure-pipelines
0
561
1
72,177,228
72,177,228
2
true
2022-05-09T17:17:01.897Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why does vswhere not find VS Build Tools when a specific version is specified?<p>In our build task log I see,</p> <pre><code>&quot;D:\DevopsBuildAgents\Agent...
72,220,989
check if items in array of unknown size all have the same property value<p>I have an array of undefined size that holds objects with the same propertynames. What I am looking for, is a clean way to check if all of these items have the same value assigned to a specific property or not.</p> <p>Example [{age:10}, {age:10}...
<p>You can do the following <div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>const checkPropertyIsEqual = (myArray, propertyName) =&gt; { const res = myArray.map(arrayItem =&gt; ar...
check if items in array of unknown size all have the same property value
javascript|node.js
0
60
4
72,221,088
72,221,088
2
true
2022-05-12T19:14:14.213Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: check if items in array of unknown size all have the same property value<p>I have an array of undefined size that holds objects with the same propertynames. ...
72,195,434
How to create an actor in Akka cluster dynamically<p>How can i create an actor in akka cluster Sharding dynamically with Cluster Client which will pass message from out side the cluster with akka remoting.</p>
<p>So you don't provide a lot of details about what you using (Typed vs Untyped, JVM or .NET). But, regardless, the short answer is just &quot;send a message to the <code>ShardRegion</code>&quot;. The whole gist of sharding is that the actor is dynamically created automatically and transparently whenever a message is r...
How to create an actor in Akka cluster dynamically
akka|akka.net|akka-cluster|akka-remote-actor|akka-remoting
0
105
1
72,204,270
72,204,270
2
true
2022-05-11T04:29:04.567Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to create an actor in Akka cluster dynamically<p>How can i create an actor in akka cluster Sharding dynamically with Cluster Client which will pass messa...
72,198,804
Kill a process in Windows 10 from the PyCharm command line<p>I would like to use Tensorboard on a Python application. When I start it using the command line of PyCharm in Windows 10, I get the following message:</p> <pre><code>&quot;Reusing TensorBoard on port 8111 (pid 10180), started 0:23:16 ago. (Use '!kill 10180' t...
<p>Updated Answer:</p> <p>Essentially this problem is caused by temporary files not being deleted, as I found <a href="https://stackoverflow.com/a/59582163/11072533">here</a>. The solution for this is to type <code>import tempfile</code> and <code>tempfile.gettempdir()</code> into the console to return the path to the ...
Kill a process in Windows 10 from the PyCharm command line
python|windows|pycharm|tensorboard
0
113
1
72,200,358
72,200,358
2
true
2022-05-11T09:42:47.870Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Kill a process in Windows 10 from the PyCharm command line<p>I would like to use Tensorboard on a Python application. When I start it using the command line ...
72,142,008
Read attribute from XML in SSMS using XML.Node<p>I'm trying to read an XML file, the aim is to get ddscontrol to return</p> <pre><code>888 </code></pre> <p>in one record and</p> <pre><code>999 </code></pre> <p>in the other.</p> <p>Similarly for tooltip I need to return</p> <pre><code>TTT111 </code></pre> <p>and</p> <pr...
<p>As @Larnu already mentioned, the XML doesn't look right.</p> <p>Please try the following solution.</p> <p>Notable points:</p> <ul> <li>It is using two namespace declarations.</li> <li>It is better NOT to traverse XML up.</li> <li><code>../text()</code> is added to XPath expressions for performance reasons.</li> </ul...
Read attribute from XML in SSMS using XML.Node
xml|ssms|xmlnode
0
40
1
72,143,226
72,143,226
2
true
2022-05-06T13:09:56.113Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Read attribute from XML in SSMS using XML.Node<p>I'm trying to read an XML file, the aim is to get ddscontrol to return</p> <pre><code>888 </code></pre> <p>i...
72,210,805
XDocument xmlns url attributes persist to child nodes<p>Based on <a href="https://stackoverflow.com/questions/24305747/how-to-remove-xmlns-attribute-of-a-node-other-than-root-in-an-xdocument?msclkid=56922e00d0d111ec9074924a9f78cfa3#:%7E:text=Adding%20the%20same%20namespace%20to%20your%20childs%20as%20well%20will%20solv...
<p>I ran your code as follows. And didn't encounter any issues.</p> <p><strong>c#</strong></p> <pre><code>void Main() { XDocument xdoc = CreateRootTag(); Console.WriteLine(xdoc); } private XDocument CreateRootTag() { XNamespace xmlns = XNamespace.Get(&quot;http://my.namespace&quot;); var xdec = new XDe...
XDocument xmlns url attributes persist to child nodes
c#|xml|xml-parsing
0
33
1
72,218,356
72,218,356
2
true
2022-05-12T06:09:05.337Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: XDocument xmlns url attributes persist to child nodes<p>Based on <a href="https://stackoverflow.com/questions/24305747/how-to-remove-xmlns-attribute-of-a-nod...
72,235,786
strange error in main and incorrect reading of a vector<p>hi I was writing a code where near the vectors it returns true if they are placed in ascending order otherwise false, when I try to start the code it gives me this error that I cannot understand</p> <pre><code>main.cpp:9:5: error: conflicting types for 'main' in...
<p>In your average C++ program, the <code>main</code> function is the <strong>singular entry and exit point</strong> for the program. When your executable is called, the program starts at <code>main</code>, and once <code>main</code> returns, the program releases all of its allocated resources and is terminated.</p> <p...
strange error in main and incorrect reading of a vector
c++
0
102
1
72,235,872
72,235,872
2
true
2022-05-13T21:58:57.687Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: strange error in main and incorrect reading of a vector<p>hi I was writing a code where near the vectors it returns true if they are placed in ascending orde...
72,157,188
MongoDB pipeline lookup with group losing fields<p>I only have 2 years exp with SQL databases and 0 with noSQL database. I am trying to write a pipeline using mongoDB compass aggregate pipeline tool that performs a look up, group, sum, and sort. I am using MongoDB compass to try and accomplish this. Also, please share ...
<p>In <code>$group</code> stage, it only returns documents with <code>_id</code> and <code>CustomerOrderNumber</code> fields, so <code>CustomerInfo</code> field was missing.</p> <ol> <li><code>$lookup</code></li> <li><code>$project</code> - From 1st stage, <code>CustomerInfo</code> returns as an array, hence getting th...
MongoDB pipeline lookup with group losing fields
database|mongodb|nosql|mongodb-compass
0
81
1
72,157,560
72,157,560
2
true
2022-05-08T00:04:17.210Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: MongoDB pipeline lookup with group losing fields<p>I only have 2 years exp with SQL databases and 0 with noSQL database. I am trying to write a pipeline usin...
72,141,747
cannot delete list elements<p>I am making space invaders in Java. I am trying to get lasers to work but whenever I remove a laser the timer (that the code is in) stops. I don't understand the error. Here is the error:</p> <pre><code>Exception in thread &quot;AWT-EventQueue-0&quot; java.util.ConcurrentModificationExcept...
<p>Java does not allow removing elements from a collection while you are iterating it using a for-each loop.</p> <p><a href="https://docs.oracle.com/javase/7/docs/api/java/util/ConcurrentModificationException.html" rel="nofollow noreferrer">Javadoc for ConcurrentModificationException</a></p> <blockquote> <p>Note that t...
cannot delete list elements
java|arraylist|game-physics
0
38
1
72,141,769
72,141,769
2
true
2022-05-06T12:50:24.073Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: cannot delete list elements<p>I am making space invaders in Java. I am trying to get lasers to work but whenever I remove a laser the timer (that the code is...
72,179,095
Show a loader.gif image before sending the request to UrlFetchApp.fetch using AppScript<p>I want to show loader.gif or any loading image before sending the request to UrlFetchApp.fetch. I explore the AppScript docs but couldn't find event regarding this.</p> <pre><code>var response = UrlFetchApp.fetch('url') Logger.log...
<p><strong>SUGGESTION:</strong></p> <p>You can use a combination of <code>Utilities.sleep()</code> (<a href="https://developers.google.com/apps-script/reference/utilities/utilities#sleep(Integer)" rel="nofollow noreferrer">reference</a>), combined with <a href="https://developers.google.com/apps-script/guides/html" rel...
Show a loader.gif image before sending the request to UrlFetchApp.fetch using AppScript
google-apps-script
0
85
1
72,179,571
72,179,571
2
true
2022-05-09T23:12:02.977Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Show a loader.gif image before sending the request to UrlFetchApp.fetch using AppScript<p>I want to show loader.gif or any loading image before sending the r...
72,150,094
How to let threads manipulate the same list Java<p>I have an class where I define a list with an add and deletion method like here:</p> <pre class="lang-java prettyprint-override"><code>public class listClass{ private List&lt;T&gt; someList = new ArrayList&lt;&gt;(); public void add(){ //adds to list ...
<p>I think that happens because you are instantiating a new listClass inside each threadClass object so when you modify the list, you are actually modifing in each thread their own &quot;local&quot; copy. Try to instantiate the list in your main function and then pass it to your threads, so you'll have a single instanc...
How to let threads manipulate the same list Java
java|multithreading
0
65
3
72,150,208
72,150,208
2
true
2022-05-07T06:39:16.027Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to let threads manipulate the same list Java<p>I have an class where I define a list with an add and deletion method like here:</p> <pre class="lang-java...
72,177,014
wget in script not working when called from cron<p>I've read a load of similar cases and can't for the life of me figure this one out...</p> <p>I'm running a wget command inside a .sh script which is called from cron on reboot as follows:</p> <pre><code>@reboot /home/user/reboot_script.sh </code></pre> <p>The .sh scrip...
<p><code>@reboot</code> is too early in boot process IMHO. You should create a systemd script to wait network.</p> <p>As a workaround, you can add a</p> <pre><code>sleep 30 </code></pre> <p>or better:</p> <pre><code>until ping -c1 domain.com &amp;&gt;/dev/null; do sleep 5 done </code></pre> <p>before your wget</p>
wget in script not working when called from cron
cron|debian|wget
0
97
1
72,177,153
72,177,153
2
true
2022-05-09T19:01:05.900Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: wget in script not working when called from cron<p>I've read a load of similar cases and can't for the life of me figure this one out...</p> <p>I'm running a...
72,160,595
Django - how to use filter to check if a string field contains a word?<p>my model order has a text field as: order.remark.</p> <p>how to filter orders with the remark field containing certain word? e.g. a reference number, a telephone number.</p> <p>in the order remark field the user can input anything, how to filter o...
<p>well your <code>Order</code> model has a field named <code>remark</code>, to filter objects containing a certain remark you can use <code>__contains</code> for having the case sensitivity or use <code>__icontains</code> to ignore the case sensitivity. so you can filter as follow</p> <pre><code>Order.objects.filter(r...
Django - how to use filter to check if a string field contains a word?
django|filter
0
156
2
72,161,588
72,161,588
2
true
2022-05-08T11:36:34.363Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Django - how to use filter to check if a string field contains a word?<p>my model order has a text field as: order.remark.</p> <p>how to filter orders with t...
72,155,745
Convince TypeScript that Vue 3 template ref is available in onMounted<p>I am trying to work with an HTML canvas in a TypeScript Vue 3 component (Composition API).</p> <p>The issue I am facing is that in an <code>onMounted</code> hook callback, TypeScript is telling me that the value of my template ref could be undefine...
<p>Use the <a href="https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-0.html#non-null-assertion-operator" rel="nofollow noreferrer">non-null assertion operator</a>:</p> <pre class="lang-js prettyprint-override"><code>onMounted(() =&gt; { ctx = canvasElem.value!.getContext(&quot;2d&quot;); }); </...
Convince TypeScript that Vue 3 template ref is available in onMounted
typescript|vue.js|vuejs3|vue-composition-api
0
570
1
72,157,852
72,157,852
2
true
2022-05-07T19:19:48.890Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Convince TypeScript that Vue 3 template ref is available in onMounted<p>I am trying to work with an HTML canvas in a TypeScript Vue 3 component (Composition ...
72,175,266
Computed is not defined<p>I've got a error where computed is not defined, I can't seem to find how to solve this, even after placing it in <code>computed: {}</code></p> <pre class="lang-html prettyprint-override"><code>&lt;template&gt; &lt;component :is=&quot;tag&quot; v-html=&quot;sanitizedContent&quot; /&gt; &lt;/t...
<p>By looking at your code, you could make it better like this:</p> <p>Import the missing <code>computed</code> from <code>&quot;@nuxtjs/composition-api&quot;</code>, and add the missing <code>setup</code> function, returning the value you want.</p> <pre class="lang-html prettyprint-override"><code>&lt;template&gt; &...
Computed is not defined
vue.js|debugging|vuejs2|nuxt.js|vue-composition-api
0
1,216
2
72,175,555
72,175,555
2
true
2022-05-09T16:26:51.980Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Computed is not defined<p>I've got a error where computed is not defined, I can't seem to find how to solve this, even after placing it in <code>computed: {}...
72,230,953
mapper does not convert between dto to entity<p>I am new to mapsturct I just want to map between dto to entity those two;</p> <p>my bank class;</p> <pre><code> @Id private int id; </code></pre> <p>my bank dto class;</p> <pre><code>private Integer bankId; </code></pre> <p>my mapper below;</p> <pre><code>BankMapper BANK...
<p>Target and source properties don't work well with collections mapping. You need additional mapping for single element. Update your mapper as below, so Mapstruct can use element mapper when mapping the collection:</p> <pre><code>@Mapper public interface BankMapper { BankMapper BANK_MAPPER_INSTANCE = Mappers.getM...
mapper does not convert between dto to entity
java|spring-boot|java-8|mapstruct|mapper
0
374
1
72,231,887
72,231,887
2
true
2022-05-13T14:09:43.457Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: mapper does not convert between dto to entity<p>I am new to mapsturct I just want to map between dto to entity those two;</p> <p>my bank class;</p> <pre><cod...
72,222,904
Is there a simple way I could create an effect when my mouse touches a div in HTML, css or javascript?<p>I am trying to reproduce this effect, whenever the mouse touches a div, the div get surrounded by some sort of container like this</p> <p><a href="https://i.stack.imgur.com/p0epq.png" rel="nofollow noreferrer"><img ...
<p>You can use <code>:hover</code> with border, outline and border radius for this to happen</p> <p>heres the CSS:</p> <pre class="lang-css prettyprint-override"><code>.container:hover{ border: 1px solid white; border-radius: 10px; } </code></pre> <p>Also make sure to add a regular border in the container or if w...
Is there a simple way I could create an effect when my mouse touches a div in HTML, css or javascript?
javascript|html|css
0
51
1
72,224,739
72,224,739
2
true
2022-05-12T23:03:43.083Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is there a simple way I could create an effect when my mouse touches a div in HTML, css or javascript?<p>I am trying to reproduce this effect, whenever the m...
72,164,853
Pointer arithmetic in C when used as a target array for strcat()<p>When studying string manipulation in C, I've come across an effect that's not quite what I would have expected with <code>strcat()</code>. Take the following little program:</p> <pre><code>#include &lt;stdio.h&gt; #include &lt;string.h&gt; int main() {...
<p>You will get an output of <code>abcdefghij</code>, because your call to <code>strcat</code> hasn't changed the address of <code>string</code> (and nor <em>can</em> you change that – it's fixed for the duration of the block in which it is declared, just like the address of any other variable). What you are passing to...
Pointer arithmetic in C when used as a target array for strcat()
arrays|c|string|strcat
0
61
4
72,164,976
72,164,976
2
true
2022-05-08T20:27:49.277Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pointer arithmetic in C when used as a target array for strcat()<p>When studying string manipulation in C, I've come across an effect that's not quite what I...
72,192,733
Best way to move data between two pages in SvelteKit?<p>tl;dr - best practice for moving data between two pages in Svelte?</p> <p>I have two pages, let's say First.svelte and Second.svelte.</p> <p>In a traditional framework, I might create a form on First.svelte and then post it to Second.svelte. I can bind hidden inpu...
<p>If you want to use a form, you would handle it with an endpoint; but you could just use stores: if the user goes from one page to the next without refreshing the browser, it should stay there.</p> <p>You can also look into persistent stores for more reliability if the user refreshes the page but simple stores should...
Best way to move data between two pages in SvelteKit?
svelte|sveltekit
0
168
1
72,295,790
72,295,790
2
true
2022-05-10T20:45:29.203Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Best way to move data between two pages in SvelteKit?<p>tl;dr - best practice for moving data between two pages in Svelte?</p> <p>I have two pages, let's say...
72,143,406
How do i copy n characters for m lines in a file (in c)?<p>I have a file of 1000 lines with up to 70 characters in them. I want to copy the 13 first in a table, the 15th-30th in another table... i tried many different things without success, here's one of them :</p> <pre><code>#include &lt;stdio.h&gt; #include &lt;stdl...
<p>The way you copy the substrings is broken:</p> <pre class="lang-c prettyprint-override"><code> while(fgets(str,line,pf)!= NULL) { printf(&quot;%s&quot;, str); number[line][size_num]=str[line]; // here i want number to copy the 13 first characters //o...
How do i copy n characters for m lines in a file (in c)?
c
0
53
1
72,144,583
72,144,583
2
true
2022-05-06T14:49:03.077Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do i copy n characters for m lines in a file (in c)?<p>I have a file of 1000 lines with up to 70 characters in them. I want to copy the 13 first in a tab...
72,142,652
Position a button on the right of each row with overflow-x<p>I want to add a button next to each row of my table. Plot twist, the table is inside a div with a fixed width and overflow-x for responsiveness. I want the button to show next to each row outside the container div.</p> <p>With my current code, the button does...
<p>The solution is using position sticky on the last column.</p> <pre><code>position: sticky; right: 0px </code></pre> <p>Reference : <a href="https://www.w3schools.com/howto/howto_css_sticky_element.asp" rel="nofollow noreferrer">W3 Schools</a>.</p> <p>Here's the snippet:</p> <p><div class="snippet" data-lang="js" dat...
Position a button on the right of each row with overflow-x
html|css|html-table
0
79
1
72,144,152
72,144,152
2
true
2022-05-06T13:54:53.143Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Position a button on the right of each row with overflow-x<p>I want to add a button next to each row of my table. Plot twist, the table is inside a div with ...
72,152,871
Concatenating arrays of different sizes<p>I am trying to do a quadtree algorithm on numpy array of points created by <code>make_blobs</code> function from <code>sklearn</code>. I am trying to create an Recursive Partition KMeans in which the centroids are found in each quadtree partition of the space. Here is my partit...
<p>When I first read the question, I thought you were trying to <code>hstack</code> array with shape: <code>(4,0), (4,1,2) or (4,2,2)</code>. But with the comments it appears that there are also shape (4,) arrays well.</p> <p>The <code>4</code> part comes from joining 4 elements</p> <pre><code>parts = np.array([parts1...
Concatenating arrays of different sizes
python|numpy|scikit-learn|partition|quadtree
0
251
1
72,162,782
72,162,782
2
true
2022-05-07T13:14:47.333Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Concatenating arrays of different sizes<p>I am trying to do a quadtree algorithm on numpy array of points created by <code>make_blobs</code> function from <c...
72,179,130
Why can't numpy.sum sum all elements of arrays with different length?<p>I have been self-learning numpy, and according to the numpy manual, the <a href="https://numpy.org/doc/stable/reference/generated/numpy.sum.html" rel="nofollow noreferrer">numpy.sum</a> will sum all the elements of an array or array-like. However, ...
<pre><code>In [128]: array_a = [1,2,3,4,5,6] # Same length ...: array_b = [4,5,6,7,8,9] </code></pre> <p>Here you give <code>sum</code> a list:</p> <pre><code>In [129]: np.sum([array_a, array_b]) Out[129]: 60 </code></pre> <p>What it does first is make array:</p> <pre><code>In [130]: np.array([array_a, array_b]) ...
Why can't numpy.sum sum all elements of arrays with different length?
python|numpy
0
64
2
72,179,254
72,179,254
2
true
2022-05-09T23:17:40.667Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why can't numpy.sum sum all elements of arrays with different length?<p>I have been self-learning numpy, and according to the numpy manual, the <a href="http...
72,157,781
Layout design over navigation action bar<p>I am looking for a solution to design an element on the top of the navigation action bar and also a way to increase the size of the action bar. One way I can think of, is to disable the navigation action bar and then design. Is there any way if it's achievable without disablin...
<p>After hard work of 30min. I got your answer. In your image, <code>Toolbar</code> is already in use with <code>backButton, refreshButton, BluetothButton, and locationButton</code> and they created the <code>Connect</code> button in <code>TabLayout</code> that's why it shows half on <code>TabLayout</code> and half on ...
Layout design over navigation action bar
android|xml|android-studio|android-layout
0
48
1
72,158,622
72,158,622
2
true
2022-05-08T03:11:13.423Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Layout design over navigation action bar<p>I am looking for a solution to design an element on the top of the navigation action bar and also a way to increas...
72,205,361
location.href is not working, can't acess to link location<p>I've created a &quot;loading page&quot; which should be the first page that users see when they connect. It's a simple page with a central bouton that people have to click. Once they do, they access to the rest of the website. All the pages including the load...
<p>There is a missing slash <code>/</code>, your code should look like this:</p> <pre><code>introBox.addEventListener('click', function(){ document.location.href = &quot;/main.html&quot;; }); </code></pre> <p>If you want to redirect outside your website, you have to add double slash <code>//</code>.</p> <pre><code>...
location.href is not working, can't acess to link location
javascript|web|location|href
0
56
1
72,206,731
72,206,731
2
true
2022-05-11T17:38:10.587Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: location.href is not working, can't acess to link location<p>I've created a &quot;loading page&quot; which should be the first page that users see when they ...
72,191,225
Problem updating dynamically ActiveForm values with Ajax + RenderPartial/Ajax<h4>Solution</h4> Since the php is not going to be re-executed someone told me to use a return value from the controller as a parameter of the "success" function into ajax's request.<br> **CONTROLLER** <pre><code>if(Yii::$app-&gt;request-&gt;i...
<p>You can use <code>Pjax</code> in, yii2:<br> <strong>Controller:</strong></p> <pre><code>public function actionCreate() { $model = new Task(); if( Yii::$app-&gt;request-&gt;post() &amp;&amp; Yii::$app-&gt;request-&gt;isPjax ) { $query = new \yii\db\Query(); $rows = $query-&gt;...
Problem updating dynamically ActiveForm values with Ajax + RenderPartial/Ajax
php|jquery|model-view-controller|yii2
0
47
1
72,247,763
72,247,763
2
true
2022-05-10T18:15:28.447Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Problem updating dynamically ActiveForm values with Ajax + RenderPartial/Ajax<h4>Solution</h4> Since the php is not going to be re-executed someone told me t...
72,227,175
Understanding the `scheduler_tick()` function of Linux Kernel<p>To my knowledge, I understood that the <code>scheduler_tick()</code> function periodically gets called by the timer interrupt with the frequency of HZ.</p> <p>I'm new to kernel development, so these might be naive questions but I'm trying to understand the...
<p>Answering your main questions and comments at the same time:</p> <ol> <li>It's not possible for scheduler code to be called <em>while already scheduling</em>, as it runs with interrupts disabled.</li> <li>Yes, each core has its own runqueue and does its own scheduling.</li> <li>It's the opposite: high HZ -&gt; sched...
Understanding the `scheduler_tick()` function of Linux Kernel
linux-kernel|operating-system|kernel|scheduler
0
160
1
72,232,482
72,232,482
2
true
2022-05-13T09:16:04.027Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Understanding the `scheduler_tick()` function of Linux Kernel<p>To my knowledge, I understood that the <code>scheduler_tick()</code> function periodically ge...
72,172,008
delete files with partial match to another list of names<p>I have a list of names in file1 that is a substring of the true filenames of the files I want to delete. I want to delete the files that are partially matched by the names in file1. Any idea how to specify the files to delete?</p> <p>file1:</p> <pre><code> fil...
<p>Assuming you don't have any filenames containing newline literals...</p> <pre><code>printf '%s\n' * | grep -Fvf file1 | xargs -d $'\n' rm -f -- </code></pre> <p>Let's walk through this piece-by-piece:</p> <ul> <li><code>printf '%s\n' *</code> generates a list of files in your current directory.</li> <li><code>grep -...
delete files with partial match to another list of names
bash|unix
0
35
2
72,172,316
72,172,316
2
true
2022-05-09T12:27:10.833Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: delete files with partial match to another list of names<p>I have a list of names in file1 that is a substring of the true filenames of the files I want to d...
72,235,955
SQL Query to get the last unique value from a column<p>I have a SQL table with the following columns:</p> <p>id | created_at</p> <p>I want to get a dictionary of all the unique id's and the latest created_at time.</p> <p>My current query is this:</p> <pre><code>SELECT id, created_at from uscis_case_history ORDER BY cre...
<p>Sounds like you just need to aggregate:</p> <pre><code>SELECT id, MAX(created_at) LatestCreated_at FROM uscis_case_history GROUP BY id ORDER BY MAX(created_at) DESC; </code></pre>
SQL Query to get the last unique value from a column
sql
0
68
2
72,236,037
72,236,037
2
true
2022-05-13T22:30:33.583Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: SQL Query to get the last unique value from a column<p>I have a SQL table with the following columns:</p> <p>id | created_at</p> <p>I want to get a dictionar...
72,177,781
Why are traits sometimes grouped as "concerns" in PHP packages?<p>When looking through package source files, I often see a folder titled &quot;concerns&quot; that seems to exclusively house trait files. A few examples:</p> <ul> <li><a href="https://github.com/pestphp/pest/tree/master/src" rel="nofollow noreferrer">Pest...
<p>I think it's just a &quot;good enough&quot; name picked by community. Indeed, traits are not &quot;objects&quot; or &quot;factories&quot; or &quot;repositories&quot; - they don't do anything by themselves, but they are adding properties and qualities to classes where they are used. And the word &quot;concern&quot; d...
Why are traits sometimes grouped as "concerns" in PHP packages?
php|package
0
154
1
72,178,745
72,178,745
2
true
2022-05-09T20:18:44.617Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why are traits sometimes grouped as "concerns" in PHP packages?<p>When looking through package source files, I often see a folder titled &quot;concerns&quot;...
72,143,711
(Live) viewing of large images using pyvips<p>I recently discovered the awesome pyvips package and would like to use it to analyze data that was taken on a homebuilt slide scanner (not built by me). I scan about 4000 tiles of 1024x1024 pixels each along the edges of a square-shaped sample (the center part of the sample...
<p>You can use <code>crop</code> to cut out a chunk of the image and pass that on to something else. It won't make the whole thing, it'll just render the bit you need, so it'll be quick.</p> <p>Something like:</p> <pre class="lang-py prettyprint-override"><code># loop over all tiles and place at correct position # do t...
(Live) viewing of large images using pyvips
python|vips
0
222
1
72,296,102
72,296,102
2
true
2022-05-06T15:10:27.867Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: (Live) viewing of large images using pyvips<p>I recently discovered the awesome pyvips package and would like to use it to analyze data that was taken on a h...
72,200,733
How add action button to google-doc?<p>I want to add button or another widget with click action to my Google Document with Apps Scripts; How will i can do it?</p> <pre><code>function addButton() { var body = DocumentApp.getActiveDocument().getBody(); // code for add button to body. } </code></pre>
<h3>Create a menu</h3> <pre><code>function onOpen() { menu(); } function menu() { DocumentApp.getUi().createMenu('MyMenu') .addItem('Function Descript', 'functionName') .addToUi(); } function functionName() { //a function that does nothing } </code></pre> <p>Your best bet is to learn how to do this on yo...
How add action button to google-doc?
javascript|google-apps-script|google-cloud-platform|google-docs|google-docs-api
0
74
1
72,200,867
72,200,867
2
true
2022-05-11T12:02:05.213Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How add action button to google-doc?<p>I want to add button or another widget with click action to my Google Document with Apps Scripts; How will i can do it...
72,088,925
How to rewrite URLs that cause duplicate content?<p>I have a lot of links with a double URL structure. Basically, I need a <code>.htaccess</code> rule that redirects all URLs that start <code>/de</code> (for German language) to the same URL with only a <code>/</code>.</p> <pre><code>example.com/de/Shop/Tradition/Jagd-F...
<p>Your rewrite rule should match starting with <code>/de/</code> (with an optional strating slash, capture everything afterwards with <code>(.*)</code> and redirect to the capture group (<code>$1</code>) with a 301 permanent redirect:</p> <pre class="lang-sh prettyprint-override"><code>RewriteEngine on RewriteRule ^/?...
How to rewrite URLs that cause duplicate content?
.htaccess|http-redirect
0
17
1
72,089,023
72,089,023
2
true
2022-05-02T15:26:51Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to rewrite URLs that cause duplicate content?<p>I have a lot of links with a double URL structure. Basically, I need a <code>.htaccess</code> rule that r...
72,193,758
Method to speed up a VLOOKUP on two CSV files created from spreadsheet data<p>First I need to <code>VLOOKUP</code> twice in a CSV to find the name of the two teams, then I join the two names and do another VLOOKUP in another CSV:</p> <pre><code>function duoble_vlookup() { var s = SpreadsheetApp.getActive(); var sea...
<p>I believe your goal is as follows.</p> <ul> <li>You want to reduce the process cost of your script.</li> </ul> <h3>Modification points:</h3> <ul> <li>When the ternary operator instead of the if statement is used, the process cost can be reduced a little. <a href="https://tanaikech.github.io/2018/07/11/benchmark-cond...
Method to speed up a VLOOKUP on two CSV files created from spreadsheet data
csv|google-apps-script
0
38
1
72,193,937
72,193,937
2
true
2022-05-10T22:58:59.980Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Method to speed up a VLOOKUP on two CSV files created from spreadsheet data<p>First I need to <code>VLOOKUP</code> twice in a CSV to find the name of the two...
72,182,481
Return an error and exit gracefully in clap cli<p>I'd like to implement a simple clap cli that operates on git repositories, but that isn't critical to the question; it will help clarify I believe. I'm trying to identify the most idiomatic way to exit with an error if not run from the root of a repository. Here are thr...
<p>I'm personally a big fan of error wrapper libraries like <a href="https://crates.io/crates/anyhow" rel="nofollow noreferrer">anyhow</a>, <a href="https://crates.io/crates/eyre" rel="nofollow noreferrer">eyre</a> or <a href="https://crates.io/crates/miette" rel="nofollow noreferrer">miette</a>.</p> <p>Some remarks:</...
Return an error and exit gracefully in clap cli
rust|clap
0
392
1
72,183,192
72,183,192
2
true
2022-05-10T07:47:20.940Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Return an error and exit gracefully in clap cli<p>I'd like to implement a simple clap cli that operates on git repositories, but that isn't critical to the q...
72,177,272
How to add radio buttons in Jenkins using groovy when building a job using "Build with parameters"?<p>I am trying to add <code>radio</code> buttons in Jenkins instead of <code>checkboxes</code> when running <code>Build with Parameters</code>. In my existing code, I am getting checkboxes. What changes should I make in m...
<p>You can achieve that easily using the <a href="https://plugins.jenkins.io/extended-choice-parameter/" rel="nofollow noreferrer">Extended Choice Parameter</a> which has a built in support for all kinds of selection options including radio buttons.<br /> You can use it as follows:</p> <pre class="lang-groovy prettypri...
How to add radio buttons in Jenkins using groovy when building a job using "Build with parameters"?
jenkins|groovy|jenkins-pipeline|jenkins-groovy
0
446
1
72,181,738
72,181,738
2
true
2022-05-09T19:25:31.073Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to add radio buttons in Jenkins using groovy when building a job using "Build with parameters"?<p>I am trying to add <code>radio</code> buttons in Jenkin...
72,185,172
Jenkinsfile `pipeline` to use different GitHub credentials for different `stages`?<p>I have a Jenkins pipeline running two tests in parallel on two nodes, something like:</p> <pre><code>pipeline { agent { label 'MASTER' } stages { stage('x86 and Arm tests') { parallel ...
<p>When running a declarative pipeline from SCM, for each agent that is used during the execution the repository used for loading the pipeline will be automatically checked out to the workspace.<br /> If you want to change this default behavior and manually control the SCM configuration for each agent you must first di...
Jenkinsfile `pipeline` to use different GitHub credentials for different `stages`?
github|jenkins|jenkins-pipeline|jenkins-plugins
0
81
1
72,219,229
72,219,229
2
true
2022-05-10T11:02:27.190Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Jenkinsfile `pipeline` to use different GitHub credentials for different `stages`?<p>I have a Jenkins pipeline running two tests in parallel on two nodes, so...
72,207,205
Incomplete CSS grid leaving first item blank instead of last<p>I want to display an unknown number of items in a 3 column grid. CSS grid seems like the perfect solution and using it in its simplest form gives me 99% of what I'm looking for.</p> <p>However! If I have 8 items, it will leave the first spot in row 1 empty ...
<p>Ok, I found out what the issue was. There is an interaction between the grid layout and the <code>content</code> property that had an unexpected effect.</p> <p>This CSS (used throughout the project I'm working on) resulted in the behaviour I was seeing:</p> <pre><code>.row:before, .row:after { content: &quot;&quot...
Incomplete CSS grid leaving first item blank instead of last
css|css-grid
0
105
1
72,207,439
72,207,439
2
true
2022-05-11T20:22:33.080Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Incomplete CSS grid leaving first item blank instead of last<p>I want to display an unknown number of items in a 3 column grid. CSS grid seems like the perfe...
72,197,597
c++ constexpr concatenate char*<p><strong>Context:</strong> In my company we generate a lot of types based on IDL files. Some of the types require special logic so they are handcoded but follow the same pattern as the generated ones. We have a function which all types must implement which is a name function. This will ...
<p>From constexpr you cannot return char* which is constructed there... You must return some compile time known(also its size) constant thingy. A possible solution could be something like:</p> <pre><code>#include &lt;cstring&gt; // Buffer to hold the result struct NameBuffer { // Hardcoded 128 bytes!!!!! Carefully...
c++ constexpr concatenate char*
c++|c++17|constexpr
0
250
1
72,197,782
72,197,782
2
true
2022-05-11T08:13:15.643Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: c++ constexpr concatenate char*<p><strong>Context:</strong> In my company we generate a lot of types based on IDL files. Some of the types require special lo...
72,162,836
Kubectl exec stops/closes after 2-3 minutes<p>I'm trying to backup a MySQL database running inside a k8s cluster (k3s). This cluster is running locally on a Raspberry Pi. I've built a custom image based on Alpine Linux that contains a script to create the backup using mysqldump:</p> <p><code>kubectl exec &lt;pod_name&g...
<p>It is possible that you're getting disconnected because <code>kubectl</code> thinks the connection is dead due to no data from the other side.</p> <p>Instead of:</p> <p><code>kubectl exec &lt;pod_name&gt; -n &lt;namespace_name&gt; -- /usr/bin/mysqldump -u &lt;db_user&gt; --password=&lt;db_password&gt; --verbose &lt;...
Kubectl exec stops/closes after 2-3 minutes
kubernetes|k3s
0
214
1
72,168,189
72,168,189
2
true
2022-05-08T16:06:15.120Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Kubectl exec stops/closes after 2-3 minutes<p>I'm trying to backup a MySQL database running inside a k8s cluster (k3s). This cluster is running locally on a ...
72,200,083
Can OpenID Connect Scopes Contain Spaces?<p>Does OpenID Connect support the quoting of scopes?</p> <p>For example, is requesting the <code>openid</code> scope the same as requesting the <code>&quot;openid&quot;</code> scope?</p> <p>If so, does this mean that scopes are allowed to contain spaces?</p> <p>I tried looking ...
<p>See in the original oauth2 <a href="https://www.rfc-editor.org/rfc/inline-errata/rfc6749.html" rel="nofollow noreferrer">rfc</a>:</p> <pre><code>The value of the scope parameter is expressed as a list of space- delimited, case-sensitive strings. The strings are defined by the authorization server. If the value con...
Can OpenID Connect Scopes Contain Spaces?
authentication|oauth-2.0|authorization|openid-connect|specifications
0
84
1
72,200,740
72,200,740
2
true
2022-05-11T11:16:55.137Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can OpenID Connect Scopes Contain Spaces?<p>Does OpenID Connect support the quoting of scopes?</p> <p>For example, is requesting the <code>openid</code> scop...
72,183,078
How to store a state of custom allocator used for allocation of different types<p>In a situation where one needs to work with custom <em>state</em>ful allocator, what is the idiomatic way to store the <em>state</em>, if the state should be used to allocate objects of different types? E.g. if one needs a <em>allocator-a...
<p>Maybe you can use pmr.</p> <pre><code>#include &lt;vector&gt; #include &lt;memory_resource&gt; struct foo { std::pmr::memory_resource&amp; mem {*std::pmr::get_default_resource()}; std::pmr::vector&lt;int&gt; vi{&amp;mem}; std::pmr::vector&lt;double&gt; vd{&amp;mem}; }; </code></pre>
How to store a state of custom allocator used for allocation of different types
c++|allocator
0
41
1
72,183,635
72,183,635
2
true
2022-05-10T08:34:31.420Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to store a state of custom allocator used for allocation of different types<p>In a situation where one needs to work with custom <em>state</em>ful alloca...
72,160,825
Why vscode shortcuts don't work properly?<p>I've recently updated my VSCode and most of its shortcuts don't work anymore. I tried to reinstall my VSCode but it didn't work. I've checked if it's affected by any other system shortcuts but I wasn't lucky enough and none of them worked for me. Some shortcuts like: <strong>...
<p>I found a solution for this problem.</p> <ol> <li>go to : <code>File&gt;Preferences&gt;Keyboard Shortcut</code></li> </ol> <p><a href="https://i.stack.imgur.com/Tpk30.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Tpk30.png" alt="enter image description here" /></a></p> <ol start="2"> <li>Then fr...
Why vscode shortcuts don't work properly?
visual-studio-code|keyboard-shortcuts
0
1,018
3
72,187,880
72,187,880
2
true
2022-05-08T12:05:47.933Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why vscode shortcuts don't work properly?<p>I've recently updated my VSCode and most of its shortcuts don't work anymore. I tried to reinstall my VSCode but ...
72,142,882
how to add density line over real count value (maybe with 2 y-axis)<p>I would like to plot a density plot over counts histogram using following sample data:</p> <p>However my density line was not readable in my plot. if I use <code>..ncount..</code>, I can see it, but the plot is not the one I would prefer.</p> <p>Plot...
<p>A few options, none of which are perfect: the first two do not achieve &quot;perfect&quot; alignment, and the third is manual.</p> <p>(FYI: <code>after_stat(count)</code> is now preferred over <code>..count..</code>, see <code>?after_stat</code>. Not a breaking thing, just a &quot;btw&quot;.)</p> <ol> <li><p>Change ...
how to add density line over real count value (maybe with 2 y-axis)
r|ggplot2
0
121
2
72,143,196
72,143,196
2
true
2022-05-06T14:11:19.270Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to add density line over real count value (maybe with 2 y-axis)<p>I would like to plot a density plot over counts histogram using following sample data:<...
72,223,084
Is there a way to search one table for certain values, and if successfully found, then update a different table?<p>Good afternoon all,</p> <p>This is my first time using SQL, so forgive me for being new. I have three different tables that I've created:</p> <pre><code>CREATE TABLE employee (ID int, fname text, lname tex...
<p>This uses an <code>IN CLAUSE</code>, because there could be more than one ID with the same name combination.</p> <pre><code>UPDATE contact SET cellphone = '1234567890' WHERE ID IN ( SELECT ID FROM employee WHERE fname = 'A' AND lname = 'B'); </code></pre>
Is there a way to search one table for certain values, and if successfully found, then update a different table?
sql|if-statement|where-in
0
39
2
72,223,192
72,223,192
2
true
2022-05-12T23:36:55.670Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is there a way to search one table for certain values, and if successfully found, then update a different table?<p>Good afternoon all,</p> <p>This is my firs...
72,193,556
how to obtain SeDebugPrivilege in Python?<p>How does one obtain SeDebugPrivilege in Python? I believe both the Ctypes api and PyWin32 are both individually capable of doing it, i don't care which API is used. I found this broken code in the wild, it's probably pretty close</p> <pre class="lang-py prettyprint-override"...
<p>Problems:</p> <ul> <li><p>Wrong <em>TokenPrivileges</em> value: <strong>it should be <em>3</em></strong>, as per <a href="https://docs.microsoft.com/en-us/windows/win32/api/winnt/ne-winnt-token_information_class" rel="nofollow noreferrer">[MS.Docs]: TOKEN_INFORMATION_CLASS enumeration (winnt.h)</a>. Use the value ex...
how to obtain SeDebugPrivilege in Python?
python|winapi|ctypes|pywin32
0
254
1
72,221,249
72,221,249
2
true
2022-05-10T22:28:39.777Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to obtain SeDebugPrivilege in Python?<p>How does one obtain SeDebugPrivilege in Python? I believe both the Ctypes api and PyWin32 are both individually c...
72,202,282
Swap a select text with javascript?<p>I have a example code here:</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>function swap() { var sel1 = $("#se1 option:selected").text(...
<p>You shouldn't be swapping the values or the text of the two selected items in the lists. You just need to swap which item is selected in each list. Once that is done, that <code>option</code> will have whatever value the list has set up for it.</p> <p>The version of JQuery you use here doesn't matter since what you ...
Swap a select text with javascript?
javascript|jquery
0
45
1
72,202,897
72,202,897
2
true
2022-05-11T13:51:46.357Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Swap a select text with javascript?<p>I have a example code here:</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel...
72,170,014
XSLT 2.0 changing the default namespace value of ROOT after applying templates<p>My goal is to be able to :</p> <ol> <li>Replace root element's <code>xmlns=&quot;http://xmlns.example.com/v1&quot;</code> with <code>xmlns=&quot;http://xmlns.example.com&quot;</code> (<strong>without v1</strong>)</li> <li>Replace root elem...
<p>The identity transformation alone doesn't help if you want or need to change the namespaces of elements (and a namespace declared on some element applies to all its descendants so you need to change the namespace of the root and all its descendants); based on that I think you need to write a templates as the startin...
XSLT 2.0 changing the default namespace value of ROOT after applying templates
xml|xslt|xslt-2.0|xslt-3.0
0
59
1
72,170,660
72,170,660
2
true
2022-05-09T09:47:59.067Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: XSLT 2.0 changing the default namespace value of ROOT after applying templates<p>My goal is to be able to :</p> <ol> <li>Replace root element's <code>xmlns=&...
72,154,655
How to pass the Image pointer to Image_dos_header in windows<p>How to properly construct the <code>NtHeader</code> when calling <code>PIMAGE_NT_HEADERS64</code> Microsoft docs does not seem to have much remarks on this function, the problem is that casting from <code>void*</code> to <code>DWORD</code> fails</p> <pre><c...
<p><code>DWORD</code> is 32 bits (4 bytes) in size, in both 32-bit and 64-bit systems.</p> <p>The compiler is warning you that the size of <code>DWORD</code> is different than the size of a <code>void*</code> pointer in your compilation, so you will lose bits. This means you must be compiling a 64-bit executable, where...
How to pass the Image pointer to Image_dos_header in windows
c++|winapi|portable-executable
0
81
1
72,154,795
72,154,795
2
true
2022-05-07T16:56:24.323Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to pass the Image pointer to Image_dos_header in windows<p>How to properly construct the <code>NtHeader</code> when calling <code>PIMAGE_NT_HEADERS64</co...
72,204,862
What is this std::string constructor doing?<p>I am trying to write a native host client for a WebExtension browser addon in C++.</p> <p>I looked for examples and unfortunately only found a couple ones.</p> <p>There's <a href="https://discourse.mozilla.org/t/webextension-with-native-messaging-c-app-side/30821" rel="nofo...
<blockquote> <p>What does <code>string m( message, message + sizeof message / sizeof message[0] );</code> do?</p> </blockquote> <p><code>message</code> decays to pointer to first element, <code>sizeof message / sizeof message[0]</code> is the number of elements in the array, and <code>message + sizeof message / sizeof ...
What is this std::string constructor doing?
c++|string
0
126
1
72,204,942
72,204,942
2
true
2022-05-11T16:53:45.630Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What is this std::string constructor doing?<p>I am trying to write a native host client for a WebExtension browser addon in C++.</p> <p>I looked for examples...
72,213,782
Append to String a Signed Int (Converted to Bytes) in Big Endian<p>I have a 4 byte integer (signed), and (i) I want to reverse the byte order, (ii) I want to store the bytes (i.e. the 4 bytes) as bytes of the string. I am working in C++. In order to reverse the byte order in Big Endian, I was using the ntohl, but I can...
<blockquote> <p>I was using the ntohl, but I cannot use that due the fact that my numbers can be also negative.</p> </blockquote> <p>It's unclear why you think that negative number would be a problem. It's fine to convert negative numbers with <code>ntohl</code>.</p> <blockquote> <pre><code>s.append(reinterpret_cast&lt...
Append to String a Signed Int (Converted to Bytes) in Big Endian
c++
0
41
1
72,213,858
72,213,858
2
true
2022-05-12T10:15:45.583Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Append to String a Signed Int (Converted to Bytes) in Big Endian<p>I have a 4 byte integer (signed), and (i) I want to reverse the byte order, (ii) I want to...
72,206,382
ReactJS: The last radio button value cannot be sent<p>I try to create a quiz app in ReactJS. I injected a form in <a href="https://www.npmjs.com/package/slick-carousel" rel="nofollow noreferrer">slick-carousel</a>. Every slider has only one question with radio buttons.</p> <pre><code>return ( &lt;React.Fragment&gt;...
<p>The problem is that you called the function <code>handleSubmit</code> before adding the last answer in your state, the solution is to add the answer before calling the function <code>handleSubmit</code> and don't forget to add the parameter answers to the function <code>handleSubmit</code> because <code>setState</co...
ReactJS: The last radio button value cannot be sent
reactjs
0
26
1
72,206,639
72,206,639
2
true
2022-05-11T19:07:28.690Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: ReactJS: The last radio button value cannot be sent<p>I try to create a quiz app in ReactJS. I injected a form in <a href="https://www.npmjs.com/package/slic...
72,163,903
Behavior of variables using su in linux<p>I'm installing Poetry in a dockerfile, but I want to do it under a different user (to play nicely with VSCode). I don't understand the behavior of the <code>su</code> command though.</p> <p>When I run <code>su vscode -c &quot;echo $HOME&quot;</code> I get <code>/root</code>. Ho...
<p><code>&quot;echo $HOME&quot;</code> is evaluated by your current shell <em>before</em> <code>su</code> is executed. So <code>su</code> will only be passed as argument <code>&quot;echo /root&quot;</code> (already-evaluated). If you want the variable to be evaluated by the shell spawned by su, you need to escape it: <...
Behavior of variables using su in linux
linux|python-poetry|su
0
17
1
72,163,930
72,163,930
2
true
2022-05-08T18:12:16.870Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Behavior of variables using su in linux<p>I'm installing Poetry in a dockerfile, but I want to do it under a different user (to play nicely with VSCode). I d...
72,217,350
How to map values on to a range in seaborn swarmplot?<p>I have an array of 100 float values in the range [0, 1]. (min and max values are not necessarily 0 and 1)</p> <p>I want to map them to a hue in the &quot;icefire&quot; color palette, in a swarmplot. In other words I want the data points, the dots, to have a hue ba...
<p>Unlike a scatter plot, Seaborn's <code>swarmplot</code> (currently?) doesn't use a <code>vmin=</code> and <code>vmax=</code> parameter. The <code>swarmplot</code> considers the hue mapping as categorical. You can simulate working with a colormap by creating a <code>palette</code> as a dictionary that maps every poss...
How to map values on to a range in seaborn swarmplot?
matplotlib|seaborn|hue|colormap|swarmplot
0
85
1
72,218,520
72,218,520
2
true
2022-05-12T14:21:56.513Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to map values on to a range in seaborn swarmplot?<p>I have an array of 100 float values in the range [0, 1]. (min and max values are not necessarily 0 an...
72,222,795
convert hued displot of X to plot of hue vs mode(X given hue)?<p>I have a Seaborn displot with a hued variable:</p> <p><a href="https://i.stack.imgur.com/rjYXA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rjYXA.png" alt="enter image description here" /></a></p> <p>For each hued variable, I want to...
<p>You can use scipy.stats.gaussian_kde to create the density estimation function. And then call that function on an array of x-values to calculate its maximum.</p> <pre class="lang-py prettyprint-override"><code>import matplotlib.pyplot as plt import seaborn as sns import pandas as pd import numpy as np df = pd.DataF...
convert hued displot of X to plot of hue vs mode(X given hue)?
seaborn
0
45
1
72,223,056
72,223,056
2
true
2022-05-12T22:44:54.770Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: convert hued displot of X to plot of hue vs mode(X given hue)?<p>I have a Seaborn displot with a hued variable:</p> <p><a href="https://i.stack.imgur.com/rjY...
72,168,920
position: relative; position: absolute; in drop down list<p>At <a href="https://www.w3schools.com/css/css_dropdowns.asp" rel="nofollow noreferrer">https://www.w3schools.com/css/css_dropdowns.asp</a> It puts</p> <pre><code>position: relative; position: absolute; </code></pre> <p>for</p> <pre><code>.dropdown .dropdown-co...
<p>If you don't add it, it will shift the next elements.</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>.position-relative{ position:relative; } .position-absolute{ pos...
position: relative; position: absolute; in drop down list
html|css
0
81
2
72,168,989
72,168,989
2
true
2022-05-09T08:19:40.313Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: position: relative; position: absolute; in drop down list<p>At <a href="https://www.w3schools.com/css/css_dropdowns.asp" rel="nofollow noreferrer">https://ww...
72,159,583
Iterate through vector<uchar> and count occurrence of values<p>How to iterate through a <code>std::vector&lt;uchar&gt;</code> and count the occurrence of each value?</p> <p>I'm still fairly new to C++ and don't really know the best approaches</p> <p>My guess would be to iterate through the vector and register each occu...
<p>We use an <code>unordered_map</code> as a counter by key.</p> <pre class="lang-cpp prettyprint-override"><code>#include &lt;algorithm&gt; #include &lt;cstdio&gt; #include &lt;iterator&gt; #include &lt;unordered_map&gt; #include &lt;vector&gt; int main(int argc, char const *argv[]) { auto samples = // or from use...
Iterate through vector<uchar> and count occurrence of values
c++
0
59
2
72,159,652
72,159,652
2
true
2022-05-08T09:16:05.807Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Iterate through vector<uchar> and count occurrence of values<p>How to iterate through a <code>std::vector&lt;uchar&gt;</code> and count the occurrence of eac...
72,143,873
What does citext NULL mean in PostgresSQL<p>What does this mean in PostgreSQL</p> <p><code>columnName citext NULL</code></p> <p>Im working on some SQL change, there is data in the database, but doesn't show in the front end. Wonderig if this NULL makes the values go into null state?</p>
<p>The part you have shown means nothing and won't work as it is. This will likely be part of a table definition. If you need further details which differenes exist between CITEXT and TEXT or VARCHAR, you should have a look in the documentation: <a href="https://www.postgresql.org/docs/current/citext.html" rel="nofollo...
What does citext NULL mean in PostgresSQL
postgresql
0
62
2
72,144,113
72,144,113
2
true
2022-05-06T15:21:06.020Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What does citext NULL mean in PostgresSQL<p>What does this mean in PostgreSQL</p> <p><code>columnName citext NULL</code></p> <p>Im working on some SQL change...
72,215,116
Keep only unmatched records when joining tables<p>I have 2 access tables that contain partially similar data, one being more enriched than the other. The idea here is to join the two tables by the fields <strong>id</strong> and <strong>num</strong> and to get from the table T2 the num that are not in the table T1</p> <...
<p>You can use RIGHT JOIN. And I recommend to do not use &quot;LIKE&quot; in this case because this is slow. You can just use the = operator. So your query will be:</p> <pre><code>SELECT t2.id, t2.num, t2.status FROM t1 RIGHT JOIN t2 ON t1.id = t2.id AND t1.num = t2.num WHERE t1.num IS NULL AND t2.status = 'done'; <...
Keep only unmatched records when joining tables
mysql|sql|ms-access
0
83
3
72,215,356
72,215,356
2
true
2022-05-12T11:55:22.793Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Keep only unmatched records when joining tables<p>I have 2 access tables that contain partially similar data, one being more enriched than the other. The ide...
72,233,673
SELECT DISTINCT, ORDER BY expressions must appear in select list - error when migrating from Oracle to Postgres<p>I'm in the process of migrating our database from Oracle to Postgres. We have a number of hardcoded queries in our spring boot application that now break as result of this migration, and I'm having to fix t...
<p>Your query works in Postgres 13 and later. If you start a new project, then you should use the most recent version, rather than starting with a slightly outdated version</p> <p>In older versions, you can wrap it in a derived table to get around that.</p> <pre><code>select * from ( SELECT DISTINCT * FROM TABLE_A...
SELECT DISTINCT, ORDER BY expressions must appear in select list - error when migrating from Oracle to Postgres
sql|postgresql|sql-order-by|distinct
0
44
1
72,233,952
72,233,952
2
true
2022-05-13T17:53:37.967Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: SELECT DISTINCT, ORDER BY expressions must appear in select list - error when migrating from Oracle to Postgres<p>I'm in the process of migrating our databas...
72,180,881
Program to read 2 lists and print numbers from lists combined in reverse order<p>Hi I've been writing a program where the user enters numbers for two different lists and the the program prints the lists combined and sorts the numbers in reverse order (highest - lowest).</p> <p>I have managed to write a program but I ne...
<p>This would work. You could also ask for comma separated input instead.</p> <p>Example input would look like this for each list: <code>1 2 3 4 5</code></p> <pre><code>lst1 = input(&quot;Enter list of space separated numbers:&quot;) # input = `2 1 4 7 5 9` lst2 = input(&quot;Enter list of space separated numbers:&quo...
Program to read 2 lists and print numbers from lists combined in reverse order
python|python-3.x
0
51
4
72,180,962
72,180,962
2
true
2022-05-10T04:50:15.080Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Program to read 2 lists and print numbers from lists combined in reverse order<p>Hi I've been writing a program where the user enters numbers for two differe...
72,164,410
Mock Service Worker returns empty<p>I'm new to <strong>react testing library</strong>. I am trying to test a simple component that call some apis and then it fills inputs with the data of these apis. But when I run <code>npm test</code> it keeps showing me this : the recieved value is empty</p> <p>Expected the element ...
<p>The problem is that you're not awaiting for the value but the element, and the element is there when the component is mounted with a value of <code>&quot;&quot;</code>, hence your assertion fails.</p> <p>So, you need to <code>await</code> for the value, you can use <code>waitFor</code> for the same.</p> <pre><code>i...
Mock Service Worker returns empty
javascript|reactjs|jestjs|react-testing-library|msw
0
1,035
1
72,230,687
72,230,687
2
true
2022-05-08T19:22:00.707Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Mock Service Worker returns empty<p>I'm new to <strong>react testing library</strong>. I am trying to test a simple component that call some apis and then it...
72,118,164
GitHub Action errors because it can't see a folder<p>I'm trying to set up my first GiHub Action. All it needs to do is run a test over my Godot files. I based it on a template.</p> <pre><code>name: CI on: pull_request: branches: [ main ] workflow_dispatch: jobs: build: runs-on: ubuntu-latest steps...
<p>When you need to access the files from the proper repository in a Github Actions workflow, you need to setup the <a href="https://github.com/actions/checkout" rel="nofollow noreferrer">actions/checkout</a> first.</p> <p>This will allow the workflow to access the <strong>Github workspace</strong> (which is basically ...
GitHub Action errors because it can't see a folder
github|testing|continuous-integration|github-actions|godot
0
21
1
72,118,692
72,118,692
2
true
2022-05-04T18:59:34.277Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: GitHub Action errors because it can't see a folder<p>I'm trying to set up my first GiHub Action. All it needs to do is run a test over my Godot files. I base...
72,139,328
Uncaught ArgumentCountError: mysqli_stmt::execute() expects exactly 0 arguments, 1 given<p>I am trying to build a site where I can upload multiple images with php and mysql but I am getting below error:</p> <blockquote> <p>Fatal error: Uncaught ArgumentCountError: mysqli_stmt::execute() expects exactly 0 arguments, 1 g...
<p>It looks like you are using PHP 8.0. This version didn't allow passing an array in the <code>execute()</code> method; it's only available as of PHP 8.1. You must bind the parameters using the <code>bind_param()</code> method.</p> <pre><code>$sql = &quot;INSERT INTO image_upload (image_name) VALUES (?)&quot;; $stmt =...
Uncaught ArgumentCountError: mysqli_stmt::execute() expects exactly 0 arguments, 1 given
php|mysqli
0
346
1
72,139,769
72,139,769
2
true
2022-05-06T09:38:15.677Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Uncaught ArgumentCountError: mysqli_stmt::execute() expects exactly 0 arguments, 1 given<p>I am trying to build a site where I can upload multiple images wit...
72,216,729
Dynamically added MathJax(LATEX) Element is not rendering in Browser<p>Trying to dynamically generate a LATEX notation for use of symbolic math. By checking the output with the browsers &quot;inspect&quot;, the resulting output seems to be correct, but as its execution runs asynchronously writing as text inside the DIV...
<p>The key to solving your problem is to typeset the result. Just printing the output will not work.</p> <p>This JavaScript function will interface with MathJax to draw the result. The parameter <code>str</code> is your <code>mylatexstr</code>.</p> <pre><code>function draw(str) { var math = MathJax.Hub.getAllJa...
Dynamically added MathJax(LATEX) Element is not rendering in Browser
javascript|html|mathjax|pyscript
0
107
1
72,221,359
72,221,359
2
true
2022-05-12T13:43:34.277Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Dynamically added MathJax(LATEX) Element is not rendering in Browser<p>Trying to dynamically generate a LATEX notation for use of symbolic math. By checking ...
72,045,661
Obtain column values based on changes in another column<p>I have a dataframe like this:</p> <pre><code>dateColumnDF &lt;- c(&quot;2022-04-12 00:02:57&quot;, &quot;2022-04-12 00:02:58&quot;, &quot;2022-04-12 00:02:59&quot;, &quot;2022-04-12 00:03:00&quot;, &quot;2022-04-12 00:03:02&quot;) ValueColumnDf &lt;- c(&quot;50&...
<p>Using <code>tidyr::pivot_longer</code> (you were already using <code>dplyr</code>), you can turn the table into long form.</p> <pre><code>library(tidyr) pivot_longer(df, starts_with(&quot;Var&quot;), names_to = &quot;Var&quot;, values_to = &quot;flagChangedTo&quot;) </code></pre> <p>This gives</p> <pre><code> time...
Obtain column values based on changes in another column
r|dplyr
0
30
2
72,045,838
72,045,838
2
true
2022-04-28T14:38:23.577Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Obtain column values based on changes in another column<p>I have a dataframe like this:</p> <pre><code>dateColumnDF &lt;- c(&quot;2022-04-12 00:02:57&quot;, ...
72,160,672
NodeJS: async/await doesn't return data correctly with loops<p>I'm having these calls to list users with groups from google active directory</p> <pre><code>let globalGroups = null; let groupMembers = null; await GetCustomerId(req, res).then( async () =&gt; { // GetGroups is async function saves groups in `globa...
<p><code>globalGroups.forEach( async (group) =&gt; {</code></p> <p>An async method inside <code>.forEach</code> doesn't actually do what you might want it to do.</p> <p>By essentially doing <code>array.forEach(async method)</code> you're invoking a bunch of async calls, 1 per element in the array. It's not actually pro...
NodeJS: async/await doesn't return data correctly with loops
node.js|asynchronous|foreach|async-await
0
43
1
72,161,015
72,161,015
2
true
2022-05-08T11:45:14.223Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: NodeJS: async/await doesn't return data correctly with loops<p>I'm having these calls to list users with groups from google active directory</p> <pre><code>l...
72,164,352
Redux Toolkit, trying to use filter in a reducer function, but it doesn't behave as expected<p>I have a reducer that should filter the array and update its state</p> <pre><code> searchByName: (state, action) =&gt; { state.users = state.users.filter((user) =&gt; user.name.toLowerCase().includes(action.paylo...
<p>A reducer function always returns the full state. <a href="https://redux-toolkit.js.org/usage/immer-reducers" rel="nofollow noreferrer">Reducers use Immer</a> internally to help manage immutability and write good state changing code.</p> <p>Here's how you should actually return in searchByName:</p> <pre><code>search...
Redux Toolkit, trying to use filter in a reducer function, but it doesn't behave as expected
javascript|reactjs|redux|redux-toolkit
0
1,461
1
72,164,421
72,164,421
2
true
2022-05-08T19:13:10.007Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Redux Toolkit, trying to use filter in a reducer function, but it doesn't behave as expected<p>I have a reducer that should filter the array and update its s...
72,206,852
useState spread syntax<p>When I set setItemPressed({[itemid]: false, ...itemPressed}), the itemid doesn't change to false, but when I setItemPressed({[itemid]: false}) itemid cahnges to false, but all of the other ids get removed. How do I make it so the other ids stay and this one changes?</p> <pre><code> const [item...
<p>The ordering matters.</p> <pre><code> setItemPressed({[itemid]: false, ...itemPressed}) </code></pre> <p>should be flipped:</p> <pre><code> setItemPressed({...itemPressed, [itemid]: false}) </code></pre> <p>Whatever comes later overrides what came before.</p> <p><strong>Edit</strong>: The reason why the pr...
useState spread syntax
reactjs|react-native
0
51
3
72,206,901
72,206,901
2
true
2022-05-11T19:47:44.623Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: useState spread syntax<p>When I set setItemPressed({[itemid]: false, ...itemPressed}), the itemid doesn't change to false, but when I setItemPressed({[itemid...
72,189,617
Routerlink only works the first time<p>I am trying to redirect with routerlink to a category of products. But it only works the first time. Although the change is reflected in the url (http://localhost:4200/product/3), the page remains static the 2nd time a link is clicked.</p> <p>Router is { path: 'product/:prodClass'...
<p>Try this:</p> <pre class="lang-js prettyprint-override"><code>submenusProduct: SubMenu []= [{ name: 'Wine', id: 4, }, { name: 'Liquor', id: 1, },{ name: 'Beer', id: 2, },{ name: 'Foods', id: 3, }]; </code></pre> <p>In the Section:</p> <pre class="lang-html prettyprint-override...
Routerlink only works the first time
angular
0
69
1
72,189,778
72,189,778
2
true
2022-05-10T16:02:56.327Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Routerlink only works the first time<p>I am trying to redirect with routerlink to a category of products. But it only works the first time. Although the chan...
72,188,511
How to label bars per group based on a column in ggplot2?<p>Note: The <a href="https://stackoverflow.com/questions/72182845/how-to-make-barplot-of-groups-in-dataframes">previous answers</a> provided do not show how to label the ordered ones per group</p> <p>Given this datasets:</p> <pre><code> require(dplyr) requi...
<p>Is this what you want?</p> <pre class="lang-r prettyprint-override"><code>library(tidyverse) class &lt;- c(1, 4, 1, 3, 2, 2, 4, 1, 4, 5, 2, 4, 2, 2, 2) prog &lt;- c( &quot;Bac2&quot;, &quot;Bac2&quot;, &quot;Bac2&quot;, &quot;Bac&quot;, &quot;Master&quot;, &quot;Master&quot;, &quot;Bac&quot;, &quot;Bac&quot;, &qu...
How to label bars per group based on a column in ggplot2?
r|ggplot2
0
53
2
72,188,707
72,188,707
2
true
2022-05-10T14:48:12.557Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to label bars per group based on a column in ggplot2?<p>Note: The <a href="https://stackoverflow.com/questions/72182845/how-to-make-barplot-of-groups-in-...
72,074,189
replace elements using jQuery<p>I have the following HTML rendered out in powerapps portal and I would like to replace all the occurrence of</p> <pre><code> &lt;font size = 3&gt;..... &lt;/font&gt; </code></pre> <p>with</p> <pre><code> &lt;div class=&quot;legend&quot;&gt;... &lt;/div&gt; </code></pre> <p>I have ...
<ul> <li>To search for existing elements, use CSS expressions in jQuery's <code>$()</code>.</li> <li>To create new elements, use HTML code in jQuery's 's <code>$()</code>.</li> <li><code>.replaceAll()</code> is a string function. You meant <a href="https://api.jquery.com/replacewith/" rel="nofollow noreferrer"><code>.r...
replace elements using jQuery
javascript|jquery
0
32
1
72,074,261
72,074,261
2
true
2022-05-01T05:17:32.463Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: replace elements using jQuery<p>I have the following HTML rendered out in powerapps portal and I would like to replace all the occurrence of</p> <pre><code> ...
72,220,107
Are there any advantages in using a single stored procedure for multiple operations or is my teacher wrong?<p>I'm working on my databases class final project, which consists of making an application that can access and do operations in a database. My teacher insists that I should use a single stored procedure per table...
<p><strong>Are there any advantages</strong>? Probably - opening Management Studio could be quicker.</p> <p><strong>Is your teacher wrong</strong>? Yes, most certainly, but as SMor and Jeroen write in the comments: Your teacher does the grading, so he's right until you graduate your class.</p> <p>Take a look at this qu...
Are there any advantages in using a single stored procedure for multiple operations or is my teacher wrong?
sql-server|tsql
0
127
1
72,230,112
72,230,112
2
true
2022-05-12T17:49:50.103Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Are there any advantages in using a single stored procedure for multiple operations or is my teacher wrong?<p>I'm working on my databases class final project...
72,154,490
Generating nested dictionary from a text file<p>I have a <code>sample.txt</code> file with following text.</p> <pre><code>abcd 10 abcd 1.1.1.1 abcd 2.2.2.2 abcd 3.3.3.3 wxyz 20 wxyz 1.1.1.1 wxyz 2.2.2.2 wxyz 4.4.4.4 </code></pre> <p>I want to store the different values from each line into a dictionary with...
<p>You can use a <code>for</code> loop to loop though the data, and whenever it finds a line that starts with an id that doesn't already exist in the <code>customer_names</code> list, add it to the list along with the other necessary data to start filling up with the neighboring lines:</p> <pre><code>details = { &...
Generating nested dictionary from a text file
python|dictionary|nested
0
68
2
72,154,601
72,154,601
2
true
2022-05-07T16:34:31.323Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Generating nested dictionary from a text file<p>I have a <code>sample.txt</code> file with following text.</p> <pre><code>abcd 10 abcd 1.1.1.1 abcd 2.2.2....
72,233,817
Execution of combined Booleans in swift<p>I'm having a question about a computed property where I'm using a combination of computed Booleans to get a result. I understand the logic behind the code, but I'm using some print statements in my code (for debugging) which are not getting called when one of the earlier Boolea...
<p><code>&amp;&amp;</code> is a “short-circuiting” operator: If the left operand is false then the right operand is not evaluated at all.</p> <p>Here are two possible options if you want (for debugging purposes) all boolean expressions to be evaluated.</p> <p><em>Option 1:</em> Create an array with all boolean results ...
Execution of combined Booleans in swift
swift|boolean|computed-properties
0
46
1
72,233,967
72,233,967
2
true
2022-05-13T18:08:40.330Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Execution of combined Booleans in swift<p>I'm having a question about a computed property where I'm using a combination of computed Booleans to get a result....
72,232,890
Calculate Decay Rate in Python<p>I have dataset which somewhat follows an exponentional decay</p> <pre><code>df_A Period Count 0 1600 1 894 2 959 3 773 4 509 5 206 </code></pre> <p>I want to calculate the decay rate by using 2 methods as I'm expecting both to give the same result, h...
<p>Not sure what you mean by &quot;over-complicated&quot;. Can you explain your 2 methods? I'm not sure I follow how you arrived by them? In any case, <code>scipy.optimize.curve_fit</code> does all the heavy lifting for you:</p> <pre class="lang-py prettyprint-override"><code>import numpy as np import pandas as pd from...
Calculate Decay Rate in Python
python|pandas|numpy|math|statistics
0
157
1
72,233,222
72,233,222
2
true
2022-05-13T16:42:59.333Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Calculate Decay Rate in Python<p>I have dataset which somewhat follows an exponentional decay</p> <pre><code>df_A Period Count 0 1600 1 894 2 ...
72,142,264
Angular_Improper_Type_Pipe_Usage in checkmarx scan<p>We are using a tool called checkmarx to scan code vulnerability. I am getting Angular_Improper_Type_Pipe_Usage warning for the below Angular code in checkmarx scan.</p> <p><strong>Code:</strong></p> <pre><code>&lt;div&gt;{{pctValue| percent:'1.2'}}&lt;/div&gt; </code...
<p>From the Checkmarx official documentation:</p> <blockquote> <p>Angular pipes are intended to convert, transform or process values passed into them. However, if the values passed to these pipes are not validated, an exception might be thrown by the pipe; if it is not handled, the application will cease to respond unt...
Angular_Improper_Type_Pipe_Usage in checkmarx scan
angular|typescript|checkmarx
0
405
1
72,168,687
72,168,687
2
true
2022-05-06T13:29:16.810Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Angular_Improper_Type_Pipe_Usage in checkmarx scan<p>We are using a tool called checkmarx to scan code vulnerability. I am getting Angular_Improper_Type_Pipe...