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
73,023,265
Powershell - if statement operator through paramenter<p>Hello Powershell expert, i have a short question regarding a powershell issue of mine.</p> <p>I try to pass parameter variables to process these variables in an if statement.My Goal is to have a fully dynamic if statement. Let me show you the circumstance:</p> <pr...
<p>Per @SantiagoSquarzon's comments, one way to do this is to use <a href="https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/invoke-expression?view=powershell-7.2" rel="nofollow noreferrer"><code>Invoke-Expression</code></a> to generate a string containing a PowerShell command, and then ex...
Powershell - if statement operator through paramenter
powershell|if-statement|variables|parameters|operators
1
77
2
73,025,267
73,025,267
3
true
2022-07-18T13:38:42.013Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Powershell - if statement operator through paramenter<p>Hello Powershell expert, i have a short question regarding a powershell issue of mine.</p> <p>I try t...
72,770,924
Julia BitArray with 128 Bits<p>I need a Julia BitArray-like object that can encode more than 64 bits, say 128 bits. Does a simple replacement of UInt64 with UInt128 in bitarray.jl work?</p>
<p>Based on the information in your comment, the existing <code>BitArray</code> would itself serve your needs. Note that <code>BitArray</code> uses <code>UInt64</code>s internally, but that's not a limitation on the size of the array - it actually stores the bits as a <code>Vector</code> of <code>UInt64</code>s, so the...
Julia BitArray with 128 Bits
julia|bitarray
1
77
1
72,773,785
72,773,785
3
true
2022-06-27T10:54:11.767Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Julia BitArray with 128 Bits<p>I need a Julia BitArray-like object that can encode more than 64 bits, say 128 bits. Does a simple replacement of UInt64 with ...
73,010,962
NSDocument XML read Issue<p>I am working on a NSDocument based Mac app. Which imports .xml file. It's working fine for some xml files but for few having issues.</p> <p><strong>Issue is read() is modifying the data when we import file, i need to keep the original data as it is. what do i need to do to make sure i get or...
<p>Reading is not changing your document.</p> <p>You make an xml document, with <code>XMLDocument(data:...)</code>. You are asking for a new valid XML document based on your original, and that is exactly what you get. The resulting structure is <em>not</em> a big string, like your original data; it is an elaborate <em>...
NSDocument XML read Issue
swift|objective-c|xcode|macos|nsdocument
0
77
1
73,012,008
73,012,008
3
true
2022-07-17T10:19:29.070Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: NSDocument XML read Issue<p>I am working on a NSDocument based Mac app. Which imports .xml file. It's working fine for some xml files but for few having issu...
72,852,859
How to replace spaces between words using regex?<p>I am trying to convert a string of words and numbers into a list, every item is separated with a space, so using .replace(&quot; &quot;, &quot;,&quot;).split(&quot;,&quot;) would be an easy solution, but unfortunately, sometimes there are multiple words in the object n...
<p>You may probably use this <code>re.sub + split</code> solution:</p> <pre class="lang-py prettyprint-override"><code>import re s = 'office supplies 674.56 570.980487 755.84 682.360029' print ( re.sub(r'(?&lt;=[a-zA-Z])\s+(?=[a-zA-Z])', '_', s).split() ) </code></pre> <p><strong>Output:</strong></p> <pre class="lang-p...
How to replace spaces between words using regex?
python|regex
3
77
2
72,852,954
72,852,954
4
true
2022-07-04T07:02:00.513Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to replace spaces between words using regex?<p>I am trying to convert a string of words and numbers into a list, every item is separated with a space, so...
72,994,859
How to control git which deploys to different release nos<p>I am handling a project with a directory structure I am unaware of, instead of having project directories on the root, it is nested in <code>deploy/releases/108</code> where there are 3 other directories named 1, 106, 107 and all contain the project which I am...
<p>Right now, your GitHub action relies on a symlink (symbolic link) <code>deploy/current</code> referencing one of the release/xxx folders (here, <code>releases/107</code>)</p> <p>Reorganise the repository in order to:</p> <ul> <li>import each releases/xxx content into a release branch</li> <li>tag each import with a ...
How to control git which deploys to different release nos
git|github|version-control|github-actions|git-workflow
3
77
1
73,015,077
73,015,077
4
true
2022-07-15T13:34:57.123Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to control git which deploys to different release nos<p>I am handling a project with a directory structure I am unaware of, instead of having project dir...
72,841,377
Atomic equivalent for C89<p>So, im programming in C89, and its going well so far except one issue, Im doing multithreaded applications and I need to use atomic.</p> <p>I dont want to switch to C11 because I want my code to be compatable on every compiler and system and for my code to last a very long time.</p> <p>Iv'e ...
<p>It can't be done.</p> <p>Prior to C11, to get atomic operations, you had to use inline assembler or compiler-specific intrinsics to access the appropriate instructions. And since the language had no formal memory model, you had to rely on knowledge of compiler-specific internals (often undocumented) to know what op...
Atomic equivalent for C89
c|multithreading|atomic|c89
2
77
1
72,842,152
72,842,152
4
true
2022-07-02T18:08:00.647Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Atomic equivalent for C89<p>So, im programming in C89, and its going well so far except one issue, Im doing multithreaded applications and I need to use atom...
72,781,944
Suggestion to refactor code into simple way -React<p>I have multiple with the same class name and method with different parameter i want to refactor the below code to a simpler way any suggestion would be helpful.</p> <pre><code>&lt;table class=&quot;greyGridTable&quot;&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&...
<p>I hope this would be helpful. thanks</p> <pre><code>export const TableItems = ({data}) =&gt; { return ( &lt;&gt; {data.map(item =&gt; ( &lt;tr&gt; &lt;td&gt;{item.name}&lt;/td&gt; &lt;td className='table-container'&gt; {item?.symbol} {formatDate(someMethod1(param1,a)}&lt;/td&g...
Suggestion to refactor code into simple way -React
javascript|reactjs|ecmascript-6|react-hooks|react-redux
1
77
2
72,782,027
72,782,027
4
true
2022-06-28T06:55:41.273Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Suggestion to refactor code into simple way -React<p>I have multiple with the same class name and method with different parameter i want to refactor the bel...
72,983,438
How to pass a multidimensional array to a C function using pointers?<p>I'm trying to write a program where you have to find the maximum and minimum number in a multidimensional array using double pointers. But when I try to compile it, the compiler returns to me this message:</p> <pre><code>warning: passing argument 1 ...
<p>The prototype for your function should be different: it should take a matrix of <code>N</code> by <code>M</code> doubles and pointers to double for the results. The matrix should be <code>const</code> qualified since the function does not modify it.</p> <p>You could write this as:</p> <pre><code>void MinMax(double c...
How to pass a multidimensional array to a C function using pointers?
arrays|c|multidimensional-array
1
77
2
72,983,655
72,983,655
4
true
2022-07-14T15:57:51.977Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to pass a multidimensional array to a C function using pointers?<p>I'm trying to write a program where you have to find the maximum and minimum number in...
72,969,478
Why Julia doesn't consider maximum function in the chained functions when combining anonymous function?<p>I've just got aware of <a href="https://docs.julialang.org/en/v1/manual/functions/#Function-composition-and-piping" rel="nofollow noreferrer">chaining functions (like a pipeline) in Julia</a> for a couple of days. ...
<p>The problem is actually the arrow operator not the pipe! The pipes are fine.</p> <p>Remember, you can always use the colon operator if you want to examine the parsing order:</p> <pre><code>julia&gt; :(a .|&gt; x-&gt;x^2 .|&gt; sqrt .|&gt; Int64 |&gt; maximum) :(a .|&gt; (x-&gt;begin #= REPL[84]:1 =# ...
Why Julia doesn't consider maximum function in the chained functions when combining anonymous function?
julia
6
77
1
72,969,765
72,969,765
4
true
2022-07-13T16:16:15Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why Julia doesn't consider maximum function in the chained functions when combining anonymous function?<p>I've just got aware of <a href="https://docs.julial...
72,899,958
Two JavaScript funtions "await" for something that will resolve, is there any way to avoid it?<p>I've to admin I need to read more about this topic. Anyways, here is the background:</p> <ol> <li><code>foo</code> and <code>bar</code> need to use <code>instance</code>, which is a result of a async call</li> <li><code>loa...
<p>I hope I understood you correctly. You can hold the raw promise and always return it. Once it's in resolve state it, awaiting it will return the value without re-running anything.</p> <pre><code>let promise; load() { if(!promise){ promise = new Promise(resolve =&gt; setTimeout(() =&gt; { resolve([]); ...
Two JavaScript funtions "await" for something that will resolve, is there any way to avoid it?
javascript|promise
0
77
2
72,900,091
72,900,091
4
true
2022-07-07T14:50:25.727Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Two JavaScript funtions "await" for something that will resolve, is there any way to avoid it?<p>I've to admin I need to read more about this topic. Anyways,...
72,945,481
Async/Await in high-scale projects<p>Is using Async/Await in calling every database methods(Repository Pattern) in a large and high scale project, ok? Is it going to lower my server performance? Sorry for my English :(</p>
<blockquote> <p>Is using Async/Await in calling every database methods(Repository Pattern) in a large and high scale project, ok?</p> </blockquote> <p>Yes.</p> <blockquote> <p>Is it going to lower my server performance?</p> </blockquote> <p>The speed of each individual request will remain approximately the same. Howeve...
Async/Await in high-scale projects
c#|asp.net-core|asynchronous|async-await
0
77
2
72,945,593
72,945,593
5
true
2022-07-11T23:04:10.417Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Async/Await in high-scale projects<p>Is using Async/Await in calling every database methods(Repository Pattern) in a large and high scale project, ok? Is it ...
72,961,193
How to replicate Excel's index matching formula in R using dplyr?<p>I am a heavy user of Excel and am learning R and the easy-to-use R package dplyr. I frequently use Excel's index(...,match(...)) formula combination to pull in (look up) target values from a column. How would I perform the same thing, in R and using dp...
<p>Base R has a <code>match</code> function which works similar to the Excel one.</p> <pre><code>myData$Match &lt;- with(myData, Code4[match(Code2, Code3)] * !Code1) myData #----- Element Code1 Code2 Code3 Code4 Match 1 A 0 1 0 0.0 1.1 2 A 0 2 0 0.0 1.2 3 C 0 ...
How to replicate Excel's index matching formula in R using dplyr?
r|indexing|dplyr|excel-formula|lookup
1
77
2
72,961,376
72,961,376
5
true
2022-07-13T05:07:20.110Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to replicate Excel's index matching formula in R using dplyr?<p>I am a heavy user of Excel and am learning R and the easy-to-use R package dplyr. I frequ...
72,822,673
2D Array Printing as Reference<p>I have the code similar to below:</p> <pre><code>my @array1 = (); #2d array to be used my $string1 = &quot;blank1&quot;; my $string2 = &quot;blank2&quot;; my $string3 = &quot;blank3&quot;; my @temp = ($string1, $string2, $string3); push (@array1, \@temp); </code></pre> <p>The reason I ...
<p>An array can only have scalars for elements. Thus this includes references, to arrays for example, what enables us to build complex data structures. See <a href="https://perldoc.perl.org/perldsc" rel="nofollow noreferrer">perldsc</a>, <em>Tom's Perl Data Structure Cookbook</em>.</p> <p>Elements of those (&quot;seco...
2D Array Printing as Reference
arrays|perl|multidimensional-array
3
77
1
72,823,919
72,823,919
5
true
2022-06-30T22:33:26.213Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: 2D Array Printing as Reference<p>I have the code similar to below:</p> <pre><code>my @array1 = (); #2d array to be used my $string1 = &quot;blank1&quot;; my ...
72,912,915
Join items in list that occur before and after keyword python<p>I'm using a name entity recognition model to find names in a text string. For hyphenated names like Jane Miller-Smith, the NER model returns the names seperately like this:</p> <pre><code>names = ['Jane','Miller','-','Smith'] </code></pre> <p>What's a simp...
<p>Scan from right to left, replacing the three-element slices whenever a hyphen is found:</p> <pre><code>&gt;&gt;&gt; names = ['Jane', '-', 'Marie','Miller', '-','Smith'] &gt;&gt;&gt; for i in reversed(range(len(names))): if names[i] == '-': names[i-1: i+2] = [f'{names[i-1]}-{names[i+1]}'] &gt;&gt...
Join items in list that occur before and after keyword python
python|list
3
77
5
72,913,175
72,913,175
6
true
2022-07-08T14:27:40.857Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Join items in list that occur before and after keyword python<p>I'm using a name entity recognition model to find names in a text string. For hyphenated name...
72,777,348
Why C++ template array length deduction need to be like "f(T (&a)[N]"?<p>Use C++ template to know the length of C-style array, we need this:</p> <pre><code>#include&lt;stdio.h&gt; template&lt;class T,size_t N&gt; size_t length(T (&amp;a)[N]){ return N; } int main() { int fd[2]; printf(&quot;%lld\n&quot;, length...
<p>In this function declaration</p> <pre><code>template&lt;class T,size_t N&gt; size_t length(T a[N]){ return N; } </code></pre> <p>the compiler adjusts the parameter having the array type to pointer to the array element type.</p> <p>That is this declaration actually is equivalent to</p> <pre><code>template&lt;class T,...
Why C++ template array length deduction need to be like "f(T (&a)[N]"?
c++|arrays|templates|pass-by-reference|pass-by-value
2
77
1
72,777,381
72,777,381
6
true
2022-06-27T19:21:18.630Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why C++ template array length deduction need to be like "f(T (&a)[N]"?<p>Use C++ template to know the length of C-style array, we need this:</p> <pre><code>#...
72,895,928
Retrieve stream from Optional<Stream><p>How can I get the actual stream in order to filter or map methods from an Optional ? For instance</p> <pre><code>Optional.ofNullable(id) .map(this:loadAllById) // method loadAllById return a stream (now is wrapped in Optional&lt;Stream&gt;) .filter(obj -&gt; obj.s...
<p>Here, you don't need to use <code>Optinal</code> at all.</p> <p>Optional was <strong>not</strong> designed to perform <code>null</code>-checks and <code>Optional.ofNullable(id)</code> is an abuse of optional (<em>see <a href="https://stackoverflow.com/a/52048770/17949945">Should Optional.ofNullable() be used for nul...
Retrieve stream from Optional<Stream>
java|java-8|java-stream|option-type
0
77
1
72,896,817
72,896,817
6
true
2022-07-07T10:05:07.810Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Retrieve stream from Optional<Stream><p>How can I get the actual stream in order to filter or map methods from an Optional ? For instance</p> <pre><code>Opti...
73,011,319
Java-Stream - Collect a List of objects into a Set of Strings after applying Collector groupingBy<p>Given the following classes <code>Order</code> and <code>Item</code> and a list of <code>Order</code>s.</p> <pre><code>@Getter @AllArgsConstructor @ToString public class Order { String customerName; List&lt;Item&...
<p>You were very close.</p> <p>Since you need to transform a <em>stream element</em> <strong>not</strong> into a single object, but extract a <em>collection of items</em> from the <em>order</em>, you need a different <em>collector</em> - <code>flatMapping()</code> instead of <code>mapping()</code>.</p> <pre><code>Map&l...
Java-Stream - Collect a List of objects into a Set of Strings after applying Collector groupingBy
java|java-stream|collectors|groupingby
3
77
2
73,011,395
73,011,395
6
true
2022-07-17T11:20:31.130Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Java-Stream - Collect a List of objects into a Set of Strings after applying Collector groupingBy<p>Given the following classes <code>Order</code> and <code>...
72,797,396
Mojo::DOM breaking UTF8 in Perl<p>I'm trying to find out how to use <code>Mojo::DOM</code> with UTF8 (and other formats... not just UTF8). It seems to mess up the encoding:</p> <pre><code> my $dom = Mojo::DOM-&gt;new($html); $dom-&gt;find('script')-&gt;reverse-&gt;each(sub { #print &quot;$_-&gt;{id}\n&q...
<p>You are slurping raw octets but not decoding them (storing the raw in <code>$utf8</code>). Then you treat it as if you had decoded it, so the result is mojibake.</p> <ul> <li>If you read raw octets, decode it before you use it. You'll end up with the right Perl internal string.</li> <li><code>slurp_utf8</code> will ...
Mojo::DOM breaking UTF8 in Perl
perl|mojolicious|mojo-useragent
1
77
1
72,797,882
72,797,882
7
true
2022-06-29T07:27:46.657Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Mojo::DOM breaking UTF8 in Perl<p>I'm trying to find out how to use <code>Mojo::DOM</code> with UTF8 (and other formats... not just UTF8). It seems to mess u...
72,979,006
What do the options in ffmpeg mean?<p>I don't understand what these options ( -r 30 -s 1280x720 -preset superfast -profile:v baseline) mean , searched but couldn't find , hope someone can help :</p> <pre><code>ffmpeg -i rtmp://localhost:1935/stream/$name -c:a libfdk_aac -b:a 128k -c:v libx264 -b:v 2500k -f fl...
<p>From <a href="https://ffmpeg.org/ffmpeg.html" rel="nofollow noreferrer">https://ffmpeg.org/ffmpeg.html</a></p> <blockquote> <p>-r[:stream_specifier] fps (input/output,per-stream)<br /> Set frame rate (Hz value, fraction or abbreviation).</p> </blockquote> <blockquote> <p>-s[:stream_specifier] size (input/output,per-...
What do the options in ffmpeg mean?
ffmpeg|rtmp
-2
77
1
72,980,161
72,980,161
-1
true
2022-07-14T10:24:10.273Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What do the options in ffmpeg mean?<p>I don't understand what these options ( -r 30 -s 1280x720 -preset superfast -profile:v baseline) mean , searched but co...
72,856,433
How to check for variable character in string and match it with another string of same length?<p>I have a rather complex issue that I'am unable to figure out.</p> <p>I'm getting a set of string every 10 seconds from another process in which the first set has first 5 characters constant, next 3 are variable and can chan...
<p>It's always a good idea to make an abstraction. Here I've made a simple function that takes the pattern and the value and makes a check:</p> <pre class="lang-cs prettyprint-override"><code>bool PatternMatches(string pattern, string value) { // The null string doesn't match any pattern if (value == null) ...
How to check for variable character in string and match it with another string of same length?
c#
-1
77
4
72,856,856
72,856,856
-1
true
2022-07-04T12:04:29.013Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to check for variable character in string and match it with another string of same length?<p>I have a rather complex issue that I'am unable to figure out...
72,309,859
React Native Elements cannot be used as a JSX component - Typescript<p><code>'Text' cannot be used as a JSX component.</code></p> <p>Im using the <code>Text</code> elements as example but it happens for all react native elements.</p> <p>Code example:</p> <pre><code> return ( &lt;&gt; &lt;TechnicianDetailCar...
<p>The problem was that the project was taking the <code>@react-native-types</code> from the another <code>node_modules</code> project</p>
React Native Elements cannot be used as a JSX component - Typescript
typescript|react-native
1
78
2
72,708,709
72,708,709
0
true
2022-05-19T19:03:02.123Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: React Native Elements cannot be used as a JSX component - Typescript<p><code>'Text' cannot be used as a JSX component.</code></p> <p>Im using the <code>Text<...
72,772,079
Remix - remix.config.js - How to configure rehype-highlight and register an additional language for highlighting?<p>In remix.config.js I have the following code</p> <pre class="lang-js prettyprint-override"><code> mdx: async (filename) =&gt; { const [rehypeHighlight] = await Promise.all([ import(&quot;rehype-...
<p>In the meantime I have found out. Here is the modified code to register another language in case someone else can't see the forest for the trees either :)</p> <pre class="lang-js prettyprint-override"><code>const gql = require( &quot;highlight.js/lib/languages/graphql&quot; ); module.exports = { //Other configurat...
Remix - remix.config.js - How to configure rehype-highlight and register an additional language for highlighting?
javascript|remix.run
1
78
1
72,788,560
72,788,560
0
true
2022-06-27T12:25:21.360Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Remix - remix.config.js - How to configure rehype-highlight and register an additional language for highlighting?<p>In remix.config.js I have the following c...
72,787,796
Docker Containers' Network Access Configuration<p>I'm struggling to configure docker-compose file in order to achieve below structure. Web container needs to be accessible through virtual pcs, physical devices (local &amp; external), but the Keycloak container needs to be only accessible by web container. How can I ach...
<p>If a container doesn't have <code>ports:</code>, it (mostly*) isn't accessible from outside of Docker. If your goal is to have the container only be accessible from other containers, you can just delete <code>ports:</code>.</p> <p>In comments you ask about the container being reachable from other containers. So lo...
Docker Containers' Network Access Configuration
docker|networking|docker-compose|dockerfile|keycloak
0
78
1
72,802,518
72,802,518
0
true
2022-06-28T13:57:04.530Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Docker Containers' Network Access Configuration<p>I'm struggling to configure docker-compose file in order to achieve below structure. Web container needs to...
72,812,449
How to listen to keyspace events using Spring Data Redis with a GCP managed cluster?<p>I am using secondary indexes with Redis thanks to Spring Data Redis <code>@Indexed</code> annotations. My entry has a TTL. This has a side effect of keeping the indexes after the expiration of the main entry. This is expected, and <a...
<p>This problem is linked to the fact that the Redis cluster is managed, and as such remote clients can't call CONFIG on it. When enabling the Spring keyspace event listener, it tries to configure Redis to emit keyspace expiry events, by setting the <code>notify-keyspace-events</code> config key to &quot;Ex&quot;.</p> ...
How to listen to keyspace events using Spring Data Redis with a GCP managed cluster?
spring|google-cloud-platform|redis|spring-data-redis
0
78
1
72,812,450
72,812,450
0
true
2022-06-30T08:18:03.840Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to listen to keyspace events using Spring Data Redis with a GCP managed cluster?<p>I am using secondary indexes with Redis thanks to Spring Data Redis <c...
72,797,733
Can't import System.Net.Http on VB.Net page<p>I'm trying to use HttpClient on a VB.NET page (Windows Server 2019 IIS 10), but getting BC30002 error. Tracing the error in IIS, I see warning BC40056 (Namespace not found) on line:</p> <pre><code>Imports System.Net.Http </code></pre> <p>Running gacutil, seems that the asse...
<p>Finally understood that, even if .NET Framework 4.8 supports HttpClient, CLR is still at 4.0 version (that don't support HttpClient). Optimal solution, as noted by user9938, would be migrating to .NET 6, but, for an old app where I just need to add a small integration, was easier for me to use old WebClient, instead...
Can't import System.Net.Http on VB.Net page
vb.net|dotnet-httpclient|iis-10|system.net
0
78
1
72,827,747
72,827,747
0
true
2022-06-29T07:56:01.783Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can't import System.Net.Http on VB.Net page<p>I'm trying to use HttpClient on a VB.NET page (Windows Server 2019 IIS 10), but getting BC30002 error. Tracing ...
72,838,808
C++ How to copy a part of vector into array?<p>I was making a copy from a large dynamic array to a small fixed size array.</p> <pre><code>for (int i = 0; i &lt;= dumpVec.size() - 16; i++) { copy(dumpArr + i, dumpArr + i + 16, temp); // to copy 16 bytes from dynamic array } </code></pre> <p>But I should use a vector...
<pre><code>copy(dumpArr + i, dumpArr + i + 16, temp); // to copy 16 bytes from dynamic array </code></pre> <p>can be written as</p> <pre><code>copy(&amp;dumpArr[i], &amp;dumpArr[i + 16], &amp;temp[0]); // to copy 16 bytes from dynamic array </code></pre> <p>and now the same code works for <code>vector</code> and <code>...
C++ How to copy a part of vector into array?
c++|copy|stdvector|stdarray|stdcopy
1
78
2
72,839,485
72,839,485
0
true
2022-07-02T11:47:50.820Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: C++ How to copy a part of vector into array?<p>I was making a copy from a large dynamic array to a small fixed size array.</p> <pre><code>for (int i = 0; i &...
72,843,333
How do I attach a debugger to my Spring Boot application in AWS Cloud9?<p>I am using AWS's Cloud9 IDE to work on a Spring Boot application.</p> <p>I have created a &quot;shell command&quot; run configuration that uses the following command to start my application:</p> <p><code>mvn spring-boot:run -f pom.xml -DlogPathPr...
<p>First, click Edit launch configurations and then add the below snippet. And then run &quot;mvnDebug spring-boot:run&quot; It will start listening to the port 8000 and you can click the drop down adjacent to Run button to attach the debugger.</p> <pre><code>{ &quot;configurations&quot;: [ { &quot;type&quo...
How do I attach a debugger to my Spring Boot application in AWS Cloud9?
java|amazon-web-services|spring-boot|debugging|aws-cloud9
0
78
1
72,851,821
72,851,821
0
true
2022-07-03T00:57:21.570Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do I attach a debugger to my Spring Boot application in AWS Cloud9?<p>I am using AWS's Cloud9 IDE to work on a Spring Boot application.</p> <p>I have cre...
72,855,625
Xcode Bus error: 10 when archiving but working fine on debug<h3>Xcode 13.4.1 (13F100)</h3> <p>A project using <strong>SwiftUI</strong> fails <strong>archiving</strong> and throws the very cryptic message <code>Bus error: 10</code>, without further explanation.</p> <p>But everything works fine while debugging.</p> <p>Af...
<p>After long research and reading <a href="https://stackoverflow.com/a/66617961/4691224">this</a> answer I was able to narrow the issue even further. It turned out I had a <code>SwiftUI</code> <code>EquatableView</code>, but without properties. Something like this:</p> <h3>Not working for Optimization</h3> <pre class=...
Xcode Bus error: 10 when archiving but working fine on debug
ios|swift|xcode|optimization|swiftui
1
78
1
72,855,626
72,855,626
0
true
2022-07-04T10:55:42.390Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Xcode Bus error: 10 when archiving but working fine on debug<h3>Xcode 13.4.1 (13F100)</h3> <p>A project using <strong>SwiftUI</strong> fails <strong>archivin...
72,859,237
Updating a column in a dataframe with latest value from the latest year<p>Lets say I have a dataframe:</p> <pre><code>df = |ID | year | value | |----|------|----------| |123 | 2011 | Mango | |232 | 2010 | Pineapple| |123 | 2022 | Orange | |232 | 2021 | Apple | |221 | 2021 | Banana | </code></pre> <p>I wa...
<p>You need to use 'Rank' &amp; 'Merge' as below, gives required output</p> <pre><code>df = pd.DataFrame({'ID':[123,232,123,232,221],'Year':[2011,2010,2022,2021,2021],'Value':['Mango','Pineapple','Orange','Apple','Banana']}) df['ID_Year_Rank'] = df.groupby(['ID'])['Year'].rank(method='first', ascending=False) df </code...
Updating a column in a dataframe with latest value from the latest year
python|pandas|dataframe|merge|concatenation
0
78
2
72,860,099
72,860,099
0
true
2022-07-04T15:42:40.397Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Updating a column in a dataframe with latest value from the latest year<p>Lets say I have a dataframe:</p> <pre><code>df = |ID | year | value | |----|--...
72,856,780
What do I need to alter for my multi-subscription Bicep alert rule deployment to succeed?<p>the code below is my attempt at creating a template allowing easy deployment of a static Alert rule to multiple Azure subscriptions. To achieve this, I am looping through an array containing the subscriptions I want to deploy to...
<p>Looking at the <a href="https://docs.microsoft.com/en-us/azure/templates/microsoft.insights/metricalerts?tabs=bicep#metricalertproperties" rel="nofollow noreferrer">documentation</a>:</p> <blockquote> <p>scopes: the list of resource id's that this metric alert is scoped to. string[] (required)</p> </blockquote> <p>S...
What do I need to alter for my multi-subscription Bicep alert rule deployment to succeed?
azure|azure-resource-manager|azure-bicep
1
78
1
72,861,568
72,861,568
0
true
2022-07-04T12:28:45.423Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: What do I need to alter for my multi-subscription Bicep alert rule deployment to succeed?<p>the code below is my attempt at creating a template allowing easy...
72,854,696
Azure DevOps Build Validation use latest run<p>i want to prevent the User from merging a PR if a specific pipeline failed. But i don't want to trigger the pipeline again but i want to use the latest run because the pipeline is a scheduled systemtest.</p> <p>The &quot;Build Validation&quot; policy has no option to check...
<p>I am afraid that there is no such method can use Build Validation to check the latest run instead of triggering new pipeline.</p> <p>Refer to this doc: <a href="https://docs.microsoft.com/en-us/azure/devops/repos/git/branch-policies?view=azure-devops&amp;tabs=browser" rel="nofollow noreferrer">Build validation</a><...
Azure DevOps Build Validation use latest run
azure-devops|pull-request
0
78
1
72,867,520
72,867,520
0
true
2022-07-04T09:42:11.487Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Azure DevOps Build Validation use latest run<p>i want to prevent the User from merging a PR if a specific pipeline failed. But i don't want to trigger the pi...
72,879,563
Presence in consecutive day by year in daily time-series data in R<p>I have daily time-series data for 60 years about the presence and absence of rainfall for 400 stations. The data is in the following format where, in the second column, 1 indicates presence and 0 indicate absence:</p> <pre><code>Date Rainfall ...
<p>A simple solution using only {base} R functions, particularly <code>diff</code> and <code>tapply</code>. The summary statistics pertain to events with a start date in that year.</p> <pre><code>date &lt;- seq(as.Date(&quot;2000/1/1&quot;), as.Date(&quot;2010/1/1&quot;), &quot;days&quot;) rainfall &lt;- sample(c(0,1),...
Presence in consecutive day by year in daily time-series data in R
r|time-series
4
78
4
72,881,581
72,881,581
0
true
2022-07-06T07:37:19.273Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Presence in consecutive day by year in daily time-series data in R<p>I have daily time-series data for 60 years about the presence and absence of rainfall fo...
72,855,111
Can't get a way to read the property "member" in class "App\Entity\Invoice"<p>I have an error when I use CollectionType:</p> <p><a href="https://symfony.com/doc/current/form/form_collections.html" rel="nofollow noreferrer">https://symfony.com/doc/current/form/form_collections.html</a></p> <p>I followed the documentatio...
<p>So I found the solution:</p> <p>I have change my entry_options in my InvoiceType:</p> <pre><code>'entry_options' =&gt; [ &quot;responsibleAdult&quot; =&gt; $options['responsibleAdult'], &quot;event&quot; =&gt; $options['event'], &quot;eventOptions&quot; =&gt; $options[...
Can't get a way to read the property "member" in class "App\Entity\Invoice"
php|symfony
0
78
1
72,895,157
72,895,157
0
true
2022-07-04T10:14:31.407Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can't get a way to read the property "member" in class "App\Entity\Invoice"<p>I have an error when I use CollectionType:</p> <p><a href="https://symfony.com/...
72,911,316
define constant instead of duplicating 3 times<p>I'm fairly new to Node.js and I am having some issues. I received error in sonarqube as define a constant instead of duplicating 3 times for &quot;Invalid Password&quot;. how can i resolved this issue.</p> <pre><code>export const MessageCodeMapping = { REQUEST_COMPLETE...
<p>To solve this issue, stop declaring many times similar messages. What I recommend is to declare once and use in all places needed or if you must have some slight difference between them create a function that receives a message and replace with the message key with what received.</p> <p>It will be something like thi...
define constant instead of duplicating 3 times
node.js|sonarqube
0
78
2
72,911,777
72,911,777
0
true
2022-07-08T12:19:10.200Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: define constant instead of duplicating 3 times<p>I'm fairly new to Node.js and I am having some issues. I received error in sonarqube as define a constant in...
72,916,028
Tailwind CSS does not work with react app - no affect<p>I am trying to create a react website using <code>npx create-react-app myapp </code> <code>cd my app</code> later i followed the steps as per mentioned on tailwind css that are as followed: <code>npm install -D tailwindcss postcss autoprefixer</code> and then <cod...
<p>You might be having issue with tailwind.config.js can you try the below tailwind.config.js, In Create React App, the components are stored in src directory and you are targeting specific to pages and components directory, so going with .src/pages/<strong>/<em>, .src/pages/</em>, .src/components/</strong>/<em>, .src/...
Tailwind CSS does not work with react app - no affect
reactjs|tailwind-css
1
78
2
72,916,163
72,916,163
0
true
2022-07-08T19:13:08.597Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Tailwind CSS does not work with react app - no affect<p>I am trying to create a react website using <code>npx create-react-app myapp </code> <code>cd my app<...
72,920,785
Using USB port data in PyQt<p>The aim of my code is to create a window with labels, each representing a sensor. The data comes from the USB port in a table of 0s&amp;1s and depending on the value it colours the labels accordingly.<br /> The goal is supposed to look like this:</p> <p><img src="https://i.stack.imgur.com/...
<p>The concept is based on the wrong premise: <code>making</code> should only create the labels (and keep a reference to them), while <em>another</em> function should be responsible for their update.</p> <p>Since the data rate is quite fast and the display object very simple, it's probably better to use a custom widget...
Using USB port data in PyQt
pyqt|port|pyserial|qmainwindow|pyqt6
1
78
2
72,923,004
72,923,004
0
true
2022-07-09T10:57:22.280Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Using USB port data in PyQt<p>The aim of my code is to create a window with labels, each representing a sensor. The data comes from the USB port in a table o...
72,931,176
Can't we typecast in C# like below as in python<p>I am a newbie and forgive me if this is very basic question. In python, below is possible.</p> <pre><code>x = 0 x = float(x) </code></pre> <p>Can't we do this in C#? It throws error unless I assign the casting to a different variable</p>
<p>So in C# when defining a variable, you need to specify the type. For example:</p> <pre><code>int x = 0 </code></pre> <p>When you typecast in C#, you need to initialize a new variable of a different type, and set it to the existing variable. To type convert the above line to a float we'd add:</p> <pre><code>float y =...
Can't we typecast in C# like below as in python
c#|variables|casting
-4
78
3
72,931,250
72,931,250
0
true
2022-07-10T19:08:21.700Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Can't we typecast in C# like below as in python<p>I am a newbie and forgive me if this is very basic question. In python, below is possible.</p> <pre><code>x...
72,907,115
Multiple Spartacus site deployment in CCV2<p>I am working in the project where the <strong>Requirements</strong> is to build:</p> <ul> <li>2x B2B site (no sites are identical in terms of functionality)</li> <li>1x B2C site</li> </ul> <p>I know that we can't combine Spartacus B2B and B2C in single code base which lead t...
<p>I heard from my colleague that it's possible to support multiple JavaScript storefront in CCV2 now.</p> <p>For details about configuration &amp; setup, please refer to these urls below:</p> <ul> <li><p><a href="https://help.sap.com/docs/SAP_COMMERCE_CLOUD_PUBLIC_CLOUD/b2f400d4c0414461a4bb7e115dccd779/1c26045800fa4f8...
Multiple Spartacus site deployment in CCV2
spartacus-storefront|sap-commerce-cloud
0
78
1
72,933,269
72,933,269
0
true
2022-07-08T05:44:31.217Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Multiple Spartacus site deployment in CCV2<p>I am working in the project where the <strong>Requirements</strong> is to build:</p> <ul> <li>2x B2B site (no si...
72,871,476
How to stream Apache Arrow RecordBatches in C?<p>I read some data from a PostgreSQL database, convert it into RecordBatches and try to send the data to a client. But I fail to properly understand the usage of Apache Arrow C/GLib.</p> <p>My information sources are the <a href="https://arrow.apache.org/docs/cpp/index.htm...
<p>So my solution was to use the class GArrowRecordBatchStreamWriter and Reader, instead of the function garrow_output_stream_write_record_batch(), because the latter only writes a record batch without a stream header and schema. Furthermore one has to properly access the data of the GArrowBuffer after writing. (Again,...
How to stream Apache Arrow RecordBatches in C?
c|stream|apache-arrow
0
78
1
72,949,860
72,949,860
0
true
2022-07-05T14:53:33.153Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to stream Apache Arrow RecordBatches in C?<p>I read some data from a PostgreSQL database, convert it into RecordBatches and try to send the data to a cli...
72,940,003
Receiving data from arduino with bluettoth HC-05 module to python - wierd numbers recived and conversion<p>I asked this question before to know how to convert the byes to ints here: and now I have a different situation.</p> <p><a href="https://stackoverflow.com/questions/72905045/send-data-to-from-arduino-to-raspberry-...
<p>You were using: input = serialData.read(). I used getData = str(ser.readline()) and it worked for me. Input is in utf-8, whereas getData is a string. I feel like in Python a string is much easier to process and convert into integer than utf-8.</p> <p>To process the string into integers, i did:</p> <pre><code>getData...
Receiving data from arduino with bluettoth HC-05 module to python - wierd numbers recived and conversion
python|arduino|bluetooth|raspberry-pi4
0
78
1
72,961,756
72,961,756
0
true
2022-07-11T14:16:57.513Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Receiving data from arduino with bluettoth HC-05 module to python - wierd numbers recived and conversion<p>I asked this question before to know how to conver...
72,962,946
how to stop checkbox from getting checked when confirm box cancel is clicked?<p>When clicking cancel I need the checkbox to go back to unchecked. But it's getting checked . I tried everything .</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code...
<p>Ensure that you are pointing to correct checkbox with the selector.</p> <p>Your checkbox id is <code>chkbox</code> and you are trying to point some other elements with <code>&quot;#chkbox&quot; + bID</code> where <code>bID</code> is not needed I suppose.</p> <p>It works fine without that <code>bID </code> parameter....
how to stop checkbox from getting checked when confirm box cancel is clicked?
javascript|html|jquery
0
78
2
72,963,026
72,963,026
0
true
2022-07-13T08:13:15.720Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to stop checkbox from getting checked when confirm box cancel is clicked?<p>When clicking cancel I need the checkbox to go back to unchecked. But it's g...
72,965,227
How can I converting multi page PDF file to many images .jpeg with Vips in C++?<p>I'am trying using vips in c++ to read a .PDF and convert to .jpeg files. The problem is that the code save all the pages in a single file .jpeg. How can i save in many .jpeg files?</p> <p><strong>My Code</strong></p> <pre><code> VOptio...
<p>I found a way to solve this using crop.</p> <pre><code> VImage in = VImage().pdfload(&quot;/Users/MyUser/Desktop/PDF_Reader/files/TEST_DOC_READER.pdf&quot;, voptions); pages = in.get_int(&quot;n-pages&quot;); h = in.height()/pages; for(int i=0; i&lt;pages; i++){ in.crop(0,i*h, in.width(), h)....
How can I converting multi page PDF file to many images .jpeg with Vips in C++?
c++|pdf|vips
0
78
1
72,970,337
72,970,337
0
true
2022-07-13T11:04:33.160Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I converting multi page PDF file to many images .jpeg with Vips in C++?<p>I'am trying using vips in c++ to read a .PDF and convert to .jpeg files. Th...
72,959,219
Google Cloud: Why am I not an organization administrator?<p>I am attempting to expand my usage of Google Cloud and running into issues. When I go to IAM &amp; Admin -&gt; IAM and select my organization, I get an error: &quot;You do not have sufficient permissions to view this page&quot;. A bit lower: &quot;You are ...
<p>Based on what @JohnHanley's shared on the comments:</p> <blockquote> <p>Organization Admin must be applied (bound) at the organization level. If you created the organization, then you have a Workspace or Identity account. Use that account to login. The problem should be easy to solve once you are using the correct a...
Google Cloud: Why am I not an organization administrator?
google-cloud-platform
1
78
1
72,974,563
72,974,563
0
true
2022-07-12T23:03:12.267Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Google Cloud: Why am I not an organization administrator?<p>I am attempting to expand my usage of Google Cloud and running into issues. When I go to IAM &am...
72,975,021
Docker file build failed<p>I try to build my docker file but it has failed.</p> <p>I have folder structure in vscode like that:-</p> <p><a href="https://i.stack.imgur.com/0tAtM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0tAtM.png" alt="enter image description here" /></a></p> <p>In my docker fil...
<p>Try putting the <code>dockerfile</code> in the same dir as the <code>requirements.txt</code></p> <p>Then in your Dockerfile</p> <pre><code>COPY ./requirements.txt /tmp/pip-tmp/requirements.txt RUN pip install -r /tmp/pip-tmp/requirements.txt \ &amp;&amp; rm -rf /tmp/pip-tmp </code></pre> <p>After this navigate to t...
Docker file build failed
docker|dockerfile
0
78
1
72,975,420
72,975,420
0
true
2022-07-14T03:55:50.340Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Docker file build failed<p>I try to build my docker file but it has failed.</p> <p>I have folder structure in vscode like that:-</p> <p><a href="https://i.st...
72,979,667
noob to blazor and confused about page life cycle and an ever increase number of requests<p>I've decided to pick up blazor as recently enjoyed last UWP project and quite like entiry framework to boot.</p> <p>I've a very basic component, littlally uses a service using an injected IDbContextFactory&lt;&gt;, and EF core.<...
<pre><code> Post? CurrentPost=&gt; postService.GetPost(PostId); </code></pre> <p>Could become very expensive. You now query everytime you use CurrentPost.</p> <p>Make CurrentPost a property or a field and load it in OnParametersSet[Async]</p>
noob to blazor and confused about page life cycle and an ever increase number of requests
c#|entity-framework|blazor
1
78
2
72,980,328
72,980,328
0
true
2022-07-14T11:18:26.307Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: noob to blazor and confused about page life cycle and an ever increase number of requests<p>I've decided to pick up blazor as recently enjoyed last UWP proje...
72,989,881
Laravel 9 storage returns 404 on live server<p>I am trying to show images from my symlink storage directory on my live server (shared) the scripts are working perfectly on my <code>localhost</code> but by the time i deployed it the image that was uploaded is not showing and returns page 404 error.</p> <p>So i run the f...
<p>I manage to solve it by changing FILESYSTEM_DRIVER=local to FILESYSTEM_DRIVER=public on my .env file</p>
Laravel 9 storage returns 404 on live server
php|laravel
0
78
1
73,002,249
73,002,249
0
true
2022-07-15T06:35:05.837Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Laravel 9 storage returns 404 on live server<p>I am trying to show images from my symlink storage directory on my live server (shared) the scripts are workin...
72,984,103
Delphi FMX StringGrid how to change the keyboardtype to numeric<p>Using Delphi 11.1 FireMonkey Hello I would like to change the keyboardtype of a stringgrid column to mumeric (for Android). Could someone please help me with that? Thanks! Ad</p>
<p>IDE or Runtime ?</p> <ul> <li><p>IDE use another column type</p> </li> <li><p>Runtime if you create the column then create it as a TIntegerColumn, TcurrencyColumn or TFloatColumn (depending of &quot;mumeric&quot; ;-) means for you) and not a simple TColumn (default is TStringColumn).</p> </li> </ul> <p>By the way, i...
Delphi FMX StringGrid how to change the keyboardtype to numeric
android|delphi|keyboard|firemonkey|stringgrid
0
78
1
73,002,499
73,002,499
0
true
2022-07-14T16:53:00.380Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Delphi FMX StringGrid how to change the keyboardtype to numeric<p>Using Delphi 11.1 FireMonkey Hello I would like to change the keyboardtype of a stringgrid ...
73,017,811
how to read text file and display in textarea in react js<pre><code>import React from 'react'; const Dashboard = () =&gt; { const handleChange = () =&gt; { let input = document.querySelector('input'); let textarea = document.querySelector('textarea'); input.addEventListener('change', () =&gt; { let files ...
<p>When using react, you should avoid using query selectors as it will defeat the purpose of using react. Instead use states to maintain the values of textArea so that whenever there is a state update, re-render is triggered. You can use the implementation below:</p> <pre><code>import React, { useState } from &quot;rea...
how to read text file and display in textarea in react js
javascript|reactjs
0
78
2
73,018,133
73,018,133
0
true
2022-07-18T05:51:10.783Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to read text file and display in textarea in react js<pre><code>import React from 'react'; const Dashboard = () =&gt; { const handleChange = () =&gt; {...
73,016,629
Checking if sheet name available in workbook after getting value in input box. And if sheet name is not available input box called again<ol> <li><p>I am writing a VBA code where I need to find if sheet name given by user through inputbox is available or not in a workbook containing many sheets.</p> </li> <li><p>But if ...
<p>To handle all usecases (no input given, existing sheetname given, non-existing sheetname given) - you can use this code:</p> <pre class="lang-vb prettyprint-override"><code>Public Sub activateSheetByUserInput() Dim pendworkbook As Workbook Dim sht As Worksheet Dim entername As String Set pendworkbook = Workbooks(&q...
Checking if sheet name available in workbook after getting value in input box. And if sheet name is not available input box called again
excel|vba
1
78
3
73,018,379
73,018,379
0
true
2022-07-18T02:00:31.267Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Checking if sheet name available in workbook after getting value in input box. And if sheet name is not available input box called again<ol> <li><p>I am writ...
72,991,151
starting wiremock as part of local development<p>I have a hello world micronaut application which starts locally and makes some calls to an external service. What I want to do is start wiremock as part of the local build on my machine, so that wiremock can intercept the external calls and send responses</p> <p>Im not s...
<p>Have you tried instructions provided in <a href="https://github.com/tomakehurst/wiremock-jdk8-examples/" rel="nofollow noreferrer">https://github.com/tomakehurst/wiremock-jdk8-examples/</a> ?</p> <p>Add dependency:</p> <p><code> test &quot;com.github.tomakehurst:wiremock-jre8-standalone:2.33.2&quot;</code></p>...
starting wiremock as part of local development
micronaut|wiremock
0
78
1
73,021,112
73,021,112
0
true
2022-07-15T08:27:35.540Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: starting wiremock as part of local development<p>I have a hello world micronaut application which starts locally and makes some calls to an external service....
73,006,733
Plotting multiple graphs with matplotlib subplots does not show edge colors<p>I am using <code>igraph</code> to analyze a network and find a specific kind of triad as subgraphs of the main network. I successfully did that but now I'm trying to plot these subgraphs in a multipanel figure using <code>matplotlib</code>.</...
<p>I've tried setting <code>edge_color</code>, <code>color</code>, <code>face_color</code> in the <code>plot</code> function but none of them worked. Actually only <code>edge_color</code> works but it sets the color for all edges.</p> <p>The only way that worked was setting the <code>edgecolor</code> in the axes' child...
Plotting multiple graphs with matplotlib subplots does not show edge colors
python|matplotlib|igraph
2
78
1
73,021,500
73,021,500
0
true
2022-07-16T18:29:20.497Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Plotting multiple graphs with matplotlib subplots does not show edge colors<p>I am using <code>igraph</code> to analyze a network and find a specific kind of...
73,025,190
OnRowCommand is triggered, OnRowEditing not firing on my gridview<p>I have a gridview like below:</p> <pre><code>&lt;asp:GridView ID=&quot;gvitems&quot; runat=&quot;server&quot; AutoGenerateColumns=&quot;false&quot; CssClass=&quot;GridStyle&quot; AllowSorting=&quot;true&quot; OnSorting=&quot;OnSorting&quot; DataKeyName...
<p>Using LinkButton instead of regular button fixed the issue.</p> <pre><code>&lt;asp:TemplateField&gt; &lt;ItemTemplate&gt; &lt;asp:LinkButton Text=&quot;Edit&quot; runat=&quot;server&quot; CommandName=&quot;Edit&quot; /&gt; &lt;asp:LinkButton Text...
OnRowCommand is triggered, OnRowEditing not firing on my gridview
c#|asp.net|gridview|asp.net-4.5
0
78
1
73,025,864
73,025,864
0
true
2022-07-18T15:53:29.047Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: OnRowCommand is triggered, OnRowEditing not firing on my gridview<p>I have a gridview like below:</p> <pre><code>&lt;asp:GridView ID=&quot;gvitems&quot; runa...
73,030,990
Microsoft Azure database admin user creation<p>I deployed azure MySQL 5.7 database in azure. I can't create another admin user with admin permission with the serveradmin login. When I tried below command GRANT ALL PRIVILEGES ON <em>.</em> TO 'sammy'@'localhost' WITH GRANT OPTION; I am getting error serveradmin@ip don't...
<p>To create another Admin Like user in MySql we use <code>Superuser</code> privilege to get all the access of MySql. But, On Azure Database for MySQL, the SUPER permission is not supported.</p> <p>As suggested by <strong>@Cameron Battagler</strong> in <a href="https://techcommunity.microsoft.com/t5/azure-database-supp...
Microsoft Azure database admin user creation
mysql|sql|database|azure
-1
78
1
73,032,720
73,032,720
0
true
2022-07-19T04:04:41.360Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Microsoft Azure database admin user creation<p>I deployed azure MySQL 5.7 database in azure. I can't create another admin user with admin permission with the...
73,028,572
SwiftUI tap picker like a button<p>Is it possible to make a SwiftUI picker tap like a button. The following only lets you set the picker if you tap on the text, but I would like to tap the picker like a button.</p> <pre><code>struct ContentView: View { @State var myvar: String = &quot;&quot; var body: some View...
<p>@Asperi was right in their comment. The <code>Menu</code> is better than the <code>picker</code> when wanting it to display as a button. Here is a simple code example.</p> <pre><code>struct ContentView: View { @State var myvar: String = &quot;&quot; var body: some View { Menu { // This sh...
SwiftUI tap picker like a button
swiftui
0
78
2
73,038,101
73,038,101
0
true
2022-07-18T20:59:17.257Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: SwiftUI tap picker like a button<p>Is it possible to make a SwiftUI picker tap like a button. The following only lets you set the picker if you tap on the te...
72,983,801
How to resolve "A control must be associated with a text label" on a datalist's option?<p>Building a dropdown and referencing Bootstrap 5 docs' on <a href="https://getbootstrap.com/docs/5.0/forms/form-control/#datalists" rel="nofollow noreferrer">Datalists</a> it shows an example of:</p> <pre><code>&lt;label for=&quot;...
<p>I was able to resolve my issue by adding an <code>aria-label</code> to the <code>option</code> so this:</p> <pre><code>&lt;datalist id={id}&gt; {options.map((option, key) =&gt; ( &lt;option key={key} value={option.toString()} data-value={option.toString()} /&gt; ))} &lt;/datalist&gt; </code></pre> <p>turned ...
How to resolve "A control must be associated with a text label" on a datalist's option?
reactjs|dropdown|bootstrap-5|formik
0
78
1
73,092,860
73,092,860
0
true
2022-07-14T16:29:03.327Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to resolve "A control must be associated with a text label" on a datalist's option?<p>Building a dropdown and referencing Bootstrap 5 docs' on <a href="h...
72,888,242
How to make full screen mode in pygbag?<p>When I open the pygame html page created with pygbag, the console opens in full screen and the pygame window is in the corner: <a href="https://i.stack.imgur.com/utbcj.png" rel="nofollow noreferrer">image link</a></p> <p>How can I make the pygbag window open in full screen?</p>
<p>Short answer, you cannot, no web browser will allow your code to switch to fullscreen on page load without user intervention.</p> <p>So now the default in pygbag is &quot;fullscreen windowed&quot; : that way pygame screen is always maximized inside the page which seems a good trade off.</p> <p>To get console back, j...
How to make full screen mode in pygbag?
python
1
78
1
73,214,812
73,214,812
0
true
2022-07-06T18:19:16.523Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to make full screen mode in pygbag?<p>When I open the pygame html page created with pygbag, the console opens in full screen and the pygame window is in ...
73,005,935
Send each row an Excel Spreadsheet as an individual email in Outlook<p>I need a piece of code I can use to create a Macro that outputs each row of my spreadsheet below as an individual Outlook email, to the email address in the column titled &quot;Email&quot; below. I also need to add the columns titled, &quot;Call&quo...
<p>The following procedure should accomplish this task. It is assumed that your data is stored in the columns <code>A:G</code>. If this is not the case, you will need to modify the specific parts accordingly. In addition, the code already includes the feature that the subject-varying part of the &quot;body of the e-mai...
Send each row an Excel Spreadsheet as an individual email in Outlook
excel
0
78
1
73,008,522
73,008,522
0
true
2022-07-16T16:31:49.457Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Send each row an Excel Spreadsheet as an individual email in Outlook<p>I need a piece of code I can use to create a Macro that outputs each row of my spreads...
72,838,670
how to send a GET request with Json body in Flutter?<p>I need to send a GET HTTP request with a JSON body. I know that this is not allowed by the RestFul specs. However, there is no chance to change the server. Is there a way to overcome this restriction in Flutter?</p> <p>This is the code I am trying to use but I coul...
<p>You are close, but you need to use a subclass of <code>BaseRequest</code> so that you can add the body, which you can do by grabbing its sink and adding the body to that before then sending the request.</p> <pre><code>import 'dart:convert'; import 'package:http/http.dart' as http; void main() async { final paylo...
how to send a GET request with Json body in Flutter?
flutter|get|restful-url
0
78
1
72,848,398
72,848,398
0
true
2022-07-02T11:25:59.897Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to send a GET request with Json body in Flutter?<p>I need to send a GET HTTP request with a JSON body. I know that this is not allowed by the RestFul spe...
72,950,280
Is any possible for the report in pytest-html to be generate only when 1 test is fail?<p>I got some tests to be executed and I want the report to be generated only if 1 of the tests are fail, right now I use this command:</p> <pre><code>pytest -v -s --html=report.html --self-contained-html --capture=tee-sys -rx --verb...
<p>From GitHub pytest-html discussion is not possible to that, this features will be added<a href="https://i.stack.imgur.com/1txDH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1txDH.png" alt="enter image description here" /></a> in the 4.x version</p> <p><a href="https://github.com/pytest-dev/pyte...
Is any possible for the report in pytest-html to be generate only when 1 test is fail?
python|pytest|pytest-html-reporter
0
78
1
73,023,808
73,023,808
0
true
2022-07-12T09:46:57.323Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Is any possible for the report in pytest-html to be generate only when 1 test is fail?<p>I got some tests to be executed and I want the report to be generate...
72,811,576
How to import data from CSV file to MySql table only for selected columns and CSV has both values enclosed with " " and not enclosed with " "<p>I have tried using this commands</p> <pre><code>LOAD DATA LOCAL INFILE '/home/cs/Documents/abc.csv' INTO TABLE whatsappmessages FIELDS TERMINATED BY ',' IGNORE 1 ROWS (nu...
<p>try this</p> <pre><code> LOAD DATA LOCAL INFILE '/home/cs/Documents/abc.csv' INTO TABLE whatsappmessages FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '&quot;' LINES TERMINATED BY '\r\n' IGNORE 1 ROWS (number, message) set createdtime = now(); </code></pre>
How to import data from CSV file to MySql table only for selected columns and CSV has both values enclosed with " " and not enclosed with " "
mysql|database|csv
2
78
1
72,823,828
72,823,828
0
true
2022-06-30T07:05:46.123Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to import data from CSV file to MySql table only for selected columns and CSV has both values enclosed with " " and not enclosed with " "<p>I have tried ...
72,357,495
How to Convert int to byte array and byte array to Int again? (Edit)<p>I am Sending 68bytes of data using UDP Protocol.</p> <p>68bytes of data consist of 4byte of int and random 64byte of byte array. <code>uint seq</code> starts with <code>zero</code> and it will increase if client send datagram to server once at a tim...
<p>If Client sends data and sleep for 10ms, Dequeue Thread should not sleep more than 10ms. It should be more faster than sender.</p> <p>For example, If you send data per 5ms, transaction per second will be 200 data. Then your Dequeue Thread should not sleep. Even 1 ms sleep will cause error.</p> <p>Debug.Write will ca...
How to Convert int to byte array and byte array to Int again? (Edit)
c#|bitconverter
1
78
1
72,686,043
72,686,043
0
true
2022-05-24T05:14:09.117Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to Convert int to byte array and byte array to Int again? (Edit)<p>I am Sending 68bytes of data using UDP Protocol.</p> <p>68bytes of data consist of 4by...
72,866,351
Connect to RDS using IAM result password error<p>Hello i have create an RDS on AWS, and created a policy with this permission based on <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.IAMPolicy.html" rel="nofollow noreferrer">this link</a></p> <pre><code>{ &quot;Version&quot;: &...
<p>First all i had a bug - i used the db name instead DBI resource ID</p> <p><strong>This is the expected format:</strong></p> <pre><code>arn:aws:rds-db:region:account-id:dbuser:DbiResourceId/db-user-name </code></pre> <p>and here is the code</p> <pre><code>data &quot;aws_iam_policy_document&quot; &quot;p...
Connect to RDS using IAM result password error
java|postgresql|amazon-web-services|identity-management|aws-iam-policy
0
78
1
72,934,269
72,934,269
0
true
2022-07-05T08:35:06.483Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Connect to RDS using IAM result password error<p>Hello i have create an RDS on AWS, and created a policy with this permission based on <a href="https://docs....
72,938,406
VB.NET browse by table with textbox<p><a href="https://i.stack.imgur.com/5zY7v.jpg" rel="nofollow noreferrer">enter image description here</a>vb.net I connected the table to textboxes of which one is a datatimepicker, each row of the table has a date each different from the other. the rows of the table have an Id date ...
<p>From your question i understand u want to select data based on date filter, so in ur code simply u add where condition for date filter.</p> <pre><code>Public Sub mostraDati(position As Integer) Dim command As New SqlCommand(&quot;Select * from [dbo].[StoricoLotto] where [DateColumn]=&quot;&amp; datetimpickerID.Text ...
VB.NET browse by table with textbox
sql-server|vb.net|visual-studio|binding|datetimepicker
-2
78
1
72,950,169
72,950,169
0
true
2022-07-11T12:12:55.187Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: VB.NET browse by table with textbox<p><a href="https://i.stack.imgur.com/5zY7v.jpg" rel="nofollow noreferrer">enter image description here</a>vb.net I connec...
72,924,003
Return Response model as a value in JSON response<p>I would like to make that my query returns something like that:</p> <pre><code>{&quot;message&quot;: &quot;OK&quot;, &quot;data&quot;: { &quot;username&quot;: &quot;string&quot;, &quot;pseudo&quot;: &quot;string&quot;, &quot;email&quot;: &quot;strin...
<p>In the header of your POST handler you are using</p> <pre class="lang-py prettyprint-override"><code>@app.post(&quot;/&quot;, response_model=_models.UserOut ...) ... </code></pre> <p>So when you try to return something that doesn't match the <code>UserOut</code> model it returns an error. Create a model that defines...
Return Response model as a value in JSON response
python|api|fastapi|uvicorn
0
78
1
72,924,041
72,924,041
0
true
2022-07-09T19:14:02.317Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Return Response model as a value in JSON response<p>I would like to make that my query returns something like that:</p> <pre><code>{&quot;message&quot;: &quo...
72,953,118
React:- useState Hook value not updating for dictionary and array<p>For Array and Dictionary useState hook is not updating it's value.</p> <p>My Method:-</p> <pre><code>const [saveresponse, setSaveResponse] = useState({}) </code></pre> <p>For to update saveresponse:-</p> <pre><code>const res={a:&quot;1&quot;,b:&quot;2&...
<p>State updates in React are batched into one asynchronous update. The motivation for this behavior is the fact that state change triggers a re-render, which is an expensive operation for React's virtual DOM. Therefore, if you set state and then immediately print it, the change still won't be reflected. Only after the...
React:- useState Hook value not updating for dictionary and array
reactjs|react-hooks
0
78
1
72,963,488
72,963,488
0
true
2022-07-12T13:28:03.803Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: React:- useState Hook value not updating for dictionary and array<p>For Array and Dictionary useState hook is not updating it's value.</p> <p>My Method:-</p>...
72,793,235
How to generate a random number in Google Sheets / Excel through a discrete list of percentage of influence in random outcome?<p>Let's say I'm randomly picking up a number 1, 2, 3, and I take notes of how many times they were picked out of 10 times I did this. After this experiment, and taking the notes of the percenta...
<p>to generate 10 numbers from fixed set (1, 2, 3) you can use:</p> <pre><code>=INDEX(ROUND(RANDARRAY(10)*(3-1))+1) </code></pre> <p>if this gives you distribution like:</p> <pre><code>1 2 1 2 1 2 3 2 3 1 </code></pre> <p>where number 3 is picked up 20% of times you can find out the distribution like:</p> <pre><code>=I...
How to generate a random number in Google Sheets / Excel through a discrete list of percentage of influence in random outcome?
excel|google-sheets|random|google-sheets-formula|percentage
1
78
1
72,793,712
72,793,712
0
true
2022-06-28T21:16:43.447Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to generate a random number in Google Sheets / Excel through a discrete list of percentage of influence in random outcome?<p>Let's say I'm randomly picki...
72,913,856
How to upload a CSV file to a new tab(sheet) in the google spreadsheet<p>I want to write a script that can automatically upload the CSV file to a google spreadsheet. And following is my code to realize it:</p> <pre><code>import csv import gspread from oauth2client.service_account import ServiceAccountCredentials scop...
<p>As you need to put the data each day on a new page, my suggestion would be for you to create a new page with the name of today's date and then add the values:</p> <pre class="lang-python prettyprint-override"><code>import gspread from oauth2client.service_account import ServiceAccountCredentials import datetime sco...
How to upload a CSV file to a new tab(sheet) in the google spreadsheet
python|google-sheets|google-sheets-api|gspread
0
78
1
72,913,953
72,913,953
0
true
2022-07-08T15:40:52.527Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to upload a CSV file to a new tab(sheet) in the google spreadsheet<p>I want to write a script that can automatically upload the CSV file to a google spre...
73,026,196
user registration validation in Flutter<p>After entering data and try to register, the data is not updating in database.</p> <pre><code> child: TextButton( onPressed: () { final form = _formKey.currentState; if (form != null &amp;&amp; !form.validate()) { save(); ...
<p>You added ! Before form.validate() which means only if it fails it will save. Remove the ! Mark before form.validate(). The code should be like this</p> <pre><code>if(form != null &amp;&amp; form.validate()) { save(); } else { print(&quot;not ok&quot;); } </code></...
user registration validation in Flutter
flutter|dart|flutter-form-builder
0
78
1
73,026,229
73,026,229
0
true
2022-07-18T17:19:23.590Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: user registration validation in Flutter<p>After entering data and try to register, the data is not updating in database.</p> <pre><code> child: TextButton( ...
72,863,068
How to send a custom variable in a flask in Flask to JS/HTML to render an image?<p>Here is my basic python code to send the variable account name over to the javascript which will render the image.</p> <pre><code>@app.route('/&lt;username&gt;', methods=['GET', 'POST']) def user_profile_name(username): # return f&qu...
<ol> <li>Sanitize the file name</li> <li>Concatenate your variable inside the string for the Jinja2 variable</li> </ol> <pre><code>account_name = secure_filename(account_name) &lt;img src=&quot;{{url_for('static', filename='#UserData/' ~ account_name ~ '/profile/profile_pic.jpg')}&quot; width='200' height='200' /&gt; ...
How to send a custom variable in a flask in Flask to JS/HTML to render an image?
javascript|python|html|css|web
0
78
1
72,863,170
72,863,170
0
true
2022-07-05T00:50:52.690Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to send a custom variable in a flask in Flask to JS/HTML to render an image?<p>Here is my basic python code to send the variable account name over to the...
72,771,723
Jest doesn't seem to understand "import type"<p>We recently updated our monorepository to:</p> <ul> <li>Nx 14.3.6</li> <li>Angular 14.0.3</li> <li>Jest 28.1.1</li> <li>TypeScript 4.7.4</li> </ul> <p>After the upgrade the compilation succeeded, but at runtime we got lots of errors like &quot;<em><strong>emitDecoratorMet...
<p>Seems to be fixed by the workaround explained here: <a href="https://github.com/thymikee/jest-preset-angular/issues/1199#issuecomment-1168802943" rel="nofollow noreferrer">https://github.com/thymikee/jest-preset-angular/issues/1199#issuecomment-1168802943</a></p> <p>So in tsconfig.spec.json configure the &quot;inclu...
Jest doesn't seem to understand "import type"
angular|typescript|jestjs|type-only-import-export
3
78
1
72,788,471
72,788,471
0
true
2022-06-27T11:59:44.913Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Jest doesn't seem to understand "import type"<p>We recently updated our monorepository to:</p> <ul> <li>Nx 14.3.6</li> <li>Angular 14.0.3</li> <li>Jest 28.1....
72,916,913
Bundle R with a python exe application (using Pyinstaller)<p>I'm working on a python application using Eel framework and I'm using the python subprocess library to execute an R script. It works completely fine on my computer, but not in any other computer since it doesn't have R installed (and obviously R will not be i...
<p>Posting my solution in case anyone falls into the same issue:</p> <p>I ended up bundling the whole R by executing this pyinstallter command: <code>python -m eel flight_checker.py web --add-data &quot;map.R;.&quot; --add-data &quot;C:\Program Files\R;.&quot; --icon=web\drone.ico --clean</code></p> <p>Notes:</p> <ol> ...
Bundle R with a python exe application (using Pyinstaller)
python|r|subprocess|pyinstaller|eel
0
78
1
72,941,644
72,941,644
0
true
2022-07-08T20:55:56.197Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Bundle R with a python exe application (using Pyinstaller)<p>I'm working on a python application using Eel framework and I'm using the python subprocess libr...
72,898,885
How to use @Autowired in SpringBoot unit test<p>I am trying to unit test (using JUnit5 jupiter) a class developed in Java with Spring Boot that I would like to use the @Autowired annotation for convenience.</p> <p>A very simplified version of it is as follow:</p> <pre class="lang-java prettyprint-override"><code>import...
<p>Usually when you use <code>@ContextConfiguration</code> (which is a significant part of the stereotype <code>@SpringJUnitConfig</code> annotation) you should specify the configuration class from which the &quot;Demo&quot; component will be resolved. Otherwise spring won't know which classes to load.</p> <p>So you sh...
How to use @Autowired in SpringBoot unit test
spring-boot|unit-testing|spring-boot-test
0
78
1
72,899,182
72,899,182
0
true
2022-07-07T13:40:27.503Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to use @Autowired in SpringBoot unit test<p>I am trying to unit test (using JUnit5 jupiter) a class developed in Java with Spring Boot that I would like ...
72,836,030
Entity Framework Core using existing models and database , upgrading from .Net 4.8<p>I have upgraded a .NET Framework 4.8 site to .NET 6.0 using the migration assistant and a bunch of manual changes to fix stuff. I found that using Add-Migration doesn't work anymore. The migration assistant left the project using the p...
<p>Here are the relevant bits from the link Ivan provided.</p> <p>Microsoft refers to this as squashing the migrations if you are trying to retain the existing data. They list the steps as:</p> <ol> <li>Delete your Migrations folder</li> <li>Create a new migration and generate a SQL script for it</li> <li>In your datab...
Entity Framework Core using existing models and database , upgrading from .Net 4.8
c#|sql-server|entity-framework-core|ef-code-first|entity-framework-migrations
2
78
1
73,085,467
73,085,467
0
true
2022-07-02T02:17:39.297Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Entity Framework Core using existing models and database , upgrading from .Net 4.8<p>I have upgraded a .NET Framework 4.8 site to .NET 6.0 using the migratio...
72,856,825
How to write Unit Tests for injected Springboot service<p>This is the my UploadClass. And it uploads a file to the S3 bucket using S3Client.</p> <pre><code> public class UploadClass{ @Override public void upload(){ ObjectMetadata metadata = new ObjectMetadata(); metadata.setContentLength(l...
<p>With given code there is no much to test - only if upload method has been called.</p> <pre><code>@SpringBootTest public class MyClassServiceTest{ @Autowired private MyClassService myService; @MockBean private UploadClass uploadClass @Test void processTest() { myService.process(); //do some assertio...
How to write Unit Tests for injected Springboot service
java|spring-boot|unit-testing|amazon-s3|mockito
0
78
1
72,864,425
72,864,425
0
true
2022-07-04T12:31:31.297Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to write Unit Tests for injected Springboot service<p>This is the my UploadClass. And it uploads a file to the S3 bucket using S3Client.</p> <pre><code> ...
72,772,940
Unity C#: Communicate with console program asynchronously<p>I'm currently trying to write a <strong>chess GUI in Unity</strong>. I have a chess engine as an exe-file which communicates via UCI (console). The program is in a very early stage and I just want to communicate with the chess engine (console application) as a...
<p>Thanks to @BugFinder to pointing out that there are events that you can attach a method to. Using your tipps and the documentation of <a href="https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.process.beginoutputreadline?view=net-6.0" rel="nofollow noreferrer">Process.BeginOutputReadLine</a> I was able ...
Unity C#: Communicate with console program asynchronously
c#|unity3d|console-application|communication
2
78
1
72,781,274
72,781,274
1
true
2022-06-27T13:29:18.520Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Unity C#: Communicate with console program asynchronously<p>I'm currently trying to write a <strong>chess GUI in Unity</strong>. I have a chess engine as an ...
72,788,640
How to pass multiline environment variable in docker-compose.yml<p>I am trying to convert this <a href="https://opensearch.org/docs/latest/clients/logstash/index/#:%7E:text=%2De%20%27input%20%7B%20stdin%20%7B%20%7D%20%7D%20output%20%7B%0A%20%20%20opensearch%20%7B%0A%20%20%20%20%20hosts%20%3D%3E%20%5B%22https%3A//opense...
<p>Since the <code>-e</code> bit comes after the image name, it's a command for the container.</p> <p>I've never done this and I'm unable to test it, but try this</p> <pre><code>version: '3' services: logstash-producer: image: opensearchproject/logstash-oss-with-opensearch-output-plugin:7.16.2 container_name...
How to pass multiline environment variable in docker-compose.yml
docker|docker-compose|yaml|logstash|opensearch
0
78
1
72,789,121
72,789,121
1
true
2022-06-28T14:48:08.313Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How to pass multiline environment variable in docker-compose.yml<p>I am trying to convert this <a href="https://opensearch.org/docs/latest/clients/logstash/i...
72,946,813
Why does the function 'CGAL::draw' draw a black triangle instead of a polygon in the latest version of CGAL?<p>I've upgraded my CGAL installation to the latest version (5.4.1) and I can't use the function <code>CGAL::draw</code> anymore - it draws a black triangle instead of everything I need. It's not a problem in my ...
<p>I'm answering my own question.</p> <p>The issue here is that starting from the version 5.3 the CGAL library Qt5-based visualization subsystem doesn't support old graphics hardware - at least on Linux machines (no idea about Windows or Mac worlds).</p> <p>It looks like the OpenGL implementation on Linux (called Mesa)...
Why does the function 'CGAL::draw' draw a black triangle instead of a polygon in the latest version of CGAL?
c++|qt5|visualization|cgal
0
78
1
73,368,811
73,368,811
0
true
2022-07-12T03:46:40.777Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Why does the function 'CGAL::draw' draw a black triangle instead of a polygon in the latest version of CGAL?<p>I've upgraded my CGAL installation to the late...
72,941,800
Generic service with multiple values in Angular<p>Have multiple services, that provide very similar functionality but with some differences:</p> <ul> <li><code>event-type1</code>, (event-type2 for second service etc.)</li> <li><code>MODEL_A</code>, (MODEL_B for second service etc.),</li> <li><code>URL_PART_A</code>, (U...
<p>There's no just injecting a generic service directly that returns a different instance based on the generic parameter. So here are a couple of choices - use injection service <strike>or create your own service provider</strike>. <em>(After writing a custom service provider answer, the injection tokens just seem so...
Generic service with multiple values in Angular
angular|typescript|angular-services
0
78
1
73,450,807
73,450,807
1
true
2022-07-11T16:33:18.457Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Generic service with multiple values in Angular<p>Have multiple services, that provide very similar functionality but with some differences:</p> <ul> <li><co...
72,948,466
Google Play reject my wear os companion app with crashed when launch on phone<p>Can anyone help me clarify what does &quot;Your application crashed when launch on phone&quot; means for a wear os companion app? I tested my wear os app on API 28 and API 30, everything works fine. It is just an incremental update, but it ...
<p>To post an update on this issue, long story short. For my android app with wear os companion, It was my android apps' problem with the release build using <code>minification</code> and <code>shrinkResources</code> with <code>proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'<...
Google Play reject my wear os companion app with crashed when launch on phone
android|google-play|wear-os|android-wear-2.0|android-wear-3.0
1
78
2
73,332,049
73,332,049
1
true
2022-07-12T07:22:23.787Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Google Play reject my wear os companion app with crashed when launch on phone<p>Can anyone help me clarify what does &quot;Your application crashed when laun...
72,250,636
Converting a spesific audio sream and copy the rest<p>Is it possible to convert <strong>one</strong> of the audio tracks in a video file to a different format while copying/remuxing the other audio tracks in the file with FFmpeg?</p> <p>More specifically, is it possible to do this without explicitly specify all the aud...
<p>Try:</p> <pre><code>ffmpeg -i INPUT -map 0 -c copy -c:a:2 libfdk_aac OUTPUT.mkv </code></pre> <ul> <li><code>-map 0</code> to map all streams (video/audio/subtitle/etc.) of the input #0</li> <li><code>-c copy</code> sets default operation to be copy</li> <li><code>-c:a:2</code> customizes the 3rd output audio stream...
Converting a spesific audio sream and copy the rest
ffmpeg
-1
78
1
72,250,746
72,250,746
0
true
2022-05-15T17:30:55.937Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Converting a spesific audio sream and copy the rest<p>Is it possible to convert <strong>one</strong> of the audio tracks in a video file to a different forma...
72,251,924
how to initiate angular project with standalone component<p>now that angular has released standalone components, can I initiate angular with only standalone component and remove <code>NgModule</code> all-together?</p>
<p>yes you can using the new introduced <code>bootstrapApplication</code> which is imported from <code>@angular/platform-browser</code> in the <code>main.ts</code> file</p> <p>here is the full code</p> <pre><code>import { enableProdMode } from '@angular/core'; import { bootstrapApplication } from '@angular/platform-bro...
how to initiate angular project with standalone component
angular|components
-1
78
1
72,251,925
72,251,925
0
true
2022-05-15T20:24:12.123Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: how to initiate angular project with standalone component<p>now that angular has released standalone components, can I initiate angular with only standalone ...
72,276,748
Matplotlib FuncAnimation only shows one frame<p>I am trying to do an animation using the <code>FuncAnimation</code> module but my code only produces one frame. It looks like that it update the right thing (<code>k</code>) and it go on with the animation for the right amount of frames, but every frame shows the first im...
<p>Since you didn't provide a reproducible example, I'm going to generate random data, and you will adapt it to your case.</p> <pre><code>import numpy as np import matplotlib.pyplot as plt from matplotlib.animation import FuncAnimation x = np.arange(-0.5, 10, 1) y = np.arange(4.5, 11, 1) fig, ax = plt.subplots() ax....
Matplotlib FuncAnimation only shows one frame
python|matplotlib|animation
-1
78
1
72,276,979
72,276,979
0
true
2022-05-17T15:25:55.423Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Matplotlib FuncAnimation only shows one frame<p>I am trying to do an animation using the <code>FuncAnimation</code> module but my code only produces one fram...
72,261,366
Access mesh imported with gmsh<p>I think I have a very common problem. Can you help me out? I want to examine a 3D-mesh with python. I want to use trimesh in order to examine the mesh but the mesh comes with the .STEP Format. I use gmsh to load the mesh but I have no idea how I can access the mesh I have or how I can c...
<p>I found I what I have to do :D</p> <pre><code>x = trimesh.Trimesh(**trimesh.interfaces.gmsh.load_gmsh(&quot;C:/Users/....STEP&quot;) </code></pre> <p>This allows me to use use the gmsh loading abilities while examining the object with trimesh. I'll post my source once I found it again.</p>
Access mesh imported with gmsh
trimesh|gmsh
0
78
1
72,285,453
72,285,453
0
true
2022-05-16T15:02:55.577Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Access mesh imported with gmsh<p>I think I have a very common problem. Can you help me out? I want to examine a 3D-mesh with python. I want to use trimesh in...
72,290,500
Mapping between Azure AD and Snowflake roles<p>I have seen a similar <a href="https://stackoverflow.com/questions/71922653/authorization-mapping-a-azure-ad-group-to-a-snowflake-role">post here</a> but it doesn't answer my question. I have a long Azure AD group names and would like to map them to shorter role names in S...
<p>That's correct. The Azure AD group name will become the name of the role within Snowflake.</p> <p>More details: <a href="https://docs.microsoft.com/en-us/azure/active-directory/saas-apps/snowflake-provisioning-tutorial" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/azure/active-directory/saas-apps/snowf...
Mapping between Azure AD and Snowflake roles
snowflake-cloud-data-platform
0
78
1
72,291,776
72,291,776
0
true
2022-05-18T13:52:52.097Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Mapping between Azure AD and Snowflake roles<p>I have seen a similar <a href="https://stackoverflow.com/questions/71922653/authorization-mapping-a-azure-ad-g...
72,288,395
Realm: property declared as origin of linking objects property does not exist<p>I'm using Realm Swift for the following code:</p> <pre class="lang-swift prettyprint-override"><code>class Item: Object { @Persisted(primaryKey: true) var name = &quot;&quot; @Persisted(originProperty: &quot;items&quot;) var collect...
<p>This</p> <pre><code>let items = List&lt;Item&gt;() </code></pre> <p>Needs to be this</p> <pre><code>@Persisted var items = List&lt;Item&gt;() </code></pre> <p>or</p> <pre><code>@Persisted var items: List&lt;Item&gt; </code></pre> <p>depending on the use case.</p> <p>The <code>let</code> syntax is how we used to do i...
Realm: property declared as origin of linking objects property does not exist
ios|swift|realm
1
78
1
72,295,645
72,295,645
0
true
2022-05-18T11:31:18.477Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Realm: property declared as origin of linking objects property does not exist<p>I'm using Realm Swift for the following code:</p> <pre class="lang-swift pret...
72,294,523
Lua sample-fetch 'routeIP': runtime error: /etc/haproxy/route_req.lua:3: attempt to call a nil value (method 'fhdr') from /etc/haproxy/route_req.lua<p>I was trying to print my 'X-forwarded-for' header using LUA script in HAProxy. But I am getting error</p> <p><strong>/var/log/haproxy.log</strong></p> <pre><code>May 18 ...
<p>That error means that <code>txn.f</code> doesn't contain a method called <code>fhdr</code>. Maybe you meant <code>req_fhdr</code> instead.</p>
Lua sample-fetch 'routeIP': runtime error: /etc/haproxy/route_req.lua:3: attempt to call a nil value (method 'fhdr') from /etc/haproxy/route_req.lua
lua|haproxy|distributed-system|system-design|x-forwarded-for
0
78
1
72,296,542
72,296,542
0
true
2022-05-18T18:49:10.493Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Lua sample-fetch 'routeIP': runtime error: /etc/haproxy/route_req.lua:3: attempt to call a nil value (method 'fhdr') from /etc/haproxy/route_req.lua<p>I was ...
72,321,376
SQL : how to check if all entries of a table are in another table<p>I am trying to make a program where users enter what ingredients they have in their home, and the system gives recipes that they can make with using only those ingredients.</p> <p>Table of ingredients that are needed to make recipes. 'recipe_ingredient...
<pre><code>SELECT recipe_id, name FROM recipe WHERE recipe_id NOT IN ( SELECT recipe_id FROM recipe_ingredients ri LEFT JOIN home_ing h ON h.home_ing_name = ri.ingredient_name WHERE home_ing_name IS NULL) </code></pre> <p>This SQL is listing all recipes without (<code>NOT IN</code>) unmatching ingred...
SQL : how to check if all entries of a table are in another table
sql|sql-server|database
-1
78
3
72,323,436
72,323,436
0
true
2022-05-20T15:24:59.057Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: SQL : how to check if all entries of a table are in another table<p>I am trying to make a program where users enter what ingredients they have in their home,...
72,318,923
Pandas/Openpyxl - Save Current Date into xlsx Filename<p>Trying to save an xlsx file and include the current date in the file name during the process. Currently, I'm using the below code but I receive the error <code>invalid format string</code> - uncertain what format I can use to accomplish this.</p> <p>I saw this me...
<p>The error is in the <code>save</code> command where you have an extra <code>%</code> in the end. Also, just <code>now</code> is not sufficient, it needs the <code>()</code>. For the code above, think it also needs the <code>datetime.</code> to be added. So, change the last line from....</p> <pre><code>wb1.save('file...
Pandas/Openpyxl - Save Current Date into xlsx Filename
pandas|openpyxl|python-3.10
0
78
1
72,327,536
72,327,536
0
true
2022-05-20T12:26:21.740Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Pandas/Openpyxl - Save Current Date into xlsx Filename<p>Trying to save an xlsx file and include the current date in the file name during the process. Curren...
72,335,680
How do i make my Inkwell onhover work on my menu items?<p>I am trying to create an onHover effect on my navigation menu, my approach was to create boolean list as long as my navigation menu items and with initial false values, then when a menu item is hovered change the color, my problem is the value parameter from the...
<p>Are you sure you don't have the <code>hover</code> variable inside build method? Make sure it is correct state variable of StatefulWidget. I would also recommend removing the <code>final</code> annotation since you want to change it on hover. Also you can simplify your code like this:</p> <pre><code>setState(() { ...
How do i make my Inkwell onhover work on my menu items?
flutter|dart
0
78
1
72,341,888
72,341,888
0
true
2022-05-22T07:40:39.567Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How do i make my Inkwell onhover work on my menu items?<p>I am trying to create an onHover effect on my navigation menu, my approach was to create boolean li...
72,328,089
PHP semaphore (in same browser)<p>If I want prevent multiple execution of a code <strong>in same browser</strong>, why PHP semaphore not working in same browser or another browser tab?</p> <p><a href="https://www.php.net/manual/en/intro.sem.php" rel="nofollow noreferrer">https://www.php.net/manual/en/intro.sem.php</a><...
<p>I don't understand why but it is caused by the Chrome browser cache, the response from the server does not contain any cache headers, when I disable browser cache, it works like expected</p>
PHP semaphore (in same browser)
php|semaphore
0
78
1
72,345,565
72,345,565
0
true
2022-05-21T08:58:14.860Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: PHP semaphore (in same browser)<p>If I want prevent multiple execution of a code <strong>in same browser</strong>, why PHP semaphore not working in same brow...
72,366,806
Python annotations for decorated async functions<p>I have difficulties with annotations for my coroutines which are decorated to prevent aiohttp errors. There are my two functions:</p> <pre><code>from typing import Callable, Awaitable, Optional from os import sep import aiofiles import aiohttp from asyncio.exceptions i...
<p>I would suggest using <code>TypeVar</code> as <code>Awaitable</code> type parameter to stop losing information about decorated function: in your example result of call to <code>download</code> would be of type <code>Any</code>. Also using <code>ParamSpec</code> will help preserve arguments. Finally, something like t...
Python annotations for decorated async functions
python-3.x|asynchronous|python-decorators|aiohttp|python-typing
0
78
1
72,367,942
72,367,942
0
true
2022-05-24T17:04:37.797Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Python annotations for decorated async functions<p>I have difficulties with annotations for my coroutines which are decorated to prevent aiohttp errors. Ther...
72,313,656
Perfect hash function for integer sequence<p>Given a set of integers (sequence) 1…999_999 (for example) I need to map each individual integer to another integer in the same set 1:1 randomly (distribution depends on seed). Hash function must be scalable to large sets, so shuffling and storing all values in the memory is...
<p>It's not possible to do this without any kind of memory usage.</p> <p>If you're happy for number collisions to happen, it is possible, but otherwise, you can't really have it be random and stateless.</p> <p>What you can do though, is shuffle a list of all indices randomly. That would be only 4 or 8 bytes per list el...
Perfect hash function for integer sequence
hash|hash-function
0
78
1
72,371,380
72,371,380
0
true
2022-05-20T04:41:39.670Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Perfect hash function for integer sequence<p>Given a set of integers (sequence) 1…999_999 (for example) I need to map each individual integer to another inte...
72,377,340
MongoDb compass complex filter<p>I have a collection in mongo. Sample single entry</p> <pre><code>{ &quot;_id&quot;: { &quot;$oid&quot;: &quot;6278dc35b07e447b14feef57&quot; }, &quot;formId&quot;: &quot;6278d9f7b07e447b14feef54&quot;, &quot;formData&quot;: { &quot;0&quot;: { ...
<p>With the current document structure, it is only possible, if the value San Salvador, is always present at index 3.</p> <p>In that case, the following query should work:</p> <pre><code>db.collection.find({ formId: &quot;6278d9f7b07e447b14feef54&quot;, &quot;formData.3.value&quot;: &quot;San Salvador&quot; }) </co...
MongoDb compass complex filter
mongodb|mongodb-query
-1
78
1
72,378,435
72,378,435
0
true
2022-05-25T12:05:47.307Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: MongoDb compass complex filter<p>I have a collection in mongo. Sample single entry</p> <pre><code>{ &quot;_id&quot;: { &quot;$oid&quot;: &quot;62...
72,383,885
WhatsApp API Call Rails<p>I'd like to execute the following call in rails:</p> <pre class="lang-rb prettyprint-override"><code> curl -i -X POST \ https://graph.facebook.com/v12.0/FROM_PHONE_NUMBER_ID/messages \ -H 'Authorization: Bearer ACCESS_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ &quot;messaging...
<p>You can look at the <a href="https://github.com/jnunemaker/httparty" rel="nofollow noreferrer">HTTParty gem</a>, which helps make API-call easier.</p>
WhatsApp API Call Rails
ruby-on-rails|api
0
78
1
72,388,633
72,388,633
0
true
2022-05-25T20:37:12.360Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: WhatsApp API Call Rails<p>I'd like to execute the following call in rails:</p> <pre class="lang-rb prettyprint-override"><code> curl -i -X POST \ https://g...
72,391,902
Find all possible mongodb combinations of two fields<p>I have in database the next array of objects</p> <pre><code>[ { price: &quot;1&quot; type: &quot;buy&quot;, }, { price: &quot;2&quot; type: &quot;buy&quot;, }, { price: &quot;3&quot; type: &quot;sell&quot; }, { price...
<p>Query</p> <ul> <li>self-lookup and match if not same id (avoid same item on pair)</li> <li>map to add to the join result the parent item (the pair will always have as first member the one with the biggest price (needed for later))</li> <li>unwind pairs</li> <li>group pairs to remove the duplicates (each pair will ap...
Find all possible mongodb combinations of two fields
javascript|arrays|mongodb|mongoose|mongodb-query
0
78
1
72,395,388
72,395,388
0
true
2022-05-26T12:35:12.967Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Find all possible mongodb combinations of two fields<p>I have in database the next array of objects</p> <pre><code>[ { price: &quot;1&quot; type:...
72,397,590
How can I overcome PyTorch Tensor plotting problem?<p>I am a new PyTorch user and here is the code I am playing with.</p> <pre><code>epochs=20 # train for this number of epochs losses=[] #to keep track on losses for i in range(epochs): i+=1 #counter y_pred=model(cat_train,con_train) loss=torch.sqrt(c...
<p>You can use <a href="https://pytorch.org/docs/stable/generated/torch.Tensor.item.html" rel="nofollow noreferrer"><code>torch.Tensor.item</code></a>.</p> <p>So, replace the statement</p> <pre><code>losses.append(loss) </code></pre> <p>with</p> <pre><code>losses.append(loss.item()) </code></pre>
How can I overcome PyTorch Tensor plotting problem?
python|pytorch|torch
1
78
1
72,397,887
72,397,887
0
true
2022-05-26T20:17:05.003Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: How can I overcome PyTorch Tensor plotting problem?<p>I am a new PyTorch user and here is the code I am playing with.</p> <pre><code>epochs=20 # train for t...
72,288,784
Globally change the value of any string in Angular/Typescript<p>I'm looking for a solution to change the value of all strings in my application similar to an internationalization/localization.</p> <p>My strings follow a specific pattern like this:</p> <pre><code>let sample = &quot;[someID]&quot; </code></pre> <p>Then i...
<p>Have you considered using a BehaviourSubject in a service? That way you could cast the updated value to all the application via a .next('newValue')</p> <p>myService.ts:</p> <pre><code>globalSample:BehaviourSubject = new BehaviourSubject&lt;string&gt;('default') globalSample$ = globalSample.asObservable(); updateSam...
Globally change the value of any string in Angular/Typescript
javascript|html|angular|typescript|string
0
78
1
72,419,227
72,419,227
0
true
2022-05-18T11:57:59.017Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Globally change the value of any string in Angular/Typescript<p>I'm looking for a solution to change the value of all strings in my application similar to an...
72,378,888
System.ObjectDisposedException while sending email using smtpclient (fluent-email)<p>I am getting a <code>System.ObjectDisposedException</code> when i try to send an e-mail in a .NET core 6.0 project using the fluent-email library:</p> <pre><code>System.ObjectDisposedException: Cannot access a disposed object. Object n...
<p>The extensions provided by fluent-email did inject these classes as singleton and I did use another lifetime and therefore this issue occured.</p> <p>So I forgot to also override the dependency injection container configuration for all dependencies using the <code>System.ObjectDisposedException</code> to use singlet...
System.ObjectDisposedException while sending email using smtpclient (fluent-email)
c#|.net-core|smtpclient
-1
78
1
72,598,456
72,598,456
0
true
2022-05-25T13:49:54.587Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: System.ObjectDisposedException while sending email using smtpclient (fluent-email)<p>I am getting a <code>System.ObjectDisposedException</code> when i try to...
72,374,353
Loss not decreasing with Longformer and Custom Classification Head<p>I am trying to use Longformer to build a classification model for a task with 9 classes. I am downloading the model from Huggingface and putting my own Tensorflow head on top. However, the loss is not decreasing past a certain point. I have tried Hugg...
<p>Solved this with a tiny learning rate (1.25e-06) and the introduction of warm up steps to the optimizer!</p>
Loss not decreasing with Longformer and Custom Classification Head
python|tensorflow|classification
1
78
1
72,614,069
72,614,069
0
true
2022-05-25T08:33:24.767Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Loss not decreasing with Longformer and Custom Classification Head<p>I am trying to use Longformer to build a classification model for a task with 9 classes....
72,311,019
Storing Uint8List into SQL Server<p>I'm using Flutter and I'm Working on a functionality of getting a list of pictures from gallery and converting them to <code>List&lt;Uint8List&gt;</code> to store them in SQL Server Database.</p> <p>I have a problem with the right data type to store each <code>Uint8List</code> data. ...
<p>SQL Server does not have a data type that maps directly to a list, so the correct choice probably depends on how you intend to work with the list values.</p> <p>Some options:</p> <ol> <li>Create a new table and store each list value in a separate row along with the key value that relates it back to the main table. T...
Storing Uint8List into SQL Server
sql-server|flutter|uint8list
0
78
1
72,312,409
72,312,409
0
true
2022-05-19T21:01:32.447Z
Please answer the following Stackoverflow question on Programming. Answer it like you are a developer answering Stackoverflow questions. Stackoverflow question: Storing Uint8List into SQL Server<p>I'm using Flutter and I'm Working on a functionality of getting a list of pictures from gallery and converting them to <c...